Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7f07cad5

Von Thomas Heck vor mehr als 11 Jahren hinzugefügt

  • ID 7f07cad54a09532a7df252cf55479ab7195c034f
  • Vorgänger 55c51cd5
  • Nachfolger 42646def

Datenbank-Helper(*_as_number) verwenden

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
533 533

  
534 534
  my $curr_employee = SL::DB::Manager::Employee->current;
535 535

  
536
  foreach ( 'cv.creditlimit', 'cv.discount' ) {
537
    my ($namespace, $varname) = split('.', $_, 2);
538
    $::form->{$namespace}->{$varname} = $::form->parse_amount(\%::myconfig, $::form->{$namespace}->{$varname});
539
  }
540
  $::form->{cv}->{discount} /= 100;
541

  
542 536
  if ( $::form->{cv}->{id} ) {
543 537
    if ( $self->is_vendor() ) {
544 538
      $self->{cv} = SL::DB::Vendor->new(id => $::form->{cv}->{id})->load();
......
765 759

  
766 760
  $self->{template_args} = {};
767 761

  
768
  $self->{cv}->discount($self->{cv}->discount * 100);
769

  
770

  
771 762
  $::request->{layout}->add_javascripts('autocomplete_customer.js');
772 763
}
773 764

  
templates/webpages/customer_vendor/form.html
206 206
          <th align="right">[% 'Credit Limit' | $T8 %]</th>
207 207

  
208 208
          <td>
209
            [% L.input_tag('cv.creditlimit', LxERP.format_amount(SELF.cv.creditlimit, 0), size = 9) %]
209
            [% L.input_tag('cv.creditlimit_as_number', SELF.cv.creditlimit_as_number, size = 9) %]
210 210
          </td>
211 211

  
212 212

  
......
220 220
          <th align="right">[% 'Discount' | $T8 %]</th>
221 221

  
222 222
          <td>
223
            [% L.input_tag('cv.discount', SELF.cv.discount, size = 4) %]
223
            [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]
224 224
          </td>
225 225
        </tr>
226 226

  

Auch abrufbar als: Unified diff