details: /erp/devel/pi/rev/a21f7072b8ef
changeset: 7470:a21f7072b8ef
user: Adrián Romero <adrianromero <at> openbravo.com>
date: Tue Jun 01 17:48:17 2010 +0200
summary: Fixes issue 0013358: Error when invoicing using invoice grouping by
project
This change modifies the condition of grouping by project because it did not
take into account when the project is NULL
diffstat:
src-db/database/model/functions/C_INVOICE_CREATE.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r b29a566ee474 -r a21f7072b8ef
src-db/database/model/functions/C_INVOICE_CREATE.xml
--- a/src-db/database/model/functions/C_INVOICE_CREATE.xml Tue Jun 01
17:08:56 2010 +0200
+++ b/src-db/database/model/functions/C_INVOICE_CREATE.xml Tue Jun 01
17:48:17 2010 +0200
@@ -863,7 +863,7 @@
15.-User dimension 2 (User2_ID)
*/
IF((v_Partner_ID<>Cur_InvoiceSchedule.C_BPartner_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 1, 1)='1' AND
v_gOrg_ID<>Cur_InvoiceSchedule.AD_Org_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 2, 1)='1' AND
v_gOrder_ID<>Cur_InvoiceSchedule.C_Order_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 3, 1)='1' AND
v_gInOut_ID<>Cur_InvoiceSchedule.M_InOut_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 4, 1)='1' AND
v_gBillTo_ID<>Cur_InvoiceSchedule.BillTo_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 5, 1)='1' AND
v_gBPartner_Location_ID<>Cur_InvoiceSchedule.C_BPartner_Location_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 6, 1)='1' AND
v_gSalesRep_ID<>Cur_InvoiceSchedule.SalesRep_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 7, 1)='1' AND
v_gPaymentRule<>Cur_InvoiceSchedule.PaymentRule)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 8, 1)='1' AND
v_gPaymentTerm_ID<>Cur_InvoiceSchedule.C_PaymentTerm_ID) OR(SUBSTR(
- Cur_InvoiceSchedule.InvoiceGrouping, 9, 1)='1' AND
v_gCurrency_ID<>Cur_InvoiceSchedule.C_Currency_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 10, 1)='1' AND
v_gCampaign_ID<>Cur_InvoiceSchedule.C_Campaign_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 11, 1)='1' AND
v_gProject_ID<>Cur_InvoiceSchedule.C_Project_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 12, 1)='1' AND
v_gActivitiy_ID<>Cur_InvoiceSchedule.C_Activity_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 13, 1)='1' AND
v_gOrgTrx_ID<>Cur_InvoiceSchedule.AD_OrgTrx_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 14, 1)='1' AND
v_gUser1_ID<>Cur_InvoiceSchedule.User1_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 15, 1)='1' AND
v_gUser2_ID<>Cur_InvoiceSchedule.User2_ID)) THEN
+ Cur_InvoiceSchedule.InvoiceGrouping, 9, 1)='1' AND
v_gCurrency_ID<>Cur_InvoiceSchedule.C_Currency_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 10, 1)='1' AND
v_gCampaign_ID<>Cur_InvoiceSchedule.C_Campaign_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 11, 1)='1' AND
((v_gProject_ID<>Cur_InvoiceSchedule.C_Project_ID) OR (v_gProject_ID IS NULL
AND Cur_InvoiceSchedule.C_Project_ID IS NOT NULL) OR (v_gProject_ID IS NOT NULL
AND Cur_InvoiceSchedule.C_Project_ID IS NULL)))
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 12, 1)='1' AND
v_gActivitiy_ID<>Cur_InvoiceSchedule.C_Activity_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 13, 1)='1' AND
v_gOrgTrx_ID<>Cur_InvoiceSchedule.AD_OrgTrx_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 14, 1)='1' AND
v_gUser1_ID<>Cur_InvoiceSchedule.User1_ID)
OR(SUBSTR(Cur_InvoiceSchedule.InvoiceGrouping, 15, 1)='1' AND
v_gUser2_ID<>Cur_InvoiceSchedule.User2_ID)) THEN
v_Partner_ID:=Cur_InvoiceSchedule.C_BPartner_ID;
v_gOrg_ID:=Cur_InvoiceSchedule.AD_Org_ID;
v_gOrder_ID:=Cur_InvoiceSchedule.C_Order_ID;
------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits