Bugzilla – Attachment 57790 Details for
Bug 17668
typo in parcel.pl listinct vs listincgst
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17668: Fix typo in parcel.pl - listinct vs listincgst
SIGNED-OFF-Bug-17668-Fix-typo-in-parcelpl---listin.patch (text/plain), 2.80 KB, created by
Josef Moravec
on 2016-11-28 11:00:19 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17668: Fix typo in parcel.pl - listinct vs listincgst
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2016-11-28 11:00:19 UTC
Size:
2.80 KB
patch
obsolete
>From f5cc46ff625cb23d9f10727bf34cae0c4058a0d9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 22 Nov 2016 15:28:04 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 17668: Fix typo in parcel.pl - listinct vs > listincgst > >This typo has been introduced by > commit eed14b080db8691f371b4c19f1a190b87fcc396a > Bug 13001: Refactor VAT and price calculation - parcel page >So before the tax rewrite (13321, 13323). >It sounded weird to me that testers did not catch the bug on this page. > >To understand the logic: >Conditions are listincgst, invoiceincgst >Conditions | Before this patch | If we fix the typo | After this patch > 0 0 | excluded | excluded | excluded > 0 1 | included | included | included > 1 0 | excluded | excluded | excluded > 1 1 | included | included | included > >Test plan: >Create 4 vendors with the difference combinations >Create a basket, add an order (with a tax) and receive it >Confirm that the different values displayed on the parcel page are correct > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > acqui/parcel.pl | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index 8f2d46f..65be105 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -124,17 +124,15 @@ my $subtotal_for_funds; > for my $order ( @orders ) { > $order->{'unitprice'} += 0; > >- if ( $bookseller->{listincgst} and not $bookseller->{invoiceincgst} ) { >- $order->{ecost} = $order->{ecost_tax_excluded}; >- $order->{unitprice} = $order->{unitprice_tax_excluded}; >- } >- elsif ( not $bookseller->{listinct} and $bookseller->{invoiceincgst} ) { >+ if ( $bookseller->{invoiceincgst} ) { > $order->{ecost} = $order->{ecost_tax_included}; > $order->{unitprice} = $order->{unitprice_tax_included}; >- } else { >- $order->{ecost} = $order->{ecost_tax_excluded}; >+ } >+ else { >+ $order->{ecost} = $order->{ecost_tax_excluded}; > $order->{unitprice} = $order->{unitprice_tax_excluded}; > } >+ > $order->{total} = $order->{unitprice} * $order->{quantity}; > > my %line = %{ $order }; >@@ -224,9 +222,7 @@ unless( defined $invoice->{closedate} ) { > for (my $i = 0 ; $i < $countpendings ; $i++) { > my $order = $pendingorders->[$i]; > >- if ( $bookseller->{listincgst} and not $bookseller->{invoiceincgst} ) { >- $order->{ecost} = $order->{ecost_tax_excluded}; >- } elsif ( not $bookseller->{listinct} and $bookseller->{invoiceincgst} ) { >+ if ( $bookseller->{invoiceincgst} ) { > $order->{ecost} = $order->{ecost_tax_included}; > } else { > $order->{ecost} = $order->{ecost_tax_excluded}; >-- >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 17668
:
57713
|
57790
|
58011