Physical Inventory creates transactions even if movement qty = zero

(fixes issue #3)
https://bitbucket.org/tspc/adempiere361/issue/3/physical-inventory-creates-transactions
This commit is contained in:
tspc 2011-03-08 12:32:45 -05:00
parent ad8d01291c
commit dafa950221
1 changed files with 7 additions and 2 deletions

View File

@ -396,11 +396,16 @@ public class MInventory extends X_M_Inventory implements DocAction
MProduct product = line.getProduct(); MProduct product = line.getProduct();
//Get Quantity to Inventory Inernal Use //Get Quantity Internal Use
BigDecimal qtyDiff = line.getQtyInternalUse().negate(); BigDecimal qtyDiff = line.getQtyInternalUse().negate();
//If Quantity to Inventory Internal Use = Zero Then is Physical Inventory Else is Inventory Internal Use //If Quantity Internal Use = Zero Then Physical Inventory Else Internal Use Inventory
if (qtyDiff.signum() == 0) if (qtyDiff.signum() == 0)
{
qtyDiff = line.getQtyCount().subtract(line.getQtyBook()); qtyDiff = line.getQtyCount().subtract(line.getQtyBook());
//If Quantity Count minus Quantity Book = Zero, then no change in Inventory
if (qtyDiff.signum() == 0)
continue;
}
//Ignore the Material Policy when is Reverse Correction //Ignore the Material Policy when is Reverse Correction
if(!isReversal()) if(!isReversal())