X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=c5f2c3f3beacfbd625a73fdb2c583887df385f56;hb=1228aa97dd33175f74c5dfbdf759a6b3d9458f93;hp=5099c899551d9d1171fd3fad1b3dfba6f841674b;hpb=e2b9e1737230c4e4209904784808dcaec723f730;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 5099c8995..c5f2c3f3b 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -14,8 +14,8 @@ # # Contributors: Antonio Gallardo # Benjamin Lee -# Philip Reetz -# Udo Spallek +# Philip Reetz +# Udo Spallek # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -107,10 +107,6 @@ my $rp_access_map = { 'balance_sheet' => 'report', }; -# subs use these pretty freely, so declare them here -our (%column_data, @column_index); -our ($subtotalnetamount, $subtotaltax, $subtotal); - sub check_rp_access { my $form = $main::form; @@ -160,10 +156,10 @@ sub report { } my $department = qq| - - | . $locale->text('Department') . qq| - - + + | . $locale->text('Department') . qq| + + | if $form->{selectdepartment}; $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -279,30 +275,30 @@ sub report { if ($form->{report} eq "projects") { print qq| - - | . $locale->text('Project') . qq| - - + + | . $locale->text('Project') . qq| + + - | . $locale->text('From') . qq| + | . $locale->text('From') . qq| $button1 $button1_2 - | . $locale->text('Bis') . qq| + | . $locale->text('Bis') . qq| $button2 $button2_2 - + - - - - + + + + $jsscript |; @@ -310,86 +306,86 @@ $jsscript if ($form->{report} eq "income_statement") { print qq| - - - - + + + +
| . $locale->text('Include in Report') . qq| | . $locale->text('Heading') . qq| -  | . $locale->text('Subtotal') . qq|
| . $locale->text('Include in Report') . qq| | . $locale->text('Heading') . qq| +  | . $locale->text('Subtotal') . qq|
| . $locale->text('Project') . qq|$projectnumber
| . $locale->text('Project') . qq|$projectnumber
- - - - - - - + + + + + + + |; print qq| - - - - - - - - + + + + + + + + |; $checked = ""; print qq| - + |; $checked = ""; print qq| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + $jsscript |; @@ -397,87 +393,87 @@ $jsscript if ($form->{report} eq "bwa") { print qq| - - - - + + + +
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
   1. | . $locale->text('Quarter') . qq|
| . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
   1. | . $locale->text('Quarter') . qq| | . $locale->text('January') . qq| | . $locale->text('January') . qq| | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

 | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

| . $locale->text('Free report period') . qq|| . $locale->text('From') . qq|  - $button1 + | . $locale->text('From') . qq|  + $button1 $button1_2  - | . $locale->text('Bis') . qq| + | . $locale->text('Bis') . qq| $button2 $button2_2 

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | . $locale->text('EUR') . qq|

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| +  | . $locale->text('EUR') . qq|
| . $locale->text('Project') . qq|$projectnumber
| . $locale->text('Project') . qq|$projectnumber
- - - - - - - + + + + + + + |; print qq| - - - - - - - + + + + + - + |; $checked = "checked"; print qq| - + |; $checked = ""; print qq| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + @@ -490,40 +486,40 @@ $jsscript if ($form->{report} eq "balance_sheet") { print qq| - - - + + - - + - - - - - + + + + +
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
  + | . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
   1. | . $locale->text('Quarter') . qq| 1. | . $locale->text('Quarter') . qq| | . $locale->text('January') . qq| | . $locale->text('January') . qq| | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

 | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

| . $locale->text('Free report period') . qq|| . $locale->text('From') . qq|  - $button1 + | . $locale->text('From') . qq|  + $button1 $button1_2  - | . $locale->text('Bis') . qq|  - $button2 + | . $locale->text('Bis') . qq|  + $button2 $button2_2

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | . $locale->text('EUR') . qq|

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| +  | . $locale->text('EUR') . qq|
| . $locale->text('Decimalplaces') . qq|
| . $locale->text('as at') . qq| +
| . $locale->text('as at') . qq| $button1 $button1_2 | . $locale->text('Compare to') . qq| + | . $locale->text('Compare to') . qq| $button2 $button2_2
| . $locale->text('Decimalplaces') . qq|
| . $locale->text('Decimalplaces') . qq|
- - - - - - - - - + + + + + + + + + $jsscript |; @@ -531,86 +527,86 @@ $jsscript if ($form->{report} eq "trial_balance") { print qq| - - - - + + + +
| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | . $locale->text('EUR') . qq|
| . $locale->text('Include in Report') . qq| | . $locale->text('Heading') . qq| -  | . $locale->text('Subtotal') . qq| -  | . $locale->text('Account Number') . qq|
| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| +  | . $locale->text('EUR') . qq|
| . $locale->text('Include in Report') . qq| | . $locale->text('Heading') . qq| +  | . $locale->text('Subtotal') . qq| +  | . $locale->text('Account Number') . qq|
| . $locale->text('Project') . qq|$projectnumber
| . $locale->text('Project') . qq|$projectnumber
- - - - - - - + + + + + + + |; print qq| - - - - - - - - + + + + + + + + |; $checked = "checked"; print qq| - + |; $checked = ""; print qq| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + @@ -631,15 +627,15 @@ $jsscript print qq| - - - - - - - - - + + + + + + + + - - - - - + + + + + +
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Customized Report') . qq|
| . $locale->text('Year') . qq|
| . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
   1. | . $locale->text('Quarter') . qq|
| . $locale->text('Yearly') . qq| | . $locale->text('Quarterly') . qq|| . $locale->text('Monthly') . qq|
   1. | . $locale->text('Quarter') . qq| | . $locale->text('January') . qq| | . $locale->text('January') . qq| | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

 | . $locale->text('May') . qq| | . $locale->text('September') . qq|
  2. | . $locale->text('Quarter') . qq| | . $locale->text('February') . qq| | . $locale->text('June') . qq| | . $locale->text('October') . qq|
  3. | . $locale->text('Quarter') . qq| | . $locale->text('March') . qq| | . $locale->text('July') . qq| | . $locale->text('November') . qq|
  4. | . $locale->text('Quarter') . qq|  | . $locale->text('April') . qq| | . $locale->text('August') . qq| | . $locale->text('December') . qq|

| . $locale->text('Free report period') . qq|| . $locale->text('From') . qq|  - $button1 + | . $locale->text('From') . qq|  + $button1 $button1_2  - | . $locale->text('Bis') . qq|  - $button2 + | . $locale->text('Bis') . qq|  + $button2 $button2_2

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | . $locale->text('EUR') . qq|

| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| +  | . $locale->text('EUR') . qq|
| . $locale->text('All Accounts') . qq|
| . $locale->text('From') . qq|{fromdate}>| . $locale->text('Bis') . qq|
| . $locale->text('Report for') . qq| +
| . $locale->text('From') . qq|{fromdate}>| . $locale->text('Bis') . qq|
| . $locale->text('Report for') . qq| |; $checked = "checked"; @@ -659,13 +655,13 @@ $jsscript {db}> -
| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | . $locale->text('EUR') . qq|
| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| +  | . $locale->text('EUR') . qq|
@@ -673,20 +669,20 @@ $jsscript - - + |; } @@ -724,34 +720,34 @@ $jsscript {report}> - - - - - - - - - + + + + + + + + - - - - + |; } @@ -802,25 +798,25 @@ $jsscript : qq|{vc} size=35>|; print qq| - - - - - - + + + + + - + - + - - + + $jsscript |; @@ -845,44 +841,44 @@ $jsscript print qq| - + - + + + - + - + - + - + - + - - - - + + + - - + - + - - + + $jsscript - {db}> - + {db}> + |; } @@ -1112,46 +1108,40 @@ sub generate_income_statement { } sub generate_balance_sheet { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('report'); - $main::auth->assert('report'); + $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2; + $::form->{padding} = "  "; + $::form->{bold} = ""; + $::form->{endbold} = ""; + $::form->{br} = "
"; - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + my $data = RP->balance_sheet(\%::myconfig, $::form); - $form->{decimalplaces} = $form->{decimalplaces} * 1 || 2; - $form->{padding} = "  "; - $form->{bold} = ""; - $form->{endbold} = ""; - $form->{br} = "
"; - - my $data = RP->balance_sheet(\%myconfig, \%$form); + $::form->{asofdate} ||= $::form->current_date; + $::form->{period} = $::locale->date(\%::myconfig, $::form->current_date, 1); - $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate}; - $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1); - - ($form->{department}) = split /--/, $form->{department}; + ($::form->{department}) = split /--/, $::form->{department}; # define Current Earnings account - my $padding = ($form->{l_heading}) ? $form->{padding} : ""; - push(@{ $form->{equity_account} }, $padding . $locale->text('Current Earnings')); + my $padding = $::form->{l_heading} ? $::form->{padding} : ""; + push @{ $::form->{equity_account} }, $padding . $::locale->text('Current Earnings'); - $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0); - $form->{last_period} = $locale->date(\%myconfig, $form->{compareasofdate}, 0); + $::form->{this_period} = $::locale->date(\%::myconfig, $::form->{asofdate}, 0); + $::form->{last_period} = $::locale->date(\%::myconfig, $::form->{compareasofdate}, 0); - $form->{IN} = "balance_sheet.html"; +# $::form->{IN} = "balance_sheet.html"; # setup company variables for the form - map { $form->{$_} = $myconfig{$_}; } (qw(company address businessnumber nativecurr)); + map { $::form->{$_} = $::myconfig{$_} } qw(company address businessnumber nativecurr); - $form->{templates} = $myconfig{templates}; + $::form->{templates} = $::myconfig{templates}; - $form->header(); - print $form->parse_html_template('rp/balance_sheet', $data); -# $form->parse_template(); + $::form->header; + print $::form->parse_html_template('rp/balance_sheet', $data); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub generate_projects { @@ -1666,8 +1656,8 @@ sub aging { 'invnumber' => { 'text' => $locale->text('Invoice'), }, 'transdate' => { 'text' => $locale->text('Date'), }, 'duedate' => { 'text' => $locale->text('Due'), }, - 'amount' => { 'text' => $locale->text('Amount'), }, - 'open' => { 'text' => $locale->text('Open'), }, + 'amount' => { 'text' => $locale->text('Amount'), }, + 'open' => { 'text' => $locale->text('Open'), }, ); my %column_alignment = ('statement' => 'center', @@ -1819,7 +1809,7 @@ sub e_mail { if ($myconfig{role} eq 'admin') { $bcc = qq| - + |; } @@ -1843,16 +1833,16 @@ sub e_mail { @@ -1860,11 +1850,11 @@ sub e_mail { @@ -2070,9 +2060,9 @@ sub print_form { # saving the history if(!exists $form->{addition} && $form->{id} ne "") { $form->{snumbers} = qq|ordnumber_| . $form->{ordnumber}; - $form->{addition} = "PRINTED"; - $form->{what_done} = $form->{type}; - $form->save_history($form->dbconnect(\%myconfig)); + $form->{addition} = "PRINTED"; + $form->{what_done} = $form->{type}; + $form->save_history; } # /saving the history $main::lxdebug->leave_sub(); @@ -2121,19 +2111,19 @@ sub generate_tax_report { my $descvar = "$form->{accno}_description"; my $description = $form->escape($form->{$descvar}); my $ratevar = "$form->{accno}_rate"; - our $taxrate; # most likely error + my ($subtotalnetamount, $subtotaltax, $subtotal) = (0, 0, 0); my $department = $form->escape($form->{department}); # construct href my $href = - "$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}"; + "$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&report=$form->{report}"; # construct callback $description = $form->escape($form->{$descvar}, 1); $department = $form->escape($form->{department}, 1); my $callback = - "$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&$ratevar=$taxrate&report=$form->{report}"; + "$form->{script}?&action=generate_tax_report&fromdate=$form->{fromdate}&todate=$form->{todate}&db=$form->{db}&method=$form->{method}&accno=$form->{accno}&$descvar=$description&department=$department&report=$form->{report}"; my $title = $form->escape($form->{title}); $href .= "&title=$title"; @@ -2144,6 +2134,7 @@ sub generate_tax_report { my @columns = $form->sort_columns(qw(id transdate invnumber name netamount tax amount)); + my @column_index; foreach my $item (@columns) { if ($form->{"l_$item"} eq "Y") { @@ -2223,13 +2214,13 @@ sub generate_tax_report {
| . $locale->text('Include in Report') . qq| - - - - - - - - - - - - + - + + + + + + + + + + +
| . $locale->text('ID') . qq|| . $locale->text('Invoice') . qq|| . $locale->text('Date') . qq|
|; + | . $locale->text('Include in Report') . qq| + + + + + + + + + + + + - - - - - - - - - - -
| . $locale->text('ID') . qq|| . $locale->text('Invoice') . qq|| . $locale->text('Date') . qq|
|; if ($form->{db} eq 'ar') { print $locale->text('Customer'); @@ -697,19 +693,19 @@ $jsscript print qq| | . $locale->text('Amount') . qq|| . $locale->text('Tax') . qq|| . $locale->text('Total') . qq|
| . $locale->text('Subtotal') . qq|
-
| . $locale->text('Amount') . qq|| . $locale->text('Tax') . qq|| . $locale->text('Total') . qq|
| . $locale->text('Subtotal') . qq|
+
| . $locale->text('From') . qq|{fromdate}>| . $locale->text('Bis') . qq|
| . $locale->text('Method') . qq|| +
| . $locale->text('From') . qq|{fromdate}>| . $locale->text('Bis') . qq|
| . $locale->text('Method') . qq|| . $locale->text('Accrual') . qq| -  | +  | . $locale->text('EUR') . qq|
| . $locale->text('Include in Report') . qq| - - - - - - - - - - - - + + + - + + + + + + + + +
| . $locale->text('ID') . qq|| . $locale->text('Invoice') . qq|| . $locale->text('Date') . qq|
|; +
| . $locale->text('Include in Report') . qq| + + + + + + + + + + + + - - - - - - - - -
| . $locale->text('ID') . qq|| . $locale->text('Invoice') . qq|| . $locale->text('Date') . qq|
|; if ($form->{db} eq 'ar') { print $locale->text('Customer'); @@ -762,17 +758,17 @@ $jsscript print qq| | . $locale->text('Amount') . qq|| . $locale->text('Total') . qq|
| . $locale->text('Subtotal') . qq|
-
| . $locale->text('Amount') . qq|| . $locale->text('Total') . qq|
| . $locale->text('Subtotal') . qq|
+
| . $locale->text($label) . qq|$vc
| . $locale->text('From') . qq|  - $button1 +
| . $locale->text($label) . qq|$vc
| . $locale->text('From') . qq|  + $button1 $button1_2  - | . $locale->text('Bis') . qq|  - $button2 + | . $locale->text('Bis') . qq|  + $button2 $button2_2
| . $locale->text('Account') . qq|| . $locale->text('Account') . qq| - -
| . $locale->text('Reference') . qq|| . $locale->text('Reference') . qq|
| . $locale->text('Source') . qq|| . $locale->text('Source') . qq|
| . $locale->text('Memo') . qq|| . $locale->text('Memo') . qq|
| . $locale->text('From') . qq| +
| . $locale->text('From') . qq| $button1 $button1_2 | . $locale->text('Bis') . qq| + | . $locale->text('Bis') . qq| $button2 $button2_2
| . $locale->text('Include Exchangerate Difference') . qq| -
| . $locale->text('Include Exchangerate Difference') . qq| +
| . $locale->text('Bcc') . qq| - - - - - - - - - $bcc - + + + + + + + + + $bcc +
| . $locale->text('E-mail') . qq|| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
| . $locale->text('E-mail') . qq|| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
- - - - - + + + + +
| . $locale->text('Message') . qq|
| . $locale->text('Message') . qq|
- + |; map { print "$column_header{$_}\n" } @column_index; print qq| - + |; # add sort and escape callback @@ -2248,7 +2239,7 @@ sub generate_tax_report { if ($form->{l_subtotal} eq 'Y') { if ($sameitem ne $ref->{ $form->{sort} }) { - &tax_subtotal; + tax_subtotal(\@column_index, \$subtotalnetamount, \$subtotaltax, \$subtotal); $sameitem = $ref->{ $form->{sort} }; } } @@ -2264,6 +2255,7 @@ sub generate_tax_report { $ref->{$_} = $form->format_amount(\%myconfig, $ref->{$_}, 2, " "); } qw(netamount tax amount); + my %column_data; $column_data{id} = qq||; $column_data{invnumber} = qq||; @@ -2276,26 +2268,27 @@ sub generate_tax_report { $i++; $i %= 2; print qq| - + |; map { print "$column_data{$_}\n" } @column_index; print qq| - + |; } if ($form->{l_subtotal} eq 'Y') { - &tax_subtotal; + tax_subtotal(\@column_index, \$subtotalnetamount, \$subtotaltax, \$subtotal); } + my %column_data; map { $column_data{$_} = qq|| } @column_index; print qq| - + |; my $total = $form->format_amount(\%myconfig, $totalnetamount + $totaltax, 2, " "); @@ -2328,27 +2321,30 @@ sub generate_tax_report { sub tax_subtotal { $main::lxdebug->enter_sub(); + my ($column_index, $subtotalnetamount, $subtotaltax, $subtotal) = @_; + my $form = $main::form; my %myconfig = %main::myconfig; my $locale = $main::locale; - map { $column_data{$_} = "" } @column_index; + my %column_data; + map { $column_data{$_} = "" } @{ $column_index }; - $subtotalnetamount = $form->format_amount(\%myconfig, $subtotalnetamount, 2, " "); - $subtotaltax = $form->format_amount(\%myconfig, $subtotaltax, 2, " "); - $subtotal = $form->format_amount(\%myconfig, $subtotalnetamount + $subtotaltax, 2, " "); + $$subtotalnetamount = $form->format_amount(\%myconfig, $$subtotalnetamount, 2, " "); + $$subtotaltax = $form->format_amount(\%myconfig, $$subtotaltax, 2, " "); + $$subtotal = $form->format_amount(\%myconfig, $$subtotalnetamount + $$subtotaltax, 2, " "); - $column_data{netamount} = ""; - $column_data{tax} = ""; - $column_data{amount} = ""; + $column_data{netamount} = ""; + $column_data{tax} = ""; + $column_data{amount} = ""; - $subtotalnetamount = 0; - $subtotaltax = 0; + $$subtotalnetamount = 0; + $$subtotaltax = 0; print qq| - + |; - map { print "\n$column_data{$_}" } @column_index; + map { print "\n$column_data{$_}" } @{ $column_index }; print qq| @@ -2516,21 +2512,18 @@ sub print_options { my ($media); my $type = qq| -
$ref->{id}{id}&callback=$callback>$ref->{invnumber}
 
  $subtotalnetamount$subtotaltax$subtotal$$subtotalnetamount$$subtotaltax$$subtotal