onPaymentPosted: 'handlePaymentPosted',
},
model: "XM.SalesOrder",
+ printOnSaveSetting: "DefaultPrintPOOnSave",
actions: [{
name: "print",
isViewMethod: true,
"column": "cntct_name"
}
},
+ {
+ "name": "honorific",
+ "attr": {
+ "type": "String",
+ "column": "cntct_honorific"
+ }
+ },
{
"name": "firstName",
"attr": {
"column": "cntct_first_name"
}
},
+ {
+ "name": "middleName",
+ "attr": {
+ "type": "String",
+ "column": "cntct_middle"
+ }
+ },
{
"name": "lastName",
"attr": {
"column": "cntct_last_name"
}
},
+ {
+ "name": "suffix",
+ "attr": {
+ "type": "String",
+ "column": "cntct_suffix"
+ }
+ },
{
"name": "jobTitle",
"attr": {
"isVoid": {
"update": false
}
+ },
+ "personal": {
+ "create": false,
+ "read": "ViewPersonalCRMAccounts",
+ "update": false,
+ "delete": false,
+ "properties": [
+ "crmaccountUsers"
+ ]
}
},
"properties": [
"column": "invchead_id",
"inverse": "source"
}
+ },
+ {
+ "name": "crmaccountUsers",
+ "toMany": {
+ "type": "ShareUsers",
+ "column": "obj_uuid",
+ "inverse": "uuid"
+ }
}
],
"isSystem": true
"read": "MaintainMiscInvoices ViewMiscInvoices",
"update": false,
"delete": false
+ },
+ "personal": {
+ "create": false,
+ "read": "ViewPersonalCRMAccounts",
+ "update": false,
+ "delete": false,
+ "properties": [
+ "crmaccountUsers"
+ ]
}
},
"properties": [
"isNested": true,
"required": true
}
+ },
+ {
+ "name": "crmaccountUsers",
+ "toMany": {
+ "type": "ShareUsers",
+ "column": "obj_uuid",
+ "inverse": "uuid"
+ }
}
],
"isSystem": true
"total": {
"view": "MaintainSalesOrders ViewSalesOrders"
}
+ },
+ "personal": {
+ "create": false,
+ "read": "ViewPersonalCRMAccounts",
+ "update": false,
+ "delete": false,
+ "properties": [
+ "crmaccountUsers"
+ ]
}
},
"properties": [
"type": "String",
"column": "cohead_shiptocountry"
}
+ },
+ {
+ "name": "crmaccountUsers",
+ "toMany": {
+ "type": "ShareUsers",
+ "column": "obj_uuid",
+ "inverse": "uuid"
+ }
}
],
"isSystem": true
"public/tables/docass.sql",
"public/tables/grppriv.sql",
"public/tables/incdt.sql",
+ "public/tables/invchead.sql",
"public/tables/invcitem.sql",
"public/tables/invcitemtax.sql",
"public/tables/itemsite.sql",
"public/tables/prj.sql",
"public/tables/prjtask.sql",
"public/tables/quitem.sql",
+ "public/tables/shiphead.sql",
"public/tables/shiptoinfo.sql",
"public/tables/todoitem.sql",
"public/tables/usrpref.sql",
--- /dev/null
+-- add uuid column here because there are views that need this
+select xt.add_column('invchead','obj_uuid', 'uuid', 'default xt.uuid_generate_v4()', 'public');
+select xt.add_inheritance('invchead', 'xt.obj');
+select xt.add_constraint('invchead', 'invchead_obj_uuid','unique(obj_uuid)', 'public');
--- /dev/null
+-- add uuid column here because there are views that need this
+select xt.add_column('shiphead','obj_uuid', 'uuid', 'default xt.uuid_generate_v4()', 'public');
+select xt.add_inheritance('shiphead', 'xt.obj');
+select xt.add_constraint('shiphead', 'shiphead_obj_uuid','unique(obj_uuid)', 'public');
new.invchead_void,
new.invchead_saletype_id,
new.invchead_shipzone_id
-);
+)
+
+returning invchead.*,
+ null::numeric,
+ null::numeric,
+ null::numeric,
+ null::numeric,
+ null::numeric,
+ null::numeric,
+ null::numeric,
+ null::date,
+ null::date;
create or replace rule "_UPDATE" as on update to xt.invcheadinfo do instead
"xt/views/receivable_invoice_return.sql",
"xt/views/aropeninfo.sql",
"xt/views/receivable_applications.sql",
- "xt/views/cashrcpt.sql"
+ "xt/views/share_users_invchead.sql",
+ "xt/views/cashrcpt.sql",
+ "xt/tables/sharetype.sql"
]
}
--- /dev/null
+-- Invoice CRM Account's users.
+delete from xt.sharetype where sharetype_tblname = 'share_users_invchead';
+insert into xt.sharetype (
+ sharetype_nsname,
+ sharetype_tblname,
+ sharetype_col_obj_uuid,
+ sharetype_col_username
+) values (
+ 'xt',
+ 'share_users_invchead',
+ 'obj_uuid',
+ 'username'
+);
--- /dev/null
+/*
+ * This view lists all postgres usernames that are associated with a CRM
+ * Account that owns a resource. That associaiton is either the main user
+ * account, owner's user account, customer's sale rep's user account or
+ * a shared access that has been specifically granted.
+ *
+ * This view can be used to determine which users have personal privilege
+ * access to an Invoice based on what CRM Account it belongs to.
+ */
+
+select xt.create_view('xt.share_users_invchead', $$
+
+ -- Invoice CRM Account's users.
+ SELECT
+ invchead_cust_crmacct_ids.obj_uuid::uuid AS obj_uuid,
+ username::text AS username
+ FROM (
+ SELECT
+ invchead.obj_uuid,
+ crmacct_id
+ FROM invchead
+ LEFT JOIN custinfo ON invchead_cust_id = cust_id
+ LEFT JOIN crmacct ON cust_id = crmacct_cust_id
+ ) invchead_cust_crmacct_ids
+ LEFT JOIN xt.crmacct_users USING (crmacct_id)
+ WHERE 1=1
+ AND username IS NOT NULL;
+
+$$, false);
shiptoContactHonorific: "",
shiptoContactFirstName: "",
shiptoContactLastName: "",
- shiptoContactMiddle: "",
+ shiptoContactMiddleName: "",
shiptoContactSuffix: "",
shiptoContactTitle: "",
shiptoContactPhone: "",
attrs.shiptoContactHonorific = contact.get("honorific");
attrs.shiptoContactFirstName = contact.get("firstName");
attrs.shiptoContactLastName = contact.get("lastName");
- attrs.shiptoContactMiddle = contact.get("middle");
+ attrs.shiptoContactMiddleName = contact.get("middleName");
attrs.shiptoContactSuffix = contact.get("suffix");
attrs.shiptoContactTitle = contact.get("title");
attrs.shiptoContactPhone = contact.get("phone");
vendorContactHonorific: "",
vendorContactFirstName: "",
vendorContactLastName: "",
- vendorContactMiddle: "",
+ vendorContactMiddleName: "",
vendorContactSuffix: "",
vendorContactTitle: "",
vendorContactPhone: "",
attrs.vendorContactHonorific = contact.get("honorific");
attrs.vendorContactFirstName = contact.get("firstName");
attrs.vendorContactLastName = contact.get("lastName");
- attrs.vendorContactMiddle = contact.get("middle");
+ attrs.vendorContactMiddleName = contact.get("middleName");
attrs.vendorContactSuffix = contact.get("suffix");
attrs.vendorContactTitle = contact.get("title");
attrs.vendorContactPhone = contact.get("phone");
};
}());
-
// ..........................................................
// PURCHASE ORDER
//
-
enyo.kind({
name: "XV.PurchaseOrderList",
kind: "XV.List",
notify: false},
{name: "unrelease", privilege: "ReleasePurchaseOrders",
prerequisite: "canUnrelease",
- method: "doUnrelease", notify: false}
+ method: "doUnrelease", notify: false},
+ {name: "print", privilege: "ViewPurchaseOrders",
+ method: "doPrint", isViewMethod: true},
+ {name: "email", privilege: "ViewPurchaseOrders",
+ method: "doEmail", isViewMethod: true}
],
query: {orderBy: [
{attribute: 'number'}
// ..........................................................
// PURCHASE ORDER
//
-
enyo.kind({
name: "XV.PurchaseOrderWorkspace",
kind: "XV.Workspace",
title: "_purchaseOrder".loc(),
model: "XM.PurchaseOrder",
printOnSaveSetting: "DefaultPrintPOOnSave",
+ actions: [{
+ name: "print",
+ isViewMethod: true,
+ label: "_print".loc(),
+ privilege: "ViewPurchaseOrders",
+ prerequisite: "isReadyClean"
+ },
+ {name: "email",
+ isViewMethod: true,
+ label: "_email".loc(),
+ privilege: "ViewPurchaseOrders",
+ prerequisite: "isReadyClean"
+ }],
headerAttrs: ["number", "-", "vendor.name"],
components: [
{kind: "Panels", arrangerKind: "CarouselArranger",
}
},
{
- "name": "vendorContactSuffic",
+ "name": "vendorContactSuffix",
"attr": {
"type": "String",
"column": "pohead_vend_cntct_suffix"
"xt/tables/wftype.sql",
"xt/tables/acttype.sql",
"xt/tables/poheadext.sql",
+ "xt/tables/rptdef.sql",
"xt/views/itemsrcmfg.sql",
"xt/views/poheadinfo.sql",
"xt/views/poiteminfo.sql",
--- /dev/null
+select xt.add_report_definition('XM.PurchaseOrder', 0, $${
+ "settings": {
+ "detailAttribute": "lineItems",
+ "defaultFontSize": 12,
+ "defaultMarginSize": 20
+ },
+ "headerElements": [
+ {
+ "definition": [
+ {"attr": "remitto.name"},
+ {"attr": "remitto.address"}
+ ],
+ "options": {"x": 0, "y": 40}
+ },
+ {
+ "element": "image",
+ "definition": "Logo",
+ "options": {"x": 200, "y": 40, "width": 150}
+ },
+ {
+ "definition": [{"text": "_orderDate", "label": true}],
+ "options": {"fontBold": true, "x": 400, "y": 60}
+ },
+ {
+ "definition": [{"text": "_purchaseOrder"}],
+ "options": {"fontBold": true, "fontSize": 18, "x": 450, "y": 40, "align": "right"}
+ },
+ {
+ "definition": [{"attr": "orderDate"}],
+ "options": {"x": 500, "y": 60, "align": "right"}
+ },
+ {
+ "definition": [{"text": "_orderNumber", "label": true}],
+ "options": {"fontBold": true, "x": 400, "y": 75}
+ },
+ {
+ "definition": [{"attr": "number"}],
+ "options": {"x": 500, "y": 75, "align": "right"}
+ },
+ {
+ "definition": [{"text": "_to", "label": true}],
+ "options": {"x": 50, "y": 140, "fontBold": true}
+ },
+ {
+ "definition": [
+ {"attr": "vendorContactFirstName"},
+ {"attr": "vendorContactLastName"},
+ {"attr": "vendorContactHonorific"}
+ ],
+ "transform": "fullname",
+ "options": {"x": 50, "y": 160, "width": 250}
+ },
+ {
+ "definition": [
+ {"attr": "vendorContact"},
+ {"attr": "vendorAddress1"},
+ {"attr": "vendorAddress2"},
+ {"attr": "vendorAddress3"},
+ {"attr": "vendorCity"},
+ {"attr": "vendorState"},
+ {"attr": "vendorPostalCode"},
+ {"attr": "vendorCountry"},
+ {"attr": "vendorPhone"}
+ ],
+ "transform": "address",
+ "options": {"x": 50, "y": 170, "width": 250}
+ },
+ {
+ "definition": [{"text": "_shipTo", "label": true}],
+ "options": {"x": 350, "y": 140, "fontBold": true}
+ },
+ {
+ "definition": [
+ {"attr": "shiptoContactFirstName"},
+ {"attr": "shiptoContactLastName"},
+ {"attr": "shiptoContactHonorific"}
+ ],
+ "transform": "fullname",
+ "options": {"x": 350, "y": 160, "width": 250}
+ },
+ {
+ "definition": [
+ {"attr": "shiptoName"},
+ {"attr": "shiptoAddress1"},
+ {"attr": "shiptoAddress2"},
+ {"attr": "shiptoAddress3"},
+ {"attr": "shiptoCity"},
+ {"attr": "shiptoState"},
+ {"attr": "shiptoPostalCode"},
+ {"attr": "shiptoCountry"},
+ {"attr": "shiptoPhone"}
+ ],
+ "transform": "address",
+ "options": {"x": 350, "y": 170, "width": 250}
+ },
+ {
+ "definition": [{"text": "_fob", "label": true}],
+ "options": {"fontBold": true, "x": 50, "y": 230}
+ },
+ {
+ "definition": [{"attr": "fob"}],
+ "options": {"x": 50, "y": 245}
+ },
+ {
+ "definition": [{"text": "_shipVia", "label": true}],
+ "options": {"fontBold": true, "x": 175, "y": 230}
+ },
+ {
+ "definition": [{"attr": "shipVia"}],
+ "options": {"x": 175, "y": 245}
+ },
+ {
+ "definition": [{"text": "_terms", "label": true}],
+ "options": {"fontBold": true, "x": 300, "y": 230}
+ },
+ {
+ "definition": [{"attr": "terms.description"}],
+ "options": {"x": 300, "y": 245}
+ },
+ {"element": "fontBold"},
+ {
+ "element": "band",
+ "definition": [
+ {"text": "_item", "width": 90},
+ {"text": "_vendorItem", "width": 100},
+ {"text": "_description", "width": 100},
+ {"text": "_ordered", "width": 60},
+ {"text": "_uom", "width": 45},
+ {"text": "_unitPrice", "width": 90},
+ {"text": "_extendedPrice", "width": 100}
+ ],
+ "options": {"border": 0, "padding": 5, "x": 0, "y": 300}
+ },
+ {"element": "bandLine", "size": 2}
+ ],
+ "detailElements": [
+ {"element": "fontNormal"},
+ {
+ "element": "band",
+ "definition": [
+ {"attr": "lineItems*vendorItemNumber", "width": 90},
+ {"attr": "lineItems*item.number", "width": 100},
+ {"attr": "lineItems*item.description1", "width": 100},
+ {"attr": "lineItems*quantity", "width": 60},
+ {"attr": "lineItems*vendorUnit", "width": 45},
+ {"attr": "lineItems*price", "width": 90},
+ {"attr": "lineItems*extendedPrice", "width": 100}
+ ],
+ "options": {"fontBold": true, "border": 0, "padding": 14}
+ }
+ ],
+ "footerElements": [
+ {"element": "bandLine", "size": 2},
+ {
+ "definition": [
+ {"attr": "subtotal", "label": true},
+ {"attr": "freight", "label": true},
+ {"attr": "taxTotal", "label": true},
+ {"attr": "total", "label": true}
+ ],
+ "options": {"fontBold": true, "fontSize": 14, "width": 550, "align": "right"}
+ }
+ ],
+ "pageFooterElements": [
+ {
+ "element": "pageNumber", "definition": [],
+ "options": {"align": "center"}
+ }
+ ]
+}$$);
"options": {"fontBold": true, "x": 500, "y": 230}
},
{
- "definition": [{"attr": ""}],
+ "definition": [{"attr": "fob"}],
"options": {"x": 500, "y": 245}
},
{
"../lib/orm/source/xt/functions/add_primary_key.sql",
"../lib/orm/source/xt/functions/create_table.sql",
+ "public/indexes/apopentax.sql",
+ "public/indexes/aropentax.sql",
+ "public/indexes/asohisttax.sql",
+ "public/indexes/cmheadtax.sql",
+ "public/indexes/cmitemtax.sql",
+ "public/indexes/cobilltax.sql",
+ "public/indexes/cobmisctax.sql",
+ "public/indexes/cohisttax.sql",
"public/indexes/evntlog.sql",
+ "public/indexes/invchead.sql",
+ "public/indexes/invcheadtax.sql",
"public/indexes/invcitemtax.sql",
"public/indexes/shipitem.sql",
+ "public/indexes/taxhist.sql",
+ "public/indexes/voheadtax.sql",
+ "public/indexes/voitemtax.sql",
"public/types/achline.sql",
"public/types/apaging.sql",
"public/trigger_functions/wo.sql",
"public/trigger_functions/womatl.sql",
+ "public/tables/bankrecitem.sql",
+ "public/tables/cashrcpt.sql",
"public/tables/metric.sql",
+ "public/tables/priv.sql",
+ "public/tables/tax.sql",
+ "public/tables/taxpay.sql",
+
"public/tables/location.sql",
"public/views/address.sql",
"public/views/apmemo.sql",
WHERE (invcitem_invchead_id=pInvcheadid);
IF (pType IN ('T', 'X')) THEN
- SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) INTO _tax
- FROM calculateTaxDetailSummary('I', pInvcheadid, 'T');
+ SELECT SUM(tax) INTO _tax
+ FROM (SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) AS tax
+ FROM tax
+ JOIN calculateTaxDetailSummary('I', pInvcheadid, 'T')ON (taxdetail_tax_id=tax_id)
+ GROUP BY tax_id) AS data;
END IF;
IF (pType = 'T') THEN
WHERE (quitem_quhead_id=pQuheadid);
IF (pType IN ('T', 'X')) THEN
- SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) INTO _tax
- FROM calculateTaxDetailSummary('Q', pQuheadid, 'T');
+ SELECT SUM(tax) INTO _tax
+ FROM (SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) AS tax
+ FROM tax
+ JOIN calculateTaxDetailSummary('Q', pQuheadid, 'T')ON (taxdetail_tax_id=tax_id)
+ GROUP BY tax_id) AS data;
END IF;
IF (pType = 'T') THEN
AND (coitem_status != 'X');
IF (pType IN ('T', 'B', 'X')) THEN
- SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) INTO _tax
- FROM calculateTaxDetailSummary('S', pCoheadid, 'T');
+ SELECT SUM(tax) INTO _tax
+ FROM (SELECT COALESCE(ROUND(SUM(taxdetail_tax), 2), 0.0) AS tax
+ FROM tax
+ JOIN calculateTaxDetailSummary('S', pCoheadid, 'T')ON (taxdetail_tax_id=tax_id)
+ GROUP BY tax_id) AS data;
END IF;
IF (pType IN ('T', 'B', 'C')) THEN
_accntid INTEGER;
_sequence INTEGER;
_gltransid INTEGER;
+ _result INTEGER;
_r RECORD;
+ _tax RECORD;
BEGIN
END LOOP;
+ IF (fetchMetricBool('CashBasedTax')) THEN
+ -- Cash based tax distributions
+ -- GL Transactions
+ SELECT fetchGLSequence() INTO _sequence;
+ FOR _r IN SELECT *
+ FROM bankrecitem
+ WHERE ( (bankrecitem_cleared)
+ AND (bankrecitem_bankrec_id=pBankrecid) ) LOOP
+ -- first, debit the tax liability clearing account
+ -- and credit the tax liability distribution account
+ -- for each tax code
+ FOR _tax IN SELECT docnumber, custname, distdate, source, doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ ROUND(currToBase(currid, ROUND(SUM(taxhist_tax),2), taxhist_docdate) * percentpaid, 2) AS taxbasevalue
+ FROM (
+ -- Cash receipt, gltrans
+ SELECT aropen_docnumber AS docnumber, cust_name AS custname,
+ aropen_curr_id AS currid, gltrans_date AS distdate,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN cashrcpt ON ((gltrans_source='A/R')
+ AND (gltrans_doctype='CR')
+ AND (gltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN custinfo ON (cust_id=aropen_cust_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash receipt, sltrans
+ UNION
+ SELECT aropen_docnumber AS docnumber, cust_name AS custname,
+ aropen_curr_id AS currid, sltrans_date AS distdate,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN cashrcpt ON ((sltrans_source='A/R')
+ AND (sltrans_doctype='CR')
+ AND (sltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN custinfo ON (cust_id=aropen_cust_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, gltrans
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, gltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, gltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, sltrans
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, sltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, sltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ ) AS data
+ GROUP BY docnumber, custname, currid, distdate, percentpaid,
+ source, doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id, taxhist_docdate
+ LOOP
+ SELECT insertIntoGLSeries( _sequence, _tax.source, _tax.doctype, _tax.docnumber,
+ _tax.tax_dist_accnt_id,
+ _tax.taxbasevalue,
+ COALESCE(_r.bankrecitem_effdate, _tax.distdate), _tax.custname ) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'insertIntoGLSeries failed, result=%', _result;
+ END IF;
+ SELECT insertIntoGLSeries( _sequence, _tax.source, _tax.doctype, _tax.docnumber,
+ _tax.tax_sales_accnt_id,
+ (_tax.taxbasevalue * -1.0),
+ COALESCE(_r.bankrecitem_effdate, _tax.distdate), _tax.custname ) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'insertIntoGLSeries failed, result=%', _result;
+ END IF;
+ END LOOP;
+
+ -- second, create a taxpay row for each taxhist
+ FOR _tax IN SELECT taxhist_id, applyid, distdate,
+ ROUND(taxhist_tax * percentpaid, 2) AS taxpaid
+ FROM (
+ -- Cash receipt, gltrans
+ SELECT taxhist_id, aropen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid
+ FROM gltrans JOIN cashrcpt ON ((gltrans_source='A/R')
+ AND (gltrans_doctype='CR')
+ AND (gltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash receipt, sltrans
+ UNION
+ SELECT taxhist_id, aropen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid
+ FROM sltrans JOIN cashrcpt ON ((sltrans_source='A/R')
+ AND (sltrans_doctype='CR')
+ AND (sltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, gltrans
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, sltrans
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ ) AS data
+ LOOP
+ INSERT INTO taxpay
+ ( taxpay_taxhist_id, taxpay_apply_id, taxpay_distdate, taxpay_tax )
+ VALUES
+ ( _tax.taxhist_id, _tax.applyid, COALESCE(_r.bankrecitem_effdate, _tax.distdate), _tax.taxpaid );
+ END LOOP;
+
+ END LOOP;
+
+ SELECT postGLSeries(_sequence, fetchJournalNumber('GL-MISC')) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'postGLSeries failed, result=%', _result;
+ END IF;
+
+ END IF;
+
+
-- Mark all the gltrans items that have been cleared as reconciled.
UPDATE gltrans
SET gltrans_rec = TRUE
('Credit Return ' || _r.item_number),
costcat_asset_accnt_id,
getPrjAccntId(_r.cmhead_prj_id, resolveCOSAccount(itemsite_id, _r.cust_id, _r.saletype_id, _r.shipzone_id)),
- _itemlocSeries, _glDate, _r.std_cost) INTO _invhistid
+ _itemlocSeries, _glDate, (_r.std_cost * _r.qty)) INTO _invhistid
FROM itemsite, costcat
WHERE ((itemsite_costcat_id=costcat_id)
AND (itemsite_id=_r.itemsite_id));
_accntid INTEGER;
_sequence INTEGER;
_gltransid INTEGER;
+ _result INTEGER;
_r RECORD;
+ _tax RECORD;
BEGIN
WHERE (bankrec_id=_bankrecid);
END IF;
+ IF (fetchMetricBool('CashBasedTax')) THEN
+ -- Cash based tax distributions
+ -- GL Transactions
+ SELECT fetchGLSequence() INTO _sequence;
+ FOR _r IN SELECT *
+ FROM bankrecitem
+ WHERE ( (bankrecitem_cleared)
+ AND (bankrecitem_bankrec_id=pBankrecid) ) LOOP
+ -- first, debit the tax liability clearing account
+ -- and credit the tax liability distribution account
+ -- for each tax code
+ FOR _tax IN SELECT docnumber, custname, distdate, source, doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ ROUND(currToBase(currid, ROUND(SUM(taxhist_tax),2), taxhist_docdate) * percentpaid, 2) AS taxbasevalue
+ FROM (
+ -- Cash receipt, gltrans
+ SELECT aropen_docnumber AS docnumber, cust_name AS custname,
+ aropen_curr_id AS currid, gltrans_date AS distdate,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN cashrcpt ON ((gltrans_source='A/R')
+ AND (gltrans_doctype='CR')
+ AND (gltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN custinfo ON (cust_id=aropen_cust_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash receipt, sltrans
+ UNION
+ SELECT aropen_docnumber AS docnumber, cust_name AS custname,
+ aropen_curr_id AS currid, sltrans_date AS distdate,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN cashrcpt ON ((sltrans_source='A/R')
+ AND (sltrans_doctype='CR')
+ AND (sltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN custinfo ON (cust_id=aropen_cust_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, gltrans
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, gltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, gltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ gltrans_source AS source, gltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, sltrans
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, sltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT apopen_docnumber AS docnumber, vend_name AS vendname,
+ apopen_curr_id AS currid, sltrans_date AS distdate,
+ (vohead_amount / apopen_amount) AS percentpaid,
+ sltrans_source AS source, sltrans_doctype AS doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id,
+ taxhist_tax, taxhist_docdate
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN vendinfo ON (vend_id=apopen_vend_id)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ JOIN tax ON (tax_id=taxhist_tax_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ ) AS data
+ GROUP BY docnumber, custname, currid, distdate, percentpaid,
+ source, doctype,
+ tax_sales_accnt_id, tax_dist_accnt_id, taxhist_docdate
+ LOOP
+ SELECT insertIntoGLSeries( _sequence, _tax.source, _tax.doctype, _tax.docnumber,
+ _tax.tax_dist_accnt_id,
+ (_tax.taxbasevalue * -1.0),
+ COALESCE(_r.bankrecitem_effdate, _tax.distdate), _tax.custname ) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'insertIntoGLSeries failed, result=%', _result;
+ END IF;
+ SELECT insertIntoGLSeries( _sequence, _tax.source, _tax.doctype, _tax.docnumber,
+ _tax.tax_sales_accnt_id,
+ _tax.taxbasevalue,
+ COALESCE(_r.bankrecitem_effdate, _tax.distdate), _tax.custname ) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'insertIntoGLSeries failed, result=%', _result;
+ END IF;
+ END LOOP;
+
+ -- second, create a taxpay row for each taxhist
+ FOR _tax IN SELECT taxhist_id, applyid, distdate,
+ ROUND(taxhist_tax * percentpaid, 2) AS taxpaid
+ FROM (
+ -- Cash receipt, gltrans
+ SELECT taxhist_id, aropen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid
+ FROM gltrans JOIN cashrcpt ON ((gltrans_source='A/R')
+ AND (gltrans_doctype='CR')
+ AND (gltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash receipt, sltrans
+ UNION
+ SELECT taxhist_id, aropen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (cashrcptitem_amount / aropen_amount) AS percentpaid
+ FROM sltrans JOIN cashrcpt ON ((sltrans_source='A/R')
+ AND (sltrans_doctype='CR')
+ AND (sltrans_misc_id=cashrcpt_id))
+ JOIN cashrcptitem ON (cashrcptitem_cashrcpt_id=cashrcpt_id)
+ JOIN aropen ON (aropen_id=cashrcptitem_aropen_id)
+ JOIN cohist ON (cohist_invcnumber=aropen_docnumber AND cohist_doctype=aropen_doctype)
+ JOIN cohisttax ON (taxhist_parent_id=cohist_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, gltrans
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, gltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM gltrans JOIN checkhead ON ((gltrans_source='A/P')
+ AND (gltrans_doctype='CK')
+ AND (gltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ WHERE (gltrans_id=_r.bankrecitem_source_id)
+ -- Cash payment, sltrans
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voheadtax ON (taxhist_parent_id=vohead_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ UNION
+ SELECT taxhist_id, apopen_id AS applyid, sltrans_date AS distdate, taxhist_tax,
+ (checkitem_amount / apopen_amount) AS percentpaid
+ FROM sltrans JOIN checkhead ON ((sltrans_source='A/P')
+ AND (sltrans_doctype='CK')
+ AND (sltrans_misc_id=checkhead_id))
+ JOIN checkitem ON (checkitem_checkhead_id=checkhead_id)
+ JOIN apopen ON (apopen_id=checkitem_apopen_id)
+ JOIN vohead ON (vohead_number=apopen_docnumber)
+ JOIN voitem ON (voitem_vohead_id=vohead_id)
+ JOIN voitemtax ON (taxhist_parent_id=voitem_id)
+ WHERE (sltrans_id=_r.bankrecitem_source_id)
+ ) AS data
+ LOOP
+ DELETE FROM taxpay
+ WHERE (taxpay_taxhist_id=_tax.taxhist_id)
+ AND (taxpay_apply_id=_tax.applyid)
+ AND (taxpay_distdate=COALESCE(_r.bankrecitem_effdate, _tax.distdate))
+ AND (taxpay_tax=_tax.taxpaid);
+ END LOOP;
+
+ END LOOP;
+
+ SELECT postGLSeries(_sequence, fetchJournalNumber('GL-MISC')) INTO _result;
+ IF (_result < 0) THEN
+ RAISE EXCEPTION 'postGLSeries failed, result=%', _result;
+ END IF;
+
+ END IF;
+
-- Mark all the gltrans items that have been cleared as unreconciled.
UPDATE gltrans
SET gltrans_rec = FALSE
-CREATE OR REPLACE FUNCTION toggleBankrecCleared(INTEGER, TEXT, INTEGER, NUMERIC, NUMERIC) RETURNS BOOLEAN AS $$
+CREATE OR REPLACE FUNCTION toggleBankrecCleared(INTEGER, TEXT, INTEGER) RETURNS BOOLEAN AS $$
+-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
+-- See www.xtuple.com/CPAL for the full text of the software license.
+DECLARE
+ pBankrecid ALIAS FOR $1;
+ pSource ALIAS FOR $2;
+ pSourceid ALIAS FOR $3;
+
+BEGIN
+ RETURN toggleBankrecCleared(pBankrecid, pSource, pSourceid, NULL, NULL, NULL);
+END;
+$$ LANGUAGE 'plpgsql';
+
+CREATE OR REPLACE FUNCTION toggleBankrecCleared(INTEGER, TEXT, INTEGER, NUMERIC, NUMERIC, DATE) RETURNS BOOLEAN AS $$
-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
-- See www.xtuple.com/CPAL for the full text of the software license.
DECLARE
pSourceid ALIAS FOR $3;
pCurrrate ALIAS FOR $4;
pAmount ALIAS FOR $5;
+ pDate ALIAS FOR $6;
_cleared BOOLEAN;
_r RECORD;
BEGIN
-
SELECT bankrecitem_id, bankrecitem_cleared INTO _r
FROM bankrecitem
WHERE ( (bankrecitem_bankrec_id=pBankrecid)
INSERT INTO bankrecitem
(bankrecitem_bankrec_id, bankrecitem_source,
bankrecitem_source_id, bankrecitem_cleared,
- bankrecitem_curr_rate, bankrecitem_amount)
+ bankrecitem_curr_rate, bankrecitem_amount,
+ bankrecitem_effdate)
VALUES
(pBankrecid, pSource,
pSourceid, _cleared,
- pCurrrate, pAmount);
+ pCurrrate, pAmount,
+ pDate);
ELSE
_cleared := FALSE;
DELETE FROM bankrecitem
--- /dev/null
+--CREATE INDEX apopentax_taxhist_parent_id_idx on apopentax using btree (taxhist_parent_id);
+select xt.add_index('apopentax', 'taxhist_parent_id','apopentax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX apopentax_taxhist_taxtype_id_idx on apopentax using btree (taxhist_taxtype_id);
+select xt.add_index('apopentax', 'taxhist_taxtype_id','apopentax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX apopentax_taxhist_parent_type_idx on apopentax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('apopentax', 'taxhist_parent_id, taxhist_taxtype_id','apopentax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX aropentax_taxhist_parent_id_idx on aropentax using btree (taxhist_parent_id);
+select xt.add_index('aropentax', 'taxhist_parent_id','aropentax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX aropentax_taxhist_taxtype_id_idx on aropentax using btree (taxhist_taxtype_id);
+select xt.add_index('aropentax', 'taxhist_taxtype_id','aropentax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX aropentax_taxhist_parent_type_idx on aropentax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('aropentax', 'taxhist_parent_id, taxhist_taxtype_id','aropentax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX asohisttax_taxhist_parent_id_idx on asohisttax using btree (taxhist_parent_id);
+select xt.add_index('asohisttax', 'taxhist_parent_id','asohisttax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX asohisttax_taxhist_taxtype_id_idx on asohisttax using btree (taxhist_taxtype_id);
+select xt.add_index('asohisttax', 'taxhist_taxtype_id','asohisttax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX asohisttax_taxhist_parent_type_idx on asohisttax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('asohisttax', 'taxhist_parent_id, taxhist_taxtype_id','asohisttax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX cmheadtax_taxhist_parent_id_idx on cmheadtax using btree (taxhist_parent_id);
+select xt.add_index('cmheadtax', 'taxhist_parent_id','cmheadtax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX cmheadtax_taxhist_taxtype_id_idx on cmheadtax using btree (taxhist_taxtype_id);
+select xt.add_index('cmheadtax', 'taxhist_taxtype_id','cmheadtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX cmheadtax_taxhist_parent_type_idx on cmheadtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('cmheadtax', 'taxhist_parent_id, taxhist_taxtype_id','cmheadtax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX cmitemtax_taxhist_parent_id_idx on cmitemtax using btree (taxhist_parent_id);
+select xt.add_index('cmitemtax', 'taxhist_parent_id','cmitemtax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX cmitemtax_taxhist_taxtype_id_idx on cmitemtax using btree (taxhist_taxtype_id);
+select xt.add_index('cmitemtax', 'taxhist_taxtype_id','cmitemtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX cmitemtax_taxhist_parent_type_idx on cmitemtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('cmitemtax', 'taxhist_parent_id, taxhist_taxtype_id','cmitemtax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX cobilltax_taxhist_parent_id_idx on cobilltax using btree (taxhist_parent_id);
+select xt.add_index('cobilltax', 'taxhist_parent_id','cobilltax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX cobilltax_taxhist_taxtype_id_idx on cobilltax using btree (taxhist_taxtype_id);
+select xt.add_index('cobilltax', 'taxhist_taxtype_id','cobilltax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX cobilltax_taxhist_parent_type_idx on cobilltax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('cobilltax', 'taxhist_parent_id, taxhist_taxtype_id','cobilltax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX cobmisctax_taxhist_parent_id_idx on cobmisctax using btree (taxhist_parent_id);
+select xt.add_index('cobmisctax', 'taxhist_parent_id','cobmisctax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX cobmisctax_taxhist_taxtype_id_idx on cobmisctax using btree (taxhist_taxtype_id);
+select xt.add_index('cobmisctax', 'taxhist_taxtype_id','cobmisctax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX cobmisctax_taxhist_parent_type_idx on cobmisctax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('cobmisctax', 'taxhist_parent_id, taxhist_taxtype_id','cobmisctax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX cohisttax_taxhist_parent_id_idx on cohisttax using btree (taxhist_parent_id);
+select xt.add_index('cohisttax', 'taxhist_parent_id','cohisttax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX cohisttax_taxhist_taxtype_id_idx on cohisttax using btree (taxhist_taxtype_id);
+select xt.add_index('cohisttax', 'taxhist_taxtype_id','cohisttax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX cohisttax_taxhist_parent_type_idx on cohisttax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('cohisttax', 'taxhist_parent_id, taxhist_taxtype_id','cohisttax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX invchead_invchead_cust_id_idx on invchead using btree (invchead_cust_id);
+select xt.add_index('invchead', 'invchead_cust_id','invchead_invchead_cust_id_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX invcheadtax_taxhist_parent_id_idx on invcheadtax using btree (taxhist_parent_id);
+select xt.add_index('invcheadtax', 'taxhist_parent_id','invcheadtax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX invcheadtax_taxhist_taxtype_id_idx on invcheadtax using btree (taxhist_taxtype_id);
+select xt.add_index('invcheadtax', 'taxhist_taxtype_id','invcheadtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX invcheadtax_taxhist_parent_type_idx on invcheadtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('invcheadtax', 'taxhist_parent_id, taxhist_taxtype_id','invcheadtax_taxhist_parent_type_idx', 'btree', 'public');
-DROP INDEX IF EXISTS invcitemtax_taxhist_parent_id_idx;
-CREATE INDEX invcitemtax_taxhist_parent_id_idx ON invcitemtax (taxhist_parent_id);
+--CREATE INDEX invcitemtax_taxhist_parent_id_idx on invcitemtax using btree (taxhist_parent_id);
+select xt.add_index('invcitemtax', 'taxhist_parent_id','invcitemtax_taxhist_parent_id_idx', 'btree', 'public');
+--CREATE INDEX invcitemtax_taxhist_taxtype_id_idx on invcitemtax using btree (taxhist_taxtype_id);
+select xt.add_index('invcitemtax', 'taxhist_taxtype_id','invcitemtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX invcitemtax_taxhist_parent_type_idx on invcitemtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('invcitemtax', 'taxhist_parent_id, taxhist_taxtype_id','invcitemtax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX taxhist_taxhist_parent_id_idx on taxhist using btree (taxhist_parent_id);
+select xt.add_index('taxhist', 'taxhist_parent_id','taxhist_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX taxhist_taxhist_taxtype_id_idx on taxhist using btree (taxhist_taxtype_id);
+select xt.add_index('taxhist', 'taxhist_taxtype_id','taxhist_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX taxhist_taxhist_parent_type_idx on taxhist using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('taxhist', 'taxhist_parent_id, taxhist_taxtype_id','taxhist_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX voheadtax_taxhist_parent_id_idx on voheadtax using btree (taxhist_parent_id);
+select xt.add_index('voheadtax', 'taxhist_parent_id','voheadtax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX voheadtax_taxhist_taxtype_id_idx on voheadtax using btree (taxhist_taxtype_id);
+select xt.add_index('voheadtax', 'taxhist_taxtype_id','voheadtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX voheadtax_taxhist_parent_type_idx on voheadtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('voheadtax', 'taxhist_parent_id, taxhist_taxtype_id','voheadtax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+--CREATE INDEX voitemtax_taxhist_parent_id_idx on voitemtax using btree (taxhist_parent_id);
+select xt.add_index('voitemtax', 'taxhist_parent_id','voitemtax_taxhist_parent_id_idx', 'btree', 'public');
+
+--CREATE INDEX voitemtax_taxhist_taxtype_id_idx on voitemtax using btree (taxhist_taxtype_id);
+select xt.add_index('voitemtax', 'taxhist_taxtype_id','voitemtax_taxhist_taxtype_id_idx', 'btree', 'public');
+
+--CREATE INDEX voitemtax_taxhist_parent_type_idx on voitemtax using btree (taxhist_parent_id, taxhist_taxtype_id);
+select xt.add_index('voitemtax', 'taxhist_parent_id, taxhist_taxtype_id','voitemtax_taxhist_parent_type_idx', 'btree', 'public');
--- /dev/null
+select xt.add_column('bankrecitem','bankrecitem_effdate', 'DATE', NULL, 'public');
\ No newline at end of file
--- /dev/null
+select xt.add_column('cashrcpt','cashrcpt_alt_curr_rate', 'NUMERIC', NULL, 'public');
\ No newline at end of file
<? else ?>
SELECT gltrans_id AS id, 1 AS altid,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- gltrans_date AS transdate,
+ COALESCE(bankrecitem_effdate, gltrans_date) AS transdate,
gltrans_doctype AS doc_type,
gltrans_docnumber AS doc_number,
gltrans_notes AS notes,
AND (NOT COALESCE(checkhead_void, false))
AND (gltrans_amount > 0)
AND (gltrans_doctype != 'JP')
- AND (bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('GL' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (gltrans_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
UNION ALL
SELECT sltrans_id AS id, 2 AS altid,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- sltrans_date AS transdate,
+ COALESCE(bankrecitem_effdate, sltrans_date) AS transdate,
sltrans_doctype AS doc_type,
sltrans_docnumber AS doc_number,
sltrans_notes AS notes,
AND (NOT sltrans_rec)
AND (NOT COALESCE(checkhead_void, false))
AND (sltrans_amount > 0)
- AND (bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('SL' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (sltrans_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
UNION ALL
SELECT bankadj_id AS id, 3 AS altid,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- bankadj_date AS transdate,
+ COALESCE(bankrecitem_effdate, bankadj_date) AS transdate,
'ADJ' AS doc_type,
bankadj_docnumber AS doc_number,
bankadjtype_name AS notes,
WHERE ( (((bankadjtype_iscredit=true) AND (bankadj_amount > 0)) OR ((bankadjtype_iscredit=false) AND (bankadj_amount < 0)))
AND (bankadj_bankadjtype_id=bankadjtype_id)
AND (NOT bankadj_posted)
- AND (bankadj_bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankadj_bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('AD' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (bankadj_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
ORDER BY sortdate;
<? endif ?>
jrnluse_use AS use, gltrans_journalnumber AS jrnlnum,
COALESCE(date(jrnluse_date), gltrans_date) AS f_jrnldate,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- gltrans_date AS f_date,
+ COALESCE(bankrecitem_effdate, gltrans_date) AS f_date,
gltrans_doctype AS doc_type,
gltrans_docnumber AS docnumber,
gltrans_notes AS notes,
AND (NOT COALESCE(checkhead_void, false))
AND (gltrans_amount < 0)
AND (gltrans_doctype != 'JP')
- AND (bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('GL' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (gltrans_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
UNION ALL
SELECT sltrans_id AS id, 2 AS altid,
jrnluse_use AS use, sltrans_journalnumber AS jrnlnum,
COALESCE(date(jrnluse_date), sltrans_date) AS f_jrnldate,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- sltrans_date AS f_date,
+ COALESCE(bankrecitem_effdate, sltrans_date) AS f_date,
sltrans_doctype AS doc_type,
sltrans_docnumber AS docnumber,
sltrans_notes AS notes,
WHERE ((NOT sltrans_rec)
AND (NOT COALESCE(checkhead_void, false))
AND (sltrans_amount < 0)
- AND (bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('SL' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (sltrans_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
UNION ALL
SELECT bankadj_id AS id, 3 AS altid,
'' AS use, NULL AS jrnlnum, bankadj_date AS f_jrnldate,
COALESCE(bankrecitem_cleared, FALSE) AS cleared,
- bankadj_date AS f_date,
+ COALESCE(bankrecitem_effdate, bankadj_date) AS f_date,
'ADJ' AS doc_type,
bankadj_docnumber AS docnumber,
bankadjtype_name AS notes,
WHERE ( (((bankadjtype_iscredit=false) AND (bankadj_amount > 0)) OR ((bankadjtype_iscredit=true) AND (bankadj_amount < 0)))
AND (bankadj_bankadjtype_id=bankadjtype_id)
AND (NOT bankadj_posted)
- AND (bankadj_bankaccnt_id=<? value("bankaccntid") ?>) )
+ AND (bankadj_bankaccnt_id=<? value("bankaccntid") ?>)
+<? if exists("source") ?>
+ AND ('AD' = <? value("source") ?>)
+<? endif ?>
+<? if exists("sourceid") ?>
+ AND (bankadj_id = <? value("sourceid") ?>)
+<? endif ?>
+ )
ORDER BY jrnldate, jrnlnum, sortdate;
<? endif ?>
------------BEGIN SALES--------------
-- All sales tax history including memos
SELECT
- taxhist_distdate, taxhist_journalnumber,
- tax_code AS tax, tax_descrip,
+ COALESCE(taxpay_distdate, taxhist_distdate) AS taxhist_distdate,
+ taxhist_journalnumber, tax_code AS tax, tax_descrip,
COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,
COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,
COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,
END AS freightbase,
CASE
WHEN (cohist_misc_type = 'F') THEN
- taxhist_tax / taxhist_curr_rate
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate
ELSE 0
END AS freighttax,
0 AS purchasebase,
- taxhist_tax AS taxlocal,
- taxhist_tax / taxhist_curr_rate AS taxbase,
- taxhist_tax / taxhist_curr_rate AS salestaxbase,
+ COALESCE(taxpay_tax, taxhist_tax) AS taxlocal,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS taxbase,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS salestaxbase,
0 AS purchasetaxbase,
'qty' AS qty_xtnumericrole,
'saleprice' AS unitprice_xtnumericrole,
LEFT OUTER JOIN taxzone ON (cohist_taxzone_id=taxzone_id)
LEFT OUTER JOIN itemsite ON (cohist_itemsite_id=itemsite_id)
LEFT OUTER JOIN item ON (itemsite_item_id=item_id)
+ LEFT OUTER JOIN taxpay ON (taxpay_taxhist_id=taxhist_id)
+WHERE ((true)
<? if exists("distDate") ?>
-WHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_distdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? else ?>
-WHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_docdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? endif ?>
<? if exists("tax_id") ?>
AND (taxhist_tax_id=<? value("tax_id") ?>)
<? if exists("taxzone_id") ?>
AND (taxzone_id=<? value("taxzone_id") ?>)
<? endif ?>
+<? if exists("cashbasedtax") ?>
+ AND (taxpay_id IS NOT NULL)
+<? endif ?>
)
<? endif ?>
--------------END SALES--------------------
<? if exists("showPurchases") ?>
-- A/P Memo history
SELECT
- taxhist_distdate, taxhist_journalnumber,
- tax_code AS tax, tax_descrip,
+ COALESCE(taxpay_distdate, taxhist_distdate) AS taxhist_distdate,
+ taxhist_journalnumber, tax_code AS tax, tax_descrip,
COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,
COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,
COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,
0 AS freightbase,
0 AS freighttax,
apopen_amount / apopen_curr_rate AS purchasebase,
- taxhist_tax AS taxlocal,
- taxhist_tax / taxhist_curr_rate AS taxbase,
+ COALESCE(taxpay_tax, taxhist_tax) AS taxlocal,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS taxbase,
0 AS salestaxbase,
- taxhist_tax / taxhist_curr_rate AS purchasetaxbase,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS purchasetaxbase,
'qty' AS qty_xtnumericrole,
'purchaseprice' AS unitprice_xtnumericrole,
'extprice' AS extension_xtnumericrole,
JOIN curr_symbol ON (curr_id=taxhist_curr_id)
LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)
LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)
+ LEFT OUTER JOIN taxpay ON (taxpay_taxhist_id=taxhist_id)
+WHERE ((true)
<? if exists("distDate") ?>
-WHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_distdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? else ?>
-WHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_docdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? endif ?>
<? if exists("tax_id") ?>
AND (taxhist_tax_id=<? value("tax_id") ?>)
AND (false)
<? endif ?>
AND (taxhist_distdate IS NOT NULL)
+<? if exists("cashbasedtax") ?>
+ AND (taxpay_id IS NOT NULL)
+<? endif ?>
)
UNION ALL
--Voucher Header History
SELECT
- taxhist_distdate, taxhist_journalnumber,
- tax_code AS tax, tax_descrip,
+ COALESCE(taxpay_distdate, taxhist_distdate) AS taxhist_distdate,
+ taxhist_journalnumber, tax_code AS tax, tax_descrip,
COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,
COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,
COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,
0 AS freightbase,
0 AS freighttax,
0 AS purchasebase,
- taxhist_tax AS taxlocal,
- taxhist_tax / taxhist_curr_rate AS taxbase,
+ COALESCE(taxpay_tax, taxhist_tax) AS taxlocal,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS taxbase,
0 AS salestaxbase,
- taxhist_tax / taxhist_curr_rate AS purchasetaxbase,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS purchasetaxbase,
'qty' AS qty_xtnumericrole,
'purchaseprice' AS unitprice_xtnumericrole,
'extprice' AS amount_xtnumericrole,
LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)
LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)
LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)
+ LEFT OUTER JOIN taxpay ON (taxpay_taxhist_id=taxhist_id)
+WHERE ((true)
<? if exists("distDate") ?>
-WHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_distdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? else ?>
-WHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_docdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? endif ?>
<? if exists("tax_id") ?>
AND (taxhist_tax_id=<? value("tax_id") ?>)
AND (taxzone_id=<? value("taxzone_id") ?>)
<? endif ?>
AND (taxhist_distdate IS NOT NULL)
+<? if exists("cashbasedtax") ?>
+ AND (taxpay_id IS NOT NULL)
+<? endif ?>
)
UNION ALL
--Voucher Line Item
SELECT
- taxhist_distdate, taxhist_journalnumber,
- tax_code AS tax, tax_descrip,
+ COALESCE(taxpay_distdate, taxhist_distdate) AS taxhist_distdate,
+ taxhist_journalnumber, tax_code AS tax, tax_descrip,
COALESCE(taxtype_name,<? value("none") ?>) AS taxtype, taxtype_descrip,
COALESCE(taxclass_code,<? value("none") ?>) AS taxclass, taxclass_descrip,
COALESCE(taxauth_code,<? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,
0 AS freightbase,
0 AS freighttax,
currToBase(vohead_curr_id, COALESCE(SUM(vodist_amount),0), vohead_distdate) AS purchasebase,
- taxhist_tax AS taxlocal,
- taxhist_tax / taxhist_curr_rate AS taxbase,
+ COALESCE(taxpay_tax, taxhist_tax) AS taxlocal,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS taxbase,
0 AS salestaxbase,
- taxhist_tax / taxhist_curr_rate AS purchasetaxbase,
+ COALESCE(taxpay_tax, taxhist_tax) / taxhist_curr_rate AS purchasetaxbase,
'qty' AS qty_xtnumericrole,
'purchaseprice' AS unitprice_xtnumericrole,
'extprice' AS amount_xtnumericrole,
LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)
LEFT OUTER JOIN item ON (itemsite_item_id=item_id)
LEFT OUTER JOIN expcat ON (expcat_id=poitem_expcat_id)
+ LEFT OUTER JOIN taxpay ON (taxpay_taxhist_id=taxhist_id)
+WHERE ((true)
<? if exists("distDate") ?>
-WHERE ((taxhist_distdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_distdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? else ?>
-WHERE ((taxhist_docdate BETWEEN <? value("startDate") ?>
- AND <? value("endDate") ?>)
+ AND (taxhist_docdate BETWEEN <? value("startDate") ?>
+ AND <? value("endDate") ?>)
<? endif ?>
<? if exists("tax_id") ?>
AND (taxhist_tax_id=<? value("tax_id") ?>)
AND (taxzone_id=<? value("taxzone_id") ?>)
<? endif ?>
AND (taxhist_distdate IS NOT NULL)
+<? if exists("cashbasedtax") ?>
+ AND (taxpay_id IS NOT NULL)
+<? endif ?>
)
-GROUP BY taxhist_id,taxhist_distdate,tax_code,tax_descrip,
+GROUP BY taxhist_id, taxpay_distdate,taxhist_distdate,tax_code,tax_descrip,
taxtype_name,taxtype_descrip,taxclass_code,taxclass_descrip,
taxauth_code,taxauth_descrip,taxzone,taxzone_descrip,curr_abbr,
vohead_number,pohead_number,item_number,item_descrip1,
vohead_curr_id,vohead_distdate,vohead_docdate,vend_name,
expcat_code,expcat_descrip,taxhist_tax,taxhist_curr_rate,
- voitem_qty, taxhist_journalnumber
+ voitem_qty, taxhist_journalnumber, taxpay_tax
<? endif ?>
-------------END PURCHASE--------------
ORDER BY docdate DESC, docnumber DESC
SELECT recv_id AS item_id, 1 AS item_type, 'REC' AS action,
recv_date AS item_date,
recv_qty AS qty, 'qty' AS qty_xtnumericrole,
- recv_purchcost AS unitprice, 'curr' AS unitprice_xtnumericrole,
+ recv_purchcost AS unitprice,
+ 'purchprice' AS unitprice_xtnumericrole,
formatBoolYN(recv_vohead_id=<? value("vohead_id") ?>) AS f_tagged,
<? value("receiving") ?> AS action_qtdisplayrole,
0 AS qty_xttotalrole
SELECT poreject_id AS item_id, 2 AS item_type, 'REJ' AS action,
poreject_date AS item_date,
poreject_qty * -1 AS qty, 'qty',
- COALESCE(recv_purchcost, poitem_unitprice) AS unitprice, 'curr' AS unitprice_xtnumericrole,
+ COALESCE(recv_purchcost, poitem_unitprice) AS unitprice,
+ 'purchprice' AS unitprice_xtnumericrole,
formatBoolYN(poreject_vohead_id=<? value("vohead_id") ?>) AS f_tagged,
<? value("reject") ?> AS action_qtdisplayrole,
0 AS qty_xttotalrole
select 'UnifiedBuild', 'true'
where not exists (select c.metric_id from metric c where c.metric_name = 'UnifiedBuild');
-SELECT setMetric('ServerVersion', '4.4.1');
+SELECT setMetric('ServerVersion', '4.5.0Beta');
--- /dev/null
+insert into priv (priv_module, priv_name, priv_descrip)
+select 'Accounting', 'ChangeCashRecvPostDate',
+ 'Can change the distribution date when posting Cash Receipts'
+where not exists (select c.priv_id from priv c where c.priv_name = 'ChangeCashRecvPostDate');
\ No newline at end of file
--- /dev/null
+select xt.add_column('tax','tax_dist_accnt_id', 'INTEGER', NULL, 'public');
\ No newline at end of file
--- /dev/null
+select xt.create_table('taxpay', 'public');
+select xt.add_column('taxpay','taxpay_id', 'INTEGER', 'NOT NULL', 'public');
+select xt.add_column('taxpay','taxpay_taxhist_id', 'INTEGER', 'NOT NULL', 'public');
+select xt.add_column('taxpay','taxpay_apply_id', 'INTEGER', 'NOT NULL', 'public');
+select xt.add_column('taxpay','taxpay_distdate', 'DATE', 'NOT NULL', 'public');
+select xt.add_column('taxpay','taxpay_tax', 'NUMERIC', 'NOT NULL', 'public');
+select xt.add_primary_key('taxpay','taxpay_id', 'public');
\ No newline at end of file
FROM metric
WHERE(metric_name='GLFFProfitCenters')
LIMIT 1;
- ffProfit := COALESCE(ffSub, false);
+ ffProfit := COALESCE(ffProfit, false);
IF (NEW.accnt_sub IS NOT NULL AND ffSub = false) THEN
SELECT subaccnt_id
.selectable-chart {
margin: 10px;
- color: @white;
+ color: @slate-blue;
overflow: hidden;
+
+ .xv-list-item {
+ border-bottom: 1px solid grey;
+ box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
+ .long {
+ padding-left: 7px;
+ width: 250px;
+ }
+ }
+
+ .onyx-popup {
+ margin-top:40px;
+ margin-left:200px;
+ }
.chart-title-bar {
height: @icon-height;
- background-color: @dark-gray;
+ background-color: @lightest-gray;
.border-top-radius(10px);
.chart-title {
padding-top: 8px;
+ color: @black;
text-align: center;
+ /*font-size: 2em;*/
+ font-weight: normal
}
.remove-icon {
top: 0;
right: 0;
}
+
+ .icon-filter {
+ color: @black;
+ position: absolute;
+ right: 35px;
+ }
}
.chart-bottom {
- background-color: @charcoal;
+ background-color: @white;
border: 1px solid @bottom-border;
border-top: none;
.border-bottom-radius(10px);
.xv-picker-label {
width: @picker-label;
- color: @white;
+ color: @black;
}
.onyx-button {
padding: 10px 10px;
}
}
+
+ .chart-filters {
+ background-color: @white;
+
+ -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
+ }
+
+ .chart-filters .xv-parameter-panel {
+ background-color: @ghost;
+ border: 1px solid @smoke;
+ margin: 0 4px 6px 0;
+ width: 100%;
+ }
+
+ .chart-filters.xv-parameter-panel .onyx-groupbox-header {
+ padding: 6px 10px;
+ border-bottom: 1px solid @smoke;
+ background: @lightest-gray;
+ color: @near-black;
+}
+
+ .chart-filters.xv-parameter-panel .enyo-fittable-columns-layout {
+ padding: 6px 10px;
+ border-bottom: 1px solid @smoke;
+ background: @white;
+ color: @near-black;
+}
+
}
border: none;
}
/**
- * Default ListItem styles when using a ModelDecorator.
- */
-.xv-list .xv-model-decorator > .xv-list-item .xv-table {
- display: table;
- width: 100%;
- table-layout: fixed;
-}
-.xv-list .xv-model-decorator > .xv-list-item .xv-table .xv-cell {
- display: table-cell;
-}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr {
- /**
- * Default styling for a model's id (as designated by 'idAttribute')
- */
-}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attribute-id {
- color: blue;
+ Styles relating to Lists
+*/
+.xv-list-header {
+ background-color: #d8d8d8;
+ color: #fdfdfd;
+ font-size: .6em;
font-weight: bold;
- cursor: pointer;
+ text-transform: uppercase;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ border-bottom: 1px solid #aaaaaa;
}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attribute-name {
- font-weight: bold;
+.xv-list-header .xv-list-column.last {
+ border-right: none;
}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-number {
- text-align: right;
+.xv-list-header .xv-list-column.name-column,
+.xv-list-header .xv-list-column.first,
+.xv-list-header .xv-list-column.second,
+.xv-list-header .xv-list-column.third,
+.xv-list-header .xv-list-column.short,
+.xv-list-header .xv-list-column.small,
+.xv-list-header .xv-list-column.medium,
+.xv-list-header .xv-list-column.descr {
+ padding-left: 7px;
}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-money {
+/* List */
+.xv-list-column.line-number {
+ width: 30px;
text-align: right;
}
-.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-date {
+.xv-list-column.name-column {
+ width: 200px;
+}
+.xv-list-column.right-column {
+ width: 100px;
text-align: right;
}
-.xv-list .xv-model-decorator > .xv-list-item.item-selected .xv-list-attr {
- color: white;
+.xv-list-column.short {
+ width: 100px;
}
-.xv-list .xv-model-decorator > .xv-list-item.item-selected .xv-list-attr.xm-attribute-id {
- color: #ff6529;
+.xv-list-column.small {
+ width: 125px;
}
-/**
- Styles related to pickers, combo boxes, and relation widgets
-*/
-.onyx-picker-decorator .onyx-button {
- padding: 12px 8px 12px 8px;
+.xv-list-column.medium {
width: 150px;
}
-.onyx-picker .onyx-menu-item {
- text-align: left;
- text-overflow: ellipsis;
-}
-.picker-icon {
- position: absolute;
- right: 0;
- margin: 0 10px 0 2px;
- color: #070707;
-}
-.xv-picker-button {
- text-align: left;
+.xv-list-column.first {
+ width: 300px;
}
-.xv-picker-button .picker-content {
- max-width: 100px;
- overflow: hidden;
+.xv-list-column.second {
+ width: 200px;
}
-.xv-picker-button.disabled {
- color: #777777;
+.xv-list-column.third {
+ width: 100px;
}
-.xv-picker-label {
- color: #070707;
- padding: 20px 8px 8px 8px;
+.xv-list-column.money,
+.xv-list-column.quantity {
+ width: 75px;
text-align: right;
- width: 130px;
}
-.xv-picker-label.disabled {
- color: #777777;
+.xv-list-column.descr {
+ width: 200px;
}
-.xv-combobox .onyx-input-decorator input {
- width: 145px;
+.xv-list-column.icon {
+ width: 10px;
}
-.xv-combobox .icon-sort {
- color: #357ec7;
+.xv-list {
+ background: #f8f8f8;
+}
+.xv-list .xv-list-item > * {
+ display: inline-block;
vertical-align: middle;
}
-.xv-combobox-note {
- padding: 14px 3px 8px 3px;
- text-align: left;
+.xv-list .xv-list-item {
+ background-color: #fdfdfd;
+ border-bottom: 1px solid #d7d7d7;
+ min-height: 32px;
}
-/*
- Styles relating to the grid box
-*/
-/* Entire box including the grid and the summary panel */
-.xv-grid-box {
- /**
- This is the most general grid row that
- is not specific to read-only or selected
- */
+.xv-list .xv-list-item.header {
+ padding-top: 0;
}
-.xv-grid-box.small-panel {
- width: 600px;
+.xv-list .xv-list-item.inactive {
+ background-color: #d8d8d8;
+ color: #070707;
}
-.xv-grid-box.medium-panel {
- width: 700px;
+.xv-list .xv-list-item.inactive .xv-list-column .xv-list-attr {
+ background: transparent;
}
-.xv-grid-box.large-panel {
- width: 800px;
+.xv-list .xv-list-item.inactive .xv-list-column .xv-list-attr.placeholder {
+ color: #d8d8d8;
}
-.xv-grid-box .enyo-list-page > *:first-child .xv-grid-row {
- border-top: 0;
+.xv-list .xv-list-item .xv-list-column .list-icon {
+ padding: 2px;
+ color: #666666;
+ vertical-align: sub;
+ border: 1px solid #efefef;
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
}
-.xv-grid-box .xv-above-grid-list {
- border: 0;
+.xv-list .xv-list-item.item-selected {
+ background: #226b9a;
+ background-color: #1f608c;
+ background-image: -moz-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#226b9a), to(#1a4f77));
+ background-image: -webkit-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: -o-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: linear-gradient(to bottom, #226b9a, #1a4f77);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff226b9a', endColorstr='#ff1a4f77', GradientType=0);
}
-.xv-grid-box .xv-scroller {
+.xv-list .xv-list-item.item-selected .xv-list-attr {
+ color: #fdfdfd;
+}
+.xv-list .xv-list-item.item-selected .xv-list-attr.placeholder {
+ font-style: italic;
+ color: #99ccff;
+}
+.xv-list .xv-list-item.item-selected .xv-list-attr.hyperlink {
+ color: #ff6529;
+}
+.xv-list .xv-list-item.item-selected .xv-list-attr.header {
+ background: #99ccff;
+}
+.xv-list .xv-list-item .xv-list-item-gear {
+ position: absolute;
+ right: 0px;
+ z-index: 999;
+}
+.xv-list.xv-grid-list {
background: #f8f8f8;
}
-.xv-grid-box .xv-grid-attr.bold {
- font-weight: bold;
+.xv-list.xv-grid-list .xv-list-item > * {
+ vertical-align: top;
}
-.xv-grid-box .xv-grid-attr.error {
- color: #ff0000;
+.xv-list.xv-grid-list .xv-list-item {
+ padding-top: 7px !important;
+ padding-bottom: 9px !important;
+ border-bottom: 1px solid #aaaaaa !important;
+ background: #f8f8f8;
}
-.xv-grid-box .xv-grid-attr.emphasis {
- color: #009000;
+.xv-list.xv-grid-list .xv-list-item.item-selected {
+ background: #226b9a;
+ background-color: #1f608c;
+ background-image: -moz-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#226b9a), to(#1a4f77));
+ background-image: -webkit-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: -o-linear-gradient(top, #226b9a, #1a4f77);
+ background-image: linear-gradient(to bottom, #226b9a, #1a4f77);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff226b9a', endColorstr='#ff1a4f77', GradientType=0);
}
-.xv-grid-box .xv-grid-attr.warn {
- color: #ff9c00;
+.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr {
+ color: #fdfdfd;
}
-.xv-grid-box .xv-grid-attr.italic {
+.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.placeholder {
font-style: italic;
+ color: #99ccff;
}
-.xv-grid-box .xv-grid-attr.placeholder {
- font-style: italic;
- color: #93a1a1;
+.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.hyperlink {
+ color: #ff6529;
}
-.xv-grid-box .xv-grid-attr.hyperlink {
- color: blue;
+.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.header {
+ background: #99ccff;
}
-.xv-grid-box .xv-gridbox-button {
- color: #357ec7;
- font-size: 18px;
- border: none;
- background: transparent;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column {
+ vertical-align: top;
}
-.xv-grid-box .xv-grid-row {
+.xv-list.xv-grid-list .xv-list-item .xv-list-column .xv-list-attr {
font-size: 12px;
- background-color: #d8d8d8;
- border-bottom: 1px solid #aaaaaa;
- vertical-align: top;
- /**
- This is the grid header row
- */
}
-.xv-grid-box .xv-grid-row > * {
- display: inline-block;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.last {
+ border-right: none;
}
-.xv-grid-box .xv-grid-row .xv-grid-header {
- background-color: #d7d7d7;
- color: #0e0e0e;
- font-size: .8em;
- font-weight: bold;
- text-transform: uppercase;
- padding-top: 4px;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.name-column {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .xv-grid-header.last {
- border-right: none;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.first {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row > * {
- padding: 6px 4px;
- border: none;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.second {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .line-number {
- vertical-align: top;
- width: 30px;
- text-align: right;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.third {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .grid-actions {
- display: block;
- padding-left: 30px;
- border-radius: 4px;
- border-width: 0;
- background: #f3f3f3;
- margin: 6px;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.short {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .grid-actions > * {
- display: inline-block;
- width: 100%;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.small {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .grid-item {
- vertical-align: top;
- width: 175px;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.medium {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .quantity {
- vertical-align: top;
- text-align: right;
- width: 100px;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column.descr {
+ padding-left: 7px;
}
-.xv-grid-box .xv-grid-row .percent {
- vertical-align: top;
- text-align: right;
- width: 90px;
+.xv-list.xv-grid-list .xv-list-item .xv-list-column .xv-list-attr {
+ padding: 0px;
}
-.xv-grid-box .xv-grid-row .price {
- vertical-align: top;
- text-align: right;
- width: 90px;
+.xv-list-attr {
+ padding: 5px;
+ font-size: .8em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ color: #070707;
}
-.xv-grid-box .xv-grid-row .date {
- vertical-align: top;
- width: 105px;
+.xv-list-attr.header {
+ padding: 4px;
+ background: #d8d8d8;
+ font-size: .7em;
+ font-weight: bold;
+ text-transform: uppercase;
+ color: #fdfdfd;
}
-.xv-grid-box .xv-grid-row .user {
- vertical-align: top;
- width: 100px;
+.xv-list-attr.footer {
+ padding: 4px;
+ background: #d8d8d8;
+ font-size: .7em;
+ font-weight: bold;
+ text-transform: uppercase;
+ color: #070707;
}
-.xv-grid-box .xv-grid-row.readonly {
- background: #f8f8f8;
- min-height: 56px;
+.xv-list-attr.right {
+ position: absolute;
+ right: 10px;
}
-.xv-grid-box .xv-grid-row.selected {
- background-color: #fdfdfd;
- border: 1px solid #ff6529;
+.xv-list-attr.text-align-right {
+ text-align: right;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-input-decorator {
- padding: 0;
- width: 100%;
- margin: 0;
+.xv-list-attr.bold {
+ font-weight: bold;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-input-decorator input {
- width: 100%;
- font-size: 13px;
+.xv-list-attr.error {
+ color: #ff0000;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-picker-decorator {
- padding-top: 6px;
- width: 100%;
+.xv-list-attr.emphasis {
+ color: #009000;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-picker-decorator .onyx-button {
- height: 26px;
- padding-top: 3px;
- width: 100%;
- font-size: 13px;
+.xv-list-attr.warn {
+ color: #ff9c00;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input {
- border: none;
+.xv-list-attr.italic {
+ font-style: italic;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-picker-label {
- display: none;
+.xv-list-attr.placeholder {
+ font-style: italic;
+ color: #777777;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget {
- margin-right: 10px;
- padding-top: 0;
+.xv-list-attr.hyperlink {
+ color: blue;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator {
- padding: 0;
- width: 100%;
+.xv-list-attr.disabled {
+ color: #777777;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator input {
- width: 85%;
- font-size: 13px;
+/* Navigator */
+.xv-navigator-header {
+ font-size: small;
+ font-weight: bold;
+ text-transform: uppercase;
+ color: #ff6600;
+ padding-left: 20px;
+ border-bottom: 1px solid #0e0e0e;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget {
- padding-top: 6px;
+.xv-workspace-header {
+ color: #fdfdfd;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding: 8px 0 0 8px;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator {
- padding: 0;
+/**
+ * Default ListItem styles when using a ModelDecorator.
+ */
+.xv-list .xv-model-decorator > .xv-list-item .xv-table {
+ display: table;
width: 100%;
- margin: 0;
+ table-layout: fixed;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator input {
- width: 100%;
- font-size: 13px;
+.xv-list .xv-model-decorator > .xv-list-item .xv-table .xv-cell {
+ display: table-cell;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox {
- padding-left: 0;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr {
+ /**
+ * Default styling for a model's id (as designated by 'idAttribute')
+ */
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox input {
- padding-top: 3px;
- width: 80px;
- font-size: 13px;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attribute-id {
+ color: blue;
+ font-weight: bold;
+ cursor: pointer;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget {
- padding-bottom: 0;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attribute-name {
+ font-weight: bold;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator {
- padding: 0;
- width: 100%;
- margin: 0;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-number {
+ text-align: right;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator input {
- width: 100%;
- font-size: 13px;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-money {
+ text-align: right;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input-decorator {
- width: 100%;
- padding-top: 6px;
+.xv-list .xv-model-decorator > .xv-list-item .xv-list-column.xv-list-attr.xm-attributetype-date {
+ text-align: right;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input {
- width: 85%;
- padding-right: 4px;
+.xv-list .xv-model-decorator > .xv-list-item.item-selected .xv-list-attr {
+ color: white;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-useraccount-widget .xv-subinput {
- width: 80px;
- height: 16px;
+.xv-list .xv-model-decorator > .xv-list-item.item-selected .xv-list-attr.xm-attribute-id {
+ color: #ff6529;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-subinput {
- width: 100%;
+/**
+ Styles related to pickers, combo boxes, and relation widgets
+*/
+.onyx-picker-decorator .onyx-button {
+ padding: 12px 8px 12px 8px;
+ width: 150px;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input {
- padding-top: 6px;
- width: 100%;
- border: none;
+.onyx-picker .onyx-menu-item {
+ text-align: left;
+ text-overflow: ellipsis;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-label,
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-flexible-label,
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget-secondarydescription {
- display: none;
+.picker-icon {
+ position: absolute;
+ right: 0;
+ margin: 0 10px 0 2px;
+ color: #070707;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget-description {
- text-indent: 0;
- padding-bottom: 0;
- padding-top: 8px;
+.xv-picker-button {
+ text-align: left;
}
-.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-private-item-site-widget {
- border-bottom: 0;
+.xv-picker-button .picker-content {
+ max-width: 100px;
+ overflow: hidden;
}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel {
- border: none;
- margin-top: 0;
- padding-left: 0;
- padding-right: 0;
+.xv-picker-button.disabled {
+ color: #777777;
}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group {
- padding: 0;
- border: none;
+.xv-picker-label {
+ color: #070707;
+ padding: 20px 8px 8px 8px;
+ text-align: right;
+ width: 130px;
}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-moneywidget {
- padding-bottom: 0;
- padding-top: 0;
-}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-moneywidget .xv-input-decorator {
- padding-bottom: 0;
- padding-top: 0;
+.xv-picker-label.disabled {
+ color: #777777;
}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-numberwidget {
- padding-bottom: 0;
- padding-top: 0;
+.xv-combobox .onyx-input-decorator input {
+ width: 145px;
}
-.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-numberwidget .xv-input-decorator {
- width: 163px;
- padding-bottom: 0;
- padding-top: 0;
+.xv-combobox .icon-sort {
+ color: #357ec7;
+ vertical-align: middle;
}
-.xv-grid-list .xv-list-column {
- vertical-align: top !important;
+.xv-combobox-note {
+ padding: 14px 3px 8px 3px;
+ text-align: left;
}
/*
- Styles relating to the dashboard
-*/
-/*
- Variables for widths/colors
+ Styles relating to the grid box
*/
-.dashboard {
- background-color: #d8d8d8;
- /*
- These styles will only be used
- if the chart is in a dashboard
+/* Entire box including the grid and the summary panel */
+.xv-grid-box {
+ /**
+ This is the most general grid row that
+ is not specific to read-only or selected
*/
}
-.dashboard .charts-panels {
- overflow-y: auto;
+.xv-grid-box.small-panel {
+ width: 600px;
}
-.dashboard .selectable-chart {
- width: 500px;
- height: 230px;
+.xv-grid-box.medium-panel {
+ width: 700px;
}
-.dashboard .selectable-chart .chart-title-bar {
- width: 500px;
+.xv-grid-box.large-panel {
+ width: 800px;
}
-.dashboard .nvtooltip {
- color: black;
+.xv-grid-box .enyo-list-page > *:first-child .xv-grid-row {
+ border-top: 0;
}
-.selectable-chart {
- margin: 10px;
- color: #fdfdfd;
- overflow: hidden;
+.xv-grid-box .xv-above-grid-list {
+ border: 0;
}
-.selectable-chart .chart-title-bar {
- height: 32px;
- background-color: #373737;
- -webkit-border-top-right-radius: 10px;
- -moz-border-radius-topright: 10px;
- border-top-right-radius: 10px;
- -webkit-border-top-left-radius: 10px;
- -moz-border-radius-topleft: 10px;
- border-top-left-radius: 10px;
+.xv-grid-box .xv-scroller {
+ background: #f8f8f8;
}
-.selectable-chart .chart-title-bar .chart-title {
- padding-top: 8px;
- text-align: center;
+.xv-grid-box .xv-grid-attr.bold {
+ font-weight: bold;
}
-.selectable-chart .chart-title-bar .remove-icon {
- position: absolute;
- top: 0;
- right: 0;
+.xv-grid-box .xv-grid-attr.error {
+ color: #ff0000;
}
-.selectable-chart .chart-bottom {
- background-color: #666666;
- border: 1px solid #444444;
- border-top: none;
- -webkit-border-bottom-right-radius: 10px;
- -moz-border-radius-bottomright: 10px;
- border-bottom-right-radius: 10px;
- -webkit-border-bottom-left-radius: 10px;
- -moz-border-radius-bottomleft: 10px;
- border-bottom-left-radius: 10px;
+.xv-grid-box .xv-grid-attr.emphasis {
+ color: #009000;
}
-.selectable-chart .chart-bottom .xv-picker-label {
- width: 100px;
- color: #fdfdfd;
+.xv-grid-box .xv-grid-attr.warn {
+ color: #ff9c00;
}
-.selectable-chart .chart-bottom .onyx-button {
- width: 130px;
- padding: 10px 10px;
+.xv-grid-box .xv-grid-attr.italic {
+ font-style: italic;
}
-/**
- Styles relating to Lists
-*/
-.xv-list-header {
+.xv-grid-box .xv-grid-attr.placeholder {
+ font-style: italic;
+ color: #93a1a1;
+}
+.xv-grid-box .xv-grid-attr.hyperlink {
+ color: blue;
+}
+.xv-grid-box .xv-gridbox-button {
+ color: #357ec7;
+ font-size: 18px;
+ border: none;
+ background: transparent;
+}
+.xv-grid-box .xv-grid-row {
+ font-size: 12px;
background-color: #d8d8d8;
- color: #fdfdfd;
- font-size: .6em;
+ border-bottom: 1px solid #aaaaaa;
+ vertical-align: top;
+ /**
+ This is the grid header row
+ */
+}
+.xv-grid-box .xv-grid-row > * {
+ display: inline-block;
+}
+.xv-grid-box .xv-grid-row .xv-grid-header {
+ background-color: #d7d7d7;
+ color: #0e0e0e;
+ font-size: .8em;
font-weight: bold;
text-transform: uppercase;
padding-top: 4px;
- padding-bottom: 4px;
- border-bottom: 1px solid #aaaaaa;
}
-.xv-list-header .xv-list-column.last {
+.xv-grid-box .xv-grid-row .xv-grid-header.last {
border-right: none;
}
-.xv-list-header .xv-list-column.name-column,
-.xv-list-header .xv-list-column.first,
-.xv-list-header .xv-list-column.second,
-.xv-list-header .xv-list-column.third,
-.xv-list-header .xv-list-column.short,
-.xv-list-header .xv-list-column.small,
-.xv-list-header .xv-list-column.medium,
-.xv-list-header .xv-list-column.descr {
- padding-left: 7px;
+.xv-grid-box .xv-grid-row > * {
+ padding: 6px 4px;
+ border: none;
}
-/* List */
-.xv-list-column.line-number {
+.xv-grid-box .xv-grid-row .line-number {
+ vertical-align: top;
width: 30px;
text-align: right;
}
-.xv-list-column.name-column {
- width: 200px;
+.xv-grid-box .xv-grid-row .grid-actions {
+ display: block;
+ padding-left: 30px;
+ border-radius: 4px;
+ border-width: 0;
+ background: #f3f3f3;
+ margin: 6px;
}
-.xv-list-column.right-column {
- width: 100px;
- text-align: right;
+.xv-grid-box .xv-grid-row .grid-actions > * {
+ display: inline-block;
+ width: 100%;
}
-.xv-list-column.short {
- width: 100px;
+.xv-grid-box .xv-grid-row .grid-item {
+ vertical-align: top;
+ width: 175px;
}
-.xv-list-column.small {
- width: 125px;
+.xv-grid-box .xv-grid-row .quantity {
+ vertical-align: top;
+ text-align: right;
+ width: 100px;
}
-.xv-list-column.medium {
- width: 150px;
+.xv-grid-box .xv-grid-row .percent {
+ vertical-align: top;
+ text-align: right;
+ width: 90px;
}
-.xv-list-column.first {
- width: 300px;
+.xv-grid-box .xv-grid-row .price {
+ vertical-align: top;
+ text-align: right;
+ width: 90px;
}
-.xv-list-column.second {
- width: 200px;
+.xv-grid-box .xv-grid-row .date {
+ vertical-align: top;
+ width: 105px;
}
-.xv-list-column.third {
+.xv-grid-box .xv-grid-row .user {
+ vertical-align: top;
width: 100px;
}
-.xv-list-column.money,
-.xv-list-column.quantity {
- width: 75px;
- text-align: right;
+.xv-grid-box .xv-grid-row.readonly {
+ background: #f8f8f8;
+ min-height: 56px;
}
-.xv-list-column.descr {
- width: 200px;
+.xv-grid-box .xv-grid-row.selected {
+ background-color: #fdfdfd;
+ border: 1px solid #ff6529;
}
-.xv-list-column.icon {
- width: 10px;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-input-decorator {
+ padding: 0;
+ width: 100%;
+ margin: 0;
}
-.xv-list {
- background: #f8f8f8;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-input-decorator input {
+ width: 100%;
+ font-size: 13px;
}
-.xv-list .xv-list-item > * {
- display: inline-block;
- vertical-align: middle;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-picker-decorator {
+ padding-top: 6px;
+ width: 100%;
}
-.xv-list .xv-list-item {
- background-color: #fdfdfd;
- border-bottom: 1px solid #d7d7d7;
- min-height: 32px;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .onyx-picker-decorator .onyx-button {
+ height: 26px;
+ padding-top: 3px;
+ width: 100%;
+ font-size: 13px;
}
-.xv-list .xv-list-item.header {
- padding-top: 0;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input {
+ border: none;
}
-.xv-list .xv-list-item.inactive {
- background-color: #d8d8d8;
- color: #070707;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-picker-label {
+ display: none;
}
-.xv-list .xv-list-item.inactive .xv-list-column .xv-list-attr {
- background: transparent;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget {
+ margin-right: 10px;
+ padding-top: 0;
}
-.xv-list .xv-list-item.inactive .xv-list-column .xv-list-attr.placeholder {
- color: #d8d8d8;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator {
+ padding: 0;
+ width: 100%;
}
-.xv-list .xv-list-item .xv-list-column .list-icon {
- padding: 2px;
- color: #666666;
- vertical-align: sub;
- border: 1px solid #efefef;
- -webkit-border-radius: 2px;
- -moz-border-radius: 2px;
- border-radius: 2px;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-datewidget .onyx-input-decorator input {
+ width: 85%;
+ font-size: 13px;
}
-.xv-list .xv-list-item.item-selected {
- background: #226b9a;
- background-color: #1f608c;
- background-image: -moz-linear-gradient(top, #226b9a, #1a4f77);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#226b9a), to(#1a4f77));
- background-image: -webkit-linear-gradient(top, #226b9a, #1a4f77);
- background-image: -o-linear-gradient(top, #226b9a, #1a4f77);
- background-image: linear-gradient(to bottom, #226b9a, #1a4f77);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff226b9a', endColorstr='#ff1a4f77', GradientType=0);
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget {
+ padding-top: 6px;
}
-.xv-list .xv-list-item.item-selected .xv-list-attr {
- color: #fdfdfd;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator {
+ padding: 0;
+ width: 100%;
+ margin: 0;
}
-.xv-list .xv-list-item.item-selected .xv-list-attr.placeholder {
- font-style: italic;
- color: #99ccff;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-numberwidget .onyx-input-decorator input {
+ width: 100%;
+ font-size: 13px;
}
-.xv-list .xv-list-item.item-selected .xv-list-attr.hyperlink {
- color: #ff6529;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox {
+ padding-left: 0;
}
-.xv-list .xv-list-item.item-selected .xv-list-attr.header {
- background: #99ccff;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-combobox input {
+ padding-top: 3px;
+ width: 80px;
+ font-size: 13px;
}
-.xv-list .xv-list-item .xv-list-item-gear {
- position: absolute;
- right: 0px;
- z-index: 999;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget {
+ padding-bottom: 0;
}
-.xv-list.xv-grid-list {
- background: #f8f8f8;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator {
+ padding: 0;
+ width: 100%;
+ margin: 0;
}
-.xv-list.xv-grid-list .xv-list-item > * {
- vertical-align: top;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-moneywidget .onyx-input-decorator input {
+ width: 100%;
+ font-size: 13px;
}
-.xv-list.xv-grid-list .xv-list-item {
- padding-top: 7px !important;
- padding-bottom: 9px !important;
- border-bottom: 1px solid #aaaaaa !important;
- background: #f8f8f8;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input-decorator {
+ width: 100%;
+ padding-top: 6px;
}
-.xv-list.xv-grid-list .xv-list-item.item-selected {
- background: #226b9a;
- background-color: #1f608c;
- background-image: -moz-linear-gradient(top, #226b9a, #1a4f77);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#226b9a), to(#1a4f77));
- background-image: -webkit-linear-gradient(top, #226b9a, #1a4f77);
- background-image: -o-linear-gradient(top, #226b9a, #1a4f77);
- background-image: linear-gradient(to bottom, #226b9a, #1a4f77);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff226b9a', endColorstr='#ff1a4f77', GradientType=0);
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget .onyx-input {
+ width: 85%;
+ padding-right: 4px;
}
-.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr {
- color: #fdfdfd;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-useraccount-widget .xv-subinput {
+ width: 80px;
+ height: 16px;
}
-.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.placeholder {
- font-style: italic;
- color: #99ccff;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-subinput {
+ width: 100%;
}
-.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.hyperlink {
- color: #ff6529;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-input {
+ padding-top: 6px;
+ width: 100%;
+ border: none;
}
-.xv-list.xv-grid-list .xv-list-item.item-selected .xv-list-attr.header {
- background: #99ccff;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-label,
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-flexible-label,
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget-secondarydescription {
+ display: none;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column {
- vertical-align: top;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-relationwidget-description {
+ text-indent: 0;
+ padding-bottom: 0;
+ padding-top: 8px;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column .xv-list-attr {
- font-size: 12px;
+.xv-grid-box .xv-grid-row.selected .xv-grid-column .xv-private-item-site-widget {
+ border-bottom: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.last {
- border-right: none;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel {
+ border: none;
+ margin-top: 0;
+ padding-left: 0;
+ padding-right: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.name-column {
- padding-left: 7px;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group {
+ padding: 0;
+ border: none;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.first {
- padding-left: 7px;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-moneywidget {
+ padding-bottom: 0;
+ padding-top: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.second {
- padding-left: 7px;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-moneywidget .xv-input-decorator {
+ padding-bottom: 0;
+ padding-top: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.third {
- padding-left: 7px;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-numberwidget {
+ padding-bottom: 0;
+ padding-top: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.short {
- padding-left: 7px;
+.xv-grid-box.xv-groupbox .xv-sales-summary-panel .xv-sales-summary-total-group .xv-numberwidget .xv-input-decorator {
+ width: 163px;
+ padding-bottom: 0;
+ padding-top: 0;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.small {
- padding-left: 7px;
+.xv-grid-list .xv-list-column {
+ vertical-align: top !important;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.medium {
- padding-left: 7px;
+/*
+ Styles relating to the dashboard
+*/
+/*
+ Variables for widths/colors
+*/
+.dashboard {
+ background-color: #d8d8d8;
+ /*
+ These styles will only be used
+ if the chart is in a dashboard
+ */
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column.descr {
- padding-left: 7px;
+.dashboard .charts-panels {
+ overflow-y: auto;
}
-.xv-list.xv-grid-list .xv-list-item .xv-list-column .xv-list-attr {
- padding: 0px;
+.dashboard .selectable-chart {
+ width: 500px;
+ height: 230px;
}
-.xv-list-attr {
- padding: 5px;
- font-size: .8em;
- white-space: nowrap;
+.dashboard .selectable-chart .chart-title-bar {
+ width: 500px;
+}
+.dashboard .nvtooltip {
+ color: black;
+}
+.selectable-chart {
+ margin: 10px;
+ color: #357ec7;
overflow: hidden;
- text-overflow: ellipsis;
- color: #070707;
}
-.xv-list-attr.header {
- padding: 4px;
- background: #d8d8d8;
- font-size: .7em;
- font-weight: bold;
- text-transform: uppercase;
- color: #fdfdfd;
+.selectable-chart .xv-list-item {
+ border-bottom: 1px solid grey;
+ box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}
-.xv-list-attr.footer {
- padding: 4px;
- background: #d8d8d8;
- font-size: .7em;
- font-weight: bold;
- text-transform: uppercase;
- color: #070707;
+.selectable-chart .xv-list-item .long {
+ padding-left: 7px;
+ width: 250px;
}
-.xv-list-attr.right {
- position: absolute;
- right: 10px;
+.selectable-chart .onyx-popup {
+ margin-top: 40px;
+ margin-left: 200px;
}
-.xv-list-attr.text-align-right {
- text-align: right;
+.selectable-chart .chart-title-bar {
+ height: 32px;
+ background-color: #efefef;
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-radius-topright: 10px;
+ border-top-right-radius: 10px;
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ border-top-left-radius: 10px;
}
-.xv-list-attr.bold {
- font-weight: bold;
+.selectable-chart .chart-title-bar .chart-title {
+ padding-top: 8px;
+ color: #070707;
+ text-align: center;
+ /*font-size: 2em;*/
+ font-weight: normal;
}
-.xv-list-attr.error {
- color: #ff0000;
+.selectable-chart .chart-title-bar .remove-icon {
+ position: absolute;
+ top: 0;
+ right: 0;
}
-.xv-list-attr.emphasis {
- color: #009000;
+.selectable-chart .chart-title-bar .icon-filter {
+ color: #070707;
+ position: absolute;
+ right: 35px;
}
-.xv-list-attr.warn {
- color: #ff9c00;
+.selectable-chart .chart-bottom {
+ background-color: #fdfdfd;
+ border: 1px solid #444444;
+ border-top: none;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-bottomright: 10px;
+ border-bottom-right-radius: 10px;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-bottom-left-radius: 10px;
}
-.xv-list-attr.italic {
- font-style: italic;
+.selectable-chart .chart-bottom .xv-picker-label {
+ width: 100px;
+ color: #070707;
}
-.xv-list-attr.placeholder {
- font-style: italic;
- color: #777777;
+.selectable-chart .chart-bottom .onyx-button {
+ width: 130px;
+ padding: 10px 10px;
}
-.xv-list-attr.hyperlink {
- color: blue;
+.selectable-chart .chart-filters {
+ background-color: #fdfdfd;
+ -webkit-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
}
-.xv-list-attr.disabled {
- color: #777777;
+.selectable-chart .chart-filters .xv-parameter-panel {
+ background-color: #f8f8f8;
+ border: 1px solid #d7d7d7;
+ margin: 0 4px 6px 0;
+ width: 100%;
}
-/* Navigator */
-.xv-navigator-header {
- font-size: small;
- font-weight: bold;
- text-transform: uppercase;
- color: #ff6600;
- padding-left: 20px;
- border-bottom: 1px solid #0e0e0e;
+.selectable-chart .chart-filters.xv-parameter-panel .onyx-groupbox-header {
+ padding: 6px 10px;
+ border-bottom: 1px solid #d7d7d7;
+ background: #efefef;
+ color: #0e0e0e;
}
-.xv-workspace-header {
- color: #fdfdfd;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding: 8px 0 0 8px;
+.selectable-chart .chart-filters.xv-parameter-panel .enyo-fittable-columns-layout {
+ padding: 6px 10px;
+ border-bottom: 1px solid #d7d7d7;
+ background: #fdfdfd;
+ color: #0e0e0e;
}
/**
Styles relating to widgets in the pullout
};
var formatAddress = function (name, address1, address2, address3, city, state, code, country) {
- if (!arguments[0]) { return; }
var address = [];
-
if (name) { address.push(name); }
if (address1) {address.push(address1); }
if (address2) {address.push(address2); }
}).join("-")];
};
+ var formatFullName = function (firstName, lastName, honorific, suffix) {
+ var fullName = [];
+ if (honorific) { fullName.push(honorific + ' '); }
+ fullName.push(firstName + ' ' + lastName);
+ if (suffix) { fullName.push(' ' + suffix); }
+ return fullName;
+ };
+
var transformFunctions = {
+ fullname: formatFullName,
address: formatAddress,
arbl: formatArbl
};
-<package id = "pbtodist450RC"
- version = "4.5.0RC"
+<package id = "pbtodist450Beta"
+ version = "4.5.0Beta"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
-<package id = "dist450RC"
- version = "4.5.0RC"
+<package id = "dist450Beta"
+ version = "4.5.0Beta"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
-<package id = "pb450RC"
- version = "4.5.0RC"
+<package id = "pb450Beta"
+ version = "4.5.0Beta"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
-<package id = "xtmfg_install450RC"
- version = "4.5.0RC"
+<package id = "xtmfg_install450Beta"
+ version = "4.5.0Beta"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
-<package id = "xtmfg450RC"
- version = "4.5.0RC"
+<package id = "xtmfg450Beta"
+ version = "4.5.0Beta"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
"XV.InvoiceListItem", function () {
XT.session.privileges.attributes.ViewMiscInvoices = false;
XT.session.privileges.attributes.MaintainMiscInvoices = false;
+ XT.session.privileges.attributes.ViewPersonalCRMAccounts = false;
assert.isFalse(XM.InvoiceListItem.canRead());
XT.session.privileges.attributes.ViewMiscInvoices = true;
assert.isTrue(XM.InvoiceListItem.canRead());
XT.session.privileges.attributes.ViewMiscInvoices = true;
+ XT.session.privileges.attributes.ViewPersonalCRMAccounts = true;
});
it("XM.InvoiceListItem is not editable", function () {
assert.isFalse(XM.InvoiceListItem.canCreate());