details: https://code.openbravo.com/erp/devel/pi/rev/a7ca298ecd76
changeset: 23400:a7ca298ecd76
user: Atul Gaware <atul.gaware <at> openbravo.com>
date: Thu May 29 10:41:14 2014 +0530
summary: Fixes Issue 26503:When trying to post a Physical Inventory with
total cost = 0
Post status should be = Disabled for Accounting
diffstat:
src/org/openbravo/erpCommon/ad_forms/DocInventory.java | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 4eea5c0c8248 -r a7ca298ecd76
src/org/openbravo/erpCommon/ad_forms/DocInventory.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInventory.java Wed May 28
09:20:58 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInventory.java Thu May 29
10:41:14 2014 +0530
@@ -177,6 +177,16 @@
if (p_lines.length == 0) {
setStatus(STATUS_DocumentDisabled);
}
+ int countInvLinesWithTrnCostZero = 0;
+ for (int i = 0; i < p_lines.length; i++) {
+ DocLine_Material line = (DocLine_Material) p_lines[i];
+ if (line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
+ countInvLinesWithTrnCostZero++;
+ }
+ }
+ if (p_lines.length == countInvLinesWithTrnCostZero) {
+ setStatus(STATUS_DocumentDisabled);
+ }
for (int i = 0; i < p_lines.length; i++) {
DocLine_Material line = (DocLine_Material) p_lines[i];
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits