Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d2d78032

Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt

  • ID d2d780320b8430a099ebfe013dc81ba9c2b70253
  • Vorgänger df6b50af
  • Nachfolger b1e1ad26

Auftrags-Controller: totalen Ertrag unten anzeigen

Unterschiede anzeigen:

SL/Controller/Order.pm
967 967
    $self->js->show('#subtotal_row_id');
968 968
  }
969 969

  
970
  if ($self->order->is_sales) {
971
    my $is_neg = $self->order->marge_total < 0;
972
    $self->js
973
      ->html('#marge_total_id',   $::form->format_amount(\%::myconfig, $self->order->marge_total,   2))
974
      ->html('#marge_percent_id', $::form->format_amount(\%::myconfig, $self->order->marge_percent, 2))
975
      ->action_if( $is_neg, 'addClass',    '#marge_total_id',        'plus0')
976
      ->action_if( $is_neg, 'addClass',    '#marge_percent_id',      'plus0')
977
      ->action_if( $is_neg, 'addClass',    '#marge_percent_sign_id', 'plus0')
978
      ->action_if(!$is_neg, 'removeClass', '#marge_total_id',        'plus0')
979
      ->action_if(!$is_neg, 'removeClass', '#marge_percent_id',      'plus0')
980
      ->action_if(!$is_neg, 'removeClass', '#marge_percent_sign_id', 'plus0');
981
  }
982

  
970 983
  $self->js
971 984
    ->html('#netamount_id', $::form->format_amount(\%::myconfig, $self->order->netamount, -2))
972 985
    ->html('#amount_id',    $::form->format_amount(\%::myconfig, $self->order->amount,    -2))

Auch abrufbar als: Unified diff