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

Transport costs are not accounted anymore #861

Closed
twothreenine opened this issue Mar 18, 2021 · 3 comments
Closed

Transport costs are not accounted anymore #861

twothreenine opened this issue Mar 18, 2021 · 3 comments
Labels

Comments

@twothreenine
Copy link
Contributor

I just noticed that recently ordergroups are accounted their order sum without the distributed transport cost.
On the confirm page, the amounts are still displayed including the transport costs, but the transactions then created don't include them!

In our @foodcoopsat deployment, it still worked on March 2nd, but didn't on March 14th, also it doesn't work with the current master version here.

@paroga
Copy link
Member

paroga commented Mar 18, 2021

the problem is easy to fix: price needs to be changed to total at

if group_order.ordergroup
price = group_order.price * -1 # decrease! account balance
group_order.ordergroup.add_financial_transaction!(price, note, user, transaction_type, nil, group_order)
end
and we need a test for that too

twothreenine added a commit to twothreenine/foodsoft that referenced this issue Mar 19, 2021
@mjavurek mjavurek added the bug label Mar 23, 2021
@twothreenine
Copy link
Contributor Author

twothreenine commented Jun 7, 2021

I wish this would be fixed soon, as the PR is already there. (#862)
We have many orders waiting to be accounted and most foodcoops won't even have noticed this bug and accounted without transport costs

@decentral1se
Copy link
Member

This does seem like kind of a critical bug @twothreenine 😟

paroga pushed a commit to foodcoopsat/foodsoft that referenced this issue Oct 19, 2021
paroga pushed a commit to foodcoopsat/foodsoft that referenced this issue Dec 9, 2021
paroga pushed a commit to foodcoopsat/foodsoft that referenced this issue Jan 1, 2022
paroga pushed a commit to twothreenine/foodsoft that referenced this issue Feb 18, 2022
paroga pushed a commit to twothreenine/foodsoft that referenced this issue Feb 18, 2022
@paroga paroga closed this as completed in f3493b3 Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants