Bug 19271 - Ordered/Spent lists should display vendor name, not vendor code
Summary: Ordered/Spent lists should display vendor name, not vendor code
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Target Milestone: ---
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-07 10:58 UTC by Katrin Fischer
Modified: 2018-10-24 09:13 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19271: Show vendor name and format prices on ordered/spent lists (7.18 KB, patch)
2018-08-10 17:19 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19271: Show vendor name and format prices on ordered/spent lists (7.36 KB, patch)
2018-09-16 18:45 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 19271: Show vendor name on ordered/spent lists (3.79 KB, patch)
2018-09-27 11:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19271: Format prices on ordered/spent lists (5.28 KB, patch)
2018-09-27 11:47 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19271: Show vendor name on ordered/spent lists (3.86 KB, patch)
2018-09-29 15:19 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-09-07 10:58:35 UTC
The list of ordered and spent amounts for each fund shows only the vendor's internal number instead of the vendor name. This makes the list less useful, especially for printing or exporting.

Koha should show the vendor names instead of the numbers.
Comment 1 Katrin Fischer 2018-08-10 17:19:59 UTC Comment hidden (obsolete)
Comment 2 Caroline Cyr La Rose 2018-09-16 18:15:10 UTC
I get conflicts when trying to apply the patch

koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt
Comment 3 Chris Cormack 2018-09-16 18:45:56 UTC
Created attachment 78979 [details] [review]
Bug 19271: Show vendor name and format prices on ordered/spent lists

Improvements to the display of lists of ordered and received orders:
- Format prices according to CurrencyFormat system preference
- Show the vendor's name instead of the internal number

To test:
- Make sure you have some pending and received orders
- Access the Spent and Ordered pages by clicking on the
  amount ordered or spent on the acq start page
- Verify that
  - All price information is shown according to CurrencyFormat
  - Vendor name shows
Comment 4 Caroline Cyr La Rose 2018-09-16 18:48:19 UTC
Everything works fine now. The names of the vendors appear!

:)
Comment 5 Jonathan Druart 2018-09-16 21:44:21 UTC
I would not format the prices in the same patch/bug report, I am expecting regressions here: sum of round numbers (sprintf %.2f) vs round of sum (if it makes sense...)
Comment 6 Katrin Fischer 2018-09-21 19:36:04 UTC
(In reply to Jonathan Druart from comment #5)
> I would not format the prices in the same patch/bug report, I am expecting
> regressions here: sum of round numbers (sprintf %.2f) vs round of sum (if it
> makes sense...)

Sorry, I don't understand. Can you explain? It seems to be the same change as in other places?
Comment 7 Jonathan Druart 2018-09-21 19:52:43 UTC
use Modern::Perl;
my $x = 12.344;
my $y = 67.213;
say sprintf("%.2f", $x)+sprintf("%.2f", $y);
say sprintf("%.2f", $x+$y);'

79.55
79.56
Comment 8 Martin Renvoize 2018-09-27 08:12:12 UTC
Man that's upsetting, but I have to agree with Jonathan here..  the totals shouldn't really be calculated in this script in my opinion.  But because they are, we can't make this change here.

Could we perhaps split into two bugs please Katrin?
Comment 9 Martin Renvoize 2018-09-27 08:13:45 UTC
Marking as Failed QA as now two of us agree that this change could have negative effects on calculations.
Comment 10 Katrin Fischer 2018-09-27 10:29:46 UTC
What about keeping the format statements in the .pl file and still use the Price filter?
Comment 11 Martin Renvoize 2018-09-27 11:47:29 UTC
Created attachment 79482 [details] [review]
Bug 19271: Show vendor name on ordered/spent lists

 Improvements to the display of lists of ordered and received orders:
 - Show the vendor's name instead of the internal number

 To test:
 - Make sure you have some pending and received orders
 - Access the Spent and Ordered pages by clicking on the
   amount ordered or spent on the acq start page
   - Verify that
     - Vendor name shows

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2018-09-27 11:47:32 UTC
Created attachment 79483 [details] [review]
Bug 19271: Format prices on ordered/spent lists

 Improvements to the display of lists of ordered and received orders:
 - Format prices according to CurrencyFormat system preference

 To test:
 - Make sure you have some pending and received orders
 - Access the Spent and Ordered pages by clicking on the
   amount ordered or spent on the acq start page
   - Verify that
     - All price information is shown according to CurrencyFormat

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Martin Renvoize 2018-09-27 11:48:58 UTC
Right.. I've split the patch in two.. left the accreditation with Katrin as the original author and signed off the first patch.. I'll now create a second bug and move the second patch over there.
Comment 14 Martin Renvoize 2018-09-27 11:54:54 UTC
Second patch moved to bug 21427 unblocking this bug.  Setting to Signed off
Comment 15 Jonathan Druart 2018-09-29 15:19:59 UTC
Created attachment 79613 [details] [review]
Bug 19271: Show vendor name on ordered/spent lists

Improvements to the display of lists of ordered and received orders:
 - Show the vendor's name instead of the internal number

 To test:
 - Make sure you have some pending and received orders
 - Access the Spent and Ordered pages by clicking on the
   amount ordered or spent on the acq start page
   - Verify that
     - Vendor name shows

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Nick Clemens 2018-10-01 16:43:42 UTC
Awesome work all!

Pushed to master for 18.11
Comment 17 Fridolin SOMERS 2018-10-11 13:16:14 UTC
Pushed to 18.05.x for 18.05.05
Comment 18 Fridolin SOMERS 2018-10-11 13:16:45 UTC
Pushed to 17.11.x for 17.11.11