Bugzilla – Attachment 73359 Details for
Bug 19780
Actual price is not updated after it has been amended post receiving an order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order
Bug-19780---Updating-the-invoice-costs-after-updat.patch (text/plain), 5.47 KB, created by
Alex Buckley
on 2018-03-27 23:45:51 UTC
(
hide
)
Description:
Bug 19780 - Updating the invoice costs after updating the actual cost of an order following the receival of the order
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-03-27 23:45:51 UTC
Size:
5.47 KB
patch
obsolete
>From 43c504c8a05e014fa0eb45a163eeeac59c3038c4 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sat, 24 Mar 2018 00:35:55 +0000 >Subject: [PATCH] Bug 19780 - Updating the invoice costs after updating the > actual cost of an order following the receival of the order > >This patch builds on the previous patch attached to the bug report 19780. > >The purpose of this patch is to fix the current bug in Koha which is if >you have accidently written in the incorrect value into an order >receival form then try to correct the value by clicking on the order >line link and writing in a new value into the actual value input field >of the order and then save the form and go and view the invoice you >notice that the invoice amount has not been updated to match the newly >entered actual value of the order. > >This bug was reported by Horowhenua District Library > >Now with this patch after clicking on the order line link and writing in >a new actual value for a received order the database is correctly >updated with the new actual value and if you now view the appropriate >invoice for that order you will notice that the invoice amount has been updated. > >To make the testing of this patch easier I have made a before and after >screencast video to compliment the test plan. > >Updated test plan: >1. Create an order with the vendor price: 10.00 and actual price of >12.00 > >2. Close the order and receive the shipment. Change the actual price in >the receival page to 14.00 > >3. Open a new tab and view the invoice for the newly received order and notice that 14.00 is the value displayed > >4. In your first tab now click on the order line link to modify the order. >Change the actual price to 15.00 > >5. View the invoice now and notice that 14.00 is still the value being >displayed > >6. Apply patch > >7. Repeat steps 1,2,3,4 and 5 and notice that 15.00 is the value >displayed in the invoice > >Sponsored-By: Catalyst IT >--- > acqui/addorder.pl | 7 +++---- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 2 +- > 3 files changed, 5 insertions(+), 6 deletions(-) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 6fa0e01..ef34c07 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -131,7 +131,6 @@ use C4::Output; > use Koha::Acquisition::Currencies; > use Koha::Acquisition::Orders; > use C4::Barcodes; >-use Data::Dumper; > ### "-------------------- addorder.pl ----------" > > # FIXME: This needs to do actual error checking and possibly return user to the same form, >@@ -268,12 +267,12 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; > > my $modify = $input->param('modify'); >- if ($orderinfo->{ordernumber} && !$modify) { >+ if (!$modify) { > $orderinfo = C4::Acquisition::populate_order_with_prices( > { > order => $orderinfo, > booksellerid => $orderinfo->{booksellerid}, >- receiving => 1, >+ ordering => 1, > } > ); > } elsif ( $modify ) { >@@ -281,7 +280,7 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > { > order => $orderinfo, > booksellerid => $orderinfo->{booksellerid}, >- ordering => 1, >+ receiving => 1, > } > ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index c74070f..19030de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -487,7 +487,7 @@ > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <td> >- <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]&modifying=1">Modify</a> >+ <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Modify</a> > [% UNLESS (books_loo.order_received) %] > <br /> > <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index 2790d5a..b472a8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -275,7 +275,7 @@ > [% END %] > </td> > <td> >- <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a> >+ <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]&modifying=1">[% order.ordernumber %]</a> > [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %] > (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>) > [% END %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19780
:
69622
|
73359
|
87696