]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
BUG10693: Fix wrong monthnumber in PDF Bill
authorAlexander Marx <alexander.marx@ipfire.org>
Fri, 2 Jan 2015 06:46:21 +0000 (07:46 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Jan 2015 09:22:28 +0000 (10:22 +0100)
lfs/squid-accounting
src/squid-accounting/acct-lib.pl
src/squid-accounting/acct.pl

index 0dca63f751f4c43aa036d8fa53954c740fe7e194..9ef8324110ead048ba52f379518bbac781bc972c 100644 (file)
@@ -15,7 +15,7 @@ THISAPP    = squid-accounting-$(VER)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = squid-accounting
-PAK_VER    = 3
+PAK_VER    = 4
 
 DEPS       = "perl-DBI perl-DBD-SQLite perl-File-ReadBackwards perl-PDF-API2 sendEmail"
 
index a19140d04cd055714d8dae3dd556b73222488d85..bac1e3632fb3f2b4b0cdec4804179884e0b210de 100644 (file)
@@ -387,6 +387,7 @@ sub pdf2 {
        my @billar              = @{$_[0]}; #DATA from sendbill (just host/values)
        my $month               = $_[1];
        $month                  = '0'.$month if $month < 10;
+       $month                  = '12' if $month == 0;
        my $year                = $_[2];
        my $mwst                = $_[3];
        my @address_cust= @{$_[4]}; #Array which contains customer and hoster adresses and some additional info from billgroup
index d535901b679f62ba6bb27cce76a2860b9ae9382e..79fc7bae43eede00a9444d2c5e761cf7ec60793a 100755 (executable)
@@ -210,7 +210,9 @@ sub sendbill {
        my @now = localtime(time);
        $now[5] = $now[5] + 1900;
        my $actmonth = $now[4];
-       my $month                       = '0'.$actmonth if $actmonth < 10;
+       my $month;
+       $month = '0'.$actmonth if $actmonth < 10;
+       $month = '12' if $actmonth == 0;
        my $actyear  = $now[5];
        my ($from,$till)=&ACCT::getmonth($actmonth,$actyear);                                   #FIXME month and year as variables!
        my @billar = &ACCT::GetTaValues($from,$till,$rggrp);