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