1 select xt.add_report_definition('XM.Invoice', 0, $${
3 "detailAttribute": "lineItems",
5 "defaultMarginSize": 20
10 {"attr": "remitto.name"},
11 {"attr": "remitto.address"}
13 "options": {"x": 0, "y": 40}
17 "definition": "Invoice Logo",
18 "options": {"x": 200, "y": 40, "width": 150}
21 "definition": [{"text": "_invoice"}],
22 "options": {"fontBold": true, "fontSize": 18, "x": 500, "y": 40, "align": "right"}
25 "definition": [{"text": "_invoiceDate", "label": true}],
26 "options": {"fontBold": true, "x": 400, "y": 60}
29 "definition": [{"attr": "invoiceDate"}],
30 "options": {"x": 500, "y": 60, "align": "right"}
33 "definition": [{"text": "_dueDate", "label": true}],
34 "options": {"fontBold": true, "x": 400, "y": 75}
37 "definition": [{"attr": "dueDate"}],
38 "options": {"x": 500, "y": 75, "align": "right"}
41 "definition": [{"text": "_discountDate", "label": true}],
42 "options": {"fontBold": true, "x": 400, "y": 90}
45 "definition": [{"attr": "discountDate"}],
46 "options": {"x": 500, "y": 90, "align": "right"}
49 "definition": [{"text": "_orderDate", "label": true}],
50 "options": {"fontBold": true, "x": 400, "y": 105}
53 "definition": [{"attr": "orderDate"}],
54 "options": {"x": 500, "y": 105, "align": "right"}
57 "definition": [{"text": "_terms", "label": true}],
58 "options": {"fontBold": true, "x": 400, "y": 120}
61 "definition": [{"attr": "terms.description"}],
62 "options": {"x": 475, "y": 120, "align": "right"}
65 "definition": [{"text": "_orderNumber", "label": true}],
66 "options": {"fontBold": true, "x": 0, "y": 180}
69 "definition": [{"attr": "orderNumber"}],
70 "options": {"x": 200, "y": 180}
73 "definition": [{"text": "_invoiceNumber", "label": true}],
74 "options": {"fontBold": true, "x": 0, "y": 195}
77 "definition": [{"attr": "number"}],
78 "options": {"x": 200, "y": 195}
81 "definition": [{"text": "_purchaseOrderNumber", "label": true}],
82 "options": {"fontBold": true, "x": 0, "y": 210}
85 "definition": [{"attr": "customerPurchaseOrderNumber"}],
86 "options": {"x": 200, "y": 210}
89 "definition": [{"text": "_customerNumber", "label": true}],
90 "options": {"fontBold": true, "x": 0, "y": 225}
93 "definition": [{"attr": "customer.number"}],
94 "options": {"x": 200, "y": 225}
97 "definition": [{"text": "_billto", "label": true}],
98 "options": {"x": 0, "y": 250, "fontBold": true}
102 {"attr": "billtoName"},
103 {"attr": "billtoAddress1"},
104 {"attr": "billtoAddress2"},
105 {"attr": "billtoAddress3"},
106 {"attr": "billtoCity"},
107 {"attr": "billtoState"},
108 {"attr": "billtoPostalCode"},
109 {"attr": "billtoCountry"},
110 {"attr": "billtoPhone"}
112 "transform": "address",
113 "options": {"x": 120, "y": 250, "width": 250}
115 {"element": "fontBold"},
119 {"text": "_quantity", "width": 100},
120 {"text": "_uom", "width": 50},
121 {"text": "_item", "width": 100},
122 {"text": "_currency", "width": 80},
123 {"text": "_unitPrice", "width": 100},
124 {"text": "_extendedPrice", "width": 100}
126 "options": {"border": 0, "padding": 5, "x": 0, "y": 325}
128 {"element": "bandLine", "size": 2}
131 {"element": "fontNormal"},
135 {"attr": "lineItems*quantity", "width": 100},
136 {"attr": "lineItems*quantityUnit", "width": 50},
137 {"attr": "lineItems*item.number", "width": 100},
138 {"attr": "currency", "width": 80},
139 {"attr": "lineItems*price", "width": 100},
140 {"attr": "lineItems*extendedPrice", "width": 100}
142 "options": {"fontBold": true, "border": 0, "padding": 12}
148 {"attr": "notes", "label": true}
150 "options": {"fontSize": 10, "width": 400}
152 {"element": "bandLine", "size": 2},
155 {"attr": "subtotal", "label": true},
156 {"attr": "taxTotal", "label": true},
157 {"attr": "total", "label": true}
159 "options": {"width": 525, "align": "right"}
162 "pageFooterElements": [
164 "element": "pageNumber", "definition": [],
165 "options": {"align": "center"}