Corrected some erros introduced by:

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=1740047&group_id=176962
[ 1740047 ] Average Costing & Landed Cost fix
This commit is contained in:
fer_luck 2007-06-21 14:13:14 +00:00
parent f59f754f74
commit 2b6afea485
2 changed files with 9 additions and 9 deletions

View File

@ -2143,14 +2143,14 @@ public class MInvoice extends X_C_Invoice implements DocAction
}
//MZ Goodwill
if (!invoice.isSOTrx())
if (!isSOTrx())
{
// delete Matched Invoice Cost Detail
MInvoiceLine[] lines = invoice.getLines();
MInvoiceLine[] lines = getLines();
for (int i = 0; i < lines.length; i++)
{
MCostDetail cd = MCostDetail.get (invoice.getCtx(), "C_InvoiceLine_ID=? AND M_AttributeSetInstance_ID=?",
lines[i].getC_InvoiceLine_ID(), lines[i].getM_AttributeSetInstance_ID(), invoice.get_TrxName());
MCostDetail cd = MCostDetail.get (getCtx(), "C_InvoiceLine_ID=? AND M_AttributeSetInstance_ID=?",
lines[i].getC_InvoiceLine_ID(), lines[i].getM_AttributeSetInstance_ID(), get_TrxName());
if (cd != null)
{
cd.setProcessed(false);

View File

@ -2019,18 +2019,18 @@ public class MOrder extends X_C_Order implements DocAction
return false;
//MZ Goodwill
if (!order.isSOTrx())
if (!isSOTrx())
{
// delete Matched PO Cost Detail
MOrderLine[] lines = order.getLines();
MOrderLine[] linesMZ = getLines();
for (int i = 0; i < lines.length; i++)
{
MMatchPO[] mPO = MMatchPO.getOrderLine(order.getCtx(), lines[i].getC_OrderLine_ID(), order.get_TrxName());
MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), linesMZ[i].getC_OrderLine_ID(), get_TrxName());
// delete Cost Detail if the Matched PO has been deleted
if (mPO.length == 0)
{
MCostDetail cd = MCostDetail.get(order.getCtx(), "C_OrderLine_ID=? AND M_AttributeSetInstance_ID=?",
lines[i].getC_OrderLine_ID(), lines[i].getM_AttributeSetInstance_ID(), order.get_TrxName());
MCostDetail cd = MCostDetail.get(getCtx(), "C_OrderLine_ID=? AND M_AttributeSetInstance_ID=?",
linesMZ[i].getC_OrderLine_ID(), linesMZ[i].getM_AttributeSetInstance_ID(), get_TrxName());
if (cd != null)
{
cd.setProcessed(false);