Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more support when balancing orders #662

Open
carchrae opened this issue May 3, 2019 · 1 comment
Open

add more support when balancing orders #662

carchrae opened this issue May 3, 2019 · 1 comment

Comments

@carchrae
Copy link
Contributor

carchrae commented May 3, 2019

i started to go on a tangent in #630 so i will stop and put the tangent here.

the idea is to give users a better idea on how to balance the order. this is perhaps best described by example.

in the screenshot below, only 23 bunches of beets arrived in a case which should have had 24. in this case, we will not request a credit from the supplier, but instead, we will increase the price to our co-op members to cover the missing beet. (likewise, if 25 bunches came, we would reduce the price for everyone).

the original price was $2.30 per bunch. but because one is short, the site informs the user that they should charge $2.40 per bunch.

alternatively, if we had claimed a refund credit from the supplier for the missing amount, we would then adjust the 'received' amount. in that case, we don't adjust the price per member, but we do enter the actual amount received. this ensures that the co-op price charged will equal the (invoice - refund)

image

after adjusting the price to $2.40, this is what it looks like

image

if we had requested a refund (of $2.30 for the missing bunch!) and we had updated the received amount then this is what it would look like

image

@carchrae
Copy link
Contributor Author

carchrae commented May 3, 2019

fwiw, this is a work in progress. i think you can probably see a few bugs (or confusing things) in the prices. in particular this is where the rounding and precision gets a bit ugly. eg 22.9999 units, and $52.71 instead of $52.70 (+ 2.30 = $55)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant