|
@@ 1014-1027 (lines=14) @@
|
| 1011 |
|
return $data; |
| 1012 |
|
} |
| 1013 |
|
|
| 1014 |
|
function getNextItem($orgId, $itemId, $profileId) { |
| 1015 |
|
$item = getItemById($orgId, $itemId); |
| 1016 |
|
|
| 1017 |
|
if ($item === false) { |
| 1018 |
|
return false; |
| 1019 |
|
} |
| 1020 |
|
|
| 1021 |
|
return ORM::for_table('event_profile_delivery_item')-> |
| 1022 |
|
where('event_id', $item['event_id'])-> |
| 1023 |
|
where('profile_id', $profileId)-> |
| 1024 |
|
where_gt('order_nr', $item['order_nr'])-> |
| 1025 |
|
order_by_asc('order_nr')-> |
| 1026 |
|
find_one(); |
| 1027 |
|
} |
| 1028 |
|
|
| 1029 |
|
function getPreviousItem($orgId, $itemId, $profileId) { |
| 1030 |
|
$item = getItemById($orgId, $itemId); |
|
@@ 1029-1042 (lines=14) @@
|
| 1026 |
|
find_one(); |
| 1027 |
|
} |
| 1028 |
|
|
| 1029 |
|
function getPreviousItem($orgId, $itemId, $profileId) { |
| 1030 |
|
$item = getItemById($orgId, $itemId); |
| 1031 |
|
|
| 1032 |
|
if ($item === false) { |
| 1033 |
|
return false; |
| 1034 |
|
} |
| 1035 |
|
|
| 1036 |
|
return ORM::for_table('event_profile_delivery_item')-> |
| 1037 |
|
where('event_id', $item['event_id'])-> |
| 1038 |
|
where('profile_id', $profileId)-> |
| 1039 |
|
where_lt('order_nr', $item['order_nr'])-> |
| 1040 |
|
order_by_desc('order_nr')-> |
| 1041 |
|
find_one(); |
| 1042 |
|
} |
| 1043 |
|
|
| 1044 |
|
function getLastItemOrderNr($eventId, $profileId) { |
| 1045 |
|
$data = ORM::for_table('event_profile_delivery_item')-> |