Issue #22218: Progress on Sales Order Report
authorLinda Nichols <lynnaloo@gmail.com>
Mon, 12 May 2014 20:37:31 +0000 (20:37 +0000)
committerLinda Nichols <lynnaloo@gmail.com>
Mon, 12 May 2014 20:37:31 +0000 (20:37 +0000)
enyo-client/extensions/source/sales/client/en/strings.js
enyo-client/extensions/source/sales/database/source/manifest.js
enyo-client/extensions/source/sales/database/source/xt/tables/rptdef.sql [new file with mode: 0644]

index d3c57e3..f3567eb 100644 (file)
@@ -15,6 +15,7 @@ strict:true, trailing:true, white:true */
     "_authorizedCredit": "Authorized Credit",
     "_autoAllocateCreditMemos": "Allocate Credit Memos to New Sales Order on Save",
     "_autoSelectForBilling": "Check 'Select for Billing' option on Ship Order",
+    "_billto": "Bill To",
     "_bookings": "Bookings",
     "_convert": "Convert",
     "_creditControl": "Credit Control",
@@ -54,10 +55,12 @@ strict:true, trailing:true, white:true */
     "_salesDescription": "Customer and Sales Order Management",
     "_salesHistory": "Sales History",
     "_salesOrder": "Sales Order",
+    "_salesOrderAck": "Sales Order Acknowledgement",
     "_scheduled": "Scheduled",
     "_scheduledDate": "Scheduled Date",
     "_shipControl": "Ship Control",
     "_shipDate": "Ship Date",
+    "_shipTo": "Ship To",
     "_showQuotesAfterConverted": "Show Quotes after Conversion to SO",
     "_showSaveAndAddbutton": "Show 'Save and Add to Packing List' Button on Sales Order",
     "_staleAnalysisWarning": "Free trial demo analysis data will not be updated from your live changes.",
index e4d150d..ce8ba77 100644 (file)
@@ -4,6 +4,7 @@
   "loadOrder": 20,
   "databaseScripts": [
     "xt/tables/acttype.sql",
+    "xt/tables/rptdef.sql",
     "xt/views/share_users_cohead.sql",
     "xt/views/share_users_cust.sql",
     "xt/views/share_users_shipto.sql",
diff --git a/enyo-client/extensions/source/sales/database/source/xt/tables/rptdef.sql b/enyo-client/extensions/source/sales/database/source/xt/tables/rptdef.sql
new file mode 100644 (file)
index 0000000..62f86df
--- /dev/null
@@ -0,0 +1,161 @@
+select xt.add_report_definition('XM.SalesOrder', 0, $${
+  "settings": {
+    "detailAttribute": "lineItems",
+    "defaultFontSize": 12,
+    "defaultMarginSize": 20
+  },
+  "headerElements": [
+    {
+      "element": "image",
+      "definition": "Sales Order Logo",
+      "options": {"x": 0, "y": 40, "width": 150}
+    },
+    {
+      "definition": [{"text": "_salesOrderAck"}],
+      "options": {"fontBold": true, "fontSize": 18, "x": 300, "y": 40, "width": 300, "align": "right"}
+    },
+    {
+      "definition": [{"attr": "number"}],
+      "options": {"x": 300, "y": 70, "width": 280, "align": "right"}
+    },
+    {
+      "definition": [{"attr": "orderDate"}],
+      "options": {"x": 300, "y": 90, "width": 280, "align": "right"}
+    },
+    {
+      "definition": [{"text": "_customerAddress", "label": true}],
+      "options": {"x": 0, "y": 140, "fontBold": true}
+    },
+    {
+      "definition": [
+        {"attr": "billtoName"},
+        {"attr": "billtoAddress1"},
+        {"attr": "billtoAddress2"},
+        {"attr": "billtoAddress3"},
+        {"attr": "billtoCity"},
+        {"attr": "billtoState"},
+        {"attr": "billtoPostalCode"},
+        {"attr": "billtoCountry"},
+        {"attr": "billtoPhone"}
+      ],
+      "transform": "address",
+      "options": {"x": 0, "y": 160, "width": 250}
+    },
+    {
+      "definition": [{"text": "_billto", "label": true}],
+      "options": {"x": 225, "y": 140, "fontBold": true}
+    },
+    {
+      "definition": [
+        {"attr": "billtoName"},
+        {"attr": "billtoAddress1"},
+        {"attr": "billtoAddress2"},
+        {"attr": "billtoAddress3"},
+        {"attr": "billtoCity"},
+        {"attr": "billtoState"},
+        {"attr": "billtoPostalCode"},
+        {"attr": "billtoCountry"},
+        {"attr": "billtoPhone"}
+      ],
+      "transform": "address",
+      "options": {"x": 225, "y": 160, "width": 250}
+    },
+    {
+      "definition": [{"text": "_shipto", "label": true}],
+      "options": {"x": 425, "y": 140, "fontBold": true}
+    },
+    {
+      "definition": [
+        {"attr": "shiptoName"},
+        {"attr": "shiptoAddress1"},
+        {"attr": "shiptoAddress2"},
+        {"attr": "shiptoAddress3"},
+        {"attr": "shiptoCity"},
+        {"attr": "shiptoState"},
+        {"attr": "shiptoPostalCode"},
+        {"attr": "shiptoCountry"},
+        {"attr": "shiptoPhone"}
+      ],
+      "transform": "address",
+      "options": {"x": 425, "y": 160, "width": 250}
+    },
+    {
+      "definition": [{"text": "_purchaseOrderNumber", "label": true}],
+      "options": {"fontBold": true, "x": 0, "y": 230}
+    },
+    {
+      "definition": [{"attr": "customerPurchaseOrderNumber"}],
+      "options": {"x": 0, "y": 245}
+    },
+    {
+      "definition": [{"text": "_terms", "label": true}],
+      "options": {"fontBold": true, "x": 150, "y": 230}
+    },
+    {
+      "definition": [{"attr": "terms.description"}],
+      "options": {"x": 150, "y": 245}
+    },
+    {
+      "definition": [{"text": "_shipDate", "label": true}],
+      "options": {"fontBold": true, "x": 250, "y": 230}
+    },
+    {
+      "definition": [{"attr": "packDate"}],
+      "options": {"x": 250, "y": 245}
+    },
+    {
+      "definition": [{"text": "_shipVia", "label": true}],
+      "options": {"fontBold": true, "x": 325, "y": 230}
+    },
+    {
+      "definition": [{"attr": "shipVia"}],
+      "options": {"x": 325, "y": 245}
+    },
+    {
+      "definition": [{"text": "_fob", "label": true}],
+      "options": {"fontBold": true, "x": 500, "y": 230}
+    },
+    {
+      "definition": [{"attr": ""}],
+      "options": {"x": 500, "y": 245}
+    },
+    {
+      "element": "band",
+      "definition": [
+        {"text": "_item", "width": 100},
+        {"text": "_description", "width": 100},
+        {"text": "_ordered", "width": 80},
+        {"text": "_balance", "width": 80},
+        {"text": "_uom", "width": 50},
+        {"text": "_unitPrice", "width": 80},
+        {"text": "_amount", "width": 80}
+      ],
+      "options": {"border": 0, "padding": 5, "x": 0, "y": 325}
+    },
+    {"element": "bandLine", "size": 2}
+  ],
+  "detailElements": [
+    {"element": "fontNormal"},
+    {
+      "element": "band",
+      "definition": [
+        {"attr": "lineItems*item.number", "width": 100},
+        {"attr": "lineItems*item.description", "width": 100},
+        {"attr": "lineItems*quantity", "width": 80},
+        {"attr": "lineItems*quantity", "width": 80},
+        {"attr": "lineItems*quantityUnit", "width": 50},
+        {"attr": "lineItems*price", "width": 80},
+        {"attr": "lineItems*price", "width": 80}
+      ],
+      "options": {"fontBold": true, "border": 0, "padding": 12}
+    }
+  ],
+  "footerElements": [
+  ],
+  "pageFooterElements": [
+    {
+      "element": "pageNumber", "definition": [],
+      "options": {"align": "center"}
+    }
+  ]
+}$$);