thirtybees / statsmodule

Academic Free License v3.0
0 stars 6 forks source link

Fixing statsmodule due to https://github.com/thirtybees/thirtybees/pull/1598/commits #19

Closed eschiendorfer closed 1 year ago

eschiendorfer commented 1 year ago

As we want to store all numbers in oder_detail table in the order currency, I have made this commit: https://github.com/thirtybees/thirtybees/pull/1598/commits

This is asking for some adjustments in the statsmodule as well.

Note, that this commit also fixes a stupid behaviour: the module used p.wholesale_price to calculate orderprofits. This is just wrong. Actually od.original_wholesale_price is exactly for this purpose. Otherwise the profit on an order changes always when the wholesale_price changes (can happen years later for example)...