details: https://code.openbravo.com/erp/devel/pi/rev/48002b8ae52b
changeset: 24303:48002b8ae52b
user: Sandra Huguet <sandra.huguet <at> openbravo.com>
date: Fri Aug 22 13:44:46 2014 +0200
summary: Related to issue 27392 Totals Amounts with incorrect values when
filtering
diffstat:
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
| 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (18 lines):
diff -r 4a0636af3e5c -r 48002b8ae52b
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
---
a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
Fri Aug 22 13:19:12 2014 +0200
+++
b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
Fri Aug 22 13:44:46 2014 +0200
@@ -508,11 +508,11 @@
generateCredit = new
BigDecimal(String(form.getItem('generateCredit').getValue() || 0)),
glitemtotal = new
BigDecimal(String(form.getItem('amount_gl_items').getValue() || 0)),
credit = new BigDecimal(String(form.getItem('used_credit').getValue() ||
0)),
- selectedRecords = orderInvoice.getSelectedRecords(),
+ selectedRecords = orderInvoice.selectedIds,
actpayment, i;
for (i = 0; i < selectedRecords.length; i++) {
- totalAmountoutstanding = totalAmountoutstanding.add(new
BigDecimal(String(orderInvoice.getEditedCell(orderInvoice.getRecordIndex(selectedRecords[i]),
orderInvoice.getFieldByColumnName('outstandingAmount')))));
- totalAmount = totalAmount.add(new
BigDecimal(String(orderInvoice.getEditedCell(orderInvoice.getRecordIndex(selectedRecords[i]),
orderInvoice.getFieldByColumnName('amount')))));
+ totalAmountoutstanding = totalAmountoutstanding.add(new
BigDecimal(String(orderInvoice.getEditedCell(orderInvoice.getRecordIndex(orderInvoice.data.localData.find('id',
orderInvoice.selectedIds[i])),
orderInvoice.getFieldByColumnName('outstandingAmount')))));
+ totalAmount = totalAmount.add(new
BigDecimal(String(orderInvoice.getEditedCell(orderInvoice.getRecordIndex(orderInvoice.data.localData.find('id',
orderInvoice.selectedIds[i])), orderInvoice.getFieldByColumnName('amount')))));
}
if (selectedRecords.length > 0) {
expectedPayment.setValue(Number(totalAmountoutstanding));
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits