Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2d1975a8

Von Jan Büren vor etwa 2 Jahren hinzugefügt

  • ID 2d1975a88e4c6aa2d728b4ea0a7145a9a677c07e
  • Vorgänger efe9b725
  • Nachfolger 75ace081

Wechselkurs beim Laden des Belegs in form_header oder retrieve_invoice holen

Unterschiede anzeigen:

bin/mozilla/ap.pl
346 346
  # build the popup menus
347 347
  $form->{taxincluded} = ($form->{id}) ? $form->{taxincluded} : "checked";
348 348

  
349
  # currencies
350
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
351

  
352 349
  $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
353 350

  
354 351
  $form->{employee} = "$form->{employee}--$form->{employee_id}";
......
406 403

  
407 404
  $form->{readonly} = $readonly;
408 405

  
409
  $form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell');
410
  if ( $form->{forex} ) {
411
    $form->{exchangerate} = $form->{forex};
406
  # currencies
407
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
408
  if ($form->{currency} ne $form->{defaultcurrency}) {
409
    ($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, "sell", $form->{id}, 'ap');
412 410
  }
413 411

  
414 412
  # format amounts
415
  $form->{exchangerate}    = $form->{exchangerate} ? $form->format_amount(\%myconfig, $form->{exchangerate}) : '';
416 413
  $form->{creditlimit}     = $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0");
417 414
  $form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0");
418 415

  
......
680 677

  
681 678
  map { $form->{invtotal} += $form->{"amount_$_"} } (1 .. $form->{rowcount});
682 679

  
683
  $form->{forex}        = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell');
684
  $form->{exchangerate} = $form->{forex} if $form->{forex};
685

  
686 680
  $form->{invdate} = $form->{transdate};
687 681

  
688 682
  if (($form->{previous_vendor_id} || $form->{vendor_id}) != $form->{vendor_id}) {

Auch abrufbar als: Unified diff