Issue #23507:implement location_usable
[xtuple] / foundation-database / public / tables / report / RunningAvailability.xml
1 <!DOCTYPE openRPTDef>
2 <report>
3  <title>Running Availability</title>
4  <name>RunningAvailability</name>
5  <description>Updated in 2.3 to show order number and item code on higherlevel planned work orders.</description>
6  <grid>
7   <snap/>
8   <show/>
9   <x>0.05</x>
10   <y>0.05</y>
11  </grid>
12  <size>Letter</size>
13  <portrait/>
14  <topmargin>50</topmargin>
15  <bottommargin>50</bottommargin>
16  <rightmargin>50</rightmargin>
17  <leftmargin>50</leftmargin>
18  <querysource>
19   <name>head</name>
20   <sql>SELECT item_number,
21        item_descrip1,
22        item_descrip2,
23        uom_name,
24        warehous_code AS warehouse,
25        &lt;? if exists("showPlanned") ?>
26          text('Yes')
27        &lt;? else ?>
28          text('No')
29        &lt;? endif ?>
30        AS showplnord
31   FROM item, uom, whsinfo
32  WHERE ((item_id=&lt;? value("item_id") ?>)
33    AND (item_inv_uom_id=uom_id)
34    AND (warehous_id=&lt;? value("warehous_id") ?>))</sql>
35  </querysource>
36  <querysource loadFromDb="true">
37   <name>detail</name>
38   <mqlgroup>runningAvailability</mqlgroup>
39   <mqlname>detail</mqlname>
40  </querysource>
41  <querysource>
42   <name>info</name>
43   <sql>SELECT
44        formatQty(qtyAvailable(itemsite_id)) AS qoh,
45        formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END) AS reorderlevel,
46        formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_ordertoqty ELSE 0.0 END) AS ordertoqty,
47        formatQty(CASE WHEN(itemsite_useparams) THEN itemsite_multordqty ELSE 0.0 END) AS multorderqty 
48 FROM itemsite 
49 WHERE ((itemsite_item_id=&lt;? value("item_id") ?>)
50  AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>));</sql>
51  </querysource>
52  <rpthead>
53   <height>238</height>
54   <label>
55    <rect>
56     <x>385</x>
57     <y>215</y>
58     <width>80</width>
59     <height>15</height>
60    </rect>
61    <font>
62     <face>Arial</face>
63     <size>8</size>
64     <weight>normal</weight>
65    </font>
66    <hcenter/>
67    <vcenter/>
68    <string>Ordered</string>
69   </label>
70   <label>
71    <rect>
72     <x>150</x>
73     <y>215</y>
74     <width>150</width>
75     <height>15</height>
76    </rect>
77    <font>
78     <face>Arial</face>
79     <size>8</size>
80     <weight>normal</weight>
81    </font>
82    <left/>
83    <vcenter/>
84    <string>Parent Item Number</string>
85   </label>
86   <field>
87    <rect>
88     <x>95</x>
89     <y>125</y>
90     <width>300</width>
91     <height>20</height>
92    </rect>
93    <font>
94     <face>Arial</face>
95     <size>10</size>
96     <weight>bold</weight>
97    </font>
98    <left/>
99    <vcenter/>
100    <data>
101     <query>head</query>
102     <column>warehouse</column>
103    </data>
104   </field>
105   <field>
106    <rect>
107     <x>95</x>
108     <y>75</y>
109     <width>300</width>
110     <height>20</height>
111    </rect>
112    <font>
113     <face>Arial</face>
114     <size>10</size>
115     <weight>bold</weight>
116    </font>
117    <left/>
118    <vcenter/>
119    <data>
120     <query>head</query>
121     <column>item_descrip1</column>
122    </data>
123   </field>
124   <field>
125    <rect>
126     <x>95</x>
127     <y>95</y>
128     <width>300</width>
129     <height>20</height>
130    </rect>
131    <font>
132     <face>Arial</face>
133     <size>10</size>
134     <weight>bold</weight>
135    </font>
136    <left/>
137    <vcenter/>
138    <data>
139     <query>head</query>
140     <column>item_descrip2</column>
141    </data>
142   </field>
143   <label>
144    <rect>
145     <x>467</x>
146     <y>125</y>
147     <width>120</width>
148     <height>20</height>
149    </rect>
150    <font>
151     <face>Arial</face>
152     <size>10</size>
153     <weight>normal</weight>
154    </font>
155    <right/>
156    <vcenter/>
157    <string>Reorder Level:</string>
158   </label>
159   <label>
160    <rect>
161     <x>467</x>
162     <y>145</y>
163     <width>120</width>
164     <height>20</height>
165    </rect>
166    <font>
167     <face>Arial</face>
168     <size>10</size>
169     <weight>normal</weight>
170    </font>
171    <right/>
172    <vcenter/>
173    <string>Order up to Qty.:</string>
174   </label>
175   <label>
176    <rect>
177     <x>285</x>
178     <y>215</y>
179     <width>100</width>
180     <height>15</height>
181    </rect>
182    <font>
183     <face>Arial</face>
184     <size>8</size>
185     <weight>normal</weight>
186    </font>
187    <hcenter/>
188    <vcenter/>
189    <string>Due Date</string>
190   </label>
191   <field>
192    <rect>
193     <x>595</x>
194     <y>145</y>
195     <width>100</width>
196     <height>20</height>
197    </rect>
198    <font>
199     <face>Arial</face>
200     <size>10</size>
201     <weight>bold</weight>
202    </font>
203    <right/>
204    <vcenter/>
205    <data>
206     <query>info</query>
207     <column>ordertoqty</column>
208    </data>
209   </field>
210   <field>
211    <rect>
212     <x>365</x>
213     <y>125</y>
214     <width>100</width>
215     <height>20</height>
216    </rect>
217    <font>
218     <face>Arial</face>
219     <size>10</size>
220     <weight>bold</weight>
221    </font>
222    <right/>
223    <vcenter/>
224    <data>
225     <query>info</query>
226     <column>qoh</column>
227    </data>
228   </field>
229   <label>
230    <rect>
231     <x>555</x>
232     <y>215</y>
233     <width>80</width>
234     <height>15</height>
235    </rect>
236    <font>
237     <face>Arial</face>
238     <size>8</size>
239     <weight>normal</weight>
240    </font>
241    <hcenter/>
242    <vcenter/>
243    <string>Balance</string>
244   </label>
245   <label>
246    <rect>
247     <x>310</x>
248     <y>125</y>
249     <width>50</width>
250     <height>20</height>
251    </rect>
252    <font>
253     <face>Arial</face>
254     <size>10</size>
255     <weight>normal</weight>
256    </font>
257    <right/>
258    <vcenter/>
259    <string>QOH:</string>
260   </label>
261   <field>
262    <rect>
263     <x>305</x>
264     <y>55</y>
265     <width>100</width>
266     <height>20</height>
267    </rect>
268    <font>
269     <face>Arial</face>
270     <size>10</size>
271     <weight>bold</weight>
272    </font>
273    <left/>
274    <vcenter/>
275    <data>
276     <query>head</query>
277     <column>uom_name</column>
278    </data>
279   </field>
280   <label>
281    <rect>
282     <x>430</x>
283     <y>75</y>
284     <width>160</width>
285     <height>20</height>
286    </rect>
287    <font>
288     <face>Arial</face>
289     <size>10</size>
290     <weight>normal</weight>
291    </font>
292    <right/>
293    <vcenter/>
294    <string>Show Planned Orders:</string>
295   </label>
296   <label>
297    <rect>
298     <x>270</x>
299     <y>5</y>
300     <width>475</width>
301     <height>40</height>
302    </rect>
303    <font>
304     <face>Arial</face>
305     <size>18</size>
306     <weight>bold</weight>
307    </font>
308    <right/>
309    <vcenter/>
310    <string>Running Availability</string>
311   </label>
312   <field>
313    <rect>
314     <x>595</x>
315     <y>125</y>
316     <width>100</width>
317     <height>20</height>
318    </rect>
319    <font>
320     <face>Arial</face>
321     <size>10</size>
322     <weight>bold</weight>
323    </font>
324    <right/>
325    <vcenter/>
326    <data>
327     <query>info</query>
328     <column>reorderlevel</column>
329    </data>
330   </field>
331   <field>
332    <rect>
333     <x>595</x>
334     <y>75</y>
335     <width>100</width>
336     <height>20</height>
337    </rect>
338    <font>
339     <face>Arial</face>
340     <size>10</size>
341     <weight>bold</weight>
342    </font>
343    <left/>
344    <vcenter/>
345    <data>
346     <query>head</query>
347     <column>showplnord</column>
348    </data>
349   </field>
350   <line>
351    <xstart>5</xstart>
352    <ystart>228</ystart>
353    <xend>740</xend>
354    <yend>228</yend>
355    <weight>2</weight>
356   </line>
357   <field>
358    <rect>
359     <x>95</x>
360     <y>55</y>
361     <width>150</width>
362     <height>20</height>
363    </rect>
364    <font>
365     <face>Arial</face>
366     <size>10</size>
367     <weight>bold</weight>
368    </font>
369    <left/>
370    <vcenter/>
371    <data>
372     <query>head</query>
373     <column>item_number</column>
374    </data>
375   </field>
376   <label>
377    <rect>
378     <x>260</x>
379     <y>145</y>
380     <width>100</width>
381     <height>20</height>
382    </rect>
383    <font>
384     <face>Arial</face>
385     <size>10</size>
386     <weight>normal</weight>
387    </font>
388    <right/>
389    <vcenter/>
390    <string>Order Multiple:</string>
391   </label>
392   <label>
393    <rect>
394     <x>645</x>
395     <y>215</y>
396     <width>100</width>
397     <height>15</height>
398    </rect>
399    <font>
400     <face>Arial</face>
401     <size>8</size>
402     <weight>normal</weight>
403    </font>
404    <hcenter/>
405    <vcenter/>
406    <string>Running Availability</string>
407   </label>
408   <field>
409    <rect>
410     <x>365</x>
411     <y>145</y>
412     <width>100</width>
413     <height>20</height>
414    </rect>
415    <font>
416     <face>Arial</face>
417     <size>10</size>
418     <weight>bold</weight>
419    </font>
420    <right/>
421    <vcenter/>
422    <data>
423     <query>info</query>
424     <column>multorderqty</column>
425    </data>
426   </field>
427   <label>
428    <rect>
429     <x>5</x>
430     <y>215</y>
431     <width>100</width>
432     <height>15</height>
433    </rect>
434    <font>
435     <face>Arial</face>
436     <size>8</size>
437     <weight>normal</weight>
438    </font>
439    <left/>
440    <vcenter/>
441    <string>Order Type/#</string>
442   </label>
443   <label>
444    <rect>
445     <x>250</x>
446     <y>55</y>
447     <width>50</width>
448     <height>20</height>
449    </rect>
450    <font>
451     <face>Arial</face>
452     <size>10</size>
453     <weight>normal</weight>
454    </font>
455    <right/>
456    <vcenter/>
457    <string>UOM:</string>
458   </label>
459   <label>
460    <rect>
461     <x>467</x>
462     <y>215</y>
463     <width>80</width>
464     <height>15</height>
465    </rect>
466    <font>
467     <face>Arial</face>
468     <size>8</size>
469     <weight>normal</weight>
470    </font>
471    <hcenter/>
472    <vcenter/>
473    <string>Received</string>
474   </label>
475   <label>
476    <rect>
477     <x>10</x>
478     <y>125</y>
479     <width>80</width>
480     <height>20</height>
481    </rect>
482    <font>
483     <face>Arial</face>
484     <size>10</size>
485     <weight>normal</weight>
486    </font>
487    <right/>
488    <vcenter/>
489    <string>Site:</string>
490   </label>
491   <label>
492    <rect>
493     <x>10</x>
494     <y>55</y>
495     <width>80</width>
496     <height>20</height>
497    </rect>
498    <font>
499     <face>Arial</face>
500     <size>10</size>
501     <weight>normal</weight>
502    </font>
503    <right/>
504    <vcenter/>
505    <string>Item:</string>
506   </label>
507  </rpthead>
508  <pghead>
509   <firstpage/>
510   <height>12</height>
511  </pghead>
512  <pghead>
513   <height>28</height>
514   <label>
515    <rect>
516     <x>110</x>
517     <y>5</y>
518     <width>150</width>
519     <height>15</height>
520    </rect>
521    <font>
522     <face>Arial</face>
523     <size>8</size>
524     <weight>normal</weight>
525    </font>
526    <left/>
527    <vcenter/>
528    <string>Parent Item Number</string>
529   </label>
530   <label>
531    <rect>
532     <x>5</x>
533     <y>5</y>
534     <width>100</width>
535     <height>15</height>
536    </rect>
537    <font>
538     <face>Arial</face>
539     <size>8</size>
540     <weight>normal</weight>
541    </font>
542    <left/>
543    <vcenter/>
544    <string>Order Type/#</string>
545   </label>
546   <line>
547    <xstart>5</xstart>
548    <ystart>20</ystart>
549    <xend>745</xend>
550    <yend>20</yend>
551    <weight>2</weight>
552   </line>
553   <label>
554    <rect>
555     <x>645</x>
556     <y>5</y>
557     <width>100</width>
558     <height>15</height>
559    </rect>
560    <font>
561     <face>Arial</face>
562     <size>8</size>
563     <weight>normal</weight>
564    </font>
565    <hcenter/>
566    <vcenter/>
567    <string>Running Availability</string>
568   </label>
569   <label>
570    <rect>
571     <x>555</x>
572     <y>5</y>
573     <width>80</width>
574     <height>15</height>
575    </rect>
576    <font>
577     <face>Arial</face>
578     <size>8</size>
579     <weight>normal</weight>
580    </font>
581    <hcenter/>
582    <vcenter/>
583    <string>Balance</string>
584   </label>
585   <label>
586    <rect>
587     <x>270</x>
588     <y>5</y>
589     <width>100</width>
590     <height>15</height>
591    </rect>
592    <font>
593     <face>Arial</face>
594     <size>8</size>
595     <weight>normal</weight>
596    </font>
597    <hcenter/>
598    <vcenter/>
599    <string>Due Date</string>
600   </label>
601   <label>
602    <rect>
603     <x>467</x>
604     <y>5</y>
605     <width>80</width>
606     <height>15</height>
607    </rect>
608    <font>
609     <face>Arial</face>
610     <size>8</size>
611     <weight>normal</weight>
612    </font>
613    <hcenter/>
614    <vcenter/>
615    <string>Received</string>
616   </label>
617   <label>
618    <rect>
619     <x>385</x>
620     <y>5</y>
621     <width>80</width>
622     <height>15</height>
623    </rect>
624    <font>
625     <face>Arial</face>
626     <size>8</size>
627     <weight>normal</weight>
628    </font>
629    <hcenter/>
630    <vcenter/>
631    <string>Ordered</string>
632   </label>
633  </pghead>
634  <section>
635   <name>detail</name>
636   <detail>
637    <key>
638     <query>detail</query>
639    </key>
640    <height>22</height>
641    <field>
642     <rect>
643      <x>90</x>
644      <y>0</y>
645      <width>55</width>
646      <height>15</height>
647     </rect>
648     <font>
649      <face>Arial</face>
650      <size>8</size>
651      <weight>bold</weight>
652     </font>
653     <left/>
654     <vcenter/>
655     <data>
656      <query>detail</query>
657      <column>ordernumber</column>
658     </data>
659    </field>
660    <field>
661     <rect>
662      <x>285</x>
663      <y>0</y>
664      <width>100</width>
665      <height>15</height>
666     </rect>
667     <font>
668      <face>Arial</face>
669      <size>8</size>
670      <weight>bold</weight>
671     </font>
672     <hcenter/>
673     <vcenter/>
674     <data>
675      <query>detail</query>
676      <column>f_duedate</column>
677     </data>
678    </field>
679    <field>
680     <rect>
681      <x>5</x>
682      <y>0</y>
683      <width>80</width>
684      <height>15</height>
685     </rect>
686     <font>
687      <face>Arial</face>
688      <size>8</size>
689      <weight>bold</weight>
690     </font>
691     <left/>
692     <vcenter/>
693     <data>
694      <query>detail</query>
695      <column>ordertype</column>
696     </data>
697    </field>
698    <field>
699     <rect>
700      <x>555</x>
701      <y>0</y>
702      <width>80</width>
703      <height>15</height>
704     </rect>
705     <font>
706      <face>Arial</face>
707      <size>8</size>
708      <weight>bold</weight>
709     </font>
710     <right/>
711     <vcenter/>
712     <data>
713      <query>detail</query>
714      <column>f_balance</column>
715     </data>
716    </field>
717    <field>
718     <rect>
719      <x>385</x>
720      <y>0</y>
721      <width>80</width>
722      <height>15</height>
723     </rect>
724     <font>
725      <face>Arial</face>
726      <size>8</size>
727      <weight>bold</weight>
728     </font>
729     <right/>
730     <vcenter/>
731     <data>
732      <query>detail</query>
733      <column>f_qtyordered</column>
734     </data>
735    </field>
736    <field>
737     <rect>
738      <x>645</x>
739      <y>0</y>
740      <width>100</width>
741      <height>15</height>
742     </rect>
743     <font>
744      <face>Arial</face>
745      <size>8</size>
746      <weight>bold</weight>
747     </font>
748     <right/>
749     <vcenter/>
750     <data>
751      <query>detail</query>
752      <column>balance</column>
753     </data>
754     <format builtin="true">qty</format>
755     <tracktotal/>
756    </field>
757    <field>
758     <rect>
759      <x>467</x>
760      <y>0</y>
761      <width>80</width>
762      <height>15</height>
763     </rect>
764     <font>
765      <face>Arial</face>
766      <size>8</size>
767      <weight>bold</weight>
768     </font>
769     <right/>
770     <vcenter/>
771     <data>
772      <query>detail</query>
773      <column>f_qtyreceived</column>
774     </data>
775    </field>
776    <field>
777     <rect>
778      <x>150</x>
779      <y>0</y>
780      <width>150</width>
781      <height>15</height>
782     </rect>
783     <font>
784      <face>Arial</face>
785      <size>8</size>
786      <weight>bold</weight>
787     </font>
788     <left/>
789     <vcenter/>
790     <data>
791      <query>detail</query>
792      <column>item_number</column>
793     </data>
794    </field>
795   </detail>
796  </section>
797  <pgfoot>
798   <height>22</height>
799   <label>
800    <rect>
801     <x>0</x>
802     <y>0</y>
803     <width>100</width>
804     <height>15</height>
805    </rect>
806    <font>
807     <face>Arial</face>
808     <size>8</size>
809     <weight>normal</weight>
810    </font>
811    <right/>
812    <vcenter/>
813    <string>Report Date:</string>
814   </label>
815   <label>
816    <rect>
817     <x>600</x>
818     <y>0</y>
819     <width>100</width>
820     <height>15</height>
821    </rect>
822    <font>
823     <face>Arial</face>
824     <size>8</size>
825     <weight>normal</weight>
826    </font>
827    <right/>
828    <vcenter/>
829    <string>Page:</string>
830   </label>
831   <field>
832    <rect>
833     <x>705</x>
834     <y>0</y>
835     <width>40</width>
836     <height>15</height>
837    </rect>
838    <font>
839     <face>Arial</face>
840     <size>8</size>
841     <weight>bold</weight>
842    </font>
843    <left/>
844    <vcenter/>
845    <data>
846     <query>Context Query</query>
847     <column>page_number</column>
848    </data>
849   </field>
850   <field>
851    <rect>
852     <x>102</x>
853     <y>0</y>
854     <width>100</width>
855     <height>15</height>
856    </rect>
857    <font>
858     <face>Arial</face>
859     <size>8</size>
860     <weight>bold</weight>
861    </font>
862    <left/>
863    <vcenter/>
864    <data>
865     <query>Context Query</query>
866     <column>report_date</column>
867    </data>
868   </field>
869  </pgfoot>
870 </report>