You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the order/show view (order management), in the "full units" column on the right, the amount (to order) is shown correctly on the screen (in supplier_order_unit), but incorrectly in the metadata (in billing_unit -- should be 2 × 700 g Ordered for the bread example)
Yeah... I just added the unit conversion part and left the rest untouched. But I can explain it to you in our next call, if you wish.
The error was in the unit conversion part however. (Units display was changed by fixes for issues like #44, but I had missed changing this history title helper method.)
btw, I suggest to rename order_article.price to version to avoid confusion in places like above.
Yes that would be nice - however it is quite some effort in an untyped languange such as ruby. We had discussed this when we started with our fork and decided to stick with the price method's original name until we have a higher test coverage, so we can be sure we didn't accidentally break stuff by renaming it.
In the order/show view (order management), in the "full units" column on the right, the amount (to order) is shown correctly on the screen (in supplier_order_unit), but incorrectly in the metadata (in billing_unit -- should be
2 × 700 g Ordered
for the bread example)The code at play here:
foodsoft_hackathon/app/views/orders/_articles.html.haml
Line 38 in 58ecae5
I tried
units_history_line(order_article, plain: true, unit: order_article.article_version.supplier_order_unit)
but it didn't change anything.foodsoft_hackathon/app/helpers/orders_helper.rb
Lines 26 to 45 in 58ecae5
This method is obscure to me and I couldn't figure out what should be fixed here.
In the other cases where units_history_line is used, it seems correct as the billing unit is needed there.
btw, I suggest to rename order_article.price to
version
to avoid confusion in places like above.foodsoft_hackathon/app/models/order_article.rb
Lines 36 to 38 in 58ecae5
The text was updated successfully, but these errors were encountered: