IDEMPIERE-5703 NPE when importing Physical Inventory using Import CSV button (#1813)

* IDEMPIERE-5703 NPE when importing Physical Inventory using Import CSV button

* - implement better approach suggested by Heng Sin
This commit is contained in:
Carlos Ruiz 2023-05-01 14:05:03 +02:00 committed by GitHub
parent 92424ec5d9
commit 70413f206b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ public class CostAdjustmentLineProduct implements IColumnCallout {
trxName = gt.get_TrxName();
}
}
if (mTab.getValue("M_Inventory_ID") == null)
return null;
MInventory inventory = new MInventory(ctx, (Integer) mTab.getValue("M_Inventory_ID"), trxName);
if (MDocType.DOCSUBTYPEINV_CostAdjustment.equals(inventory.getC_DocType().getDocSubTypeInv())) {
String costingMethod = inventory.getCostingMethod();