details: https://code.openbravo.com/erp/devel/pi/rev/59459664e970
changeset: 16838:59459664e970
user: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
date: Wed Jun 13 19:42:12 2012 +0200
summary: Fixes bug 20756: Reactivate payment: credit is generated when paying
an order
diffstat:
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java
| 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (23 lines):
diff -r 6165a0f9f60c -r 59459664e970
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java
---
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java
Thu May 17 13:10:01 2012 +0200
+++
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java
Wed Jun 13 19:42:12 2012 +0200
@@ -287,9 +287,7 @@
// update outstanding amount
List<FIN_PaymentScheduleDetail> outStandingPSDs =
FIN_AddPayment.getOutstandingPSDs(psd);
if (outStandingPSDs.size() == 0) {
- // No outstanding PSD exists so we update this one
- psd.setPaymentDetails(null);
- OBDal.getInstance().save(psd);
+ toRemovePDs.add(pd.getId());
} else {
// First make sure outstanding amount is not equal zero
if
(outStandingPSDs.get(0).getAmount().add(psd.getAmount()).signum() == 0) {
@@ -548,7 +546,7 @@
List<FIN_PaymentScheduleDetail> storedScheduledPaymentDetails = new
ArrayList<FIN_PaymentScheduleDetail>();
// This is to identify first load of the grid
String strFirstLoad = vars.getStringParameter("isFirstLoad");
- if ("true".equals(strFirstLoad)) {
+ if ("true".equals(strFirstLoad) &&
payment.getFINPaymentDetailList().size() > 0) {
// Add payment schedule details related to orders or invoices to
storedSchedulePaymentDetails
OBContext.setAdminMode();
try {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits