diff options
| author | levinse <levinse> | 2011-02-16 07:39:02 +0000 |
|---|---|---|
| committer | levinse <levinse> | 2011-02-16 07:39:02 +0000 |
| commit | b9d2d7f2c80e5e89358bba0b2c3ba1de9f406c82 (patch) | |
| tree | ba5e4b7646d5239bdb2348a2af8eb06ced60020d /httemplate/view | |
| parent | a250f5db876181a0014c94cff750e985f55bcb38 (diff) | |
add barcodes to invoices, HTML part, RT10698
Diffstat (limited to 'httemplate/view')
| -rwxr-xr-x | httemplate/view/cust_bill-barcode.cgi | 18 | ||||
| -rwxr-xr-x | httemplate/view/cust_bill.cgi | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/httemplate/view/cust_bill-barcode.cgi b/httemplate/view/cust_bill-barcode.cgi new file mode 100755 index 000000000..dd8f8b814 --- /dev/null +++ b/httemplate/view/cust_bill-barcode.cgi @@ -0,0 +1,18 @@ +<% $png %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('View invoices'); + +my $conf = new FS::Conf; + +die 'invalid query' unless $cgi->param('invnum'); + +my $cust_bill = qsearchs('cust_bill', { 'invnum' => $cgi->param('invnum') } ) +or die 'unknown invnum'; + +my $png = $cust_bill->invoice_barcode(0); + +http_header('Content-Type' => 'image/png' ); + +</%init> diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 0928d04bc..3d3fb7028 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -125,6 +125,8 @@ my %opt = ( 'notice_name' => $notice_name, ); +$opt{'barcode_img'} = 1 if $conf->exists('invoice-barcode'); + my @payby = grep /\w/, $conf->config('payby'); #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) |
