details: https://code.openbravo.com/erp/devel/pi/rev/1a0f60909e60 changeset: 28149:1a0f60909e60 user: Nono <f.carballo <at> nectus.com> date: Tue Dec 15 12:57:28 2015 -0500 summary: Fixes Issue 31701 It is not posible to modify order's payments .... The C_ORDER_TRG2 trigger was updated to take into account sales invoices with document status 'VO' when updating.
details: https://code.openbravo.com/erp/devel/pi/rev/6e39d4773c59 changeset: 28150:6e39d4773c59 user: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> date: Thu Dec 17 13:23:14 2015 +0100 summary: Related to issue 31701: code review improvements When reactivating an order, do not consider payments in Awaiting Payment status as payments really linked to the order. This is a way to ensure reactivation of orders already linked to a voided invoice is possible, because since #30971 a 0 amount payment is automatically when voiding an invoice. So the flow in that case will be to manually reactivate that payment, and then reactivate the order. Updated copyright year. diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml | 3 ++- src-db/database/model/triggers/C_ORDER_TRG2.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diffs (34 lines): diff -r 447428f58b15 -r 6e39d4773c59 modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml Wed Dec 09 16:24:10 2015 +0530 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml Thu Dec 17 13:23:14 2015 +0100 @@ -204,7 +204,8 @@ WHERE ps.fin_payment_schedule_id = psd.fin_payment_schedule_order AND ps.c_order_id = p_record_id AND psd.fin_payment_detail_id = pd.fin_payment_detail_id - AND pd.fin_payment_id = p.fin_payment_id; + AND pd.fin_payment_id = p.fin_payment_id + AND p.status <> 'RPAP'; IF (v_count <> 0) THEN RAISE_APPLICATION_ERROR(-20000, '@APRM_OrderWithPayments@'||v_DocumentNo); END IF; diff -r 447428f58b15 -r 6e39d4773c59 src-db/database/model/triggers/C_ORDER_TRG2.xml --- a/src-db/database/model/triggers/C_ORDER_TRG2.xml Wed Dec 09 16:24:10 2015 +0530 +++ b/src-db/database/model/triggers/C_ORDER_TRG2.xml Thu Dec 17 13:23:14 2015 +0100 @@ -18,7 +18,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2009 Openbravo SLU + * All portions are Copyright (C) 2001-2015 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -44,7 +44,7 @@ C_PaymentTerm_ID=:new.C_PaymentTerm_ID, DateAcct=:new.DateAcct WHERE C_Order_ID=:new.C_Order_ID - AND DocStatus NOT IN('RE', 'CL', 'CO') ; + AND DocStatus NOT IN('RE', 'CL', 'CO', 'VO') ; END IF; END IF; ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits