? $locale->text('Tax Included')
: $locale->text('Tax');
+ $form->{invtotal_unformatted} = $form->{invtotal};
$form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
$APselected =
</tr>
";
- my @triggers = ();
+ my @triggers = ();
+ my $totalpaid = 0;
+
$form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
for $i (1 .. $form->{paidaccounts}) {
print "
'-labels' => \%AP_paid_labels,
'-default' => $form->{"AP_paid_$i"}));
+ $totalpaid += $form->{"paid_$i"};
+
# format amounts
if ($form->{"paid_$i"}) {
$form->{"paid_$i"} =
";
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
}
- print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
+
+ my $paid_missing = $form->{invtotal_unformatted} - $totalpaid;
+
+ print qq|
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Total') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Missing amount') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq|</td>
+ </tr>
+| . $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
qq|
<input type=hidden name=paidaccounts value=$form->{paidaccounts}>
$project = "";
}
+ $form->{invtotal_unformatted} = $form->{invtotal};
$form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2);
$ARselected =
</tr>
";
- my @triggers = ();
+ my @triggers = ();
+ my $totalpaid = 0;
+
$form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
for $i (1 .. $form->{paidaccounts}) {
print "
'-labels' => \%AR_paid_labels,
'-default' => $form->{"AR_paid_$i"}));
+ $totalpaid += $form->{"paid_$i"};
+
# format amounts
if ($form->{"paid_$i"}) {
$form->{"paid_$i"} =
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
}
- print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
+ my $paid_missing = $form->{invtotal_unformatted} - $totalpaid;
+
+ print qq|
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Total') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Missing amount') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq|</td>
+ </tr>
+| . $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
qq|
<input type=hidden name=paidaccounts value=$form->{paidaccounts}>
</tr>
|;
- my @triggers = ();
+ my @triggers = ();
+ my $totalpaid = 0;
+
$form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
for $i (1 .. $form->{paidaccounts}) {
$form->{"selectAP_paid_$i"} =~
s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/;
+ $totalpaid += $form->{"paid_$i"};
+
# format amounts
if ($form->{"paid_$i"}) {
$form->{"paid_$i"} =
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
}
+ my $paid_missing = $form->{oldinvtotal} - $totalpaid;
+
print qq|
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Total') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Missing amount') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq|</td>
+ </tr>
+
<input type=hidden name=oldinvtotal value=$form->{oldinvtotal}>
<input type=hidden name=paidaccounts value=$form->{paidaccounts}>
<input type=hidden name=selectAP_paid value="$form->{selectAP_paid}">
</tr>
";
- my @triggers = ();
+ my @triggers = ();
+ my $totalpaid = 0;
$form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
for $i (1 .. $form->{paidaccounts}) {
push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
}
+ my $paid_missing = $form->{oldinvtotal} - $totalpaid;
+
+ print qq|
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Total') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $totalpaid, 2)) . qq|</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td align="center">| . $locale->text('Missing amount') . qq|</td>
+ <td align="center">| . H($form->format_amount(\%myconfig, $paid_missing, 2)) . qq|</td>
+ </tr>
+|;
+
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal));
print qq|<input type="hidden" name="oldtotalpaid" value="$totalpaid">
</table>
'Missing Method!' => 'Fehlender Voranmeldungszeitraum',
'Missing Preferences: Outputroutine disabled' => 'Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!',
'Missing Tax Authoritys Preferences' => 'Fehlende Angaben zum Finanzamt!',
+ 'Missing amount' => 'Fehlbetrag',
'Mitarbeiter' => 'Mitarbeiter',
'Mobile1' => 'Mobile 1',
'Mobile2' => 'Mobile 2',
'Memo' => 'Memo',
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
+ 'Missing amount' => 'Fehlbetrag',
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
'Name' => 'Name',
'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
'Memo' => 'Memo',
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
+ 'Missing amount' => 'Fehlbetrag',
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
'Name' => 'Name',
'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
'Memo' => 'Memo',
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
+ 'Missing amount' => 'Fehlbetrag',
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
'Name' => 'Name',
'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
'Memo' => 'Memo',
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
+ 'Missing amount' => 'Fehlbetrag',
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
'Name' => 'Name',
'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',