From c085c3ba3bd0677719407ce613dd24466f05abe2 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 9 Jan 2004 22:39:22 +0000 Subject: credit deletions: need to use Date::Format and FS::Misc qw(send_email) in cust_credit.pm, need a link to delete unapplied credits too --- httemplate/view/cust_main.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'httemplate/view') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 8123b2f82..ee5f86973 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -668,12 +668,16 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { qsearch('cust_credit',{'custnum'=>$custnum}); foreach my $credit (@credits) { my($cref)=$credit->hashref; + my $delete = + $credit->closed !~ /^Y/i && $conf->exists('deletecredits') + ? qq! (delete)! + : ''; push @history, $cref->{_date} . "\t" . qq!!. 'Unapplied credit #' . $cref->{crednum} . ": ". - $cref->{reason} . "\t\t\t" . $credit->credited . "\t"; + $cref->{reason} . "$delete\t\t\t" . $credit->credited . "\t"; } my(@refunds)=qsearch('cust_refund',{'custnum'=> $custnum } ); -- cgit v1.2.1 From 01c33bcdfa27576bee4ab922095749794a6b9f57 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 11 Jan 2004 23:37:08 +0000 Subject: adding --- httemplate/view/cust_bill-pdf.cgi | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 httemplate/view/cust_bill-pdf.cgi (limited to 'httemplate/view') diff --git a/httemplate/view/cust_bill-pdf.cgi b/httemplate/view/cust_bill-pdf.cgi new file mode 100755 index 000000000..03340a16f --- /dev/null +++ b/httemplate/view/cust_bill-pdf.cgi @@ -0,0 +1,13 @@ +<% + +#untaint invnum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/; +my $invnum = $1; + +my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); +die "Invoice #$invnum not found!" unless $cust_bill; + +http_header('Content-Type' => 'application/postscript' ); +%> +<%= $cust_bill->print_ps %> -- cgit v1.2.1