From c1ccbe59533c208e0769ccd58478db58c34f1aaf Mon Sep 17 00:00:00 2001 From: tetragon Date: Tue, 18 Sep 2007 01:43:40 +0000 Subject: More quoting fixes related to 1795858 git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1630 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/aa.pl | 418 ++++++++++++++++++++++++++++----------------------------- bin/arap.pl | 124 ++++++++--------- bin/arapprn.pl | 40 +++--- 3 files changed, 291 insertions(+), 291 deletions(-) diff --git a/bin/aa.pl b/bin/aa.pl index 5a6f571b..d3a9dca5 100755 --- a/bin/aa.pl +++ b/bin/aa.pl @@ -406,12 +406,12 @@ sub form_header { $exchangerate = qq||; $exchangerate .= qq| - | . $locale->text('Currency') . qq| - | + | . $locale->text('Currency') . qq| + | if $form->{defaultcurrency}; $exchangerate .= qq| - - {defaultcurrency}> + + |; if ( $form->{defaultcurrency} @@ -419,19 +419,19 @@ sub form_header { { if ( $form->{forex} ) { $exchangerate .= qq| - | . $locale->text('Exchange Rate') . qq| - {exchangerate}>$form->{exchangerate} + | . $locale->text('Exchange Rate') . qq| + $form->{exchangerate} |; } else { $exchangerate .= qq| - | . $locale->text('Exchange Rate') . qq| - {exchangerate}> + | . $locale->text('Exchange Rate') . qq| + |; } } $exchangerate .= qq| -{forex}> + |; @@ -439,8 +439,8 @@ sub form_header { if ( $form->{taxaccounts} ) { $taxincluded = qq| - {taxincluded}> - | . $locale->text('Tax Included') . qq| + {taxincluded}> + | . $locale->text('Tax Included') . qq| |; } @@ -449,13 +449,13 @@ sub form_header { $rows = 2; } $notes = -qq||; +qq||; $department = qq| | . $locale->text('Department') . qq| - - + @@ -466,10 +466,10 @@ qq||; $name = ( $form->{"select$form->{vc}"} ) ? qq|| - : qq||; + : qq||; $employee = qq| - + |; if ( $form->{selectemployee} ) { @@ -480,9 +480,9 @@ qq||; $employee = qq| - $label - - $label + + |; @@ -495,10 +495,10 @@ qq||; print qq| -
{script}> + - - + + |; @@ -523,31 +523,31 @@ qq||; print qq| - - - +
$form->{title}
+ + - +
$form->{title}
- - +
+ - - + + - - + + |; } @@ -1191,16 +1191,16 @@ qq| - - + + |; $l_employee = -qq| $employeelabel|; +qq| $employeelabel|; $l_manager = - qq| | + qq| | . $locale->text('Manager'); } @@ -1211,37 +1211,37 @@ qq| $employeelabel $invnumber = qq| - - + + - - + + - - + + - - + + - - + + - - + + |; $openclosed = qq| - - @@ -1249,10 +1249,10 @@ qq| $employeelabel $summary = qq| - - @@ -1284,17 +1284,17 @@ qq| $employeelabel $selectfrom = qq| - - + @@ -1303,65 +1303,65 @@ qq| $employeelabel $name = $locale->text('Customer'); $l_name = -qq| $name|; +qq| $name|; $l_till = - qq| | + qq| | . $locale->text('Till'); if ( $form->{vc} eq 'vendor' ) { $name = $locale->text('Vendor'); $l_till = ""; $l_name = -qq| $name|; +qq| $name|; } @a = (); push @a, - qq| | + qq| | . $locale->text('No.'); - push @a, qq| | + push @a, qq| | . $locale->text('ID'); push @a, -qq| | +qq| | . $locale->text('Invoice Number'); push @a, - qq| | + qq| | . $locale->text('Order Number'); - push @a, qq| | + push @a, qq| | . $locale->text('PO Number'); push @a, -qq| | +qq| | . $locale->text('Invoice Date'); push @a, $l_name; push @a, $l_employee if $l_employee; push @a, $l_manager if $l_employee; push @a, $l_department if $l_department; push @a, - qq| | + qq| | . $locale->text('Amount'); - push @a, qq| | + push @a, qq| | . $locale->text('Tax'); push @a, - qq| | + qq| | . $locale->text('Total'); - push @a, qq| | + push @a, qq| | . $locale->text('Currency'); - push @a, qq| | + push @a, qq| | . $locale->text('Date Paid'); push @a, - qq| | + qq| | . $locale->text('Paid'); - push @a, qq| | + push @a, qq| | . $locale->text('Due Date'); - push @a, qq| | + push @a, qq| | . $locale->text('Amount Due'); - push @a, qq| | + push @a, qq| | . $locale->text('Notes'); push @a, $l_till if $l_till; push @a, - qq| | + qq| | . $locale->text('Shipping Point'); - push @a, qq| | + push @a, qq| | . $locale->text('Ship via'); $form->header; @@ -1369,34 +1369,34 @@ qq| | print qq| -{script}> + -
- - $name + {vc}"}, 1 ) . qq|"> - - + | if $form->{selectprojectnumber}; if ( ( $rows = $form->numtextrows( $form->{"description_$i"}, 40 ) ) > 1 ) { $description = -qq||; +qq||; } else { $description = -qq||; +qq||; } print qq| - + $description @@ -660,8 +660,8 @@ qq| - + + |; @@ -680,26 +680,26 @@ qq| + - + - + - +
$label$name
- + - @@ -589,7 +589,7 @@ qq||;
+ - + - + @@ -560,28 +560,28 @@ qq||; $taxincluded
| . $locale->text('Credit Limit') . qq|| . $locale->text('Credit Limit') . qq| $form->{creditlimit}| . $locale->text('Remaining') . qq|| . $locale->text('Remaining') . qq| | . $form->format_amount( \%myconfig, $form->{creditremaining}, 0, "0" ) . qq|
+ $employee - - + + - - + + - - + + - - + + - - + +
| . $locale->text('Invoice Number') . qq|| . $locale->text('Invoice Number') . qq|
| . $locale->text('Order Number') . qq|| . $locale->text('Order Number') . qq|
| . $locale->text('Invoice Date') . qq|| . $locale->text('Invoice Date') . qq|
| . $locale->text('Due Date') . qq|{duedate}>| . $locale->text('Due Date') . qq|
| . $locale->text('PO Number') . qq|| . $locale->text('PO Number') . qq|
@@ -625,23 +625,23 @@ s/option>\Q$form->{"$form->{ARAP}_amount_$i"}\E/option selected>$form->{"$form-> $form->format_amount( \%myconfig, $form->{"amount_$i"}, 2 ); $project = qq| -
- {"tax_$item"}>{"calctax_$item"}>{"calctax_$item"}>
- $form->{invtotal}$form->{invtotal}
| . $locale->text('Notes') . qq|| . $locale->text('Notes') . qq| $notes$notes
| . $locale->text('Payments') . qq|
| . $locale->text('Payments') . qq|
- +
|; if ( $form->{currency} eq $form->{defaultcurrency} ) { @@ -754,23 +754,23 @@ s/option>\Q$form->{"$form->{ARAP}_paid_$i"}\E/option selected>$form->{"$form->{A } else { $exchangerate = -qq|{"exchangerate_$i"}>|; +qq|{"exchangerate_$i"}>|; } } $form->hide_form("forex_$i"); $column_data{paid} = -qq||; +qq||; $column_data{ARAP_paid} = -qq||; - $column_data{exchangerate} = qq||; +qq||; + $column_data{exchangerate} = qq||; $column_data{datepaid} = -qq||; +qq||; $column_data{source} = -qq||; +qq||; $column_data{memo} = -qq||; +qq||; for (@column_index) { print qq|$column_data{$_}\n| } @@ -786,7 +786,7 @@ qq| - +
{"paid_$i"}>$exchangerate$exchangerate{"datepaid_$i"}>


|; @@ -1093,14 +1093,14 @@ sub delete { print qq| -{script}> + |; $form->{action} = "yes"; $form->hide_form; print qq| -

$form->{title}

+

$form->{title}

| . $locale->text('Are you sure you want to delete Transaction') @@ -1153,7 +1153,7 @@ sub search { qq||; } else { - $selectname = qq|{vc} size=35>|; + $selectname = qq||; } # departments @@ -1166,13 +1166,13 @@ qq|

| . $locale->text('Department') . qq|| . $locale->text('Department') . qq|
$employeelabel$employeelabel
| . $locale->text('Invoice Number') . qq|| . $locale->text('Invoice Number') . qq|
| . $locale->text('Order Number') . qq|| . $locale->text('Order Number') . qq|
| . $locale->text('PO Number') . qq|| . $locale->text('PO Number') . qq|
| . $locale->text('Source') . qq|| . $locale->text('Source') . qq|
| . $locale->text('Description') . qq|| . $locale->text('Description') . qq|
| . $locale->text('Notes') . qq|| . $locale->text('Notes') . qq|
| + | . $locale->text('Open') . qq| | + | . $locale->text('Closed') . qq|
| + | . $locale->text('Summary') . qq| | + | . $locale->text('Detail') . qq|
| . $locale->text('Period') . qq| - - -  | + | . $locale->text('Period') . qq| + + +  | . $locale->text('Current') . qq| -  | +  | . $locale->text('Month') . qq| -  | +  | . $locale->text('Quarter') . qq| -  | +  | . $locale->text('Year') . qq|
- +
$form->{title}
+
$form->{title}
- - + + - - + + $employee $department $invnumber - - + + - - - - + + + + $selectfrom
| . $locale->text('Account') . qq|| . $locale->text('Account') . qq|
$name$selectname$name$selectname
| . $locale->text('Ship via') . qq|| . $locale->text('Ship via') . qq|
| . $locale->text('From') . qq|| . $locale->text('To') . qq|| . $locale->text('From') . qq|| . $locale->text('To') . qq|
@@ -1406,9 +1406,9 @@ qq| |
- + |; + $column_header{runningnumber} = qq||; $column_header{id} = - ""; $column_header{transdate} = - ""; $column_header{duedate} = - ""; $column_header{invnumber} = - ""; $column_header{ordnumber} = - ""; $column_header{ponumber} = - ""; $column_header{name} = - ""; + qq||; $column_header{netamount} = - ""; + '"; $column_header{tax} = - ""; + '"; $column_header{amount} = - ""; + '"; $column_header{paid} = - ""; + '"; $column_header{datepaid} = - ""; $column_header{due} = - ""; + '"; $column_header{notes} = - ""; + '"; $column_header{employee} = - ""; + qq||; $column_header{manager} = - ""; $column_header{till} = - ""; $column_header{shippingpoint} = - ""; $column_header{shipvia} = - ""; $column_header{curr} = - ""; for (qw(amount tax netamount paid due)) { @@ -1715,28 +1715,28 @@ sub transactions { } $column_header{department} = - ""; $column_header{accno} = - ""; $column_header{source} = - ""; $column_header{debit} = - ""; + '"; $column_header{credit} = - ""; + '"; $column_header{projectnumber} = - ""; $column_header{description} = - ""; @@ -1748,9 +1748,9 @@ sub transactions { print qq| -
| . $locale->text('Include in Report') . qq|| . $locale->text('Include in Report') . qq| - +
$openclosed $summary |; @@ -1426,7 +1426,7 @@ qq| | print qq| - @@ -1437,7 +1437,7 @@ qq| | - +
| + | . $locale->text('Subtotal') . qq|


@@ -1645,69 +1645,69 @@ sub transactions { ? $locale->text('Customer') : $locale->text('Vendor'); - $column_header{runningnumber} = qq|
  " + qq|| . $locale->text('ID') . "" + qq|| . $locale->text('Date') . "" + qq|| . $locale->text('Due Date') . "" + qq|| . $locale->text('Invoice') . "" + qq|| . $locale->text('Order') . "" + qq|| . $locale->text('PO Number') . "$name$name" . $locale->text('Amount') . "' . $locale->text('Amount') . "" . $locale->text('Tax') . "' . $locale->text('Tax') . "" . $locale->text('Total') . "' . $locale->text('Total') . "" . $locale->text('Paid') . "' . $locale->text('Paid') . "" + qq|| . $locale->text('Date Paid') . "" . $locale->text('Amount Due') . "' . $locale->text('Amount Due') . "" . $locale->text('Notes') . "' . $locale->text('Notes') . "$employee$employee" + qq|| . $locale->text('Manager') . "" + qq|| . $locale->text('Till') . "" + qq|| . $locale->text('Shipping Point') . "" + qq|| . $locale->text('Ship via') . "" + qq|| . $locale->text('Curr') . "" + qq|| . $locale->text('Department') . "" + qq|| . $locale->text('Account') . "" + qq|| . $locale->text('Source') . "" . $locale->text('Debit') . "' . $locale->text('Debit') . "" . $locale->text('Credit') . "' . $locale->text('Credit') . "" + qq|| . $locale->text('Project') . "" + qq|| . $locale->text('Description') . "
+
- + @@ -1758,8 +1758,8 @@ sub transactions { " } - $column_data{tax} = ""; $column_data{amount} = - ""; $column_data{paid} = - ""; - $column_data{due} = ""; $column_data{debit} = - ""; $column_data{credit} = - ""; if ( $form->{l_curr} && $form->{sort} eq 'curr' && $form->{l_subtotal} ) { - $column_data{fx_tax} = ""; $column_data{fx_amount} = - ""; $column_data{fx_paid} = - ""; - $column_data{fx_due} = ""; + print ''; for (@column_index) { print "\n$column_data{$_}" } diff --git a/bin/arap.pl b/bin/arap.pl index bce15aae..7ad58466 100755 --- a/bin/arap.pl +++ b/bin/arap.pl @@ -153,9 +153,9 @@ sub select_name { $label = ucfirst $table; $column_data{ndx} = qq||; $column_data{name} = - qq||; + qq||; $column_data{address} = - qq||; @@ -167,17 +167,17 @@ sub select_name { print qq| -{script}> + -
$form->{title}$form->{title}
- - +
+ |; for (@column_index) { print "\n$column_header{$_}" } @@ -1802,18 +1802,18 @@ sub transactions { } for (qw(netamount amount paid)) { - $column_data{"fx_$_"} = ""; } - $column_data{fx_tax} = ""; - $column_data{fx_due} = ""; + $column_data{runningnumber} = qq||; for (qw(netamount amount paid debit credit)) { $column_data{$_} = - ""; } - $column_data{tax} = ""; - $column_data{due} = ""; @@ -1867,7 +1867,7 @@ sub transactions { $module = ( $ref->{till} ) ? "ps.pl" : $module; $column_data{invnumber} = -""; +qq||; for (qw(notes description)) { $ref->{$_} =~ s/\r?\n/
/g } for ( @@ -1879,19 +1879,19 @@ sub transactions { for (qw(id curr)) { $column_data{$_} = "" } $column_data{accno} = -qq||; +qq||; $column_data{name} = -qq||; +qq||; if ( $ref->{id} != $sameid ) { $j++; $j %= 2; } - print " - -"; + print qq| + +|; for (@column_index) { print "\n$column_data{$_}" } @@ -1910,56 +1910,56 @@ qq| + |; for (@column_index) { $column_data{$_} = "" } $column_data{netamount} = - ""; - $column_data{tax} = ""; $column_data{amount} = - ""; $column_data{paid} = - ""; $column_data{due} = - ""; $column_data{debit} = - ""; $column_data{credit} = - ""; if ( $form->{l_curr} && $form->{sort} eq 'curr' && $form->{l_subtotal} ) { $column_data{fx_netamount} = - ""; - $column_data{fx_tax} = ""; $column_data{fx_amount} = - ""; $column_data{fx_paid} = - ""; - $column_data{fx_due} = ""; @@ -2005,12 +2005,12 @@ qq| - +
" + $column_data{"fx_$_"} = '' . $form->format_amount( \%myconfig, $ref->{"fx_$_"}, 2, " " ) . "" + $column_data{fx_tax} = '' . $form->format_amount( \%myconfig, $ref->{fx_amount} - $ref->{fx_netamount}, 2, " " ) . "" + $column_data{fx_due} = '' . $form->format_amount( \%myconfig, $ref->{fx_amount} - $ref->{fx_paid}, 2, " " ) @@ -1829,21 +1829,21 @@ sub transactions { } - $column_data{runningnumber} = "$i$i" + '' . $form->format_amount( \%myconfig, $ref->{$_}, 2, " " ) . "" + $column_data{tax} = '' . $form->format_amount( \%myconfig, $ref->{amount} - $ref->{netamount}, 2, " " ) . "" + $column_data{due} = '' . $form->format_amount( \%myconfig, $ref->{amount} - $ref->{paid}, 2, " " ) . "{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{invnumber} $ref->{invnumber} $ref->{$_}{path}&login=$form->{login}&sessionid=$form->{sessionid}&action=list_transactions&accounttype=standard&accno=$ref->{accno}&fromdate=$form->{transdatefrom}&todate=$form->{transdateto}&sort=transdate&l_subtotal=$form->{l_subtotal}&prevreport=$callback>$ref->{accno}$ref->{accno}{path}&login=$form->{login}&sessionid=$form->{sessionid}&action=edit&id=$ref->{"$form->{vc}_id"}&db=$form->{vc}&callback=$callback>$ref->{name}{vc}_id"}&db=$form->{vc}&callback=$callback">$ref->{name}
{path}&login=$form->{login}&sessionid=$form->{s # print totals print qq| -
 " + '' . $form->format_amount( \%myconfig, $totalnetamount, 2, " " ) . "" + $column_data{tax} = '' . $form->format_amount( \%myconfig, $totalamount - $totalnetamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalpaid, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalamount - $totalpaid, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totaldebit, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalcredit, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalfxnetamount, 2, " " ) . "" + $column_data{fx_tax} = '' . $form->format_amount( \%myconfig, $totalfxamount - $totalfxnetamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalfxamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $totalfxpaid, 2, " " ) . "" + $column_data{fx_due} = '' . $form->format_amount( \%myconfig, $totalfxamount - $totalfxpaid, 2, " " ) . "



-{script}> + |; $form->hide_form( @@ -2042,46 +2042,46 @@ sub subtotal { for (@column_index) { $column_data{$_} = "
 " + $column_data{tax} = '' . $form->format_amount( \%myconfig, $subtotalamount - $subtotalnetamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotalamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotalpaid, 2, " " ) . "" + $column_data{due} = '' . $form->format_amount( \%myconfig, $subtotalamount - $subtotalpaid, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotaldebit, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotalcredit, 2, " " ) . "" + $column_data{fx_tax} = '' . $form->format_amount( \%myconfig, $subtotalfxamount - $subtotalfxnetamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotalfxamount, 2, " " ) . "" + '' . $form->format_amount( \%myconfig, $subtotalfxpaid, 2, " " ) . "" + $column_data{fx_due} = '' . $form->format_amount( \%myconfig, $subtotalfxmount - $subtotalfxpaid, 2, " " ) @@ -2098,7 +2098,7 @@ sub subtotal { $subtotalfxamount = 0; $subtotalfxpaid = 0; - print "
 | . $locale->text($label) . qq|| . $locale->text($label) . qq|| + qq|| . $locale->text('Address') . qq|
+
- + - +
$title$title
- - |; +
+ |; for (@column_index) { print "\n$column_data{$_}" } @@ -194,9 +194,9 @@ sub select_name { $ref->{name} = $form->quote( $ref->{name} ); $column_data{ndx} = -qq||; +qq||; $column_data{name} = -qq||; +qq||; $column_data{address} = qq||; for (qw(city state zipcode country)) { $column_data{$_} = qq||; @@ -205,14 +205,14 @@ qq||; for (@column_index) { print "\n$column_data{$_}" } print qq| -{id}> + |; @@ -223,11 +223,11 @@ qq| - +
$ref->{name}$ref->{name}$ref->{address1} $ref->{address2}$ref->{$_} $ref->{name}|; +
$ref->{name}


- + |; @@ -239,8 +239,8 @@ qq|
$ref->{name}hide_form; print qq| - - + +