From 0c0cb89fbf23c575cab2cac5519b6051288a7d3f Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 21 Jan 2004 00:04:07 +0000 Subject: don't include the _next_ day, just the full ending day --- httemplate/search/cust_bill_event.cgi | 2 +- httemplate/search/cust_pay.cgi | 2 +- httemplate/search/cust_pkg.cgi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi index b76f66b76..ec952ea5b 100644 --- a/httemplate/search/cust_bill_event.cgi +++ b/httemplate/search/cust_bill_event.cgi @@ -7,7 +7,7 @@ $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; my $beginning = str2time($1) || 0; $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; -my $ending = str2time($1) + 86400; +my $ending = str2time($1) + 86399; my @cust_bill_event = sort { $a->_date <=> $b->_date } diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi index 9eab5f82e..51dd3b340 100755 --- a/httemplate/search/cust_pay.cgi +++ b/httemplate/search/cust_pay.cgi @@ -42,7 +42,7 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq '_date' ) { } if ( $cgi->param('ending') && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) { - my $ending = str2time($1) + 86400; + my $ending = str2time($1) + 86399; push @search, " _date <= $ending "; } my $search; diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index c2f6272c4..45420f4c4 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -29,7 +29,7 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { } if ( $cgi->param('ending') && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) { - my $ending = str2time($1) + 86400; + my $ending = str2time($1) + 86399; $range .= ( $range ? ' AND ' : ' WHERE ' ). " bill <= $ending "; } -- cgit v1.2.1 From e202198ab2a701ac6f6bfcfb67171b97801ab976 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 21 Jan 2004 22:00:34 +0000 Subject: fix multi-page typeset invoices --- FS/FS/Conf.pm | 7 +++++++ FS/FS/cust_bill.pm | 1 + conf/invoice_latex | 6 +++--- conf/invoice_latexsmallfooter | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 conf/invoice_latexsmallfooter diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 467a856c1..ec1bf5574 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -490,6 +490,13 @@ httemplate/docs/config.html 'type' => 'textarea', }, + { + 'key' => 'invoice_latexsmallfooter', + 'section' => 'billing', + 'description' => 'Optional small footer for multi-page LaTeX typeset PostScript invoices.', + 'type' => 'textarea', + }, + { 'key' => 'invoice_default_terms', 'section' => 'billing', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 3c941ca6f..9f1d7a6fc 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -941,6 +941,7 @@ sub print_latex { 'zip' => _latex_escape($cust_main->zip), 'country' => _latex_escape($cust_main->country), 'footer' => join("\n", $conf->config('invoice_latexfooter') ), + 'smallfooter' => $conf->config('invoice_latexsmallfooter'), 'quantity' => 1, 'terms' => $conf->config('invoice_default_terms') || 'Payable upon receipt', #'notes' => join("\n", $conf->config('invoice_latexnotes') ), diff --git a/conf/invoice_latex b/conf/invoice_latex index b28679344..f63ab324f 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -85,12 +85,12 @@ Invoice date & & Invoice number \\ %% Header & footer changes for subsequent pages % \afterpage{ \fancyfoot[RO,RE]{\small{\thepage\ of \pageref{LastPage}}} } -\afterpage{ \fancyfoot[CO,CE]{\small{$org_company}} } +\afterpage{ \fancyfoot[CO,CE]{\small{$smallfooter}} } \afterpage{ \fancyhead[LO,LE]{\small{}} } \afterpage{ \fancyhead[RO,RE]{\small{ \begin{tabular}{ll} -Date & Account number\\ -\textbf{ $date_of_bill} & \textbf{ $customer_ref}\\ +Invoice date & Invoice number\\ +\textbf{$date} & \textbf{$invnum}\\ \end{tabular}}} } % % diff --git a/conf/invoice_latexsmallfooter b/conf/invoice_latexsmallfooter new file mode 100644 index 000000000..527c356f5 --- /dev/null +++ b/conf/invoice_latexsmallfooter @@ -0,0 +1 @@ +Ivan Kohler~~~Freeside - open-source billing -- cgit v1.2.1