Permalink
Browse files

Merge pull request #60 from xtuple/master

catching up
  • Loading branch information...
2 parents 00fa358 + 559dd0c commit a3fe153bcb53b33e74549ca7896c2937f16881fb @mikerodonnell89 committed Apr 4, 2013
@@ -148,6 +148,7 @@ var lang = XT.stringsFor("en_US", {
"_data": "Data",
"_dataState": "Data State",
"_date": "Date",
+ "_days": "Days",
"_deactivate": "Deactivate",
"_default": "Default",
"_defaults": "Defaults",
@@ -379,6 +380,7 @@ var lang = XT.stringsFor("en_US", {
"_propername": "Propername",
"_prospect": "Prospect",
"_prospects": "Prospects",
+ "_proximo": "Proximo",
"_public": "Public",
"_purchaseOrderNumber": "Purchase Order",
"_required": "Required",
@@ -401,6 +403,7 @@ var lang = XT.stringsFor("en_US", {
"_roles": "Roles",
"_salesRep": "Sales Rep",
"_saleType": "Sale Type",
+ "_saleTypes": "Sale Types",
"_schedule": "Schedule",
"_scheduleDate": "Schedule Date",
"_secondaryContact": "Secondary Contact",
@@ -417,6 +420,7 @@ var lang = XT.stringsFor("en_US", {
"_shipVia": "Ship Via",
"_shipTo": "Ship To",
"_shipZone": "Ship Zone",
+ "_shipZones": "Ship Zones",
"_shippingNotes": "Shipping Notes",
"_site": "Site",
"_siteCode": "Site Code",
@@ -727,6 +727,18 @@ white:true*/
model: XM.ShipZone
});
+
+ /**
+ @class
+
+ @extends XM.Collection
+ */
+ XM.CustomerGroupCollection = XM.Collection.extend({
+ /** @scope XM.CustomerGroupCollection.prototype */
+
+ model: XM.CustomerGroup
+
+ });
/**
@class
@@ -145,4 +145,20 @@ white:true*/
XM.characteristicTypes.add(characteristicType);
}
+ // Terms Type
+ var termsTypeJson = [
+ { id: "D", name: "_days".loc() },
+ { id: "P", name: "_proximo".loc() }
+ ];
+ XM.TermsTypeModel = Backbone.Model.extend({
+ });
+ XM.TermsTypeCollection = Backbone.Collection.extend({
+ model: XM.TermsTypeModel
+ });
+ XM.termsTypes = new XM.TermsTypeCollection();
+ for (i = 0; i < termsTypeJson.length; i++) {
+ var termsType = new XM.TermsTypeModel(termsTypeJson[i]);
+ XM.termsTypes.add(termsType);
+ }
+
}());
@@ -414,6 +414,17 @@ regexp:true, undef:true, trailing:true, white:true */
{attribute: 'code'}
]
});
+
+ // ..........................................................
+ // TERMS TYPE
+ //
+
+ enyo.kind({
+ name: "XV.TermsTypePicker",
+ kind: "XV.PickerWidget",
+ collection: "XM.termsTypes",
+ nameAttribute: "name"
+ });
// ..........................................................
// UNIT
@@ -1557,15 +1557,6 @@
"type": "Number",
"column": "custgrp_descrip"
}
- },
- {
- "name": "customers",
- "toMany": {
- "isNested": true,
- "type": "CustomerGroupCustomer",
- "column": "custgrp_id",
- "inverse": "customerGroup"
- }
}
],
"isSystem": true
@@ -27,11 +27,15 @@ var lang = XT.stringsFor("en_US", {
"_creditMemo": "Credit Memo",
"_current": "Current",
"_currentDate": "Current Date",
+ "_customerGroup": "Customer Groups",
+ "_cutOffDay": "Cutoff Day",
"_dateControl": "Date Control",
"_disableSalesOrderPriceOverride": "Disallow Override of Sale Price on Sales Order",
+ "_discountDays": "Discount Days",
"_doNotUpdate": "Do Not Update",
"_enableSOShipping": "Enable Shipping Interface from Sales Order screen",
"_firmSalesOrdersWhenAddedToPackingList": "Firm Sales Orders when added to Packing List Batch",
+ "_freightClass": "Freight Class",
"_freightPricing": "Freight Pricing",
"_hideSOMiscCharge": "Hide Misc. Charge on Sales Order screen",
"_ignoreIfDiscounted": "Ignore if Discounted",
@@ -56,6 +60,7 @@ var lang = XT.stringsFor("en_US", {
"_shipDate": "Ship Date",
"_showQuotesAfterConverted": "Show Quotes after Conversion to SO",
"_showSaveAndAddbutton": "Show 'Save and Add to Packing List' Button on Sales Order",
+ "_termsType": "Terms Type",
"_update": "Update",
"_useCalculatedFreightPricing": "Use calculated Freight values by default",
"_usePromiseDates": "Enable Promise Dates"
@@ -19,6 +19,12 @@ trailing:true white:true*/
panels = [
{name: "siteList", kind: "XV.SiteList"},
{name: "siteTypeList", kind: "XV.SiteTypeList"},
+ {name: "saleTypeList", kind: "XV.SaleTypeList"},
+ {name: "shipZoneList", kind: "XV.ShipZoneList"},
+ {name: "salesRepList", kind: "XV.SalesRepList"},
+ {name: "termsList", kind: "XV.TermsList"},
+ {name: "customerGroupList", kind: "XV.CustomerGroupList"},
+ {name: "freightClassList", kind: "XV.FreightClassList"},
{name: "itemSiteList", kind: "XV.ItemSiteList"},
{name: "costCategoryList", kind: "XV.CostCategoryList"},
{name: "plannerCodeList", kind: "XV.PlannerCodeList"},
@@ -0,0 +1,188 @@
+/*jshint bitwise:true, indent:2, curly:true eqeqeq:true, immed:true,
+latedef:true, newcap:true, noarg:true, regexp:true, undef:true,
+trailing:true white:true*/
+/*global XT:true, XM:true, XV:true, _:true, window: true, enyo:true, Globalize:true*/
+
+(function () {
+
+ // ..........................................................
+ // CUSTOMER GROUP
+ //
+
+ enyo.kind({
+ name: "XV.CustomerGroupList",
+ kind: "XV.List",
+ label: "_customerGroup".loc(),
+ collection: "XM.CustomerGroupCollection",
+ parameterWidget: "XV.CustomerGroupListParameters",
+ query: {orderBy: [
+ {attribute: 'name'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "name", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "description"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.CustomerGroupRelation", "XV.CustomerGroupList");
+
+ // ..........................................................
+ // FREIGHT CLASS
+ //
+
+ enyo.kind({
+ name: "XV.FreightClassList",
+ kind: "XV.List",
+ label: "_freightClass".loc(),
+ collection: "XM.FreightClassCollection",
+ parameterWidget: "XV.FreightClassListParameters",
+ query: {orderBy: [
+ {attribute: 'code'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "code", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "description"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.FreightClassRelation", "XV.FreightClassList");
+
+ // ..........................................................
+ // SALE TYPE
+ //
+
+ enyo.kind({
+ name: "XV.SaleTypeList",
+ kind: "XV.List",
+ label: "_saleTypes".loc(),
+ collection: "XM.SaleTypeCollection",
+ parameterWidget: "XV.SaleTypeListParameters",
+ query: {orderBy: [
+ {attribute: 'code'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "code", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "description"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.SaleTypeRelation", "XV.SaleTypeList");
+
+ // ..........................................................
+ // SALES REP
+ //
+
+ enyo.kind({
+ name: "XV.SalesRepList",
+ kind: "XV.List",
+ label: "_salesRep".loc(),
+ collection: "XM.SalesRepCollection",
+ parameterWidget: "XV.SalesRepListParameters",
+ query: {orderBy: [
+ {attribute: 'number'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "number", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "name"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.SalesRepRelation", "XV.SalesRepList");
+
+ // ..........................................................
+ // SHIP ZONE
+ //
+
+ enyo.kind({
+ name: "XV.ShipZoneList",
+ kind: "XV.List",
+ label: "_shipZones".loc(),
+ collection: "XM.ShipZoneCollection",
+ parameterWidget: "XV.ShipZoneListParameters",
+ query: {orderBy: [
+ {attribute: 'name'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "name", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "description"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.ShipZoneRelation", "XV.ShipZoneList");
+
+ // ..........................................................
+ // TERMS
+ //
+
+ enyo.kind({
+ name: "XV.TermsList",
+ kind: "XV.List",
+ label: "_terms".loc(),
+ collection: "XM.TermsCollection",
+ parameterWidget: "XV.TermsListParameters",
+ query: {orderBy: [
+ {attribute: 'code'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", classes: "short",
+ components: [
+ {kind: "XV.ListAttr", attr: "code", isKey: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", fit: true, components: [
+ {kind: "XV.ListAttr", attr: "description"}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.TermsRelation", "XV.TermsList");
+
+}());
@@ -1,3 +1,4 @@
enyo.depends(
+ "list.js",
"workspace.js"
);
Oops, something went wrong.

0 comments on commit a3fe153

Please sign in to comment.