Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #43202 All Revisions ] Back to Issue ]
Summary 0043202: grossListPrice & priceList properties of order line model (client side) are not behaving as expected according to ERP behavior
Revision 2020-02-19 13:31 by joniturralde93
Description In backend
-> Using price including taxes
GrossPriceList field of orderline stores the price of a product in the price list when the order line was created

-> Using price not including taxes
priceList field of orderline stores the price of a product in the price list when the order line was created

The above fields are static and should not change during the different processes.

All the facts explained above are true and correct. However, in the frontend side (client-side) we have properties that suggest the same behavior but they are behaving differently

priceList => seems to match with OB.MobileApp.model.receipt.get('lines').at(0).get('priceList') but the behavior is not the same

GrossPriceList => seems to match with OB.MobileApp.model.receipt.get('lines').at(0).get('grossListPrice') but the behavior is not the same

Error 1:
names of these properties are confusing

Error 2:
Front end does not offer a model property that represents the same concept stored in GrossPriceList, priceList which is the original price in the price list used when the order was created


Update:

Also the property discountPercentage is wrongly set for a layaway with manually modified price. This property is used for the column "discount" in the DB orderline (it is a percentage)

When a layaway is loaded in order to pay it, if you type:
OB.MobileApp.model.receipt.get('lines').at(0).get('discountPercentage')
The value is right. It's the same than when first synchronized the layaway, but when you completely pay the layaway, this code is executed:
discountPercentage = OB.DEC.toBigDecimal(grossListPrice)
              .subtract(grossUnitPrice)
              .multiply(new BigDecimal('100'))
              .divide(
                OB.DEC.toBigDecimal(grossListPrice),
                2,
                BigDecimal.prototype.ROUND_HALF_UP
              );

Since the property grossListPrice is wrong (based on grossListPrice or priceList depending on including/excluding taxes), the discountPercentage is wrongly calculated and sent.

Since this only happens for completed layaways, the orderloader doesn't put this wrong values in the DB, but they could be used by custom processes.
Revision 2020-02-12 22:12 by joniturralde93
Description In backend
-> Using price including taxes
GrossPriceList field of orderline stores the price of a product in the price list when the order line was created

-> Using price not including taxes
priceList field of orderline stores the price of a product in the price list when the order line was created

The above fields are static and should not change during the different processes.

All the facts explained above are true and correct. However, in the frontend side (client-side) we have properties that suggest the same behavior but they are behaving differently

priceList => seems to match with OB.MobileApp.model.receipt.get('lines').at(0).get('priceList') but the behavior is not the same

GrossPriceList => seems to match with OB.MobileApp.model.receipt.get('lines').at(0).get('grossListPrice') but the behavior is not the same

Error 1:
names of these properties are confusing

Error 2:
Front end does not offer a model property that represents the same concept stored in GrossPriceList, priceList which is the original price in the price list used when the order was created


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker