details: https://code.openbravo.com/erp/devel/pi/rev/2c7a04678d48 changeset: 28058:2c7a04678d48 user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Wed Nov 25 12:29:31 2015 +0100 summary: Fixes issue 31215:Cannot reserve pending amount in partial delivered SalesOrder
When executing Manage Reservation from Sales Order and checking reservation quantity is less than (availableQty - reservedinothersQty), this check should be done with (quantity - releasedQty) instead of with quantity. diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 670c4ca4a492 -r 2c7a04678d48 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js Fri Nov 27 01:53:55 2015 +0000 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js Wed Nov 25 12:29:31 2015 +0100 @@ -43,7 +43,7 @@ return false; } quantity = new BigDecimal(String(value)); - if (quantity.compareTo(availableQty.subtract(reservedinothersQty)) > 0) { + if (quantity.subtract(releasedQty).compareTo(availableQty.subtract(reservedinothersQty)) > 0) { isc.warn(OB.I18N.getLabel('OBUIAPP_Res_MoreQtyThanAvailable', [record.availableQty, record.reservedinothers])); return false; } ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits