Bugzilla – Attachment 10132 Details for
Bug 7686
Tax rate wrong calculation in reception summary page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
signed off patch
0001-Bug-7686-Tax-rate-calculation-in-reception-page.patch (text/plain), 2.54 KB, created by
Adrien SAURAT
on 2012-06-10 15:43:34 UTC
(
hide
)
Description:
signed off patch
Filename:
MIME Type:
Creator:
Adrien SAURAT
Created:
2012-06-10 15:43:34 UTC
Size:
2.54 KB
patch
obsolete
>From f0e5ef900f48a1c7de040ac2dfa98f149f92e0a9 Mon Sep 17 00:00:00 2001 >From: Lyon3 Team <koha@univ-lyon3.fr> >Date: Thu, 31 May 2012 17:30:57 +0200 >Subject: [PATCH] Tax rate calculation in reception summary page > >In the Already received table, the total was wrong due to >an erroneous calculation of tax rate > >Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com> >--- > acqui/parcel.pl | 10 +++++++--- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 9 +++++++-- > 2 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index bf14ff0..2d9c977 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -296,7 +296,9 @@ if ($count>$resultsperpage){ > > #$totalfreight=$freight; > $tototal = $tototal + $freight; >- >+my $gstreg = $bookseller->{gstreg}; >+my $gstpart = ($gstreg)? $tototal - ($tototal / ($gst + 1)) : $tototal * $gst; >+my $grandtot = ($gstreg)? sprintf($cfstr, $tototal) : sprintf($cfstr, $tototal + $gstpart); > $template->param( > invoice => $invoice, > datereceived => $datereceived->output('iso'), >@@ -316,8 +318,10 @@ $template->param( > totalquantity => $totalquantity, > tototal => sprintf($cfstr, $tototal), > ordergrandtotal => sprintf($cfstr, $ordergrandtotal), >- gst => $gst, >- grandtot => sprintf($cfstr, $tototal + $gst), >+ gstpercent => sprintf( "%.2f", $gst * 100 ) . '%', >+ gstpart => sprintf($cfstr,$gstpart), >+ gstreg => $gstreg, >+ grandtot => $grandtot, > totalPunitprice => sprintf("%.2f", $totalPunitprice), > totalPquantity => $totalPquantity, > totalPqtyrcvd => $totalPqtyrcvd, >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 c3b169d..49efc94 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -349,8 +349,13 @@ > The total at the bottom of the page should be within a few cents of the total for the invoice. > </p> > </td> >- <td><b>Tax rate</b></td> >- <td>[% gst %]</td> >+ [% IF ( gstreg ) %] >+ <td><b>From which included<br /> >+ (tax rate [% gstpercent %])</b></td> >+ [% ELSE %] >+ <td><b>Tax rate ([% gstpercent %])</b></td> >+ [% END %] >+ <td>[% gstpart %]</td> > </tr> > [% END %] > <tr> >-- >1.7.4.1 >
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 7686
:
8098
|
8099
|
9864
| 10132