View | Details | Raw Unified | Return to bug 12979
Collapse All | Expand All

(-)a/acqui/acqui-home.pl (-1 lines)
Lines 28-34 this script is the main page for acqui Link Here
28
28
29
use strict;
29
use strict;
30
use warnings;
30
use warnings;
31
use Number::Format;
32
31
33
use CGI;
32
use CGI;
34
use C4::Auth;
33
use C4::Auth;
(-)a/acqui/addorderiso2709.pl (-1 lines)
Lines 24-30 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI;
25
use CGI;
26
use Carp;
26
use Carp;
27
use Number::Format qw(:all);
28
use YAML qw/Load/;
27
use YAML qw/Load/;
29
28
30
use C4::Context;
29
use C4::Context;
(-)a/acqui/pdfformat/layout2pages.pm (-24 / +7 lines)
Lines 23-29 Link Here
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
package pdfformat::layout2pages;
24
package pdfformat::layout2pages;
25
use vars qw($VERSION @ISA @EXPORT);
25
use vars qw($VERSION @ISA @EXPORT);
26
use Number::Format qw(format_price);
27
use MIME::Base64;
26
use MIME::Base64;
28
use strict;
27
use strict;
29
use warnings;
28
use warnings;
Lines 31-36 use utf8; Link Here
31
30
32
use C4::Branch qw(GetBranchDetail);
31
use C4::Branch qw(GetBranchDetail);
33
32
33
use Koha::Number::Price;
34
34
BEGIN {
35
BEGIN {
35
         use Exporter   ();
36
         use Exporter   ();
36
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
37
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
Lines 56-79 sub printorders { Link Here
56
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
    
58
    
58
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $num;
60
    
61
    if ( $cur_format eq 'FR' ) {
62
        $num = new Number::Format(
63
            'decimal_fill'      => '2',
64
            'decimal_point'     => ',',
65
            'int_curr_symbol'   => '',
66
            'mon_thousands_sep' => ' ',
67
            'thousands_sep'     => ' ',
68
            'mon_decimal_point' => ','
69
        );
70
    } else {  # US by default..
71
        $num = new Number::Format(
72
            'int_curr_symbol'   => '',
73
            'mon_thousands_sep' => ',',
74
            'mon_decimal_point' => '.'
75
        );
76
    }
77
60
78
    $pdf->mediabox($height/mm, $width/mm);
61
    $pdf->mediabox($height/mm, $width/mm);
79
    my $page = $pdf->page();
62
    my $page = $pdf->page();
Lines 115-125 sub printorders { Link Here
115
                $basket->{basketno},
98
                $basket->{basketno},
116
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote for vendor : " . $line->{order_vendornote} : '' ),
99
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote for vendor : " . $line->{order_vendornote} : '' ),
117
                $line->{quantity},
100
                $line->{quantity},
118
                $num->format_price($line->{rrpgsti}),
101
                Koha::Number::Price->new( $line->{rrpgsti} )->format,
119
                $num->format_price($line->{discount}).'%',
102
                Koha::Number::Price->new( $line->{discount} )->format . '%',
120
                $num->format_price($line->{gstrate} * 100).'%',
103
                Koha::Number::Price->new( $line->{gstrate} * 100 )->format . '%',
121
                $num->format_price($line->{totalgste}),
104
                Koha::Number::Price->new( $line->{totalgste} )->format,
122
                $num->format_price($line->{totalgsti}),
105
                Koha::Number::Price->new( $line->{totalgsti} )->format,
123
            );
106
            );
124
            push(@$abaskets, $arrbasket);
107
            push(@$abaskets, $arrbasket);
125
        }
108
        }
(-)a/acqui/pdfformat/layout2pagesde.pm (-24 / +7 lines)
Lines 23-29 Link Here
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
package pdfformat::layout2pagesde;
24
package pdfformat::layout2pagesde;
25
use vars qw($VERSION @ISA @EXPORT);
25
use vars qw($VERSION @ISA @EXPORT);
26
use Number::Format qw(format_price);
27
use MIME::Base64;
26
use MIME::Base64;
28
use strict;
27
use strict;
29
use warnings;
28
use warnings;
Lines 31-36 use utf8; Link Here
31
30
32
use C4::Branch qw(GetBranchDetail);
31
use C4::Branch qw(GetBranchDetail);
33
32
33
use Koha::Number::Price;
34
34
BEGIN {
35
BEGIN {
35
         use Exporter   ();
36
         use Exporter   ();
36
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
37
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
Lines 56-79 sub printorders { Link Here
56
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
    
58
    
58
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $num;
60
    
61
    if ( $cur_format eq 'FR' ) {
62
        $num = new Number::Format(
63
            'decimal_fill'      => '2',
64
            'decimal_point'     => ',',
65
            'int_curr_symbol'   => '',
66
            'mon_thousands_sep' => ' ',
67
            'thousands_sep'     => ' ',
68
            'mon_decimal_point' => ','
69
        );
70
    } else {  # US by default..
71
        $num = new Number::Format(
72
            'int_curr_symbol'   => '',
73
            'mon_thousands_sep' => ',',
74
            'mon_decimal_point' => '.'
75
        );
76
    }
77
60
78
    $pdf->mediabox($height/mm, $width/mm);
61
    $pdf->mediabox($height/mm, $width/mm);
79
    my $page = $pdf->page();
62
    my $page = $pdf->page();
Lines 115-125 sub printorders { Link Here
115
                $basket->{basketno},
98
                $basket->{basketno},
116
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nLieferantennotiz : ". $line->{order_vendornote} : '' ),                $line->{quantity},
99
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nLieferantennotiz : ". $line->{order_vendornote} : '' ),                $line->{quantity},
117
                $line->{quantity},
100
                $line->{quantity},
118
                $num->format_price($line->{rrpgsti}),
101
                Koha::Number::Price->new( $line->{rrpgsti} )->format,
119
                $num->format_price($line->{discount}).'%',
102
                Koha::Number::Price->new( $line->{discount} )->format . '%',
120
                $num->format_price($line->{gstrate} * 100).'%',
103
                Koha::Number::Price->new( $line->{gstrate} * 100 )->format . '%',
121
                $num->format_price($line->{totalgste}),
104
                Koha::Number::Price->new( $line->{totalgste} )->format,
122
                $num->format_price($line->{totalgsti}),
105
                Koha::Number::Price->new( $line->{totalgsti} )->format,
123
            );
106
            );
124
            push(@$abaskets, $arrbasket);
107
            push(@$abaskets, $arrbasket);
125
        }
108
        }
(-)a/acqui/pdfformat/layout3pages.pm (-55 / +28 lines)
Lines 23-29 Link Here
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
package pdfformat::layout3pages;
24
package pdfformat::layout3pages;
25
use vars qw($VERSION @ISA @EXPORT);
25
use vars qw($VERSION @ISA @EXPORT);
26
use Number::Format qw(format_price);
27
use MIME::Base64;
26
use MIME::Base64;
28
use List::MoreUtils qw/uniq/;
27
use List::MoreUtils qw/uniq/;
29
use strict;
28
use strict;
Lines 32-37 use utf8; Link Here
32
31
33
use C4::Branch qw(GetBranchDetail GetBranchName);
32
use C4::Branch qw(GetBranchDetail GetBranchName);
34
33
34
use Koha::Number::Price;
35
35
BEGIN {
36
BEGIN {
36
         use Exporter   ();
37
         use Exporter   ();
37
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
38
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
Lines 57-80 sub printorders { Link Here
57
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
58
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
58
    
59
    
59
    my $cur_format = C4::Context->preference("CurrencyFormat");
60
    my $cur_format = C4::Context->preference("CurrencyFormat");
60
    my $num;
61
    
62
    if ( $cur_format eq 'FR' ) {
63
        $num = new Number::Format(
64
            'decimal_fill'      => '2',
65
            'decimal_point'     => ',',
66
            'int_curr_symbol'   => '',
67
            'mon_thousands_sep' => ' ',
68
            'thousands_sep'     => ' ',
69
            'mon_decimal_point' => ','
70
        );
71
    } else {  # US by default..
72
        $num = new Number::Format(
73
            'int_curr_symbol'   => '',
74
            'mon_thousands_sep' => ',',
75
            'mon_decimal_point' => '.'
76
        );
77
    }
78
61
79
    $pdf->mediabox($height/mm, $width/mm);
62
    $pdf->mediabox($height/mm, $width/mm);
80
    my $number = 3;
63
    my $number = 3;
Lines 134-146 sub printorders { Link Here
134
            push( @$arrbasket,
117
            push( @$arrbasket,
135
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote for vendor : " . $line->{order_vendornote} : '' ),
118
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote for vendor : " . $line->{order_vendornote} : '' ),
136
                $line->{quantity},
119
                $line->{quantity},
137
                $num->format_price($line->{rrpgste}),
120
                Koha::Number::Price->new( $line->{rrpgste} )->format,
138
                $num->format_price($line->{rrpgsti}),
121
                Koha::Number::Price->new( $line->{rrpgsti} )->format,
139
                $num->format_price($line->{discount}).'%',
122
                Koha::Number::Price->new( $line->{discount} )->format . '%',
140
                $num->format_price($line->{rrpgste} - $line->{ecostgste}),
123
                Koha::Number::Price->new( $line->{rrpgste} - $line->{ecostgste})->format,
141
                $num->format_price($line->{gstrate} * 100).'%',
124
                Koha::Number::Price->new( $line->{gstrate} * 100 )->format . '%',
142
                $num->format_price($line->{totalgste}),
125
                Koha::Number::Price->new( $line->{totalgste} )->format,
143
                $num->format_price($line->{totalgsti}),
126
                Koha::Number::Price->new( $line->{totalgsti} )->format,
144
            );
127
            );
145
            push(@$abaskets, $arrbasket);
128
            push(@$abaskets, $arrbasket);
146
        }
129
        }
Lines 204-228 sub printbaskets { Link Here
204
    my $libraryname = C4::Context->preference("LibraryName");
187
    my $libraryname = C4::Context->preference("LibraryName");
205
    
188
    
206
    my $cur_format = C4::Context->preference("CurrencyFormat");
189
    my $cur_format = C4::Context->preference("CurrencyFormat");
207
    my $num;
190
208
    
209
    if ( $cur_format eq 'FR' ) {
210
        $num = new Number::Format(
211
            'decimal_fill'      => '2',
212
            'decimal_point'     => ',',
213
            'int_curr_symbol'   => '',
214
            'mon_thousands_sep' => ' ',
215
            'thousands_sep'     => ' ',
216
            'mon_decimal_point' => ','
217
        );
218
    } else {  # US by default..
219
        $num = new Number::Format(
220
            'int_curr_symbol'   => '',
221
            'mon_thousands_sep' => ',',
222
            'mon_decimal_point' => '.'
223
        );
224
    }
225
    
226
    $pdf->mediabox($width/mm, $height/mm);
191
    $pdf->mediabox($width/mm, $height/mm);
227
    my $page = $pdf->openpage(2);
192
    my $page = $pdf->openpage(2);
228
    # create a text
193
    # create a text
Lines 263-293 sub printbaskets { Link Here
263
            push @gst, $ord->{gstrate};
228
            push @gst, $ord->{gstrate};
264
        }
229
        }
265
        @gst = uniq map { $_ * 100 } @gst;
230
        @gst = uniq map { $_ * 100 } @gst;
266
        $totalgsti = $num->round($totalgsti);
267
        $totalgste = $num->round($totalgste);
268
        $grandtotalrrpgste += $totalrrpgste;
231
        $grandtotalrrpgste += $totalrrpgste;
269
        $grandtotalrrpgsti += $totalrrpgsti;
232
        $grandtotalrrpgsti += $totalrrpgsti;
270
        $grandtotalgsti += $totalgsti;
233
        $grandtotalgsti += $totalgsti;
271
        $grandtotalgste += $totalgste;
234
        $grandtotalgste += $totalgste;
272
        $grandtotalgstvalue += $totalgstvalue;
235
        $grandtotalgstvalue += $totalgstvalue;
273
        $grandtotaldiscount += $totaldiscount;
236
        $grandtotaldiscount += $totaldiscount;
274
        my @gst_string = map{$num->format_price( $_ ) . '%'} @gst;
237
        my @gst_string =
238
          map { Koha::Number::Price->new($_)->format . '%' } @gst;
275
        push(@$arrbasket,
239
        push(@$arrbasket,
276
            $basket->{contractname},
240
            $basket->{contractname},
277
            $basket->{basketname} . ' (No. ' . $basket->{basketno} . ')',
241
            $basket->{basketname} . ' (No. ' . $basket->{basketno} . ')',
278
            $num->format_price($totalrrpgste),
242
            Koha::Number::Price->new( $totalrrpgste )->format,
279
            $num->format_price($totalrrpgsti),
243
            Koha::Number::Price->new( $totalrrpgsti )->format,
280
            "@gst_string",
244
            "@gst_string",
281
            $num->format_price($totalgstvalue),
245
            Koha::Number::Price->new( $totalgstvalue )->format,
282
            $num->format_price($totaldiscount),
246
            Koha::Number::Price->new( $totaldiscount )->format,
283
            $num->format_price($totalgste),
247
            Koha::Number::Price->new( $totalgste )->format,
284
            $num->format_price($totalgsti)
248
            Koha::Number::Price->new( $totalgsti )->format,
285
        );
249
        );
286
        push(@$abaskets, $arrbasket);
250
        push(@$abaskets, $arrbasket);
287
    }
251
    }
288
    # now, push total
252
    # now, push total
289
    undef $arrbasket;
253
    undef $arrbasket;
290
    push @$arrbasket,'','Total', $num->format_price($grandtotalrrpgste), $num->format_price($grandtotalrrpgsti), '', $num->format_price($grandtotalgstvalue), $num->format_price($grandtotaldiscount), $num->format_price($grandtotalgste), $num->format_price($grandtotalgsti);
254
    push @$arrbasket,
255
      '',
256
      'Total',
257
      Koha::Number::Price->new( $grandtotalrrpgste )->format,
258
      Koha::Number::Price->new( $grandtotalrrpgsti )->format,
259
      '',
260
      Koha::Number::Price->new( $grandtotalgstvalue )->format,
261
      Koha::Number::Price->new( $grandtotaldiscount )->format,
262
      Koha::Number::Price->new( $grandtotalgste )->format,
263
      Koha::Number::Price->new( $grandtotalgsti )->format;
291
    push @$abaskets,$arrbasket;
264
    push @$abaskets,$arrbasket;
292
    # height is width and width is height in this function, as the pdf is in landscape mode for the Tables.
265
    # height is width and width is height in this function, as the pdf is in landscape mode for the Tables.
293
266
(-)a/acqui/pdfformat/layout3pagesfr.pm (-54 / +27 lines)
Lines 22-28 Link Here
22
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
22
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
package pdfformat::layout3pagesfr;
23
package pdfformat::layout3pagesfr;
24
use vars qw($VERSION @ISA @EXPORT);
24
use vars qw($VERSION @ISA @EXPORT);
25
use Number::Format qw(format_price);
26
use MIME::Base64;
25
use MIME::Base64;
27
use List::MoreUtils qw/uniq/;
26
use List::MoreUtils qw/uniq/;
28
use strict;
27
use strict;
Lines 31-36 use utf8; Link Here
31
30
32
use C4::Branch qw(GetBranchDetail GetBranchName);
31
use C4::Branch qw(GetBranchDetail GetBranchName);
33
32
33
use Koha::Number::Price;
34
34
BEGIN {
35
BEGIN {
35
         use Exporter   ();
36
         use Exporter   ();
36
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
37
         our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
Lines 56-79 sub printorders { Link Here
56
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
    my ($pdf, $basketgroup, $baskets, $orders) = @_;
57
58
58
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $cur_format = C4::Context->preference("CurrencyFormat");
59
    my $num;
60
61
    if ( $cur_format eq 'FR' ) {
62
        $num = new Number::Format(
63
            'decimal_fill'      => '2',
64
            'decimal_point'     => ',',
65
            'int_curr_symbol'   => '',
66
            'mon_thousands_sep' => ' ',
67
            'thousands_sep'     => ' ',
68
            'mon_decimal_point' => ','
69
        );
70
    } else {  # US by default..
71
        $num = new Number::Format(
72
            'int_curr_symbol'   => '',
73
            'mon_thousands_sep' => ',',
74
            'mon_decimal_point' => '.'
75
        );
76
    }
77
60
78
    $pdf->mediabox($height/mm, $width/mm);
61
    $pdf->mediabox($height/mm, $width/mm);
79
    my $number = 3;
62
    my $number = 3;
Lines 134-146 sub printorders { Link Here
134
            push( @$arrbasket,
117
            push( @$arrbasket,
135
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote pour le fournisseur : ". $line->{order_vendornote} : '' ),
118
                $titleinfo. ($line->{order_vendornote} ? "\n----------------\nNote pour le fournisseur : ". $line->{order_vendornote} : '' ),
136
                $line->{quantity},
119
                $line->{quantity},
137
                $num->format_price($line->{rrpgste}),
120
                Koha::Number::Price->new( $line->{rrpgste}),
138
                $num->format_price($line->{rrpgsti}),
121
                Koha::Number::Price->new( $line->{rrpgsti}),
139
                $num->format_price($line->{discount}).'%',
122
                Koha::Number::Price->new( $line->{discount}).'%',
140
                $num->format_price($line->{rrpgste} - $line->{ecostgste}),
123
                Koha::Number::Price->new( $line->{rrpgste} - $line->{ecostgste}),
141
                $num->format_price($line->{gstrate} * 100).'%',
124
                Koha::Number::Price->new( $line->{gstrate} * 100).'%',
142
                $num->format_price($line->{totalgste}),
125
                Koha::Number::Price->new( $line->{totalgste}),
143
                $num->format_price($line->{totalgsti}),
126
                Koha::Number::Price->new( $line->{totalgsti}),
144
            );
127
            );
145
            push(@$abaskets, $arrbasket);
128
            push(@$abaskets, $arrbasket);
146
        }
129
        }
Lines 204-227 sub printbaskets { Link Here
204
    my $libraryname = C4::Context->preference("LibraryName");
187
    my $libraryname = C4::Context->preference("LibraryName");
205
188
206
    my $cur_format = C4::Context->preference("CurrencyFormat");
189
    my $cur_format = C4::Context->preference("CurrencyFormat");
207
    my $num;
208
209
    if ( $cur_format eq 'FR' ) {
210
        $num = new Number::Format(
211
            'decimal_fill'      => '2',
212
            'decimal_point'     => ',',
213
            'int_curr_symbol'   => '',
214
            'mon_thousands_sep' => ' ',
215
            'thousands_sep'     => ' ',
216
            'mon_decimal_point' => ','
217
        );
218
    } else {  # US by default..
219
        $num = new Number::Format(
220
            'int_curr_symbol'   => '',
221
            'mon_thousands_sep' => ',',
222
            'mon_decimal_point' => '.'
223
        );
224
    }
225
190
226
    $pdf->mediabox($width/mm, $height/mm);
191
    $pdf->mediabox($width/mm, $height/mm);
227
    my $page = $pdf->openpage(2);
192
    my $page = $pdf->openpage(2);
Lines 263-293 sub printbaskets { Link Here
263
            push @gst, $ord->{gstrate};
228
            push @gst, $ord->{gstrate};
264
        }
229
        }
265
        @gst = uniq map { $_ * 100 } @gst;
230
        @gst = uniq map { $_ * 100 } @gst;
266
        $totalgsti = $num->round($totalgsti);
267
        $totalgste = $num->round($totalgste);
268
        $grandtotalrrpgste += $totalrrpgste;
231
        $grandtotalrrpgste += $totalrrpgste;
269
        $grandtotalrrpgsti += $totalrrpgsti;
232
        $grandtotalrrpgsti += $totalrrpgsti;
270
        $grandtotalgsti += $totalgsti;
233
        $grandtotalgsti += $totalgsti;
271
        $grandtotalgste += $totalgste;
234
        $grandtotalgste += $totalgste;
272
        $grandtotalgstvalue += $totalgstvalue;
235
        $grandtotalgstvalue += $totalgstvalue;
273
        $grandtotaldiscount += $totaldiscount;
236
        $grandtotaldiscount += $totaldiscount;
274
        my @gst_string = map{$num->format_price( $_ ) . '%'} @gst;
237
        my @gst_string =
238
          map { Koha::Number::Price->new($_)->format . '%' } @gst;
275
        push(@$arrbasket,
239
        push(@$arrbasket,
276
            $basket->{contractname},
240
            $basket->{contractname},
277
            $basket->{basketname} . ' (No. ' . $basket->{basketno} . ')',
241
            $basket->{basketname} . ' (No. ' . $basket->{basketno} . ')',
278
            $num->format_price($totalrrpgste),
242
            Koha::Number::Price->new( $totalrrpgste )->format,
279
            $num->format_price($totalrrpgsti),
243
            Koha::Number::Price->new( $totalrrpgsti )->format,
280
            "@gst_string",
244
            "@gst_string",
281
            $num->format_price($totalgstvalue),
245
            Koha::Number::Price->new( $totalgstvalue )->format,
282
            $num->format_price($totaldiscount),
246
            Koha::Number::Price->new( $totaldiscount )->format,
283
            $num->format_price($totalgste),
247
            Koha::Number::Price->new( $totalgste )->format,
284
            $num->format_price($totalgsti)
248
            Koha::Number::Price->new( $totalgsti )->format,
285
        );
249
        );
286
        push(@$abaskets, $arrbasket);
250
        push(@$abaskets, $arrbasket);
287
    }
251
    }
288
    # now, push total
252
    # now, push total
289
    undef $arrbasket;
253
    undef $arrbasket;
290
    push @$arrbasket,'','Total', $num->format_price($grandtotalrrpgste), $num->format_price($grandtotalrrpgsti), '', $num->format_price($grandtotalgstvalue), $num->format_price($grandtotaldiscount), $num->format_price($grandtotalgste), $num->format_price($grandtotalgsti);
254
    push @$arrbasket,
255
      '',
256
      'Total',
257
      Koha::Number::Price->new( $grandtotalrrpgste )->format,
258
      Koha::Number::Price->new( $grandtotalrrpgsti )->format,
259
      '',
260
      Koha::Number::Price->new( $grandtotalgstvalue )->format,
261
      Koha::Number::Price->new( $grandtotaldiscount )->format,
262
      Koha::Number::Price->new( $grandtotalgste )->format,
263
      Koha::Number::Price->new( $grandtotalgsti )->format;
291
    push @$abaskets,$arrbasket;
264
    push @$abaskets,$arrbasket;
292
    # height is width and width is height in this function, as the pdf is in landscape mode for the Tables.
265
    # height is width and width is height in this function, as the pdf is in landscape mode for the Tables.
293
266
(-)a/admin/aqbudgetperiods.pl (-9 / +5 lines)
Lines 46-52 script to administer the budget periods table Link Here
46
46
47
use Modern::Perl;
47
use Modern::Perl;
48
48
49
use Number::Format qw(format_price);
50
use CGI;
49
use CGI;
51
use List::Util qw/min/;
50
use List::Util qw/min/;
52
use Koha::DateUtils;
51
use Koha::DateUtils;
Lines 59-64 use C4::Acquisition; Link Here
59
use C4::Budgets;
58
use C4::Budgets;
60
use C4::Debug;
59
use C4::Debug;
61
60
61
use Koha::Number::Price;
62
62
my $dbh = C4::Context->dbh;
63
my $dbh = C4::Context->dbh;
63
64
64
my $input       = new CGI;
65
my $input       = new CGI;
Lines 106-119 if ( $op eq 'add_form' ) { Link Here
106
		my $budgetperiod_hash=GetBudgetPeriod($budget_period_id);
107
		my $budgetperiod_hash=GetBudgetPeriod($budget_period_id);
107
        # get dropboxes
108
        # get dropboxes
108
109
109
        my $editnum = new Number::Format(
110
        $budgetperiod_hash->{budget_period_total} =
110
            'int_curr_symbol'   => '',
111
          Koha::Number::Price->new( $budgetperiod_hash->{budget_period_total} )
111
            'thousands_sep'     => '',
112
          ->format;
112
            'mon_thousands_sep' => '',
113
            'mon_decimal_point' => '.'
114
        );
115
116
        $$budgetperiod_hash{budget_period_total}= $editnum->format_price($$budgetperiod_hash{'budget_period_total'});
117
        $template->param(
113
        $template->param(
118
			%$budgetperiod_hash
114
			%$budgetperiod_hash
119
        );
115
        );
(-)a/admin/aqbudgets.pl (-1 lines)
Lines 23-29 use Modern::Perl; Link Here
23
23
24
use CGI;
24
use CGI;
25
use List::Util qw/min/;
25
use List::Util qw/min/;
26
use Number::Format qw(format_price);
27
26
28
use Koha::Database;
27
use Koha::Database;
29
use C4::Auth qw/get_user_subpermissions/;
28
use C4::Auth qw/get_user_subpermissions/;
(-)a/admin/aqplan.pl (-2 lines)
Lines 27-33 use List::Util qw/min/; Link Here
27
use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/;
27
use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/;
28
use Date::Manip qw/ ParseDate UnixDate DateCalc/;
28
use Date::Manip qw/ ParseDate UnixDate DateCalc/;
29
use C4::Dates qw/format_date format_date_in_iso/;
29
use C4::Dates qw/format_date format_date_in_iso/;
30
use Number::Format qw(format_price);
31
use Text::CSV_XS;
30
use Text::CSV_XS;
32
31
33
use C4::Acquisition;
32
use C4::Acquisition;
34
- 

Return to bug 12979