"_isPrinted": "Printed",
"_isPublic": "Public",
"_isSold": "Sold",
+ "_issueItem": "Issue Item",
"_isSearchable": "Searchable",
"_isSystem": "System",
"_item": "Item",
"_manager": "Manager",
"_mainAddress": "Main Address",
"_manufactured": "Manufactured",
+ "_manufacturing": "Manufacturing",
"_map": "Map",
"_margin": "Margin",
"_markup": "Markup",
"_showCompletedOnly": "Show Complete Only",
"_showExpired": "Show Expired",
"_showUnReleased": "Show Unreleased",
+ "_showOnlyTopLevel": "Show Only Top Level",
"_showInactive": "Show Inactive",
"_sold": "Sold",
"_soldRanking": "Sold Ranking",
"_welcome": "Welcome",
"_wholesalePrice": "Wholesale Price",
"_workOrder": "Work Order",
+ "_workOrders": "Work Orders",
"_xtuplePostbooks": "PostBooks",
"_yearExpired": "Expiration Year",
"_createNewCurrency": "Create New Currency",
"_createReceiptTrans": "Create Receipt Transactions",
"_createScrapTrans": "Create Scrap Transactions",
+ "_createSOForHoldCustomer": "Create for Customers on Hold",
+ "_createSOForWarnCustomer": "Create for Customers on Warn",
"_deleteCountSlips": "Delete Count Slips",
"_deleteCountTags": "Delete Count Tags",
"_deleteItemMasters": "Delete Item Masters",
"_convertAccountSalesRep": "Convert this Account to a SalesRep?",
"_convertAccountTaxAuthority": "Convert this Account to a Tax Authority?",
"_convertProspect": "Convert this Prospect to a Customer?",
+ "_creditWarn": "This customer is on credit warn.",
+ "_creditHold": "This customer is on credit hold.",
"_customerExists": "A customer with this number already exists.",
"_customerOrProspect": "Would you like to create a new Customer or a new Prospect?",
"_exitPageWarning": "You are about to leave the xTuple application.",
},
convertQuote: function (inEvent) {
var model = inEvent.model,
+ that = this,
customer = model.get("customer"),
K = XM.CustomerProspectRelation,
- that = this,
+ attrs,
// In case we are converting a prospect
convertToCustomer = function (resp) {
if (!resp.answer) { return; }
- var success = function () {
- this.getValue().convertFromProspect(customer.id);
- };
that.doWorkspace({
workspace: "XV.CustomerWorkspace",
number: customer.get("number"),
name: customer.get("name")
},
- success: success,
+ success: afterCustomerCreated,
callback: convertToSalesOrder,
allowNew: false
});
},
- // A callback in case we had to convert to a customer first
+ afterCustomerCreated = function () {
+ this.getValue().convertFromProspect(customer.id);
+ },
+
convertToSalesOrder = function () {
- var success = function () {
- var gridBox = this.$.salesOrderLineItemGridBox;
- this.getValue().convertFromQuote(model.id, {
- success: function () {
- // Hack to force grid to refresh. Why doesn't it on its own?
- gridBox.valueChanged();
- gridBox.setDisabled(false);
- }
- });
- };
+ XM.SalesOrder.convertFromQuote(model.id, {
+ success: afterQuoteConvertedSuccess
+ });
+ },
+ afterQuoteConvertedSuccess = function (resp) {
+ attrs = resp;
that.doWorkspace({
workspace: "XV.SalesOrderWorkspace",
- success: success,
+ success: afterSalesOrderCreated,
allowNew: false
});
+ },
+
+ afterSalesOrderCreated = function () {
+ var value = this.getValue(),
+ gridBox = this.$.salesOrderLineItemGridBox;
+
+ value.setStatus(XM.Model.BUSY_FETCHING);
+ value.set(attrs);
+ value.revertStatus();
+
+ //Hack to force grid to refresh. Why doesn't it on its own?
+ gridBox.valueChanged();
+ gridBox.setDisabled(false);
};
+
+ // Get the process started one way or another
if (customer.get("status") === K.PROSPECT_STATUS) {
this.doNotify({
type: XM.Model.QUESTION,
XV.registerModelList("XM.VendorRelation", "XV.VendorList");
+ // ..........................................................
+ // WORK ORDER
+ //
+
+ enyo.kind({
+ name: "XV.WorkOrderList",
+ kind: "XV.List",
+ label: "_workOrders".loc(),
+ collection: "XM.WorkOrderListItemCollection",
+ parameterWidget: "XV.WorkOrderListParameters",
+ query: {orderBy: [
+ {attribute: 'number'}
+ ]},
+ components: [
+ {kind: "XV.ListItem", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListColumn", components: [
+ {kind: "XV.ListAttr", attr: "number", isKey: true, fit: true}
+ ]},
+ {kind: "XV.ListColumn", classes: "first", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListAttr", attr: "status",
+ style: "padding-left: 24px"},
+ {kind: "XV.ListAttr", attr: "itemSite.item.number", classes: "bold", style: "padding-left: 12px"}
+ ]},
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListAttr", attr: "itemSite.site.code", style: "padding-left: 12px"},
+ {kind: "XV.ListAttr", attr: "itemSite.item.description1", classes: "italic"}
+ ]}
+ ]},
+ {kind: "XV.ListColumn", classes: "second", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListAttr", attr: "dueDate", classes: "right"}
+ ]}
+ ]},
+ {kind: "XV.ListColumn", classes: "last", components: [
+ {kind: "FittableColumns", components: [
+ {kind: "XV.ListAttr", attr: "itemSite.item.inventoryUnit.name"},
+ {kind: "XV.ListAttr", attr: "qtyOrdered"},
+ {kind: "XV.ListAttr", attr: "qtyReceived"}
+ ]}
+ ]}
+ ]}
+ ]}
+ ]
+ });
+
+ XV.registerModelList("XM.WorkOrderListItem", "XV.WorkOrderList");
+
enyo.kind({
name: "XV.NameList",
kind: "XV.List",
{
"name": "_application_",
"databaseScripts": [
+ "version_check.sql",
"drop_deprecated.sql",
"xt/trigger_functions/comment_did_change.sql",
+ "xt/trigger_functions/customer_did_change.sql",
"xt/trigger_functions/owner_record_did_change.sql",
+ "xt/trigger_functions/sales_order_did_change.sql",
"xt/trigger_functions/taxtype_record_did_change.sql",
"xt/trigger_functions/usr_did_change.sql",
"xt/trigger_functions/usrpref_did_change.sql",
"public/tables/todoitem.sql",
"public/tables/usrpref.sql",
"public/tables/usrpriv.sql",
+ "public/tables/wo.sql",
+ "public/tables/womatl.sql",
"xt/functions/add_priv.sql",
"xt/functions/average_cost.sql",
"xt/functions/change_password.sql",
"xt/views/site.sql",
"xt/views/todoiteminfo.sql",
"xt/views/usrinfo.sql",
+ "xt/views/woinfo.sql",
"xt/tables/usrlite.sql",
"xm/javascript/account.sql",
"xm/javascript/address.sql",