Bugzilla – Attachment 16620 Details for
Bug 9506
Values are false in the generated pdf for basketgroups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9506: FIX gst list values for each basket
Bug-9506-FIX-gst-list-values-for-each-basket.patch (text/plain), 1.84 KB, created by
Jonathan Druart
on 2013-03-21 13:14:06 UTC
(
hide
)
Description:
Bug 9506: FIX gst list values for each basket
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-21 13:14:06 UTC
Size:
1.84 KB
patch
obsolete
>From 1502c115b5f4f1e74f4e7fc6de2658a61e0363da Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 21 Mar 2013 14:13:22 +0100 >Subject: [PATCH] Bug 9506: FIX gst list values for each basket > >--- > acqui/pdfformat/layout3pages.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/acqui/pdfformat/layout3pages.pm b/acqui/pdfformat/layout3pages.pm >index 38ca298..b5f5ce3 100644 >--- a/acqui/pdfformat/layout3pages.pm >+++ b/acqui/pdfformat/layout3pages.pm >@@ -25,6 +25,7 @@ package pdfformat::layout3pages; > use vars qw($VERSION @ISA @EXPORT); > use Number::Format qw(format_price); > use MIME::Base64; >+use List::MoreUtils qw/uniq/; > use strict; > use warnings; > use utf8; >@@ -223,10 +224,10 @@ sub printbaskets { > push(@$arrbasket, $bkey); > } > my ($grandtotalrrpgsti, $grandtotalrrpgste, $grandtotalgsti, $grandtotalgste, $grandtotalgstvalue, $grandtotaldiscount); >- my @gst; > # calculate each basket total > push(@$abaskets, $arrbasket); > for my $basket (@$hbaskets) { >+ my @gst; > $arrbasket = undef; > my ($totalrrpgste, $totalrrpgsti, $totalgste, $totalgsti, $totalgstvalue, $totaldiscount); > my $ords = $orders->{$basket->{basketno}}; >@@ -238,9 +239,9 @@ sub printbaskets { > $totaldiscount += ($ord->{rrpgste} - $ord->{ecostgste} ) * $ord->{quantity}; > $totalrrpgste += $ord->{rrpgste} * $ord->{quantity}; > $totalrrpgsti += $ord->{rrpgsti} * $ord->{quantity}; >- push @gst, $ord->{gstrate} * 100 >- unless grep {$ord->{gstrate} * 100 == $_ ? $_ : ()} @gst; >+ push @gst, $ord->{gstrate}; > } >+ @gst = uniq map { $_ * 100 } @gst; > $totalgsti = $num->round($totalgsti); > $totalgste = $num->round($totalgste); > $grandtotalrrpgste += $totalrrpgste; >-- >1.7.10.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 9506
:
14944
|
15041
|
16586
|
16620
|
16705
|
16706