$lxdebug->leave_sub();
}
+sub format_debit_credit {
+ $lxdebug->enter_sub();
+
+ my $dc = shift;
+
+ my $formatted_dc = $form->format_amount(\%myconfig, abs($dc), 2) . ' ';
+ $formatted_dc .= ($dc > 0) ? $locale->text('Credit (one letter abbreviation)') : $locale->text('Debit (one letter abbreviation)');
+
+ $lxdebug->leave_sub();
+
+ return $formatted_dc;
+}
+
+
sub list_transactions {
$lxdebug->enter_sub();
CA->all_transactions(\%myconfig, \%$form);
- my $saldo_old = ($form->{saldo_old} > 0) ? $form->format_amount(\%myconfig, $form->{saldo_old}, 2) . " H" : $form->format_amount(\%myconfig, abs($form->{saldo_old}) , 2) . " S";
-
- my $eb_string = ($form->{beginning_balance} > 0) ? $form->format_amount(\%myconfig, $form->{beginning_balance}, 2) . " H" : $form->format_amount(\%myconfig, abs($form->{beginning_balance}), 2) . " S";
+ my $saldo_old = format_debit_credit($form->{saldo_old});
+ my $eb_string = format_debit_credit($form->{beginning_balance});
my @options;
if ($form->{department}) {
};
$report->add_data($row);
- my $saldo_new = ($form->{saldo_new} > 0) ? $form->format_amount(\%myconfig, $form->{saldo_new}, 2) . " H" : $form->format_amount(\%myconfig, abs($form->{saldo_new}) , 2) . " S";
+ my $saldo_new = format_debit_credit($form->{saldo_new});
my $row = {
'transdate' => {
'data' => "",
'Created for' => 'Erstellt für',
'Created on' => 'Erstellt am',
'Credit' => 'Haben',
+ 'Credit (one letter abbreviation)' => 'H',
'Credit Account' => 'Habenkonto',
'Credit Limit' => 'Kreditlimit',
'Credit Limit exceeded!!!' => 'Kreditlimit überschritten!',
'Datevautomatik' => 'Datevexport',
'Datum von' => 'Datum von',
'Debit' => 'Soll',
+ 'Debit (one letter abbreviation)' => 'S',
'Debit Account' => 'Sollkonto',
'Debit Starting Balance' => 'EB Passiva',
'Debit Tax' => 'Vorsteuer',
'Create and edit sales quotations' => 'Angebote erfassen und bearbeiten',
'Create and edit vendor invoices' => 'Eingangsrechnungen erfassen und bearbeiten',
'Credit' => 'Haben',
+ 'Credit (one letter abbreviation)' => 'H',
'Credit Note' => 'Gutschrift',
'Customized Report' => 'Vorgewählte Zeiträume',
'DATEV Export' => 'DATEV-Export',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Debit' => 'Soll',
+ 'Debit (one letter abbreviation)' => 'S',
'Dec' => 'Dez',
'December' => 'Dezember',
'Decimalplaces' => 'Dezimalstellen',
$self->{subs} = {
'chart_of_accounts' => 'chart_of_accounts',
'create_subtotal_row' => 'create_subtotal_row',
+ 'format_debit_credit' => 'format_debit_credit',
'list' => 'list',
'list_transactions' => 'list_transactions',
'report_generator_back' => 'report_generator_back',