FR [2962094] Finish implementation of weighted average costing
Fixing problem reported on [2982558] C_InvoiceLine and C_OrderLine's QtyInvoiced do not match caused by revision 11710 Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2962094
This commit is contained in:
parent
7222028463
commit
4d5f74b682
|
@ -649,7 +649,7 @@ public class MMatchPO extends X_M_MatchPO
|
||||||
{
|
{
|
||||||
MOrderLine orderLine = getOrderLine();
|
MOrderLine orderLine = getOrderLine();
|
||||||
//
|
//
|
||||||
if (m_isInOutLineChange)
|
if (m_isInOutLineChange && (newRecord || getM_InOutLine_ID() != get_ValueOldAsInt("M_InOutLine_ID")))
|
||||||
{
|
{
|
||||||
if (getM_InOutLine_ID() != 0) // new delivery
|
if (getM_InOutLine_ID() != 0) // new delivery
|
||||||
orderLine.setQtyDelivered(orderLine.getQtyDelivered().add(getQty()));
|
orderLine.setQtyDelivered(orderLine.getQtyDelivered().add(getQty()));
|
||||||
|
@ -657,7 +657,7 @@ public class MMatchPO extends X_M_MatchPO
|
||||||
orderLine.setQtyDelivered(orderLine.getQtyDelivered().subtract(getQty()));
|
orderLine.setQtyDelivered(orderLine.getQtyDelivered().subtract(getQty()));
|
||||||
orderLine.setDateDelivered(getDateTrx()); // overwrite=last
|
orderLine.setDateDelivered(getDateTrx()); // overwrite=last
|
||||||
}
|
}
|
||||||
if (m_isInvoiceLineChange)
|
if (m_isInvoiceLineChange && (newRecord || getC_InvoiceLine_ID() != get_ValueOldAsInt("C_InvoiceLine_ID")))
|
||||||
{
|
{
|
||||||
if (getC_InvoiceLine_ID() != 0) // first time
|
if (getC_InvoiceLine_ID() != 0) // first time
|
||||||
orderLine.setQtyInvoiced(orderLine.getQtyInvoiced().add(getQty()));
|
orderLine.setQtyInvoiced(orderLine.getQtyInvoiced().add(getQty()));
|
||||||
|
|
Loading…
Reference in New Issue