Bug 22541 - Invoice adjustments: show invoice number and include link on ordered.pl and spent.pl
Summary: Invoice adjustments: show invoice number and include link on ordered.pl and s...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-19 19:55 UTC by Andrew Fuerste-Henry
Modified: 2019-05-18 10:00 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages (8.47 KB, patch)
2019-03-21 12:33 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages (8.51 KB, patch)
2019-03-21 21:54 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl (7.42 KB, patch)
2019-03-25 12:56 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers (4.83 KB, patch)
2019-04-02 21:34 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages (8.03 KB, patch)
2019-04-02 21:34 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl (7.47 KB, patch)
2019-04-08 18:35 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl (7.53 KB, patch)
2019-04-08 23:16 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2019-03-19 19:55:50 UTC
On ordered.pl and spent.pl, invoice adjustments are shown with a label that gives the invoiceid rather than the invoicenumber. For consistency and clarity, these should show the invoicenumber and link to the invoice page, just like the entries in the Invoice column in the table on these pages.
Comment 1 Nick Clemens 2019-03-21 12:33:19 UTC
Created attachment 86842 [details] [review]
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t
Comment 2 Liz Rea 2019-03-21 21:54:53 UTC
Created attachment 86871 [details] [review]
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 3 Katrin Fischer 2019-03-24 14:51:06 UTC
Comment on attachment 86871 [details] [review]
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages

Review of attachment 86871 [details] [review]:
-----------------------------------------------------------------

Hi Nick,

can you take a look at the code comments please? Thx!

::: acqui/ordered.pl
@@ +77,4 @@
>      (quantity > quantityreceived OR quantityreceived IS NULL)
>      GROUP BY aqorders.biblionumber, aqorders.basketno, aqorders.ordernumber,
>               tleft,
> +             ecost_tax_included, budgetdate, entrydate,

While this change appears to make sense, it seems totally unrelated to the patch. Can you please explain?

Related to: http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=9d595e36a7844f99fa5d74aad418717d12eeae37 ?

::: acqui/spent.pl
@@ +93,4 @@
>               aqorders.invoiceid,
>               aqinvoices.invoicenumber,
>               quantityreceived,
> +             unitprice_tax_included,

Same here as for ordered.pl

::: circ/ysearch.pl
@@ +40,4 @@
>  print $input->header( -type => 'text/plain', -charset => 'UTF-8' );
>  
>  my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { catalogue => '1' } );
> +warn "$auth_status is what?";

Quite sure this should not be here. :)
Comment 4 Nick Clemens 2019-03-25 12:56:37 UTC
Created attachment 86972 [details] [review]
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

bsoletes: 86871 - Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages
Comment 5 Nick Clemens 2019-03-25 13:07:33 UTC
(In reply to Katrin Fischer from comment #3)
Bad use of -a :-)

Removed the ysearch change, oops

Moved the spent/ordered changes to a followup on 21622
Comment 6 Michal Denar 2019-04-02 21:34:50 UTC
Created attachment 87334 [details] [review]
Bug 19380: Use Koha::Item::get_transfer instead of GetTransfers

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Michal Denar <black23@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=22541

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 7 Michal Denar 2019-04-02 21:34:53 UTC
Created attachment 87335 [details] [review]
Bug 22541: Use invoicenumber and link to invoice on spent and ordered pages

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 8 Katrin Fischer 2019-04-06 10:33:41 UTC
Something has gone wrong here - the patch now signed off is the one including hte false changes. Also another unrelated patch has been attached. I am resetting the  patches.
Comment 9 Katrin Fischer 2019-04-06 10:36:02 UTC
It looks like the last action was from Liz to reset to 'Needs signoff' - so changing status too.
Comment 10 Michal Denar 2019-04-07 21:55:15 UTC
Hi Katrin,
because status is set to "Need to sing off" it's call for other round of test?

Thank you.
Comment 11 Katrin Fischer 2019-04-07 22:24:34 UTC
Hi Michal, that would be great.
Comment 12 Liz Rea 2019-04-08 18:35:20 UTC
Created attachment 87536 [details] [review]
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
retested, still works as described but without the extra not applicable bits!
Comment 13 Katrin Fischer 2019-04-08 23:16:53 UTC
Created attachment 87570 [details] [review]
Bug 22541: Invoice adjustments should show invoice number and include link on ordered.pl and spent.pl

To test:
 1 - Find a vendor in acquisitions
 2 - Click 'receive shipment'
 3 - Create an invoice
 4 - Click 'Finish receiving'
 5 - Add an adjustment that encumbers while open and update adjustments
 6 - Go to acqui-home and click on the ordered total for the fund with the adjustment
 7 - Note the invoice adjustment shows the invoice id and does not link
 8 - Add another invoice and another adjustment, but close the invoice this time
 9 - Go to acqui-home and click on the spent total for the fund with the adjustment
10 - Note the invoice adjustment shows the invoice id and does not link
11 - Apply patch
12 - Visit the spent and ordered pages and note the adjustments show invoicenumber and are links
13 - prove -v t/db_dependent/Koha/Acquisition/Invoice/Adjustments.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>


Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Nick Clemens 2019-04-11 13:57:28 UTC
Awesome work all!

Pushed to master for 19.05
Comment 15 Martin Renvoize 2019-04-15 12:08:28 UTC
Enhancement, will not be backported to 18.11.x series.
Comment 16 Martin Renvoize 2019-04-29 12:46:55 UTC
Oops, I made a mistake here.. Whilst going back through the release notes I appear to have backported this enhancement and so it will be available in 18.11.05.

It's a trivial, but nice enhancement so I'm included to keep it rather than revert.
Comment 17 Andrew Fuerste-Henry 2019-04-29 13:13:36 UTC
No complaints here, thanks for the backporting!