IDEMPIERE-2997 - AR Credit Memo updates Sales Order Line QtyInvoiced in the wrong direction.
This commit is contained in:
parent
077a2c07a4
commit
ddc6b7ccc3
|
@ -1854,8 +1854,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
|| line.getM_Product_ID() == 0)
|
|| line.getM_Product_ID() == 0)
|
||||||
{
|
{
|
||||||
ol = new MOrderLine (getCtx(), line.getC_OrderLine_ID(), get_TrxName());
|
ol = new MOrderLine (getCtx(), line.getC_OrderLine_ID(), get_TrxName());
|
||||||
if (line.getQtyInvoiced() != null)
|
if (line.getQtyInvoiced() != null) {
|
||||||
ol.setQtyInvoiced(ol.getQtyInvoiced().add(line.getQtyInvoiced()));
|
ol.setQtyInvoiced(ol.getQtyInvoiced().add(isCreditMemo() ? line.getQtyInvoiced().negate() : line.getQtyInvoiced()));
|
||||||
|
}
|
||||||
if (!ol.save(get_TrxName()))
|
if (!ol.save(get_TrxName()))
|
||||||
{
|
{
|
||||||
m_processMsg = "Could not update Order Line";
|
m_processMsg = "Could not update Order Line";
|
||||||
|
|
Loading…
Reference in New Issue