IDEMPIERE-3775 Document Type>Purchase Requisition>Mandatory Charge or Product=Y no effect / IDEMPIERE-178

This commit is contained in:
Carlos Ruiz 2018-08-27 15:59:40 +02:00
parent 40085d3627
commit 5cdf7c0db9
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ public class MRequisitionLine extends X_M_RequisitionLine
* IDEMPIERE-178 Orders and Invoices must disallow amount lines without product/charge
*/
if (getParent().getC_DocType().isChargeOrProductMandatory()) {
if (getC_Charge_ID() == 0 && getM_Product_ID() == 0 && getPriceActual().signum() != 0) {
if (getC_Charge_ID() == 0 && getM_Product_ID() == 0 && (getPriceActual().signum() != 0 || getQty().signum() != 0)) {
log.saveError("FillMandatory", Msg.translate(getCtx(), "ChargeOrProductMandatory"));
return false;
}