Price columns (aqorders.*_tax_included, aqorders.*_tax_excluded, aqorders.tax_value_*) are automatically calculated when creating an order with the staff interface. They should also be automatically calculated when the order is created with the API.
Created attachment 129875 [details] [review] Bug 29959: Populate prices when creating an order with the API Price columns (aqorders.*_tax_included, aqorders.*_tax_excluded, aqorders.tax_value_*) are automatically calculated when creating an order with the staff interface. They should also be automatically calculated when the order is created with the API. Depends on bug 29955 Test plan: 1. Run tests in t/db_dependent/api/v1/acquisitions_orders.t
This sounds like a bug to me, marking it as such. Please revert if I'm wrong.
Created attachment 135437 [details] [review] Bug 29959: Populate prices when creating an order with the API Price columns (aqorders.*_tax_included, aqorders.*_tax_excluded, aqorders.tax_value_*) are automatically calculated when creating an order with the staff interface. They should also be automatically calculated when the order is created with the API. Depends on bug 29955 Test plan: 1. Run tests in t/db_dependent/api/v1/acquisitions_orders.t Signed-off-by: David Nind <david@davidnind.com>
Shouldn't this actually be called from Koha::Acq::Order->store?
(In reply to Jonathan Druart from comment #4) > Shouldn't this actually be called from Koha::Acq::Order->store? We should file a follow-up bug for refactoring things (as it would imply changing the CGI controllers as well and in this case we are fixing a bug).
(In reply to Joonas Kylmälä from comment #2) > This sounds like a bug to me, marking it as such. Please revert if I'm wrong. +1
(In reply to Tomás Cohen Arazi from comment #5) > (In reply to Jonathan Druart from comment #4) > > Shouldn't this actually be called from Koha::Acq::Order->store? > > We should file a follow-up bug for refactoring things (as it would imply > changing the CGI controllers as well and in this case we are fixing a bug). This comment was actually for bug 29955 (which this bug depends on), and it's doing refactoring already.
Created attachment 183184 [details] [review] Bug 29959: Populate prices when creating an order with the API Price columns (aqorders.*_tax_included, aqorders.*_tax_excluded, aqorders.tax_value_*) are automatically calculated when creating an order with the staff interface. They should also be automatically calculated when the order is created with the API. Test plan: 1. Run tests in t/db_dependent/api/v1/acquisitions_orders.t Signed-off-by: David Nind <david@davidnind.com>
[FAIL] t/db_dependent/api/v1/acquisitions_orders.t [FAIL] Koha/REST/V1/Acquisitions/Orders.pm Result: [FAIL] Koha/REST/V1/Acquisitions/Orders.pm SKIP spelling FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl Koha/REST/V1/Acquisitions/Orders.pm` [FAIL] t/db_dependent/api/v1/acquisitions_orders.t SKIP spelling FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl t/db_dependent/api/v1/acquisitions_orders.t`
Created attachment 186555 [details] [review] Bug 29959: Tidy files
acqui/finishreceive.pl: $order_obj->populate_with_prices_for_receiving(); In the interface populate_with_prices_for_receiving is not called at the same moment as populate_with_prices_for_ordering. Here we do. Please explain. Changing status for need of feedback.
I honestly don't remember why... Looking at this now, I can't find a good reason for it, so if you agree Marcel, I can remove lines 137-140
(In reply to Julian Maurice from comment #12) > I honestly don't remember why... > Looking at this now, I can't find a good reason for it, so if you agree > Marcel, I can remove lines 137-140 It seems you have a good reason for removing them :)