Merge cf1c77411969
This commit is contained in:
commit
602723e986
|
@ -306,7 +306,7 @@ AS
|
||||||
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
||||||
UNION
|
UNION /* BOM lines */
|
||||||
SELECT il.ad_client_id,
|
SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
|
@ -575,7 +575,7 @@ AS
|
||||||
ON il.c_tax_id = t.c_tax_id
|
ON il.c_tax_id = t.c_tax_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
||||||
UNION
|
UNION /* comment lines */
|
||||||
SELECT il.ad_client_id,
|
SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
|
@ -621,23 +621,23 @@ AS
|
||||||
NULL AS c_activity_id,
|
NULL AS c_activity_id,
|
||||||
NULL AS c_projectphase_id,
|
NULL AS c_projectphase_id,
|
||||||
NULL AS c_projecttask_id,
|
NULL AS c_projecttask_id,
|
||||||
il.ad_orgtrx_id AS c_invoiceline_ad_orgtrx_id,
|
NULL AS c_invoiceline_ad_orgtrx_id,
|
||||||
il.a_processed,
|
NULL AS a_processed,
|
||||||
il.c_charge_id,
|
NULL AS c_charge_id,
|
||||||
il.c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
il.c_uom_id,
|
NULL AS c_uom_id,
|
||||||
il.isdescription,
|
NULL AS isdescription,
|
||||||
il.isprinted AS c_invoiceline_isprinted,
|
NULL AS c_invoiceline_isprinted,
|
||||||
il.m_inoutline_id,
|
NULL AS m_inoutline_id,
|
||||||
il.m_rmaline_id,
|
NULL AS m_rmaline_id,
|
||||||
il.pricelimit,
|
NULL AS pricelimit,
|
||||||
il.processed AS c_invoiceline_processed,
|
NULL AS c_invoiceline_processed,
|
||||||
il.ref_invoiceline_id,
|
NULL AS ref_invoiceline_id,
|
||||||
il.rramt,
|
NULL AS rramt,
|
||||||
il.rrstartdate,
|
NULL AS rrstartdate,
|
||||||
il.s_resourceassignment_id,
|
NULL AS s_resourceassignment_id,
|
||||||
il.user1_id AS c_invoiceline_user1_id,
|
NULL AS c_invoiceline_user1_id,
|
||||||
il.user2_id AS c_invoiceline_user2_id,
|
NULL AS c_invoiceline_user2_id,
|
||||||
NULL AS c_uom_ad_org_id,
|
NULL AS c_uom_ad_org_id,
|
||||||
NULL AS costingprecision,
|
NULL AS costingprecision,
|
||||||
NULL AS c_uom_description,
|
NULL AS c_uom_description,
|
||||||
|
@ -822,7 +822,7 @@ AS
|
||||||
NULL AS m_asi_updatedby
|
NULL AS m_asi_updatedby
|
||||||
FROM c_invoiceline il
|
FROM c_invoiceline il
|
||||||
WHERE il.c_uom_id IS NULL)
|
WHERE il.c_uom_id IS NULL)
|
||||||
UNION
|
UNION /* empty line */
|
||||||
SELECT i.ad_client_id,
|
SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
|
@ -894,65 +894,65 @@ AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_invoice_ad_org_id,
|
NULL AS c_invoice_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
|
NULL AS c_invoice_ad_orgtrx_id,
|
||||||
i.ad_user_id AS c_invoice_ad_user_id,
|
NULL AS c_invoice_ad_user_id,
|
||||||
i.c_activity_id AS c_invoice_c_activity_id,
|
NULL AS c_invoice_c_activity_id,
|
||||||
i.c_bpartner_id AS c_invoice_c_bpartner_id,
|
NULL AS c_invoice_c_bpartner_id,
|
||||||
i.c_bpartner_location_id,
|
NULL AS c_bpartner_location_id,
|
||||||
i.c_campaign_id AS c_invoice_c_campaign_id,
|
NULL AS c_invoice_c_campaign_id,
|
||||||
i.c_charge_id AS c_invoice_c_charge_id,
|
NULL AS c_invoice_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id,
|
NULL AS c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.c_dunninglevel_id,
|
NULL AS c_dunninglevel_id,
|
||||||
i.chargeamt AS c_invoice_chargeamt,
|
NULL AS c_invoice_chargeamt,
|
||||||
i.c_order_id,
|
NULL AS c_order_id,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_project_id AS c_invoice_c_project_id,
|
NULL AS c_invoice_c_project_id,
|
||||||
i.created AS c_invoice_created,
|
NULL AS c_invoice_created,
|
||||||
i.createdby AS c_invoice_createdby,
|
NULL AS c_invoice_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateinvoiced,
|
NULL AS dateinvoiced,
|
||||||
i.dateordered,
|
NULL AS dateordered,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.description AS c_invoice_description,
|
NULL AS c_invoice_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dunninggrace,
|
NULL AS dunninggrace,
|
||||||
i.generateto,
|
NULL AS generateto,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicecollectiontype,
|
NULL AS invoicecollectiontype,
|
||||||
i.isactive AS c_invoice_isactive,
|
NULL AS c_invoice_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.isdiscountprinted,
|
NULL AS isdiscountprinted,
|
||||||
i.isindispute,
|
NULL AS isindispute,
|
||||||
i.ispaid,
|
NULL AS ispaid,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted AS c_invoice_isprinted,
|
NULL AS c_invoice_isprinted,
|
||||||
i.isselfservice AS c_invoice_isselfservice,
|
NULL AS c_invoice_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded AS c_invoice_istaxincluded,
|
NULL AS c_invoice_istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.m_pricelist_id,
|
NULL AS m_pricelist_id,
|
||||||
i.m_rma_id,
|
NULL AS m_rma_id,
|
||||||
i.paymentrule,
|
NULL AS paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.processing,
|
NULL AS processing,
|
||||||
i.ref_invoice_id,
|
NULL AS ref_invoice_id,
|
||||||
i.reversal_id,
|
NULL AS reversal_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail,
|
NULL AS sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_invoice_updated,
|
NULL AS c_invoice_updated,
|
||||||
i.updatedby AS c_invoice_updatedby,
|
NULL AS c_invoice_updatedby,
|
||||||
i.user1_id AS c_invoice_user1_id,
|
NULL AS c_invoice_user1_id,
|
||||||
i.user2_id AS c_invoice_user2_id,
|
NULL AS c_invoice_user2_id,
|
||||||
NULL AS c_tax_ad_org_id,
|
NULL AS c_tax_ad_org_id,
|
||||||
NULL AS ad_rule_id,
|
NULL AS ad_rule_id,
|
||||||
NULL AS c_country_id,
|
NULL AS c_country_id,
|
||||||
|
@ -1068,7 +1068,7 @@ AS
|
||||||
NULL AS m_asi_updated,
|
NULL AS m_asi_updated,
|
||||||
NULL AS m_asi_updatedby
|
NULL AS m_asi_updatedby
|
||||||
FROM c_invoice i)
|
FROM c_invoice i)
|
||||||
UNION
|
UNION /* tax lines */
|
||||||
SELECT it.ad_client_id,
|
SELECT it.ad_client_id,
|
||||||
it.ad_org_id,
|
it.ad_org_id,
|
||||||
it.isactive,
|
it.isactive,
|
||||||
|
|
|
@ -316,7 +316,7 @@ AS
|
||||||
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
||||||
UNION
|
UNION /* BOM lines */
|
||||||
SELECT il.ad_client_id,
|
SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
|
@ -593,7 +593,7 @@ AS
|
||||||
AND uomt.ad_language = tt.ad_language
|
AND uomt.ad_language = tt.ad_language
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
||||||
UNION
|
UNION /* comment lines */
|
||||||
SELECT il.ad_client_id,
|
SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
|
@ -639,23 +639,23 @@ AS
|
||||||
NULL AS c_activity_id,
|
NULL AS c_activity_id,
|
||||||
NULL AS c_projectphase_id,
|
NULL AS c_projectphase_id,
|
||||||
NULL AS c_projecttask_id,
|
NULL AS c_projecttask_id,
|
||||||
il.ad_orgtrx_id AS c_invoiceline_ad_orgtrx_id,
|
NULL AS c_invoiceline_ad_orgtrx_id,
|
||||||
il.a_processed,
|
NULL AS a_processed,
|
||||||
il.c_charge_id,
|
NULL AS c_charge_id,
|
||||||
il.c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
il.c_uom_id,
|
NULL AS c_uom_id,
|
||||||
il.isdescription,
|
NULL AS isdescription,
|
||||||
il.isprinted AS c_invoiceline_isprinted,
|
NULL AS c_invoiceline_isprinted,
|
||||||
il.m_inoutline_id,
|
NULL AS m_inoutline_id,
|
||||||
il.m_rmaline_id,
|
NULL AS m_rmaline_id,
|
||||||
il.pricelimit,
|
NULL AS pricelimit,
|
||||||
il.processed AS c_invoiceline_processed,
|
NULL AS c_invoiceline_processed,
|
||||||
il.ref_invoiceline_id,
|
NULL AS ref_invoiceline_id,
|
||||||
il.rramt,
|
NULL AS rramt,
|
||||||
il.rrstartdate,
|
NULL AS rrstartdate,
|
||||||
il.s_resourceassignment_id,
|
NULL AS s_resourceassignment_id,
|
||||||
il.user1_id AS c_invoiceline_user1_id,
|
NULL AS c_invoiceline_user1_id,
|
||||||
il.user2_id AS c_invoiceline_user2_id,
|
NULL AS c_invoiceline_user2_id,
|
||||||
NULL AS c_uom_ad_org_id,
|
NULL AS c_uom_ad_org_id,
|
||||||
NULL AS costingprecision,
|
NULL AS costingprecision,
|
||||||
NULL AS c_uom_description,
|
NULL AS c_uom_description,
|
||||||
|
@ -843,7 +843,7 @@ AS
|
||||||
WHERE il.c_uom_id IS NULL
|
WHERE il.c_uom_id IS NULL
|
||||||
AND l.isbaselanguage = 'N'
|
AND l.isbaselanguage = 'N'
|
||||||
AND l.issystemlanguage = 'Y')
|
AND l.issystemlanguage = 'Y')
|
||||||
UNION
|
UNION /* empty line */
|
||||||
SELECT i.ad_client_id,
|
SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
|
@ -915,65 +915,65 @@ AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_invoice_ad_org_id,
|
NULL AS c_invoice_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
|
NULL AS c_invoice_ad_orgtrx_id,
|
||||||
i.ad_user_id AS c_invoice_ad_user_id,
|
NULL AS c_invoice_ad_user_id,
|
||||||
i.c_activity_id AS c_invoice_c_activity_id,
|
NULL AS c_invoice_c_activity_id,
|
||||||
i.c_bpartner_id AS c_invoice_c_bpartner_id,
|
NULL AS c_invoice_c_bpartner_id,
|
||||||
i.c_bpartner_location_id,
|
NULL AS c_bpartner_location_id,
|
||||||
i.c_campaign_id AS c_invoice_c_campaign_id,
|
NULL AS c_invoice_c_campaign_id,
|
||||||
i.c_charge_id AS c_invoice_c_charge_id,
|
NULL AS c_invoice_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id,
|
NULL AS c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.c_dunninglevel_id,
|
NULL AS c_dunninglevel_id,
|
||||||
i.chargeamt AS c_invoice_chargeamt,
|
NULL AS c_invoice_chargeamt,
|
||||||
i.c_order_id,
|
NULL AS c_order_id,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_project_id AS c_invoice_c_project_id,
|
NULL AS c_invoice_c_project_id,
|
||||||
i.created AS c_invoice_created,
|
NULL AS c_invoice_created,
|
||||||
i.createdby AS c_invoice_createdby,
|
NULL AS c_invoice_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateinvoiced,
|
NULL AS dateinvoiced,
|
||||||
i.dateordered,
|
NULL AS dateordered,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.description AS c_invoice_description,
|
NULL AS c_invoice_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dunninggrace,
|
NULL AS dunninggrace,
|
||||||
i.generateto,
|
NULL AS generateto,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicecollectiontype,
|
NULL AS invoicecollectiontype,
|
||||||
i.isactive AS c_invoice_isactive,
|
NULL AS c_invoice_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.isdiscountprinted,
|
NULL AS isdiscountprinted,
|
||||||
i.isindispute,
|
NULL AS isindispute,
|
||||||
i.ispaid,
|
NULL AS ispaid,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted AS c_invoice_isprinted,
|
NULL AS c_invoice_isprinted,
|
||||||
i.isselfservice AS c_invoice_isselfservice,
|
NULL AS c_invoice_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded AS c_invoice_istaxincluded,
|
NULL AS c_invoice_istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.m_pricelist_id,
|
NULL AS m_pricelist_id,
|
||||||
i.m_rma_id,
|
NULL AS m_rma_id,
|
||||||
i.paymentrule,
|
NULL AS paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.processing,
|
NULL AS processing,
|
||||||
i.ref_invoice_id,
|
NULL AS ref_invoice_id,
|
||||||
i.reversal_id,
|
NULL AS reversal_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail,
|
NULL AS sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_invoice_updated,
|
NULL AS c_invoice_updated,
|
||||||
i.updatedby AS c_invoice_updatedby,
|
NULL AS c_invoice_updatedby,
|
||||||
i.user1_id AS c_invoice_user1_id,
|
NULL AS c_invoice_user1_id,
|
||||||
i.user2_id AS c_invoice_user2_id,
|
NULL AS c_invoice_user2_id,
|
||||||
NULL AS c_tax_ad_org_id,
|
NULL AS c_tax_ad_org_id,
|
||||||
NULL AS ad_rule_id,
|
NULL AS ad_rule_id,
|
||||||
NULL AS c_country_id,
|
NULL AS c_country_id,
|
||||||
|
@ -1092,7 +1092,7 @@ AS
|
||||||
ad_language l
|
ad_language l
|
||||||
WHERE l.isbaselanguage = 'N'
|
WHERE l.isbaselanguage = 'N'
|
||||||
AND l.issystemlanguage = 'Y')
|
AND l.issystemlanguage = 'Y')
|
||||||
UNION
|
UNION /* tax lines */
|
||||||
SELECT it.ad_client_id,
|
SELECT it.ad_client_id,
|
||||||
it.ad_org_id,
|
it.ad_org_id,
|
||||||
it.isactive,
|
it.isactive,
|
||||||
|
|
|
@ -445,7 +445,7 @@ AS
|
||||||
ON ol.c_bpartner_location_id = bpl.c_bpartner_location_id
|
ON ol.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||||
LEFT JOIN c_tax t
|
LEFT JOIN c_tax t
|
||||||
ON ol.c_tax_id = t.c_tax_id
|
ON ol.c_tax_id = t.c_tax_id
|
||||||
UNION
|
UNION /* BOM lines */
|
||||||
SELECT ol.ad_client_id,
|
SELECT ol.ad_client_id,
|
||||||
ol.ad_org_id,
|
ol.ad_org_id,
|
||||||
ol.isactive,
|
ol.isactive,
|
||||||
|
@ -849,7 +849,7 @@ AS
|
||||||
AND i.c_bpartner_id = po.c_bpartner_id
|
AND i.c_bpartner_id = po.c_bpartner_id
|
||||||
JOIN c_uom uom
|
JOIN c_uom uom
|
||||||
ON p.c_uom_id = uom.c_uom_id)
|
ON p.c_uom_id = uom.c_uom_id)
|
||||||
UNION
|
UNION /* empty line */
|
||||||
SELECT i.ad_client_id,
|
SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
|
@ -928,87 +928,87 @@ AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_order_ad_org_id,
|
NULL AS c_order_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_order_ad_orgtrx_id,
|
NULL AS c_order_ad_orgtrx_id,
|
||||||
i.ad_user_id,
|
NULL AS ad_user_id,
|
||||||
i.amountrefunded,
|
NULL AS amountrefunded,
|
||||||
i.amounttendered,
|
NULL AS amounttendered,
|
||||||
i.bill_bpartner_id,
|
NULL AS bill_bpartner_id,
|
||||||
i.bill_location_id,
|
NULL AS bill_location_id,
|
||||||
i.bill_user_id,
|
NULL AS bill_user_id,
|
||||||
i.c_activity_id AS c_order_c_activity_id,
|
NULL AS c_order_c_activity_id,
|
||||||
i.c_bpartner_id AS c_order_c_bpartner_id,
|
NULL AS c_order_c_bpartner_id,
|
||||||
i.c_campaign_id AS c_order_c_campaign_id,
|
NULL AS c_order_c_campaign_id,
|
||||||
i.c_cashline_id,
|
NULL AS c_cashline_id,
|
||||||
i.c_cashplanline_id,
|
NULL AS c_cashplanline_id,
|
||||||
i.c_charge_id AS c_order_c_charge_id,
|
NULL AS c_order_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id AS c_order_c_currency_id,
|
NULL AS c_order_c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.chargeamt,
|
NULL AS chargeamt,
|
||||||
i.copyfrom,
|
NULL AS copyfrom,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_pos_id,
|
NULL AS c_pos_id,
|
||||||
i.c_project_id AS c_order_c_project_id,
|
NULL AS c_order_c_project_id,
|
||||||
i.created AS c_order_created,
|
NULL AS c_order_created,
|
||||||
i.createdby AS c_order_createdby,
|
NULL AS c_order_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.datepromised AS c_order_datepromised,
|
NULL AS c_order_datepromised,
|
||||||
i.deliveryrule,
|
NULL AS deliveryrule,
|
||||||
i.deliveryviarule,
|
NULL AS deliveryviarule,
|
||||||
i.description AS c_order_description,
|
NULL AS c_order_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dropship_bpartner_id,
|
NULL AS dropship_bpartner_id,
|
||||||
i.dropship_location_id,
|
NULL AS dropship_location_id,
|
||||||
i.dropship_user_id,
|
NULL AS dropship_user_id,
|
||||||
i.freightamt AS c_order_freightamt,
|
NULL AS c_order_freightamt,
|
||||||
i.freightcostrule,
|
NULL AS freightcostrule,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicerule,
|
NULL AS invoicerule,
|
||||||
i.isactive AS c_order_isactive,
|
NULL AS c_order_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.iscreditapproved,
|
NULL AS iscreditapproved,
|
||||||
i.isdelivered,
|
NULL AS isdelivered,
|
||||||
i.isdiscountprinted AS c_order_isdiscountprinted,
|
NULL AS c_order_isdiscountprinted,
|
||||||
i.isdropship AS c_order_isdropship,
|
NULL AS c_order_isdropship,
|
||||||
i.isinvoiced,
|
NULL AS isinvoiced,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted,
|
NULL AS isprinted,
|
||||||
i.isselected,
|
NULL AS isselected,
|
||||||
i.isselfservice AS c_order_isselfservice,
|
NULL AS c_order_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded,
|
NULL AS istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.link_order_id,
|
NULL AS link_order_id,
|
||||||
i.m_freightcategory_id AS c_order_m_freightcategory_id,
|
NULL AS c_order_m_freightcategory_id,
|
||||||
i.m_pricelist_id AS c_order_m_pricelist_id,
|
NULL AS c_order_m_pricelist_id,
|
||||||
i.m_shipper_id AS c_order_m_shipper_id,
|
NULL AS c_order_m_shipper_id,
|
||||||
i.m_warehouse_id AS c_order_m_warehouse_id,
|
NULL AS c_order_m_warehouse_id,
|
||||||
i.ordertype,
|
NULL AS ordertype,
|
||||||
i.pay_bpartner_id,
|
NULL AS pay_bpartner_id,
|
||||||
i.pay_location_id,
|
NULL AS pay_location_id,
|
||||||
i.paymentrule AS c_order_paymentrule,
|
NULL AS c_order_paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.priorityrule,
|
NULL AS priorityrule,
|
||||||
i.processed AS c_order_processed,
|
NULL AS c_order_processed,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.promotioncode,
|
NULL AS promotioncode,
|
||||||
i.ref_order_id,
|
NULL AS ref_order_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail AS c_order_sendemail,
|
NULL AS c_order_sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_order_updated,
|
NULL AS c_order_updated,
|
||||||
i.updatedby AS c_order_updatedby,
|
NULL AS c_order_updatedby,
|
||||||
i.user1_id AS c_order_user1_id,
|
NULL AS c_order_user1_id,
|
||||||
i.user2_id AS c_order_user2_id,
|
NULL AS c_order_user2_id,
|
||||||
i.volume AS c_order_volume,
|
NULL AS c_order_volume,
|
||||||
i.weight AS c_order_weight,
|
NULL AS c_order_weight,
|
||||||
NULL AS m_product_ad_org_id,
|
NULL AS m_product_ad_org_id,
|
||||||
NULL AS classification,
|
NULL AS classification,
|
||||||
NULL AS m_product_copyfrom,
|
NULL AS m_product_copyfrom,
|
||||||
|
@ -1229,7 +1229,7 @@ AS
|
||||||
NULL AS c_tax_to_region_id,
|
NULL AS c_tax_to_region_id,
|
||||||
NULL AS validfrom
|
NULL AS validfrom
|
||||||
FROM c_order i)
|
FROM c_order i)
|
||||||
UNION
|
UNION /* tax lines */
|
||||||
SELECT ot.ad_client_id,
|
SELECT ot.ad_client_id,
|
||||||
ot.ad_org_id,
|
ot.ad_org_id,
|
||||||
ot.isactive,
|
ot.isactive,
|
||||||
|
|
|
@ -456,7 +456,7 @@ AS
|
||||||
LEFT JOIN c_tax_trl tt
|
LEFT JOIN c_tax_trl tt
|
||||||
ON ol.c_tax_id = tt.c_tax_id
|
ON ol.c_tax_id = tt.c_tax_id
|
||||||
AND uomt.ad_language = tt.ad_language
|
AND uomt.ad_language = tt.ad_language
|
||||||
UNION
|
UNION /* BOM lines */
|
||||||
SELECT ol.ad_client_id,
|
SELECT ol.ad_client_id,
|
||||||
ol.ad_org_id,
|
ol.ad_org_id,
|
||||||
ol.isactive,
|
ol.isactive,
|
||||||
|
@ -865,7 +865,7 @@ AS
|
||||||
JOIN m_product_trl pt
|
JOIN m_product_trl pt
|
||||||
ON pt.m_product_id = bl.m_product_id
|
ON pt.m_product_id = bl.m_product_id
|
||||||
AND uomt.ad_language = pt.ad_language)
|
AND uomt.ad_language = pt.ad_language)
|
||||||
UNION
|
UNION /* empty line */
|
||||||
SELECT i.ad_client_id,
|
SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
|
@ -873,7 +873,7 @@ AS
|
||||||
i.createdby,
|
i.createdby,
|
||||||
i.updated,
|
i.updated,
|
||||||
i.updatedby,
|
i.updatedby,
|
||||||
'en_US' AS ad_language,
|
l.ad_language,
|
||||||
i.c_order_id,
|
i.c_order_id,
|
||||||
NULL AS c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
NULL AS c_tax_id,
|
NULL AS c_tax_id,
|
||||||
|
@ -944,87 +944,87 @@ AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_order_ad_org_id,
|
NULL AS c_order_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_order_ad_orgtrx_id,
|
NULL AS c_order_ad_orgtrx_id,
|
||||||
i.ad_user_id,
|
NULL AS ad_user_id,
|
||||||
i.amountrefunded,
|
NULL AS amountrefunded,
|
||||||
i.amounttendered,
|
NULL AS amounttendered,
|
||||||
i.bill_bpartner_id,
|
NULL AS bill_bpartner_id,
|
||||||
i.bill_location_id,
|
NULL AS bill_location_id,
|
||||||
i.bill_user_id,
|
NULL AS bill_user_id,
|
||||||
i.c_activity_id AS c_order_c_activity_id,
|
NULL AS c_order_c_activity_id,
|
||||||
i.c_bpartner_id AS c_order_c_bpartner_id,
|
NULL AS c_order_c_bpartner_id,
|
||||||
i.c_campaign_id AS c_order_c_campaign_id,
|
NULL AS c_order_c_campaign_id,
|
||||||
i.c_cashline_id,
|
NULL AS c_cashline_id,
|
||||||
i.c_cashplanline_id,
|
NULL AS c_cashplanline_id,
|
||||||
i.c_charge_id AS c_order_c_charge_id,
|
NULL AS c_order_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id AS c_order_c_currency_id,
|
NULL AS c_order_c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.chargeamt,
|
NULL AS chargeamt,
|
||||||
i.copyfrom,
|
NULL AS copyfrom,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_pos_id,
|
NULL AS c_pos_id,
|
||||||
i.c_project_id AS c_order_c_project_id,
|
NULL AS c_order_c_project_id,
|
||||||
i.created AS c_order_created,
|
NULL AS c_order_created,
|
||||||
i.createdby AS c_order_createdby,
|
NULL AS c_order_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.datepromised AS c_order_datepromised,
|
NULL AS c_order_datepromised,
|
||||||
i.deliveryrule,
|
NULL AS deliveryrule,
|
||||||
i.deliveryviarule,
|
NULL AS deliveryviarule,
|
||||||
i.description AS c_order_description,
|
NULL AS c_order_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dropship_bpartner_id,
|
NULL AS dropship_bpartner_id,
|
||||||
i.dropship_location_id,
|
NULL AS dropship_location_id,
|
||||||
i.dropship_user_id,
|
NULL AS dropship_user_id,
|
||||||
i.freightamt AS c_order_freightamt,
|
NULL AS c_order_freightamt,
|
||||||
i.freightcostrule,
|
NULL AS freightcostrule,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicerule,
|
NULL AS invoicerule,
|
||||||
i.isactive AS c_order_isactive,
|
NULL AS c_order_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.iscreditapproved,
|
NULL AS iscreditapproved,
|
||||||
i.isdelivered,
|
NULL AS isdelivered,
|
||||||
i.isdiscountprinted AS c_order_isdiscountprinted,
|
NULL AS c_order_isdiscountprinted,
|
||||||
i.isdropship AS c_order_isdropship,
|
NULL AS c_order_isdropship,
|
||||||
i.isinvoiced,
|
NULL AS isinvoiced,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted,
|
NULL AS isprinted,
|
||||||
i.isselected,
|
NULL AS isselected,
|
||||||
i.isselfservice AS c_order_isselfservice,
|
NULL AS c_order_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded,
|
NULL AS istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.link_order_id,
|
NULL AS link_order_id,
|
||||||
i.m_freightcategory_id AS c_order_m_freightcategory_id,
|
NULL AS c_order_m_freightcategory_id,
|
||||||
i.m_pricelist_id AS c_order_m_pricelist_id,
|
NULL AS c_order_m_pricelist_id,
|
||||||
i.m_shipper_id AS c_order_m_shipper_id,
|
NULL AS c_order_m_shipper_id,
|
||||||
i.m_warehouse_id AS c_order_m_warehouse_id,
|
NULL AS c_order_m_warehouse_id,
|
||||||
i.ordertype,
|
NULL AS ordertype,
|
||||||
i.pay_bpartner_id,
|
NULL AS pay_bpartner_id,
|
||||||
i.pay_location_id,
|
NULL AS pay_location_id,
|
||||||
i.paymentrule AS c_order_paymentrule,
|
NULL AS c_order_paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.priorityrule,
|
NULL AS priorityrule,
|
||||||
i.processed AS c_order_processed,
|
NULL AS c_order_processed,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.promotioncode,
|
NULL AS promotioncode,
|
||||||
i.ref_order_id,
|
NULL AS ref_order_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail AS c_order_sendemail,
|
NULL AS c_order_sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_order_updated,
|
NULL AS c_order_updated,
|
||||||
i.updatedby AS c_order_updatedby,
|
NULL AS c_order_updatedby,
|
||||||
i.user1_id AS c_order_user1_id,
|
NULL AS c_order_user1_id,
|
||||||
i.user2_id AS c_order_user2_id,
|
NULL AS c_order_user2_id,
|
||||||
i.volume AS c_order_volume,
|
NULL AS c_order_volume,
|
||||||
i.weight AS c_order_weight,
|
NULL AS c_order_weight,
|
||||||
NULL AS m_product_ad_org_id,
|
NULL AS m_product_ad_org_id,
|
||||||
NULL AS classification,
|
NULL AS classification,
|
||||||
NULL AS m_product_copyfrom,
|
NULL AS m_product_copyfrom,
|
||||||
|
@ -1244,8 +1244,9 @@ AS
|
||||||
NULL AS to_country_id,
|
NULL AS to_country_id,
|
||||||
NULL AS c_tax_to_region_id,
|
NULL AS c_tax_to_region_id,
|
||||||
NULL AS validfrom
|
NULL AS validfrom
|
||||||
FROM c_order i)
|
FROM c_order i, ad_language l
|
||||||
UNION
|
WHERE l.isbaselanguage='N' AND l.issystemlanguage='Y')
|
||||||
|
UNION /* tax lines */
|
||||||
SELECT ot.ad_client_id,
|
SELECT ot.ad_client_id,
|
||||||
ot.ad_org_id,
|
ot.ad_org_id,
|
||||||
ot.isactive,
|
ot.isactive,
|
||||||
|
@ -1253,7 +1254,7 @@ AS
|
||||||
ot.createdby,
|
ot.createdby,
|
||||||
ot.updated,
|
ot.updated,
|
||||||
ot.updatedby,
|
ot.updatedby,
|
||||||
'en_US' AS ad_language,
|
tt.ad_language,
|
||||||
ot.c_order_id,
|
ot.c_order_id,
|
||||||
NULL AS c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
ot.c_tax_id,
|
ot.c_tax_id,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DROP VIEW c_invoice_linetax_v;
|
DROP VIEW c_invoice_linetax_v;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
(
|
(
|
||||||
|
@ -265,7 +265,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
||||||
UNION SELECT il.ad_client_id,
|
UNION /* BOM lines */ SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
il.created,
|
il.created,
|
||||||
|
@ -524,7 +524,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
ON il.c_tax_id = t.c_tax_id
|
ON il.c_tax_id = t.c_tax_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
||||||
UNION SELECT il.ad_client_id,
|
UNION /* comment lines */ SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
il.created,
|
il.created,
|
||||||
|
@ -569,23 +569,23 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
NULL AS c_activity_id,
|
NULL AS c_activity_id,
|
||||||
NULL AS c_projectphase_id,
|
NULL AS c_projectphase_id,
|
||||||
NULL AS c_projecttask_id,
|
NULL AS c_projecttask_id,
|
||||||
il.ad_orgtrx_id AS c_invoiceline_ad_orgtrx_id,
|
NULL AS c_invoiceline_ad_orgtrx_id,
|
||||||
il.a_processed,
|
NULL AS a_processed,
|
||||||
il.c_charge_id,
|
NULL AS c_charge_id,
|
||||||
il.c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
il.c_uom_id,
|
NULL AS c_uom_id,
|
||||||
il.isdescription,
|
NULL AS isdescription,
|
||||||
il.isprinted AS c_invoiceline_isprinted,
|
NULL AS c_invoiceline_isprinted,
|
||||||
il.m_inoutline_id,
|
NULL AS m_inoutline_id,
|
||||||
il.m_rmaline_id,
|
NULL AS m_rmaline_id,
|
||||||
il.pricelimit,
|
NULL AS pricelimit,
|
||||||
il.processed AS c_invoiceline_processed,
|
NULL AS c_invoiceline_processed,
|
||||||
il.ref_invoiceline_id,
|
NULL AS ref_invoiceline_id,
|
||||||
il.rramt,
|
NULL AS rramt,
|
||||||
il.rrstartdate,
|
NULL AS rrstartdate,
|
||||||
il.s_resourceassignment_id,
|
NULL AS s_resourceassignment_id,
|
||||||
il.user1_id AS c_invoiceline_user1_id,
|
NULL AS c_invoiceline_user1_id,
|
||||||
il.user2_id AS c_invoiceline_user2_id,
|
NULL AS c_invoiceline_user2_id,
|
||||||
NULL AS c_uom_ad_org_id,
|
NULL AS c_uom_ad_org_id,
|
||||||
NULL AS costingprecision,
|
NULL AS costingprecision,
|
||||||
NULL AS c_uom_description,
|
NULL AS c_uom_description,
|
||||||
|
@ -770,7 +770,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
NULL AS m_asi_updatedby
|
NULL AS m_asi_updatedby
|
||||||
FROM c_invoiceline il
|
FROM c_invoiceline il
|
||||||
WHERE il.c_uom_id IS NULL)
|
WHERE il.c_uom_id IS NULL)
|
||||||
UNION SELECT i.ad_client_id,
|
UNION /* empty line */ SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
i.created,
|
i.created,
|
||||||
|
@ -841,65 +841,65 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_invoice_ad_org_id,
|
NULL AS c_invoice_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
|
NULL AS c_invoice_ad_orgtrx_id,
|
||||||
i.ad_user_id AS c_invoice_ad_user_id,
|
NULL AS c_invoice_ad_user_id,
|
||||||
i.c_activity_id AS c_invoice_c_activity_id,
|
NULL AS c_invoice_c_activity_id,
|
||||||
i.c_bpartner_id AS c_invoice_c_bpartner_id,
|
NULL AS c_invoice_c_bpartner_id,
|
||||||
i.c_bpartner_location_id,
|
NULL AS c_bpartner_location_id,
|
||||||
i.c_campaign_id AS c_invoice_c_campaign_id,
|
NULL AS c_invoice_c_campaign_id,
|
||||||
i.c_charge_id AS c_invoice_c_charge_id,
|
NULL AS c_invoice_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id,
|
NULL AS c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.c_dunninglevel_id,
|
NULL AS c_dunninglevel_id,
|
||||||
i.chargeamt AS c_invoice_chargeamt,
|
NULL AS c_invoice_chargeamt,
|
||||||
i.c_order_id,
|
NULL AS c_order_id,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_project_id AS c_invoice_c_project_id,
|
NULL AS c_invoice_c_project_id,
|
||||||
i.created AS c_invoice_created,
|
NULL AS c_invoice_created,
|
||||||
i.createdby AS c_invoice_createdby,
|
NULL AS c_invoice_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateinvoiced,
|
NULL AS dateinvoiced,
|
||||||
i.dateordered,
|
NULL AS dateordered,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.description AS c_invoice_description,
|
NULL AS c_invoice_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dunninggrace,
|
NULL AS dunninggrace,
|
||||||
i.generateto,
|
NULL AS generateto,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicecollectiontype,
|
NULL AS invoicecollectiontype,
|
||||||
i.isactive AS c_invoice_isactive,
|
NULL AS c_invoice_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.isdiscountprinted,
|
NULL AS isdiscountprinted,
|
||||||
i.isindispute,
|
NULL AS isindispute,
|
||||||
i.ispaid,
|
NULL AS ispaid,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted AS c_invoice_isprinted,
|
NULL AS c_invoice_isprinted,
|
||||||
i.isselfservice AS c_invoice_isselfservice,
|
NULL AS c_invoice_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded AS c_invoice_istaxincluded,
|
NULL AS c_invoice_istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.m_pricelist_id,
|
NULL AS m_pricelist_id,
|
||||||
i.m_rma_id,
|
NULL AS m_rma_id,
|
||||||
i.paymentrule,
|
NULL AS paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.processing,
|
NULL AS processing,
|
||||||
i.ref_invoice_id,
|
NULL AS ref_invoice_id,
|
||||||
i.reversal_id,
|
NULL AS reversal_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail,
|
NULL AS sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_invoice_updated,
|
NULL AS c_invoice_updated,
|
||||||
i.updatedby AS c_invoice_updatedby,
|
NULL AS c_invoice_updatedby,
|
||||||
i.user1_id AS c_invoice_user1_id,
|
NULL AS c_invoice_user1_id,
|
||||||
i.user2_id AS c_invoice_user2_id,
|
NULL AS c_invoice_user2_id,
|
||||||
NULL AS c_tax_ad_org_id,
|
NULL AS c_tax_ad_org_id,
|
||||||
NULL AS ad_rule_id,
|
NULL AS ad_rule_id,
|
||||||
NULL AS c_country_id,
|
NULL AS c_country_id,
|
||||||
|
@ -1017,7 +1017,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_v AS
|
||||||
FROM c_invoice i
|
FROM c_invoice i
|
||||||
)
|
)
|
||||||
UNION
|
UNION
|
||||||
SELECT it.ad_client_id,
|
SELECT /* tax lines */ it.ad_client_id,
|
||||||
it.ad_org_id,
|
it.ad_org_id,
|
||||||
it.isactive,
|
it.isactive,
|
||||||
it.created,
|
it.created,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DROP VIEW c_invoice_linetax_vt;
|
DROP VIEW c_invoice_linetax_vt;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
(
|
(
|
||||||
|
@ -273,7 +273,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
ON il.s_resourceassignment_id = ra.s_resourceassignment_id
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id
|
||||||
UNION SELECT il.ad_client_id,
|
UNION /* BOM lines */ SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
il.created,
|
il.created,
|
||||||
|
@ -538,7 +538,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
ON il.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language
|
ON il.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language
|
||||||
LEFT JOIN m_attributesetinstance asi
|
LEFT JOIN m_attributesetinstance asi
|
||||||
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)
|
||||||
UNION SELECT il.ad_client_id,
|
UNION /* comment lines */ SELECT il.ad_client_id,
|
||||||
il.ad_org_id,
|
il.ad_org_id,
|
||||||
il.isactive,
|
il.isactive,
|
||||||
il.created,
|
il.created,
|
||||||
|
@ -583,23 +583,23 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
NULL AS c_activity_id,
|
NULL AS c_activity_id,
|
||||||
NULL AS c_projectphase_id,
|
NULL AS c_projectphase_id,
|
||||||
NULL AS c_projecttask_id,
|
NULL AS c_projecttask_id,
|
||||||
il.ad_orgtrx_id AS c_invoiceline_ad_orgtrx_id,
|
NULL AS c_invoiceline_ad_orgtrx_id,
|
||||||
il.a_processed,
|
NULL AS a_processed,
|
||||||
il.c_charge_id,
|
NULL AS c_charge_id,
|
||||||
il.c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
il.c_uom_id,
|
NULL AS c_uom_id,
|
||||||
il.isdescription,
|
NULL AS isdescription,
|
||||||
il.isprinted AS c_invoiceline_isprinted,
|
NULL AS c_invoiceline_isprinted,
|
||||||
il.m_inoutline_id,
|
NULL AS m_inoutline_id,
|
||||||
il.m_rmaline_id,
|
NULL AS m_rmaline_id,
|
||||||
il.pricelimit,
|
NULL AS pricelimit,
|
||||||
il.processed AS c_invoiceline_processed,
|
NULL AS c_invoiceline_processed,
|
||||||
il.ref_invoiceline_id,
|
NULL AS ref_invoiceline_id,
|
||||||
il.rramt,
|
NULL AS rramt,
|
||||||
il.rrstartdate,
|
NULL AS rrstartdate,
|
||||||
il.s_resourceassignment_id,
|
NULL AS s_resourceassignment_id,
|
||||||
il.user1_id AS c_invoiceline_user1_id,
|
NULL AS c_invoiceline_user1_id,
|
||||||
il.user2_id AS c_invoiceline_user2_id,
|
NULL AS c_invoiceline_user2_id,
|
||||||
NULL AS c_uom_ad_org_id,
|
NULL AS c_uom_ad_org_id,
|
||||||
NULL AS costingprecision,
|
NULL AS costingprecision,
|
||||||
NULL AS c_uom_description,
|
NULL AS c_uom_description,
|
||||||
|
@ -785,7 +785,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
FROM c_invoiceline il,
|
FROM c_invoiceline il,
|
||||||
ad_language l
|
ad_language l
|
||||||
WHERE il.c_uom_id IS NULL AND l.isbaselanguage = 'N' AND l.issystemlanguage = 'Y')
|
WHERE il.c_uom_id IS NULL AND l.isbaselanguage = 'N' AND l.issystemlanguage = 'Y')
|
||||||
UNION SELECT i.ad_client_id,
|
UNION /* empty line */ SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
i.created,
|
i.created,
|
||||||
|
@ -856,65 +856,65 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_invoice_ad_org_id,
|
NULL AS c_invoice_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
|
NULL AS c_invoice_ad_orgtrx_id,
|
||||||
i.ad_user_id AS c_invoice_ad_user_id,
|
NULL AS c_invoice_ad_user_id,
|
||||||
i.c_activity_id AS c_invoice_c_activity_id,
|
NULL AS c_invoice_c_activity_id,
|
||||||
i.c_bpartner_id AS c_invoice_c_bpartner_id,
|
NULL AS c_invoice_c_bpartner_id,
|
||||||
i.c_bpartner_location_id,
|
NULL AS c_bpartner_location_id,
|
||||||
i.c_campaign_id AS c_invoice_c_campaign_id,
|
NULL AS c_invoice_c_campaign_id,
|
||||||
i.c_charge_id AS c_invoice_c_charge_id,
|
NULL AS c_invoice_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id,
|
NULL AS c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.c_dunninglevel_id,
|
NULL AS c_dunninglevel_id,
|
||||||
i.chargeamt AS c_invoice_chargeamt,
|
NULL AS c_invoice_chargeamt,
|
||||||
i.c_order_id,
|
NULL AS c_order_id,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_project_id AS c_invoice_c_project_id,
|
NULL AS c_invoice_c_project_id,
|
||||||
i.created AS c_invoice_created,
|
NULL AS c_invoice_created,
|
||||||
i.createdby AS c_invoice_createdby,
|
NULL AS c_invoice_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateinvoiced,
|
NULL AS dateinvoiced,
|
||||||
i.dateordered,
|
NULL AS dateordered,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.description AS c_invoice_description,
|
NULL AS c_invoice_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dunninggrace,
|
NULL AS dunninggrace,
|
||||||
i.generateto,
|
NULL AS generateto,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicecollectiontype,
|
NULL AS invoicecollectiontype,
|
||||||
i.isactive AS c_invoice_isactive,
|
NULL AS c_invoice_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.isdiscountprinted,
|
NULL AS isdiscountprinted,
|
||||||
i.isindispute,
|
NULL AS isindispute,
|
||||||
i.ispaid,
|
NULL AS ispaid,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted AS c_invoice_isprinted,
|
NULL AS c_invoice_isprinted,
|
||||||
i.isselfservice AS c_invoice_isselfservice,
|
NULL AS c_invoice_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded AS c_invoice_istaxincluded,
|
NULL AS c_invoice_istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.m_pricelist_id,
|
NULL AS m_pricelist_id,
|
||||||
i.m_rma_id,
|
NULL AS m_rma_id,
|
||||||
i.paymentrule,
|
NULL AS paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.processing,
|
NULL AS processing,
|
||||||
i.ref_invoice_id,
|
NULL AS ref_invoice_id,
|
||||||
i.reversal_id,
|
NULL AS reversal_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail,
|
NULL AS sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_invoice_updated,
|
NULL AS c_invoice_updated,
|
||||||
i.updatedby AS c_invoice_updatedby,
|
NULL AS c_invoice_updatedby,
|
||||||
i.user1_id AS c_invoice_user1_id,
|
NULL AS c_invoice_user1_id,
|
||||||
i.user2_id AS c_invoice_user2_id,
|
NULL AS c_invoice_user2_id,
|
||||||
NULL AS c_tax_ad_org_id,
|
NULL AS c_tax_ad_org_id,
|
||||||
NULL AS ad_rule_id,
|
NULL AS ad_rule_id,
|
||||||
NULL AS c_country_id,
|
NULL AS c_country_id,
|
||||||
|
@ -1034,7 +1034,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
|
||||||
WHERE l.isbaselanguage = 'N' AND l.issystemlanguage = 'Y'
|
WHERE l.isbaselanguage = 'N' AND l.issystemlanguage = 'Y'
|
||||||
)
|
)
|
||||||
UNION
|
UNION
|
||||||
SELECT it.ad_client_id,
|
SELECT /* tax lines */ it.ad_client_id,
|
||||||
it.ad_org_id,
|
it.ad_org_id,
|
||||||
it.isactive,
|
it.isactive,
|
||||||
it.created,
|
it.created,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DROP VIEW c_order_linetax_v;
|
DROP VIEW c_order_linetax_v;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW c_order_linetax_v AS
|
CREATE OR REPLACE VIEW c_order_linetax_v AS
|
||||||
(
|
(
|
||||||
|
@ -403,7 +403,7 @@ CREATE OR REPLACE VIEW c_order_linetax_v AS
|
||||||
ON ol.c_bpartner_location_id = bpl.c_bpartner_location_id
|
ON ol.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||||
LEFT JOIN c_tax t
|
LEFT JOIN c_tax t
|
||||||
ON ol.c_tax_id = t.c_tax_id
|
ON ol.c_tax_id = t.c_tax_id
|
||||||
UNION SELECT ol.ad_client_id,
|
UNION /* BOM lines */ SELECT ol.ad_client_id,
|
||||||
ol.ad_org_id,
|
ol.ad_org_id,
|
||||||
ol.isactive,
|
ol.isactive,
|
||||||
ol.created,
|
ol.created,
|
||||||
|
@ -796,7 +796,7 @@ CREATE OR REPLACE VIEW c_order_linetax_v AS
|
||||||
ON p.m_product_id = po.m_product_id AND i.c_bpartner_id = po.c_bpartner_id
|
ON p.m_product_id = po.m_product_id AND i.c_bpartner_id = po.c_bpartner_id
|
||||||
JOIN c_uom uom
|
JOIN c_uom uom
|
||||||
ON p.c_uom_id = uom.c_uom_id)
|
ON p.c_uom_id = uom.c_uom_id)
|
||||||
UNION SELECT i.ad_client_id,
|
UNION /* empty line */ SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
i.created,
|
i.created,
|
||||||
|
@ -874,87 +874,87 @@ CREATE OR REPLACE VIEW c_order_linetax_v AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_order_ad_org_id,
|
NULL AS c_order_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_order_ad_orgtrx_id,
|
NULL AS c_order_ad_orgtrx_id,
|
||||||
i.ad_user_id,
|
NULL AS ad_user_id,
|
||||||
i.amountrefunded,
|
NULL AS amountrefunded,
|
||||||
i.amounttendered,
|
NULL AS amounttendered,
|
||||||
i.bill_bpartner_id,
|
NULL AS bill_bpartner_id,
|
||||||
i.bill_location_id,
|
NULL AS bill_location_id,
|
||||||
i.bill_user_id,
|
NULL AS bill_user_id,
|
||||||
i.c_activity_id AS c_order_c_activity_id,
|
NULL AS c_order_c_activity_id,
|
||||||
i.c_bpartner_id AS c_order_c_bpartner_id,
|
NULL AS c_order_c_bpartner_id,
|
||||||
i.c_campaign_id AS c_order_c_campaign_id,
|
NULL AS c_order_c_campaign_id,
|
||||||
i.c_cashline_id,
|
NULL AS c_cashline_id,
|
||||||
i.c_cashplanline_id,
|
NULL AS c_cashplanline_id,
|
||||||
i.c_charge_id AS c_order_c_charge_id,
|
NULL AS c_order_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id AS c_order_c_currency_id,
|
NULL AS c_order_c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.chargeamt,
|
NULL AS chargeamt,
|
||||||
i.copyfrom,
|
NULL AS copyfrom,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_pos_id,
|
NULL AS c_pos_id,
|
||||||
i.c_project_id AS c_order_c_project_id,
|
NULL AS c_order_c_project_id,
|
||||||
i.created AS c_order_created,
|
NULL AS c_order_created,
|
||||||
i.createdby AS c_order_createdby,
|
NULL AS c_order_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.datepromised AS c_order_datepromised,
|
NULL AS c_order_datepromised,
|
||||||
i.deliveryrule,
|
NULL AS deliveryrule,
|
||||||
i.deliveryviarule,
|
NULL AS deliveryviarule,
|
||||||
i.description AS c_order_description,
|
NULL AS c_order_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dropship_bpartner_id,
|
NULL AS dropship_bpartner_id,
|
||||||
i.dropship_location_id,
|
NULL AS dropship_location_id,
|
||||||
i.dropship_user_id,
|
NULL AS dropship_user_id,
|
||||||
i.freightamt AS c_order_freightamt,
|
NULL AS c_order_freightamt,
|
||||||
i.freightcostrule,
|
NULL AS freightcostrule,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicerule,
|
NULL AS invoicerule,
|
||||||
i.isactive AS c_order_isactive,
|
NULL AS c_order_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.iscreditapproved,
|
NULL AS iscreditapproved,
|
||||||
i.isdelivered,
|
NULL AS isdelivered,
|
||||||
i.isdiscountprinted AS c_order_isdiscountprinted,
|
NULL AS c_order_isdiscountprinted,
|
||||||
i.isdropship AS c_order_isdropship,
|
NULL AS c_order_isdropship,
|
||||||
i.isinvoiced,
|
NULL AS isinvoiced,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted,
|
NULL AS isprinted,
|
||||||
i.isselected,
|
NULL AS isselected,
|
||||||
i.isselfservice AS c_order_isselfservice,
|
NULL AS c_order_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded,
|
NULL AS istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.link_order_id,
|
NULL AS link_order_id,
|
||||||
i.m_freightcategory_id AS c_order_m_freightcategory_id,
|
NULL AS c_order_m_freightcategory_id,
|
||||||
i.m_pricelist_id AS c_order_m_pricelist_id,
|
NULL AS c_order_m_pricelist_id,
|
||||||
i.m_shipper_id AS c_order_m_shipper_id,
|
NULL AS c_order_m_shipper_id,
|
||||||
i.m_warehouse_id AS c_order_m_warehouse_id,
|
NULL AS c_order_m_warehouse_id,
|
||||||
i.ordertype,
|
NULL AS ordertype,
|
||||||
i.pay_bpartner_id,
|
NULL AS pay_bpartner_id,
|
||||||
i.pay_location_id,
|
NULL AS pay_location_id,
|
||||||
i.paymentrule AS c_order_paymentrule,
|
NULL AS c_order_paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.priorityrule,
|
NULL AS priorityrule,
|
||||||
i.processed AS c_order_processed,
|
NULL AS c_order_processed,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.promotioncode,
|
NULL AS promotioncode,
|
||||||
i.ref_order_id,
|
NULL AS ref_order_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail AS c_order_sendemail,
|
NULL AS c_order_sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_order_updated,
|
NULL AS c_order_updated,
|
||||||
i.updatedby AS c_order_updatedby,
|
NULL AS c_order_updatedby,
|
||||||
i.user1_id AS c_order_user1_id,
|
NULL AS c_order_user1_id,
|
||||||
i.user2_id AS c_order_user2_id,
|
NULL AS c_order_user2_id,
|
||||||
i.volume AS c_order_volume,
|
NULL AS c_order_volume,
|
||||||
i.weight AS c_order_weight,
|
NULL AS c_order_weight,
|
||||||
NULL AS m_product_ad_org_id,
|
NULL AS m_product_ad_org_id,
|
||||||
NULL AS classification,
|
NULL AS classification,
|
||||||
NULL AS m_product_copyfrom,
|
NULL AS m_product_copyfrom,
|
||||||
|
@ -1177,7 +1177,7 @@ CREATE OR REPLACE VIEW c_order_linetax_v AS
|
||||||
FROM c_order i
|
FROM c_order i
|
||||||
)
|
)
|
||||||
UNION
|
UNION
|
||||||
SELECT ot.ad_client_id,
|
SELECT /* tax lines */ ot.ad_client_id,
|
||||||
ot.ad_org_id,
|
ot.ad_org_id,
|
||||||
ot.isactive,
|
ot.isactive,
|
||||||
ot.created,
|
ot.created,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DROP VIEW c_order_linetax_vt;
|
DROP VIEW c_order_linetax_vt;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
||||||
(
|
(
|
||||||
|
@ -411,7 +411,7 @@ CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
||||||
ON ol.c_tax_id = t.c_tax_id
|
ON ol.c_tax_id = t.c_tax_id
|
||||||
LEFT JOIN c_tax_trl tt
|
LEFT JOIN c_tax_trl tt
|
||||||
ON ol.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language
|
ON ol.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language
|
||||||
UNION SELECT ol.ad_client_id,
|
UNION /* BOM lines */ SELECT ol.ad_client_id,
|
||||||
ol.ad_org_id,
|
ol.ad_org_id,
|
||||||
ol.isactive,
|
ol.isactive,
|
||||||
ol.created,
|
ol.created,
|
||||||
|
@ -808,14 +808,14 @@ CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
||||||
ON p.c_uom_id = uomt.c_uom_id
|
ON p.c_uom_id = uomt.c_uom_id
|
||||||
JOIN m_product_trl pt
|
JOIN m_product_trl pt
|
||||||
ON pt.m_product_id = bl.m_product_id AND uomt.ad_language = pt.ad_language)
|
ON pt.m_product_id = bl.m_product_id AND uomt.ad_language = pt.ad_language)
|
||||||
UNION SELECT i.ad_client_id,
|
UNION /* empty line */ SELECT i.ad_client_id,
|
||||||
i.ad_org_id,
|
i.ad_org_id,
|
||||||
i.isactive,
|
i.isactive,
|
||||||
i.created,
|
i.created,
|
||||||
i.createdby,
|
i.createdby,
|
||||||
i.updated,
|
i.updated,
|
||||||
i.updatedby,
|
i.updatedby,
|
||||||
'en_US'::character varying(6) AS ad_language,
|
l.ad_language,
|
||||||
i.c_order_id,
|
i.c_order_id,
|
||||||
NULL AS c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
NULL AS c_tax_id,
|
NULL AS c_tax_id,
|
||||||
|
@ -886,87 +886,87 @@ CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
||||||
NULL AS stdprecision,
|
NULL AS stdprecision,
|
||||||
NULL AS uomtype,
|
NULL AS uomtype,
|
||||||
NULL AS x12de355,
|
NULL AS x12de355,
|
||||||
i.ad_org_id AS c_order_ad_org_id,
|
NULL AS c_order_ad_org_id,
|
||||||
i.ad_orgtrx_id AS c_order_ad_orgtrx_id,
|
NULL AS c_order_ad_orgtrx_id,
|
||||||
i.ad_user_id,
|
NULL AS ad_user_id,
|
||||||
i.amountrefunded,
|
NULL AS amountrefunded,
|
||||||
i.amounttendered,
|
NULL AS amounttendered,
|
||||||
i.bill_bpartner_id,
|
NULL AS bill_bpartner_id,
|
||||||
i.bill_location_id,
|
NULL AS bill_location_id,
|
||||||
i.bill_user_id,
|
NULL AS bill_user_id,
|
||||||
i.c_activity_id AS c_order_c_activity_id,
|
NULL AS c_order_c_activity_id,
|
||||||
i.c_bpartner_id AS c_order_c_bpartner_id,
|
NULL AS c_order_c_bpartner_id,
|
||||||
i.c_campaign_id AS c_order_c_campaign_id,
|
NULL AS c_order_c_campaign_id,
|
||||||
i.c_cashline_id,
|
NULL AS c_cashline_id,
|
||||||
i.c_cashplanline_id,
|
NULL AS c_cashplanline_id,
|
||||||
i.c_charge_id AS c_order_c_charge_id,
|
NULL AS c_order_c_charge_id,
|
||||||
i.c_conversiontype_id,
|
NULL AS c_conversiontype_id,
|
||||||
i.c_currency_id AS c_order_c_currency_id,
|
NULL AS c_order_c_currency_id,
|
||||||
i.c_doctype_id,
|
NULL AS c_doctype_id,
|
||||||
i.c_doctypetarget_id,
|
NULL AS c_doctypetarget_id,
|
||||||
i.chargeamt,
|
NULL AS chargeamt,
|
||||||
i.copyfrom,
|
NULL AS copyfrom,
|
||||||
i.c_payment_id,
|
NULL AS c_payment_id,
|
||||||
i.c_paymentterm_id,
|
NULL AS c_paymentterm_id,
|
||||||
i.c_pos_id,
|
NULL AS c_pos_id,
|
||||||
i.c_project_id AS c_order_c_project_id,
|
NULL AS c_order_c_project_id,
|
||||||
i.created AS c_order_created,
|
NULL AS c_order_created,
|
||||||
i.createdby AS c_order_createdby,
|
NULL AS c_order_createdby,
|
||||||
i.dateacct,
|
NULL AS dateacct,
|
||||||
i.dateprinted,
|
NULL AS dateprinted,
|
||||||
i.datepromised AS c_order_datepromised,
|
NULL AS c_order_datepromised,
|
||||||
i.deliveryrule,
|
NULL AS deliveryrule,
|
||||||
i.deliveryviarule,
|
NULL AS deliveryviarule,
|
||||||
i.description AS c_order_description,
|
NULL AS c_order_description,
|
||||||
i.docaction,
|
NULL AS docaction,
|
||||||
i.docstatus,
|
NULL AS docstatus,
|
||||||
i.documentno,
|
NULL AS documentno,
|
||||||
i.dropship_bpartner_id,
|
NULL AS dropship_bpartner_id,
|
||||||
i.dropship_location_id,
|
NULL AS dropship_location_id,
|
||||||
i.dropship_user_id,
|
NULL AS dropship_user_id,
|
||||||
i.freightamt AS c_order_freightamt,
|
NULL AS c_order_freightamt,
|
||||||
i.freightcostrule,
|
NULL AS freightcostrule,
|
||||||
i.grandtotal,
|
NULL AS grandtotal,
|
||||||
i.invoicerule,
|
NULL AS invoicerule,
|
||||||
i.isactive AS c_order_isactive,
|
NULL AS c_order_isactive,
|
||||||
i.isapproved,
|
NULL AS isapproved,
|
||||||
i.iscreditapproved,
|
NULL AS iscreditapproved,
|
||||||
i.isdelivered,
|
NULL AS isdelivered,
|
||||||
i.isdiscountprinted AS c_order_isdiscountprinted,
|
NULL AS c_order_isdiscountprinted,
|
||||||
i.isdropship AS c_order_isdropship,
|
NULL AS c_order_isdropship,
|
||||||
i.isinvoiced,
|
NULL AS isinvoiced,
|
||||||
i.ispayschedulevalid,
|
NULL AS ispayschedulevalid,
|
||||||
i.isprinted,
|
NULL AS isprinted,
|
||||||
i.isselected,
|
NULL AS isselected,
|
||||||
i.isselfservice AS c_order_isselfservice,
|
NULL AS c_order_isselfservice,
|
||||||
i.issotrx,
|
NULL AS issotrx,
|
||||||
i.istaxincluded,
|
NULL AS istaxincluded,
|
||||||
i.istransferred,
|
NULL AS istransferred,
|
||||||
i.link_order_id,
|
NULL AS link_order_id,
|
||||||
i.m_freightcategory_id AS c_order_m_freightcategory_id,
|
NULL AS c_order_m_freightcategory_id,
|
||||||
i.m_pricelist_id AS c_order_m_pricelist_id,
|
NULL AS c_order_m_pricelist_id,
|
||||||
i.m_shipper_id AS c_order_m_shipper_id,
|
NULL AS c_order_m_shipper_id,
|
||||||
i.m_warehouse_id AS c_order_m_warehouse_id,
|
NULL AS c_order_m_warehouse_id,
|
||||||
i.ordertype,
|
NULL AS ordertype,
|
||||||
i.pay_bpartner_id,
|
NULL AS pay_bpartner_id,
|
||||||
i.pay_location_id,
|
NULL AS pay_location_id,
|
||||||
i.paymentrule AS c_order_paymentrule,
|
NULL AS c_order_paymentrule,
|
||||||
i.poreference,
|
NULL AS poreference,
|
||||||
i.posted,
|
NULL AS posted,
|
||||||
i.priorityrule,
|
NULL AS priorityrule,
|
||||||
i.processed AS c_order_processed,
|
NULL AS c_order_processed,
|
||||||
i.processedon,
|
NULL AS processedon,
|
||||||
i.promotioncode,
|
NULL AS promotioncode,
|
||||||
i.ref_order_id,
|
NULL AS ref_order_id,
|
||||||
i.salesrep_id,
|
NULL AS salesrep_id,
|
||||||
i.sendemail AS c_order_sendemail,
|
NULL AS c_order_sendemail,
|
||||||
i.totallines,
|
NULL AS totallines,
|
||||||
i.updated AS c_order_updated,
|
NULL AS c_order_updated,
|
||||||
i.updatedby AS c_order_updatedby,
|
NULL AS c_order_updatedby,
|
||||||
i.user1_id AS c_order_user1_id,
|
NULL AS c_order_user1_id,
|
||||||
i.user2_id AS c_order_user2_id,
|
NULL AS c_order_user2_id,
|
||||||
i.volume AS c_order_volume,
|
NULL AS c_order_volume,
|
||||||
i.weight AS c_order_weight,
|
NULL AS c_order_weight,
|
||||||
NULL AS m_product_ad_org_id,
|
NULL AS m_product_ad_org_id,
|
||||||
NULL AS classification,
|
NULL AS classification,
|
||||||
NULL AS m_product_copyfrom,
|
NULL AS m_product_copyfrom,
|
||||||
|
@ -1186,17 +1186,18 @@ CREATE OR REPLACE VIEW c_order_linetax_vt AS
|
||||||
NULL AS to_country_id,
|
NULL AS to_country_id,
|
||||||
NULL AS c_tax_to_region_id,
|
NULL AS c_tax_to_region_id,
|
||||||
NULL AS validfrom
|
NULL AS validfrom
|
||||||
FROM c_order i
|
FROM c_order i, ad_language l
|
||||||
|
WHERE l.isbaselanguage='N' AND l.issystemlanguage='Y'
|
||||||
)
|
)
|
||||||
UNION
|
UNION
|
||||||
SELECT ot.ad_client_id,
|
SELECT /* tax lines */ ot.ad_client_id,
|
||||||
ot.ad_org_id,
|
ot.ad_org_id,
|
||||||
ot.isactive,
|
ot.isactive,
|
||||||
ot.created,
|
ot.created,
|
||||||
ot.createdby,
|
ot.createdby,
|
||||||
ot.updated,
|
ot.updated,
|
||||||
ot.updatedby,
|
ot.updatedby,
|
||||||
'en_US'::character varying(6) AS ad_language,
|
tt.ad_language,
|
||||||
ot.c_order_id,
|
ot.c_order_id,
|
||||||
NULL AS c_orderline_id,
|
NULL AS c_orderline_id,
|
||||||
ot.c_tax_id,
|
ot.c_tax_id,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -137,7 +137,7 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
+ "FROM C_BPartner p"
|
+ "FROM C_BPartner p"
|
||||||
+ " INNER JOIN C_BP_Group g ON (p.C_BP_Group_ID=g.C_BP_Group_ID)"
|
+ " INNER JOIN C_BP_Group g ON (p.C_BP_Group_ID=g.C_BP_Group_ID)"
|
||||||
+ " LEFT OUTER JOIN C_BPartner_Location l ON (p.C_BPartner_ID=l.C_BPartner_ID AND l.IsBillTo='Y' AND l.IsActive='Y')"
|
+ " LEFT OUTER JOIN C_BPartner_Location l ON (p.C_BPartner_ID=l.C_BPartner_ID AND l.IsBillTo='Y' AND l.IsActive='Y')"
|
||||||
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID) "
|
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') "
|
||||||
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
||||||
|
|
||||||
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
|
boolean IsSOTrx = Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y");
|
||||||
|
|
|
@ -261,7 +261,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
+ " INNER JOIN C_BP_Group g ON (p.C_BP_Group_ID=g.C_BP_Group_ID)"
|
+ " INNER JOIN C_BP_Group g ON (p.C_BP_Group_ID=g.C_BP_Group_ID)"
|
||||||
+ " LEFT OUTER JOIN C_BPartner_Location lbill ON (p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y')"
|
+ " LEFT OUTER JOIN C_BPartner_Location lbill ON (p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y')"
|
||||||
+ " LEFT OUTER JOIN C_BPartner_Location lship ON (p.C_BPartner_ID=lship.C_BPartner_ID AND lship.IsShipTo='Y' AND lship.IsActive='Y')"
|
+ " LEFT OUTER JOIN C_BPartner_Location lship ON (p.C_BPartner_ID=lship.C_BPartner_ID AND lship.IsShipTo='Y' AND lship.IsActive='Y')"
|
||||||
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID) "
|
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') "
|
||||||
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
||||||
|
|
||||||
boolean IsSOTrx = "Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx"));
|
boolean IsSOTrx = "Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx"));
|
||||||
|
@ -473,7 +473,7 @@ public class CalloutOrder extends CalloutEngine
|
||||||
+ "lbill.C_BPartner_Location_ID AS Bill_Location_ID "
|
+ "lbill.C_BPartner_Location_ID AS Bill_Location_ID "
|
||||||
+ "FROM C_BPartner p"
|
+ "FROM C_BPartner p"
|
||||||
+ " LEFT OUTER JOIN C_BPartner_Location lbill ON (p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y')"
|
+ " LEFT OUTER JOIN C_BPartner_Location lbill ON (p.C_BPartner_ID=lbill.C_BPartner_ID AND lbill.IsBillTo='Y' AND lbill.IsActive='Y')"
|
||||||
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID) "
|
+ " LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID AND c.IsActive='Y') "
|
||||||
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
+ "WHERE p.C_BPartner_ID=? AND p.IsActive='Y'"; // #1
|
||||||
|
|
||||||
boolean IsSOTrx = "Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx"));
|
boolean IsSOTrx = "Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx"));
|
||||||
|
|
Loading…
Reference in New Issue