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:
parent
db2c6d7ec3
commit
b3862d3aac
|
@ -520,8 +520,22 @@ public class CalloutInvoice extends CalloutEngine
|
||||||
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
||||||
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
|
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual);// + ", Discount=" + Discount);
|
||||||
|
|
||||||
// Qty changed - recalc price
|
// No Product
|
||||||
if ((mField.getColumnName().equals("QtyInvoiced")
|
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("QtyEntered")
|
||||||
|| mField.getColumnName().equals("M_Product_ID"))
|
|| mField.getColumnName().equals("M_Product_ID"))
|
||||||
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))
|
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))
|
||||||
|
|
|
@ -972,8 +972,22 @@ public class CalloutOrder extends CalloutEngine
|
||||||
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
log.fine("PriceList=" + PriceList + ", Limit=" + PriceLimit + ", Precision=" + StdPrecision);
|
||||||
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
log.fine("PriceEntered=" + PriceEntered + ", Actual=" + PriceActual + ", Discount=" + Discount);
|
||||||
|
|
||||||
// Qty changed - recalc price
|
// No Product
|
||||||
if ((mField.getColumnName().equals("QtyOrdered")
|
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("QtyEntered")
|
||||||
|| mField.getColumnName().equals("M_Product_ID"))
|
|| mField.getColumnName().equals("M_Product_ID"))
|
||||||
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))
|
&& !"N".equals(Env.getContext(ctx, WindowNo, "DiscountSchema")))
|
||||||
|
|
Loading…
Reference in New Issue