Changing quantity on invoice line with charge resets price

Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3007770
This commit is contained in:
phib 2010-05-27 05:50:32 +00:00
parent db2c6d7ec3
commit b3862d3aac
2 changed files with 32 additions and 4 deletions

View File

@ -520,8 +520,22 @@ public class CalloutInvoice extends CalloutEngine
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
// Qty changed - recalc price
if ((mField.getColumnName().equals("QtyInvoiced")
// No Product
if ( M_Product_ID == 0 )
{
// if price change sync price actual and entered
// else ignore
if (mField.getColumnName().equals("PriceActual"))
{
mTab.setValue("PriceEntered", value);
}
else if (mField.getColumnName().equals("PriceEntered"))
{
mTab.setValue("PriceActual", value);
}
}
// Product Qty changed - recalc price
else if ((mField.getColumnName().equals("QtyInvoiced")
|| mField.getColumnName().equals("QtyEntered")
|| mField.getColumnName().equals("M_Product_ID"))
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))

View File

@ -972,8 +972,22 @@ public class CalloutOrder extends CalloutEngine
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
// Qty changed - recalc price
if ((mField.getColumnName().equals("QtyOrdered")
// No Product
if (M_Product_ID == 0)
{
// if price change sync price actual and entered
// else ignore
if (mField.getColumnName().equals("PriceActual"))
{
mTab.setValue("PriceEntered", value);
}
else if (mField.getColumnName().equals("PriceEntered"))
{
mTab.setValue("PriceActual", value);
}
}
// Product Qty changed - recalc price
else if ((mField.getColumnName().equals("QtyOrdered")
|| mField.getColumnName().equals("QtyEntered")
|| mField.getColumnName().equals("M_Product_ID"))
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))