[Bug 29959] New: Populate prices when creating an order with the API
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Bug ID: 29959 Summary: Populate prices when creating an order with the API Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: REST API Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com CC: tomascohen@gmail.com Depends on: 29955 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. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29955 [Bug 29955] Move C4::Acquisition::populate_order_with_prices to Koha::Acquisition::Order -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 129875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129875&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal CC| |joonas.kylmala@iki.fi --- Comment #2 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- This sounds like a bug to me, marking it as such. Please revert if I'm wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129875|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 135437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135437&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Shouldn't this actually be called from Koha::Acq::Order->store? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30875 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30875 [Bug 30875] Move price columns calculation to Koha::Acquisition::Order->store -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Bug 29959 depends on bug 29955, which changed state. Bug 29955 Summary: Move C4::Acquisition::populate_order_with_prices to Koha::Acquisition::Order https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29955 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Bug 29959 depends on bug 29955, which changed state. Bug 29955 Summary: Move C4::Acquisition::populate_order_with_prices to Koha::Acquisition::Order https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29955 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Bug 29959 depends on bug 29955, which changed state. Bug 29955 Summary: Move C4::Acquisition::populate_order_with_prices to Koha::Acquisition::Order https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29955 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135437|0 |1 is obsolete| | --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 183184 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183184&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|kyle@bywatersolutions.com |m.de.rooy@rijksmuseum.nl CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- [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` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #10 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 186555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186555&action=edit Bug 29959: Tidy files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #12 from Julian Maurice <julian.maurice@biblibre.com> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29959 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (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 :) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org