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
Order modal show price #1682
Order modal show price #1682
Conversation
…into order-modal-show-price
<option value="{{ supplier.id }}"{% if part.order_supplier == supplier.id %} selected="selected"{% endif %}> | ||
{% if show_price %} | ||
{% call_method supplier 'get_price' part.order_quantity as price %} | ||
{% include "price.html" with price=price %} - |
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.
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.
@SchrodingersGat that is done in line 7, I think the merge fixed if, could you try again?
…order-modal-show-price
@SchrodingersGat right. I could reproduce and fix it with the fixtures loaded. Will start doing that instead of using my own testing database. Should work now. |
@matmair still having some issues: Firstly, I definitely have supplier pricing set: However when I click the "order" button (on the same page): Also, when I hit "Update Prices" I get the following screen: Note that this part is marked as purchasable: Also, the "Update Prices" button seems to persist on other modals once it is drawn: Looks like these extra modal buttons need to be explicitly reset |
@matmair that's fixed the zero-pricing issue, nice work. However the extra button still persists on the next modal you launch after closing that one: |
@SchrodingersGat I found a few other problems while debugging this, will ping you when I ironed out everything. |
I fixed the button always appearing but still working on another the quantity-zero issue and on errors not finished multi-part modals reappear. |
ok no worries, let me know when you are again ready for review. |
…order-modal-show-price
@SchrodingersGat turns out that dropping all parts with a quantity of zero is no bug but hardcoded behaviour. I think that makes sense. The question is if the start-quantity should be 1 by default (currently 0) to prevent confusion. |
Fair enough, this makes sense. Thanks for your work on this. |
Fixes #391
This PR adds the fuctionallity propsed by @SchrodingersGat in #391 in 2019.
In the part-order-modal the price of each supplier-part (based on the entered quantity) is displayed. A custom submit button enables reloading the supplier-part selection screen to update the prices.