details: https://code.openbravo.com/erp/devel/pi/rev/03f22c0f86a0 changeset: 20188:03f22c0f86a0 user: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com> date: Tue Apr 23 19:28:04 2013 +0200 summary: Fixes bug 23590
diffstat: modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml | 2 +- modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml | 2 +- modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diffs (47 lines): diff -r 98249a01fff0 -r 03f22c0f86a0 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml Thu Apr 18 10:17:54 2013 +0530 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml Tue Apr 23 19:28:04 2013 +0200 @@ -7878,7 +7878,7 @@ <!--7DFD1BBEC2F60C48E040007F01004674--> <AD_COLUMN_ID><![CDATA[7DC34559B3F2B45BE040007F0100784A]]></AD_COLUMN_ID> <!--7DFD1BBEC2F60C48E040007F01004674--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD> <!--7DFD1BBEC2F60C48E040007F01004674--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED> -<!--7DFD1BBEC2F60C48E040007F01004674--> <DISPLAYLOGIC><![CDATA[@Processed@='Y' & @Status@!'RPVOID']]></DISPLAYLOGIC> +<!--7DFD1BBEC2F60C48E040007F01004674--> <DISPLAYLOGIC><![CDATA[@Processed@='Y' & @Status@!'RPVOID' & @FIN_Rev_Payment_ID@ = '']]></DISPLAYLOGIC> <!--7DFD1BBEC2F60C48E040007F01004674--> <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH> <!--7DFD1BBEC2F60C48E040007F01004674--> <ISREADONLY><![CDATA[N]]></ISREADONLY> <!--7DFD1BBEC2F60C48E040007F01004674--> <SEQNO><![CDATA[130]]></SEQNO> diff -r 98249a01fff0 -r 03f22c0f86a0 modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml --- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml Thu Apr 18 10:17:54 2013 +0530 +++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml Tue Apr 23 19:28:04 2013 +0200 @@ -51,7 +51,7 @@ <!--575E470ABADB4C278132C957A78C47E3--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--575E470ABADB4C278132C957A78C47E3--> <NAME><![CDATA[Process Payment valid actions]]></NAME> <!--575E470ABADB4C278132C957A78C47E3--> <TYPE><![CDATA[S]]></TYPE> -<!--575E470ABADB4C278132C957A78C47E3--> <CODE><![CDATA[((@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ in ('R','RE') AND AD_Ref_List.value IN ('RE','R')) OR (@EM_APRM_Process_Payment@ in ('R','RE') AND AD_Ref_List.value IN ('V') AND @Status@='RPAE') OR (@EM_APRM_Process_Payment@ is null)) AND AD_Ref_List.IsActive = 'Y']]></CODE> +<!--575E470ABADB4C278132C957A78C47E3--> <CODE><![CDATA[((@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ in ('R','RE') AND AD_Ref_List.value IN ('RE','R') AND NOT EXISTS (SELECT 1 FROM FIN_PAYMENT WHERE FIN_Rev_Payment_ID = @FIN_Payment_ID@)) OR (@EM_APRM_Process_Payment@ in ('R','RE') AND AD_Ref_List.value IN ('R') AND EXISTS (SELECT 1 FROM FIN_PAYMENT WHERE FIN_Rev_Payment_ID = @FIN_Payment_ID@)) OR (@EM_APRM_Process_Payment@ in ('R','RE') AND AD_Ref_List.value IN ('V') AND @Status@='RPAE') OR (@EM_APRM_Process_Payment@ is null)) AND AD_Ref_List.IsActive = 'Y']]></CODE> <!--575E470ABADB4C278132C957A78C47E3--> <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID> <!--575E470ABADB4C278132C957A78C47E3--></AD_VAL_RULE> diff -r 98249a01fff0 -r 03f22c0f86a0 modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Thu Apr 18 10:17:54 2013 +0530 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java Tue Apr 23 19:28:04 2013 +0200 @@ -604,7 +604,7 @@ return; } // Reverse Payment - if (FIN_Utility.isReversePayment(payment)) { + if (strAction.equals("RE") && FIN_Utility.isReversePayment(payment)) { msg.setType("Error"); msg.setTitle(Utility.messageBD(conProvider, "Error", language)); msg.setMessage(Utility.parseTranslation(conProvider, vars, language, @@ -793,6 +793,10 @@ && BigDecimal.ZERO.compareTo(psd.getWriteoffAmount()) == 0) { paymentDetail.getFINPaymentScheduleDetailList().remove(psd); OBDal.getInstance().getSession().refresh(paymentDetail); + psd.getInvoicePaymentSchedule() + .getFINPaymentScheduleDetailInvoicePaymentScheduleList().remove(psd); + psd.getOrderPaymentSchedule().getFINPaymentScheduleDetailOrderPaymentScheduleList() + .remove(psd); OBDal.getInstance().remove(psd); } } ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits