3 <title>Reorder Exceptions by Planner Code</title>
4 <name>ReorderExceptionsByPlannerCode</name>
5 <description></description>
8 <topmargin>50</topmargin>
9 <bottommargin>50</bottommargin>
10 <rightmargin>50</rightmargin>
11 <leftmargin>50</leftmargin>
14 <sql>SELECT <? if exists("plancode_id") ?>
15 ( SELECT (plancode_code || '-' || plancode_name)
17 WHERE plancode_id=<? value("plancode_id") ?>)
18 <? elseif exists("plancode_pattern") ?>
19 text(<? value("plancode_pattern") ?>)
21 text('All Planner Codes')
24 <? if exists("includePlannedOrders") ?>
30 <? if exists("warehous_id") ?>
31 ( SELECT warehous_code
33 WHERE (warehous_id=<? value("warehous_id") ?>) )
41 <sql>SELECT warehous_code, item_number, item_descrip1, item_descrip2,
42 formatDate(reorderdate) AS f_reorderdate,
43 formatQty(reorderlevel) AS f_reorderlevel,
44 formatQty((qtyNetable(itemsite_id) - qtyAllocated(itemsite_id, reorderdate) + qtyOrdered(itemsite_id, reorderdate))) AS f_projavail,
46 FROM ( SELECT itemsite_id,
47 CASE WHEN (item_type IN ('M', 'B', 'T')) THEN 1
48 WHEN (item_type IN ('P', 'O')) THEN 2
51 warehous_code, item_number, item_descrip1, item_descrip2,
52 reorderDate(itemsite_id, <? value("lookAheadDays") ?>, <? if exists("includePlannedOrder") ?>true<? else ?>false<? endif ?>) AS reorderdate,
54 FROM ( SELECT itemsite_id, itemsite_item_id, itemsite_warehous_id,
55 CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel
58 <? if exists("warehous_id") ?>
59 AND (itemsite_warehous_id=<? value("warehous_id") ?>)
61 <? if exists("plancode_id") ?>
62 AND (itemsite_plancode_id=<? value("plancode_id") ?>)
63 <? elseif exists("plancode_pattern") ?>
64 AND (itemsite_plancode_id IN (SELECT plancode_id
66 WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))
69 ) AS itemsitedate, item, whsinfo
70 WHERE ((itemsite_item_id=item_id)
71 AND (itemsite_warehous_id=warehous_id))
73 WHERE (reorderdate IS NOT NULL)
74 ORDER BY reorderdate, item_number;</sql>
88 <weight>normal</weight>
92 <string>Exception Date</string>
104 <weight>normal</weight>
108 <string>Description</string>
120 <weight>normal</weight>
124 <string>Reorder Level</string>
136 <weight>normal</weight>
140 <string>Include Planned Orders:</string>
152 <weight>bold</weight>
156 <string>Reorder Exceptions by Planner Code</string>
168 <weight>normal</weight>
172 <string>Site:</string>
184 <weight>bold</weight>
189 <query>Parameter Query</query>
190 <column>lookAheadDays</column>
203 <weight>normal</weight>
207 <string>Proj. Avail.</string>
226 <weight>normal</weight>
230 <string>Item Number</string>
242 <weight>normal</weight>
246 <string>Site</string>
258 <weight>bold</weight>
264 <column>includeplnord</column>
277 <weight>bold</weight>
283 <column>warehouse</column>
296 <weight>bold</weight>
302 <column>plannercode</column>
315 <weight>normal</weight>
319 <string>Look Ahead Days:</string>
331 <weight>normal</weight>
335 <string>Planner Code(s):</string>
354 <weight>normal</weight>
358 <string>Item Number</string>
370 <weight>normal</weight>
374 <string>Proj. Avail.</string>
393 <weight>normal</weight>
397 <string>Reorder Level</string>
409 <weight>normal</weight>
413 <string>Exception Date</string>
425 <weight>normal</weight>
429 <string>Description</string>
441 <weight>normal</weight>
445 <string>Site</string>
452 <query>detail</query>
472 <weight>bold</weight>
477 <query>detail</query>
478 <column>warehous_code</column>
491 <weight>bold</weight>
496 <query>detail</query>
497 <column>item_descrip2</column>
510 <weight>bold</weight>
515 <query>detail</query>
516 <column>f_reorderdate</column>
529 <weight>bold</weight>
534 <query>detail</query>
535 <column>f_reorderlevel</column>
548 <weight>bold</weight>
553 <query>detail</query>
554 <column>f_projavail</column>
567 <weight>bold</weight>
572 <query>detail</query>
573 <column>item_number</column>
586 <weight>bold</weight>
591 <query>detail</query>
592 <column>item_descrip1</column>
609 <weight>normal</weight>
613 <string>Page:</string>
625 <weight>normal</weight>
629 <string>Report Date:</string>
641 <weight>bold</weight>
646 <query>Context Query</query>
647 <column>page_number</column>
660 <weight>bold</weight>
665 <query>Context Query</query>
666 <column>report_date</column>