-
-
-
-$jsscript
+
+
+
+ |
+ . $locale->text('Account') . qq| |
+ |
+ . $locale->text('Amount') . qq| |
+ |
+ . $locale->text('Tax') . qq| |
+ |
+ . $locale->text('Korrektur') . qq| |
+ |
+ . $locale->text('Taxkey') . qq| |
+ |
+ . $locale->text('Project') . qq| |
+
|;
$amount = $locale->text('Amount');
$project = $locale->text('Project');
- for $i (1 .. 1) {
-
- # $form->{"selectAP_amount"} =~ s/ selected//;
- # $form->{"selectAP_amount"} =~ s/option>\Q$form->{"AP_amount_$i"}\E/option selected>$form->{"AP_amount_$i"}/;
+ for $i (1 .. $form->{rowcount}) {
# format amounts
$form->{"amount_$i"} =
$form->format_amount(\%myconfig, $form->{"amount_$i"}, 2);
+ $form->{"tax_$i"} = $form->format_amount(\%myconfig, $form->{"tax_$i"}, 2);
+ $selectAP_amount = $selectAP_amount_unquoted;
+ $re_amount = quotemeta($form->{"AP_amount_$i"});
+ $selectAP_amount =~
+ s/option value=\"${re_amount}\"/option value=\"$form->{"AP_amount_$i"}\" selected/;
+ $tax = $taxchart;
+ $tax_selected = $form->{"taxchart_$i"};
+ $tax =~ s/value=\"$tax_selected\"/value=\"$tax_selected\" selected/;
+ $tax =
+ qq| | |;
+
+ my $korrektur = $form->{"korrektur_$i"} ? 'checked' : '';
print qq|
- $amount |
- {"amount_$i"} $readonly> |
- $project |
+ |
+ {"amount_$i"}> |
+ {"tax_$i"}> |
+ |
+ $tax
{"project_id_$i"}>
|
- |
|;
$amount = "";
@@ -539,39 +571,37 @@ $jsscript
? $locale->text('Tax Included')
: $locale->text('Tax');
- # format and reverse tax
- $form->{"tax"} = $form->format_amount(\%myconfig, $form->{"tax"}, 2);
+ $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
print qq|
- ${taxlabel} |
- {"tax"} $readonly> |
- |
- | . $locale->text('Correct Tax') . qq| |
- |
+
+
+ |
-|;
-
- $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
-
- print qq|
- | . $locale->text('Total') . qq| |
- $form->{invtotal} |
+ |
+
+ $form->{invtotal} |
{oldinvtotal}>
{oldtotalpaid}>
-
+
-
- |
- |
-
-
-
-
- | . $locale->text('Notes') . qq| |
- $notes |
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ | . $locale->text('Notes') . qq| |
+ $notes |
|
@@ -616,8 +646,10 @@ $jsscript
s/option value=\"$form->{"AP_paid_$i"}\">/option value=\"$form->{"AP_paid_$i"}\" selected>/;
# format amounts
- $form->{"paid_$i"} =
+ if ($form->{"paid_$i"}) {
+ $form->{"paid_$i"} =
$form->format_amount(\%myconfig, $form->{"paid_$i"}, 2);
+ }
$form->{"exchangerate_$i"} =
$form->format_amount(\%myconfig, $form->{"exchangerate_$i"});
@@ -658,7 +690,7 @@ $jsscript
print qq|
{paidaccounts}>
-
+
|
@@ -688,29 +720,24 @@ sub form_footer {
$transdate = $form->datetonum($form->{transdate}, \%myconfig);
$closedto = $form->datetonum($form->{closedto}, \%myconfig);
- if ($form->{id} && $form->{radier}) {
+ if ($form->{id}) {
# print qq|