Skip to content

Commit

Permalink
References: #12
Browse files Browse the repository at this point in the history
  • Loading branch information
yamelsenih committed Feb 25, 2025
1 parent 0703186 commit b75a844
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions base/src/org/compiere/model/MProjectLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ protected boolean beforeSave (boolean newRecord)
setPlannedPrice(pp.getPriceStd());
}
}
if(Optional.ofNullable(getPlannedQty()).orElse(Env.ZERO).compareTo(Env.ZERO) == 0) {
BigDecimal quantity = (BigDecimal) get_Value("QtyEntered");
setPlannedQty(Optional.ofNullable(quantity).orElse(Env.ZERO));
}
if(get_ValueAsInt("C_UOM_ID") <= 0 && getM_Product_ID() > 0) {
MProduct product = MProduct.get(getCtx(), getM_Product_ID());
set_ValueOfColumn("C_UOM_ID", product.getC_UOM_ID());
}
}
// Planned Amount
setPlannedAmt(getPlannedQty().multiply(getPlannedPrice()));
Expand Down

0 comments on commit b75a844

Please sign in to comment.