Fix bug in CalloutInvoice and CalloutOrder:

- variables PriceEntered and PriceActual are not correctly assigned, and they are used in some processes below -> result, calculate of taxamt and linenetamt is wrong
This commit is contained in:
Carlos Ruiz 2011-03-07 11:06:27 -05:00
parent dc9b7d5829
commit 19dded6c92
2 changed files with 6 additions and 0 deletions

View File

@ -527,10 +527,12 @@ public class CalloutInvoice extends CalloutEngine
// else ignore // else ignore
if (mField.getColumnName().equals("PriceActual")) if (mField.getColumnName().equals("PriceActual"))
{ {
PriceEntered = (BigDecimal) value;
mTab.setValue("PriceEntered", value); mTab.setValue("PriceEntered", value);
} }
else if (mField.getColumnName().equals("PriceEntered")) else if (mField.getColumnName().equals("PriceEntered"))
{ {
PriceActual = (BigDecimal) value;
mTab.setValue("PriceActual", value); mTab.setValue("PriceActual", value);
} }
} }
@ -561,6 +563,7 @@ public class CalloutInvoice extends CalloutEngine
// //
log.fine("amt - QtyChanged -> PriceActual=" + pp.getPriceStd() log.fine("amt - QtyChanged -> PriceActual=" + pp.getPriceStd()
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount()); + ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
PriceActual = pp.getPriceStd();
mTab.setValue("PriceActual", pp.getPriceStd()); mTab.setValue("PriceActual", pp.getPriceStd());
// mTab.setValue("Discount", pp.getDiscount()); // mTab.setValue("Discount", pp.getDiscount());
mTab.setValue("PriceEntered", PriceEntered); mTab.setValue("PriceEntered", PriceEntered);

View File

@ -998,10 +998,12 @@ public class CalloutOrder extends CalloutEngine
// else ignore // else ignore
if (mField.getColumnName().equals("PriceActual")) if (mField.getColumnName().equals("PriceActual"))
{ {
PriceEntered = (BigDecimal) value;
mTab.setValue("PriceEntered", value); mTab.setValue("PriceEntered", value);
} }
else if (mField.getColumnName().equals("PriceEntered")) else if (mField.getColumnName().equals("PriceEntered"))
{ {
PriceActual = (BigDecimal) value;
mTab.setValue("PriceActual", value); mTab.setValue("PriceActual", value);
} }
} }
@ -1032,6 +1034,7 @@ public class CalloutOrder extends CalloutEngine
// //
log.fine("QtyChanged -> PriceActual=" + pp.getPriceStd() log.fine("QtyChanged -> PriceActual=" + pp.getPriceStd()
+ ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount()); + ", PriceEntered=" + PriceEntered + ", Discount=" + pp.getDiscount());
PriceActual = pp.getPriceStd();
mTab.setValue("PriceActual", pp.getPriceStd()); mTab.setValue("PriceActual", pp.getPriceStd());
mTab.setValue("Discount", pp.getDiscount()); mTab.setValue("Discount", pp.getDiscount());
mTab.setValue("PriceEntered", PriceEntered); mTab.setValue("PriceEntered", PriceEntered);