-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add a maximum order quantity #98
base: master
Are you sure you want to change the base?
Conversation
…on chain instead of a conversion table
- made article model spec work again - removed some more dead shared db code
This also fixes several actual bugs (partially caused by the rabase) detected by the specs
…onvertability (#70) * On #42: Fax pdf/csv: Decimals dependant on supplier_order_unit's si convertability * Solve #42: Improve fax PDF, CSV, text - outsource format_units_to_order to OrderHelper - fax text: include unit, adjust column width - fax PDF & text: only include order number if any present * On #42: - Adapted order_txt to generalized creating the text table and added spec - Code style fixes for order_fax * On #42 Fixes error dad0bb9#r143648091 --------- Co-authored-by: twothreenine <[email protected]>
Closes #16 Merged the hackathon and small seeds and updated the articles to handle the new unit system. Dropped the .nl and .de seed files, because I think it's unnecessary work to further maintain them.
* Fixes #66 * Fixes broken integration tests * chore: refactor extract articles_helper article_version test setup function * chore: make helper functions private * On #66 Fixes https://github.com/foodcoopsat/foodsoft_hackathon/pull/74/files/b078cfaa87d334dba8eaafff5b2be152f293c448#r1670426999 --------- Co-authored-by: Philipp Rothmann <[email protected]>
- rearrange CSV columns as I suggested in #47 - add locales for column headings according to my suggestions in #50 (to do: adjust terms across menus -- post-merge?) - update documentation of CSV layout (#46) TO DO: any adaptations for rearranged tables necessary which I've overlooked? (for example sync feature)
- added missing keys used in sources to de/en - fixes `import_search_results` key position in all locales
Pull Request Test Coverage Report for Build 10653285104Details
💛 - Coveralls |
8a88ad9
to
9cd0d22
Compare
@@ -81,6 +81,8 @@ def update_results! | |||
# 4 | 5 | 4 | 2 | |||
# | |||
def calculate_units_to_order(quantity, tolerance = 0) | |||
quantity = [price.maximum_order_quantity || quantity, quantity].min | |||
return 0 if price.minimum_order_quantity && quantity < price.minimum_order_quantity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I misunderstand the expected behavior of minimum_order_quantity of this function, or if this case was just missing and just doesn't occur here as it is handled somewhere in client-side already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - at least at a first glance something seems broken here - I've created #99 to address the issue. (I'll take a closer look asap.)
2665d81
to
1bafa9a
Compare
1bafa9a
to
a9ccad9
Compare
ToDo: