Created attachment 15479 [details] screenshot To reproduce: 1) Create some orders, don't automatically add them to a basket group 2) Open a new basket group from the basket group page of the vendor 3) Check display of currencies for the orders shown
Created attachment 23868 [details] [review] Proposed bug fix for 9654 Here we go, my first bug fix :D
Created attachment 23869 [details] [review] Bug 9654: Missing space between amount and currency symbol in basket group Formatting fix. To test 1) Create some orders, don't automatically add them to a basket group 2) Open a new basket group from the basket group page of the vendor 3) Check display of currencies for the orders shown 4/ Apply patch 5/ Recheck display
Working on "I've never used basket groups before" test plan, but this works as advertised. It even passes the qa test tool.
However, I did further thinking, and there's a problem. :( --- BEGIN SAMPLE CODE --- #!/usr/bin/perl -Tw my $val = undef; my $total = 'q'; $total .= " " . ($val // 0); print "$total\n"; $total = 'q'; $total .= " " . $val // 0; print "$total\n"; --- END SAMPLE CODE --- Before the space was added, a precedent issue wasn't as big an issue. I think the patch should be: $total .= " " . ($bookseller->{invoiceprice} // 0); This will avoid an noisy warning, and better reflect the intent of the original code, since I don't think (" " . $val) // 0; is the thing being aimed for. Here is my revised test plan: 1) Log into staff client 2) Acquisitions 3) Click 'Search' in the 'Manage orders' box. 4) Click '+ New basket' beside a vendor name. 5) Type 'Bug 9654 Test 1' into basket name. 6) Click 'Save' 7) Click 'Add to basket' 8) Click 'From an external source' 9) Type 'Green Eggs and Ham' into the Title text box. 10) Click 'Search' 11) Click 'Order' on any one of the results. 12) Click 'Add Item' in the 'Item' box. 13) Select a Fund from the dropdown in the 'Accounting details' box. 14) Click 'Save' 15) Click 'Close this basket' 16) Click 'Yes, close (Y)' without checking the attach to a basket group. 17) Click the 'Basket groups' tab. 18) Click '+ New basket group' 19) Notice the listing in 'Ungrouped baskets' lacks a space between the number and the currency. (e.g. Total: 0USD) 20) Apply patch (git bz apply 9654) 21) Refresh the page 22) Notice there is now a space. (e.g. Total: 0 USD) 23) Run the Koha QA Tool: (~/qa-test-tools/koha-qa.pl -v 2 -c 1)
Created attachment 23870 [details] [review] Fixed again Here we go
Created attachment 23871 [details] [review] [SIGNED OFF] Bug 9654: Missing space between amount and currency symbol in basket group Changed: $total .= $bookseller->{invoiceprice} // 0; Into: $total .= " " . ($bookseller->{invoiceprice} // 0); in order to add a space between the total and currency in the basket group. Revised test plan: 1) Log into staff client 2) Acquisitions 3) Click 'Search' in the 'Manage orders' box. 4) Click '+ New basket' beside a vendor name. 5) Type 'Bug 9654 Test 1' into basket name. 6) Click 'Save' 7) Click 'Add to basket' 8) Click 'From an external source' 9) Type 'Green Eggs and Ham' into the Title text box. 10) Click 'Search' 11) Click 'Order' on any one of the results. 12) Click 'Add Item' in the 'Item' box. 13) Select a Fund from the dropdown in the 'Accounting details' box. 14) Click 'Save' 15) Click 'Close this basket' 16) Click 'Yes, close (Y)' without checking the attach to a basket group. 17) Click the 'Basket groups' tab. 18) Click '+ New basket group' 19) Notice the listing in 'Ungrouped baskets' lacks a space between the number and the currency. (e.g. Total: 0USD) 20) Apply patch (git bz apply 9654) 21) Refresh the page 22) Notice there is now a space. (e.g. Total: 0 USD) 23) Run the Koha QA Tool: (~/qa-test-tools/koha-qa.pl -v 2 -c 1) Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Congratulations on your first signed off bug fix. :)
Created attachment 23889 [details] [review] [PASSED QA] Bug 9654: Missing space between amount and currency symbol in basket group Changed: $total .= $bookseller->{invoiceprice} // 0; Into: $total .= " " . ($bookseller->{invoiceprice} // 0); in order to add a space between the total and currency in the basket group. Revised test plan: 1) Log into staff client 2) Acquisitions 3) Click 'Search' in the 'Manage orders' box. 4) Click '+ New basket' beside a vendor name. 5) Type 'Bug 9654 Test 1' into basket name. 6) Click 'Save' 7) Click 'Add to basket' 8) Click 'From an external source' 9) Type 'Green Eggs and Ham' into the Title text box. 10) Click 'Search' 11) Click 'Order' on any one of the results. 12) Click 'Add Item' in the 'Item' box. 13) Select a Fund from the dropdown in the 'Accounting details' box. 14) Click 'Save' 15) Click 'Close this basket' 16) Click 'Yes, close (Y)' without checking the attach to a basket group. 17) Click the 'Basket groups' tab. 18) Click '+ New basket group' 19) Notice the listing in 'Ungrouped baskets' lacks a space between the number and the currency. (e.g. Total: 0USD) 20) Apply patch (git bz apply 9654) 21) Refresh the page 22) Notice there is now a space. (e.g. Total: 0 USD) 23) Run the Koha QA Tool: (~/qa-test-tools/koha-qa.pl -v 2 -c 1) Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes all tests.
There is still a small problem. When all order lines of an order in the basket group are cancelled, it displays: 0 0. As it was 00 before the patch I think it's still an improvement :) That said... I think this is Samuel's first patch - welcome! :)
Pushed to master. Thanks, Samuel, and congratulations!
Depends on Bug 9807 patch : 231f26b Bug 9807: (follow-up) quell warning if invoice price not set