Keeping track of your details
Some hints
- If you edit something, it is only saved once you click/tap anywhere else in the screen. Check it afterwards, by looking at “Last change to your data” or by refreshing the page.
- If you close the tab or screen immediately, the changes will not be saved.
- You can change your status and pick-up location below. You can always put your subscription on pause by changing your status to PAUSE, and activate it again by changing your status to ACTIVE. Make sure you change this by Sunday at 8pm at the latest for the following Wednesday!
- You will also see your order under “We are buying for you” after Sunday evening 20:00. Sunday evening 20:00 remains the deadline.
Your details
// PUBLIEK TOEGANKELIJKE PAGINA (Met pid code in url)
require_once('multilang.php');
$lang = get_current_language();
// Check against the private_id of the participant.
if (isset($_GET["pid"])) {
lt_setvar('varpid', $_GET["pid"]);
};
$controle = lt_query_single("SELECT ospos_people.private_id FROM ospos_people JOIN ospos_customers ON ospos_people.person_id = ospos_customers.person_id WHERE ospos_customers.deleted = '0' AND ospos_people.private_id = :varpid ");
if( !$controle) {
// The personal ID was not found in the database -> report.
$langurl_asklink_slug = $lang == 'nl' ? 'link-opvragen' : 'en/lost-personal-link';
$lang602_asklink_caption = $lang == 'nl' ? 'hier' : 'here';
$asklink_url = construct_link(get_home_url(), $langurl_asklink_slug, $lang602_asklink_caption);
$lang603_msg_wrong_id = $lang == 'nl' ? "Je persoonlijke link is niet juist. Je kunt $asklink_url je persoonlijke link opvragen." : "Your personal link is not correct. You can request your personal link $asklink_url.";
print "" . $lang603_msg_wrong_id . "
" . $lang603_msg_wrong_id . "";
}
else {
// == Section: personal data.
$lang01_title = $lang == 'nl' ? 'Persoonlijke gegevens' : 'Personal details';
$lang02_first_name = $lang == 'nl' ? 'Voornaam' : 'First name';
$lang03_last_name = $lang == 'nl' ? 'Achternaam' : 'Last name';
$lang04_email = $lang == 'nl' ? 'E-mail' : 'Email';
$lang05_postcode = $lang == 'nl' ? 'Postcode' : 'Postal code';
$lang06_postcode_errmsg = $lang == 'nl' ? 'Voer een geldige postcode in regio Den Haag in (4 cijfers beginnend met 2, 2 letters).' : 'Please enter a postcode in the area of The Hague (4 digits starting with 2, 2 letters).';
lt_table('lekkernassuh_gebruikers', $lang01_title,
"SELECT person_id,
first_name AS '$lang02_first_name',
last_name AS '$lang03_last_name',
email AS '$lang04_email',
zip AS '$lang05_postcode'
FROM ospos_people
WHERE ospos_people.private_id= :varpid
",
[
'edit' => [
1 => ['target' => 'ospos_people.first_name', 'required' => true],
2 => ['target' => 'ospos_people.last_name', 'required' => true],
3 => ['target' => 'ospos_people.email', 'type' => 'email'],
4 => ['target' => 'ospos_people.zip', 'required' => [ 'regex' => ' *2[0-9]{3} *[A-Za-z]{2} *', 'message' => $lang06_postcode_errmsg ] ]
],
'format' => 'HC
HC
HC
HC
',
'trigger' => 'lekkernassuh_actief',
]
);
# print 'Straat en huisnummer alleen invullen als je thuisbezorging kiest. + € 2,-. Lees deze pagina over thuisbezorging goed door. Wil je thuisbezorging, zet dan je afhaallocatie op Thuisbezorging.
Let op: thuisbezorging uitsluitend in Den Haag.';
// == Section: status, quantity and location.
$lang201_title = $lang == 'nl' ? 'Mijn wensen: status, aantallen en ophaallocatie (klik om te wijzigen!)' : 'My wishes: status, amounts and pick-up location (click to change!)';
$lang202_status = $lang == 'nl' ? 'Je status (klik om aan te passen)' : 'Your status (click to change)';
$lang203_aantal_groente = $lang == 'nl' ? 'Aantal GROENTE-pakketten' : 'Number of VEGETABLE packets';
$lang204_aantal_fruit = $lang == 'nl' ? 'Aantal FRUIT-pakketten' : 'Number of FRUIT packets';
// // Pause fruit packages summer 2025:
// $lang204_aantal_fruit = $lang == 'nl' ? '(Fruitpakketten pas weer op wo 20 aug!)' : '(FRUIT packets restarting only Wed Aug 20!)';
// $lang204b1_QtyStopPt1 = $lang == 'nl' ? '(...' : '(...';
// $lang204b2_QtyStopPt2 = $lang == 'nl' ? ' maar: zomerstop!...)' : ' but: summer stop!...)';
$lang205_locatie = $lang == 'nl' ? 'Afhaallocatie' : 'Pick-up location';
$lang206_last_change = $lang == 'nl' ? 'Laatste wijziging in je gegevens' : 'Last change of your data';
$status_active_id = 1; // dbase: 0 = pauze, 1 = actief
lt_table('locatie_en_aantal_pakketten', $lang201_title,
"SELECT ospos_people.person_id,
ospos_lekkernassuh_active_passive.description AS '$lang202_status',
IF (ospos_people.active = $status_active_id, tq_groente.quantity_description, '(...pauze...)') AS '$lang203_aantal_groente',
IF (ospos_people.active = $status_active_id, tq_fruit.quantity_description, '(...pauze...)') AS '$lang204_aantal_fruit',
-- -- Pause fruit packages summer 2025:
-- IF (ospos_people.active = $status_active_id, CONCAT('$lang204b1_QtyStopPt1', FORMAT(tq_fruit.quantity, 0), '$lang204b2_QtyStopPt2'), '(...pauze...)') AS '$lang204_aantal_fruit',
ospos_stock_locations.location_name AS '$lang205_locatie',
ospos_people.update_date AS '$lang206_last_change'
FROM ospos_people
JOIN ospos_stock_locations
ON ospos_people.location_id = ospos_stock_locations.location_id
JOIN ospos_lekkernassuh_quantity_options AS tq_groente
ON tq_groente.quantity = ospos_people.quantity_id
JOIN ospos_lekkernassuh_quantity_options AS tq_fruit
ON tq_fruit.quantity = ospos_people.q_fruit
JOIN ospos_lekkernassuh_active_passive ON ospos_lekkernassuh_active_passive.id = ospos_people.active
WHERE ospos_people.private_id = :varpid
",
[
'edit' => [
'1' => [ 'target' => 'ospos_people.active', 'required' => true, 'query' => 'SELECT id, description FROM ospos_lekkernassuh_active_passive ORDER BY description ASC' ],
'show' => 'always',
'2' => [ 'target' => 'ospos_people.quantity_id', 'required' => true, 'query' => 'SELECT ospos_lekkernassuh_quantity_options.quantity, ospos_lekkernassuh_quantity_options.quantity_description FROM ospos_lekkernassuh_quantity_options WHERE ospos_lekkernassuh_quantity_options.show_option = "1" ORDER BY ospos_lekkernassuh_quantity_options.quantity ASC' ],
'3' => [ 'target' => 'ospos_people.q_fruit', 'required' => true, 'query' => 'SELECT ospos_lekkernassuh_quantity_options.quantity, ospos_lekkernassuh_quantity_options.quantity_description FROM ospos_lekkernassuh_quantity_options WHERE ospos_lekkernassuh_quantity_options.show_option = "1" ORDER BY ospos_lekkernassuh_quantity_options.quantity ASC' ],
#'4' => [ 'target' => 'ospos_people.location_id', 'required' => true, 'query' => 'SELECT location_id, location_name FROM ospos_stock_locations' ]
# Exclude markets from the dropdown list: "location_id NOT IN (2, 5)"
# - 2 (= 'Mozartlaan (NB gestopt!)') because stopped after 2024-05-15
# - 5 (= 'Koningkerk (nog niet actief)') because of confused participants [jed 20240310]
'4' => [ 'target' => 'ospos_people.location_id', 'required' => true, 'query' => 'SELECT location_id, location_name FROM ospos_stock_locations WHERE location_id NOT IN (2, 5) ' ]
],
'format' => 'HC,
HC
HC
HC
HC
',
'trigger' => 'lekkernassuh_actief'
]
);
// == Section: explanation.
// // Explain product closure fruit 2025
// $lang01b_Extra = $lang == 'nl'
// ? 'NB: Geen fruitpakketten 3 weken lang! Fruitpakketten worden NIET ingekocht voor wo 30 juli t/m wo 13 aug 2025. Zie info in de e-mail en website. Je aantal fruitpakketten wordt pas weer gebruikt op zondag 17 aug 20:00).
'
// : 'NB: No Fruit packets for 3 weeks! Fruit packets are NOT being purchased for Wed 30 july - Wed 13 aug 2025. See the info in email and website. Your qty of fruit packets will first be used again on Sunday Aug 17 8:00 pm).
';
// print($lang01b_Extra);
$lang01_explanation = $lang == 'nl'
? 'UITLEG:
Hierboven zet je je wensen: status, groente en/of fruit, afhaallocatie. De aantallen worden verborgen als je status op PAUZE staat.
Om je status aan te passen, klik op het woord (\'PAUZE\' of \'ACTIEF\').
Elke zondagavond om 20:00 uur worden je wensen gelezen. Als je dan op ACTIEF staat, worden ze reserveringen voor de woensdag erna.
Vanaf zondag 20:00 staan hieronder de reserveringen die we voor je hebben gemaakt. We verwachten dat je ze komt ophalen.
'
: 'EXPLANATION:
Above, you set your wishes: status, vegetables and/or fruit, pick-up location. The numbers are hidden if your status is PAUZE.
To change your status, click on the word (\'PAUZE\' or \'ACTIEF\').
Every Sunday evening at 20:00 (8:00 PM), your wishes are read. If you\'re on ACTIEF then, they become reservations for the following Wednesday.
After Sunday 20:00, below shows the reservations we have taken for you. We expect you to come and collect them.
';
print($lang01_explanation);
// == Section: we are purchasing.
// TODO: wish: AFTER Sunday 20:00, if zero reservations, say so, instead of the existing 'emptytabletext' saying "After Sunday...". (see notes Jed LnIssue20250921a).
// About the item_id filters like 'IN (1, 2, 523, 524, 338, 339)': 1-2 are groente; 523-524 are fruit in the live db; 338-339 are fruit in the dev db.
// Todo: add the item_id values in the test-kassa db (after the products are added).
// Todo: clean up this dirt by using the added ospos_items columns 'phys_item_id' and 'res_product_id'.
$lang401_title = $lang == 'nl' ? 'Wij kopen in voor jou:' : 'We are purchasing for you:';
$lang406_product = $lang == 'nl' ? 'PRODUCT:' : 'PRODUCT:';
$lang407_quantity = $lang == 'nl' ? 'AANTAL:' : 'QUANTITY:';
$lang403_date = $lang == 'nl' ? 'DATUM:' : 'DATE:';
$lang404_location = $lang == 'nl' ? 'AFHAALLOCATIE:' : 'PICK-UP LOCATION:';
$lang405_emptytabletext = $lang == 'nl' ? 'Na zondag 20.00 uur zal hier staan wat we voor jou hebben gereserveerd voor de woensdag erna.' : 'After Sunday 20:00 (8 pm), this will show the reservations we made for you for the following Wednesday.';
lt_table('lekkernassuh_gebruikersoverzicht_reserveringen', $lang401_title,
"SELECT ospos_lekkernassuh_reservations.id, ospos_items.name AS '$lang406_product', TRIM(ospos_lekkernassuh_reservations.quantity_reserved)+0 AS '$lang407_quantity', ospos_lekkernassuh_reservations.delivery_date AS '$lang403_date', ospos_stock_locations.location_name AS '$lang404_location'
FROM ospos_lekkernassuh_reservations
JOIN ospos_people
ON ospos_lekkernassuh_reservations.person_id = ospos_people.person_id
JOIN ospos_stock_locations
ON ospos_stock_locations.location_id = ospos_lekkernassuh_reservations.location_id
JOIN ospos_items
ON ospos_items.item_id = ospos_lekkernassuh_reservations.reservation_item_id
WHERE ospos_lekkernassuh_reservations.reservation_item_id IN (1, 523, 338)
AND ospos_lekkernassuh_reservations.delivery_date >= DATE(NOW())
AND ospos_people.private_id = :varpid
AND ospos_lekkernassuh_reservations.id NOT IN (
SELECT ospos_lekkernassuh_reservations_sold.reservation_id
FROM ospos_lekkernassuh_reservations_sold
JOIN ospos_sales_items
ON ospos_sales_items.sale_id = ospos_lekkernassuh_reservations_sold.sale_id
AND ospos_sales_items.item_id = ospos_lekkernassuh_reservations_sold.sales_item_id
AND ospos_sales_items.line = ospos_lekkernassuh_reservations_sold.sales_item_line
JOIN ospos_sales
ON ospos_lekkernassuh_reservations_sold.sale_id = ospos_sales.sale_id
JOIN ospos_people
ON ospos_sales.customer_id = ospos_people.person_id
WHERE ospos_lekkernassuh_reservations_sold.sales_item_id IN (1, 2, 523, 524, 338, 339)
AND ospos_sales.customer_id = ospos_people.person_id
AND ospos_people.private_id = :varpid
)
ORDER BY ospos_lekkernassuh_reservations.delivery_date DESC ",
[
'emptytabletext' => $lang405_emptytabletext
]
);
// Section: table of no-show statistics (hidden when empty).
// Issues: duplication of code; does 6 months.
$lang501_title = $lang == 'nl' ? 'Niet afgehaalde pakketten in afgelopen 6 maanden:' : 'Packets not collected in the last 6 months:';
$lang506_product = $lang == 'nl' ? 'PRODUCT:' : 'PRODUCT:';
$lang502_quantity = $lang == 'nl' ? 'AANTAL:' : 'QUANTITY:';
$lang503_date = $lang == 'nl' ? 'NIET AFGEHAALD OP:' : 'NOT COLLECTED ON:';
$lang504_location = $lang == 'nl' ? 'AFHAALLOCATIE:' : 'PICK-UP LOCATION:';
lt_table('lekkernassuh_gebruikersoverzicht_noshow', $lang501_title,
"SELECT ospos_lekkernassuh_reservations.id, ospos_items.name AS '$lang506_product', TRIM(ospos_lekkernassuh_reservations.quantity_reserved)+0 AS '$lang502_quantity', ospos_lekkernassuh_reservations.delivery_date AS '$lang503_date', ospos_stock_locations.location_name AS '$lang504_location'
FROM ospos_lekkernassuh_reservations
JOIN ospos_people
ON ospos_lekkernassuh_reservations.person_id = ospos_people.person_id
JOIN ospos_stock_locations
ON ospos_stock_locations.location_id = ospos_lekkernassuh_reservations.location_id
JOIN ospos_items
ON ospos_items.item_id = ospos_lekkernassuh_reservations.reservation_item_id
WHERE ospos_lekkernassuh_reservations.reservation_item_id IN
(-- Gives all item_ids of reservation_required items
SELECT t_items.item_id
FROM ospos_items t_items
JOIN ospos_items t_reserv_def ON t_reserv_def.item_id = t_items.phys_item_id
)
AND ospos_lekkernassuh_reservations.delivery_date BETWEEN SUBDATE(DATE(NOW()), INTERVAL 6 MONTH) AND SUBDATE(DATE(NOW()), INTERVAL 1 DAY)
AND ospos_people.private_id = :varpid
AND ospos_lekkernassuh_reservations.id NOT IN (
SELECT ospos_lekkernassuh_reservations_sold.reservation_id
FROM ospos_lekkernassuh_reservations_sold
JOIN ospos_sales_items
ON ospos_sales_items.sale_id = ospos_lekkernassuh_reservations_sold.sale_id
AND ospos_sales_items.item_id = ospos_lekkernassuh_reservations_sold.sales_item_id
AND ospos_sales_items.line = ospos_lekkernassuh_reservations_sold.sales_item_line
JOIN ospos_sales
ON ospos_lekkernassuh_reservations_sold.sale_id = ospos_sales.sale_id
JOIN ospos_people
ON ospos_sales.customer_id = ospos_people.person_id
WHERE ospos_lekkernassuh_reservations_sold.sales_item_id IN
(-- Gives all item_ids of reservation_required items
SELECT t_items.item_id
FROM ospos_items t_items
JOIN ospos_items t_reserv_def ON t_reserv_def.item_id = t_items.phys_item_id
)
AND ospos_sales.customer_id = ospos_people.person_id
AND ospos_people.private_id = :varpid
)
ORDER BY ospos_lekkernassuh_reservations.delivery_date DESC, ospos_items.res_product_id ASC",
[
'hidetableifempty' => true // Hint: for testing multi-language of this table section, comment-out this line.
]
);
}
Let op: thuisbezorging uitsluitend in Den Haag.'; // == Section: status, quantity and location. $lang201_title = $lang == 'nl' ? 'Mijn wensen: status, aantallen en ophaallocatie (klik om te wijzigen!)' : 'My wishes: status, amounts and pick-up location (click to change!)'; $lang202_status = $lang == 'nl' ? 'Je status (klik om aan te passen)' : 'Your status (click to change)'; $lang203_aantal_groente = $lang == 'nl' ? 'Aantal GROENTE-pakketten' : 'Number of VEGETABLE packets'; $lang204_aantal_fruit = $lang == 'nl' ? 'Aantal FRUIT-pakketten' : 'Number of FRUIT packets'; // // Pause fruit packages summer 2025: // $lang204_aantal_fruit = $lang == 'nl' ? '(Fruitpakketten pas weer op wo 20 aug!)' : '(FRUIT packets restarting only Wed Aug 20!)'; // $lang204b1_QtyStopPt1 = $lang == 'nl' ? '(...' : '(...'; // $lang204b2_QtyStopPt2 = $lang == 'nl' ? ' maar: zomerstop!...)' : ' but: summer stop!...)'; $lang205_locatie = $lang == 'nl' ? 'Afhaallocatie' : 'Pick-up location'; $lang206_last_change = $lang == 'nl' ? 'Laatste wijziging in je gegevens' : 'Last change of your data'; $status_active_id = 1; // dbase: 0 = pauze, 1 = actief lt_table('locatie_en_aantal_pakketten', $lang201_title, "SELECT ospos_people.person_id, ospos_lekkernassuh_active_passive.description AS '$lang202_status', IF (ospos_people.active = $status_active_id, tq_groente.quantity_description, '(...pauze...)') AS '$lang203_aantal_groente', IF (ospos_people.active = $status_active_id, tq_fruit.quantity_description, '(...pauze...)') AS '$lang204_aantal_fruit', -- -- Pause fruit packages summer 2025: -- IF (ospos_people.active = $status_active_id, CONCAT('$lang204b1_QtyStopPt1', FORMAT(tq_fruit.quantity, 0), '$lang204b2_QtyStopPt2'), '(...pauze...)') AS '$lang204_aantal_fruit', ospos_stock_locations.location_name AS '$lang205_locatie', ospos_people.update_date AS '$lang206_last_change' FROM ospos_people JOIN ospos_stock_locations ON ospos_people.location_id = ospos_stock_locations.location_id JOIN ospos_lekkernassuh_quantity_options AS tq_groente ON tq_groente.quantity = ospos_people.quantity_id JOIN ospos_lekkernassuh_quantity_options AS tq_fruit ON tq_fruit.quantity = ospos_people.q_fruit JOIN ospos_lekkernassuh_active_passive ON ospos_lekkernassuh_active_passive.id = ospos_people.active WHERE ospos_people.private_id = :varpid ", [ 'edit' => [ '1' => [ 'target' => 'ospos_people.active', 'required' => true, 'query' => 'SELECT id, description FROM ospos_lekkernassuh_active_passive ORDER BY description ASC' ], 'show' => 'always', '2' => [ 'target' => 'ospos_people.quantity_id', 'required' => true, 'query' => 'SELECT ospos_lekkernassuh_quantity_options.quantity, ospos_lekkernassuh_quantity_options.quantity_description FROM ospos_lekkernassuh_quantity_options WHERE ospos_lekkernassuh_quantity_options.show_option = "1" ORDER BY ospos_lekkernassuh_quantity_options.quantity ASC' ], '3' => [ 'target' => 'ospos_people.q_fruit', 'required' => true, 'query' => 'SELECT ospos_lekkernassuh_quantity_options.quantity, ospos_lekkernassuh_quantity_options.quantity_description FROM ospos_lekkernassuh_quantity_options WHERE ospos_lekkernassuh_quantity_options.show_option = "1" ORDER BY ospos_lekkernassuh_quantity_options.quantity ASC' ], #'4' => [ 'target' => 'ospos_people.location_id', 'required' => true, 'query' => 'SELECT location_id, location_name FROM ospos_stock_locations' ] # Exclude markets from the dropdown list: "location_id NOT IN (2, 5)" # - 2 (= 'Mozartlaan (NB gestopt!)') because stopped after 2024-05-15 # - 5 (= 'Koningkerk (nog niet actief)') because of confused participants [jed 20240310] '4' => [ 'target' => 'ospos_people.location_id', 'required' => true, 'query' => 'SELECT location_id, location_name FROM ospos_stock_locations WHERE location_id NOT IN (2, 5) ' ] ], 'format' => 'HC, HC HC HC HC ', 'trigger' => 'lekkernassuh_actief' ] ); // == Section: explanation. // // Explain product closure fruit 2025 // $lang01b_Extra = $lang == 'nl' // ? 'NB: Geen fruitpakketten 3 weken lang! Fruitpakketten worden NIET ingekocht voor wo 30 juli t/m wo 13 aug 2025. Zie info in de e-mail en website. Je aantal fruitpakketten wordt pas weer gebruikt op zondag 17 aug 20:00).
' // : 'NB: No Fruit packets for 3 weeks! Fruit packets are NOT being purchased for Wed 30 july - Wed 13 aug 2025. See the info in email and website. Your qty of fruit packets will first be used again on Sunday Aug 17 8:00 pm).
'; // print($lang01b_Extra); $lang01_explanation = $lang == 'nl' ? 'UITLEG:
Hierboven zet je je wensen: status, groente en/of fruit, afhaallocatie. De aantallen worden verborgen als je status op PAUZE staat.
Om je status aan te passen, klik op het woord (\'PAUZE\' of \'ACTIEF\').
Elke zondagavond om 20:00 uur worden je wensen gelezen. Als je dan op ACTIEF staat, worden ze reserveringen voor de woensdag erna.
Vanaf zondag 20:00 staan hieronder de reserveringen die we voor je hebben gemaakt. We verwachten dat je ze komt ophalen.
' : 'EXPLANATION:
Above, you set your wishes: status, vegetables and/or fruit, pick-up location. The numbers are hidden if your status is PAUZE.
To change your status, click on the word (\'PAUZE\' or \'ACTIEF\').
Every Sunday evening at 20:00 (8:00 PM), your wishes are read. If you\'re on ACTIEF then, they become reservations for the following Wednesday.
After Sunday 20:00, below shows the reservations we have taken for you. We expect you to come and collect them.
'; print($lang01_explanation); // == Section: we are purchasing. // TODO: wish: AFTER Sunday 20:00, if zero reservations, say so, instead of the existing 'emptytabletext' saying "After Sunday...". (see notes Jed LnIssue20250921a). // About the item_id filters like 'IN (1, 2, 523, 524, 338, 339)': 1-2 are groente; 523-524 are fruit in the live db; 338-339 are fruit in the dev db. // Todo: add the item_id values in the test-kassa db (after the products are added). // Todo: clean up this dirt by using the added ospos_items columns 'phys_item_id' and 'res_product_id'. $lang401_title = $lang == 'nl' ? 'Wij kopen in voor jou:' : 'We are purchasing for you:'; $lang406_product = $lang == 'nl' ? 'PRODUCT:' : 'PRODUCT:'; $lang407_quantity = $lang == 'nl' ? 'AANTAL:' : 'QUANTITY:'; $lang403_date = $lang == 'nl' ? 'DATUM:' : 'DATE:'; $lang404_location = $lang == 'nl' ? 'AFHAALLOCATIE:' : 'PICK-UP LOCATION:'; $lang405_emptytabletext = $lang == 'nl' ? 'Na zondag 20.00 uur zal hier staan wat we voor jou hebben gereserveerd voor de woensdag erna.' : 'After Sunday 20:00 (8 pm), this will show the reservations we made for you for the following Wednesday.'; lt_table('lekkernassuh_gebruikersoverzicht_reserveringen', $lang401_title, "SELECT ospos_lekkernassuh_reservations.id, ospos_items.name AS '$lang406_product', TRIM(ospos_lekkernassuh_reservations.quantity_reserved)+0 AS '$lang407_quantity', ospos_lekkernassuh_reservations.delivery_date AS '$lang403_date', ospos_stock_locations.location_name AS '$lang404_location' FROM ospos_lekkernassuh_reservations JOIN ospos_people ON ospos_lekkernassuh_reservations.person_id = ospos_people.person_id JOIN ospos_stock_locations ON ospos_stock_locations.location_id = ospos_lekkernassuh_reservations.location_id JOIN ospos_items ON ospos_items.item_id = ospos_lekkernassuh_reservations.reservation_item_id WHERE ospos_lekkernassuh_reservations.reservation_item_id IN (1, 523, 338) AND ospos_lekkernassuh_reservations.delivery_date >= DATE(NOW()) AND ospos_people.private_id = :varpid AND ospos_lekkernassuh_reservations.id NOT IN ( SELECT ospos_lekkernassuh_reservations_sold.reservation_id FROM ospos_lekkernassuh_reservations_sold JOIN ospos_sales_items ON ospos_sales_items.sale_id = ospos_lekkernassuh_reservations_sold.sale_id AND ospos_sales_items.item_id = ospos_lekkernassuh_reservations_sold.sales_item_id AND ospos_sales_items.line = ospos_lekkernassuh_reservations_sold.sales_item_line JOIN ospos_sales ON ospos_lekkernassuh_reservations_sold.sale_id = ospos_sales.sale_id JOIN ospos_people ON ospos_sales.customer_id = ospos_people.person_id WHERE ospos_lekkernassuh_reservations_sold.sales_item_id IN (1, 2, 523, 524, 338, 339) AND ospos_sales.customer_id = ospos_people.person_id AND ospos_people.private_id = :varpid ) ORDER BY ospos_lekkernassuh_reservations.delivery_date DESC ", [ 'emptytabletext' => $lang405_emptytabletext ] ); // Section: table of no-show statistics (hidden when empty). // Issues: duplication of code; does 6 months. $lang501_title = $lang == 'nl' ? 'Niet afgehaalde pakketten in afgelopen 6 maanden:' : 'Packets not collected in the last 6 months:'; $lang506_product = $lang == 'nl' ? 'PRODUCT:' : 'PRODUCT:'; $lang502_quantity = $lang == 'nl' ? 'AANTAL:' : 'QUANTITY:'; $lang503_date = $lang == 'nl' ? 'NIET AFGEHAALD OP:' : 'NOT COLLECTED ON:'; $lang504_location = $lang == 'nl' ? 'AFHAALLOCATIE:' : 'PICK-UP LOCATION:'; lt_table('lekkernassuh_gebruikersoverzicht_noshow', $lang501_title, "SELECT ospos_lekkernassuh_reservations.id, ospos_items.name AS '$lang506_product', TRIM(ospos_lekkernassuh_reservations.quantity_reserved)+0 AS '$lang502_quantity', ospos_lekkernassuh_reservations.delivery_date AS '$lang503_date', ospos_stock_locations.location_name AS '$lang504_location' FROM ospos_lekkernassuh_reservations JOIN ospos_people ON ospos_lekkernassuh_reservations.person_id = ospos_people.person_id JOIN ospos_stock_locations ON ospos_stock_locations.location_id = ospos_lekkernassuh_reservations.location_id JOIN ospos_items ON ospos_items.item_id = ospos_lekkernassuh_reservations.reservation_item_id WHERE ospos_lekkernassuh_reservations.reservation_item_id IN (-- Gives all item_ids of reservation_required items SELECT t_items.item_id FROM ospos_items t_items JOIN ospos_items t_reserv_def ON t_reserv_def.item_id = t_items.phys_item_id ) AND ospos_lekkernassuh_reservations.delivery_date BETWEEN SUBDATE(DATE(NOW()), INTERVAL 6 MONTH) AND SUBDATE(DATE(NOW()), INTERVAL 1 DAY) AND ospos_people.private_id = :varpid AND ospos_lekkernassuh_reservations.id NOT IN ( SELECT ospos_lekkernassuh_reservations_sold.reservation_id FROM ospos_lekkernassuh_reservations_sold JOIN ospos_sales_items ON ospos_sales_items.sale_id = ospos_lekkernassuh_reservations_sold.sale_id AND ospos_sales_items.item_id = ospos_lekkernassuh_reservations_sold.sales_item_id AND ospos_sales_items.line = ospos_lekkernassuh_reservations_sold.sales_item_line JOIN ospos_sales ON ospos_lekkernassuh_reservations_sold.sale_id = ospos_sales.sale_id JOIN ospos_people ON ospos_sales.customer_id = ospos_people.person_id WHERE ospos_lekkernassuh_reservations_sold.sales_item_id IN (-- Gives all item_ids of reservation_required items SELECT t_items.item_id FROM ospos_items t_items JOIN ospos_items t_reserv_def ON t_reserv_def.item_id = t_items.phys_item_id ) AND ospos_sales.customer_id = ospos_people.person_id AND ospos_people.private_id = :varpid ) ORDER BY ospos_lekkernassuh_reservations.delivery_date DESC, ospos_items.res_product_id ASC", [ 'hidetableifempty' => true // Hint: for testing multi-language of this table section, comment-out this line. ] ); }
Have you changed anything? Check if it has been saved: at “Last change to your data” or by refreshing this page.
Click here to completely unsubscribe from Lekkernassûh.