Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8e9ede8f

Von Moritz Bunkus vor fast 16 Jahren hinzugefügt

  • ID 8e9ede8f7ca6895f8d68d0637b9ba0a84d6515bf
  • Vorgänger cbe7da96
  • Nachfolger ea43d77b

Zahlenformatierung mit H/S in eigene Funktion gesteckt.

Unterschiede anzeigen:

bin/mozilla/ca.pl
368 368
  $lxdebug->leave_sub();
369 369
}
370 370

  
371
sub format_debit_credit {
372
  $lxdebug->enter_sub();
373

  
374
  my $dc = shift;
375

  
376
  my $formatted_dc  = $form->format_amount(\%myconfig, abs($dc), 2) . ' ';
377
  $formatted_dc    .= ($dc > 0) ? $locale->text('Credit (one letter abbreviation)') : $locale->text('Debit (one letter abbreviation)');
378

  
379
  $lxdebug->leave_sub();
380

  
381
  return $formatted_dc;
382
}
383

  
384

  
371 385
sub list_transactions {
372 386
  $lxdebug->enter_sub();
373 387

  
......
479 493
  CA->all_transactions(\%myconfig, \%$form);
480 494

  
481 495

  
482
  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";
483

  
484
  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";
496
  my $saldo_old = format_debit_credit($form->{saldo_old});
497
  my $eb_string = format_debit_credit($form->{beginning_balance});
485 498

  
486 499
  my @options;
487 500
  if ($form->{department}) {
......
696 709
  };
697 710

  
698 711
  $report->add_data($row);
699
  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";
712
  my $saldo_new = format_debit_credit($form->{saldo_new});
700 713
  my $row = {
701 714
     'transdate' => {
702 715
       'data'    => "",

Auch abrufbar als: Unified diff