BUG10693: Fix wrong monthnumber in PDF Bill

This commit is contained in:
Alexander Marx
2015-01-02 07:46:21 +01:00
committed by Michael Tremer
parent 5946f1f9d0
commit 218d2d75f5
3 changed files with 5 additions and 2 deletions

View 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"

View 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

View File

@@ -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);