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:

SL/IR.pm
1013 1013
  $form->{mtime} = $form->{itime} if !$form->{mtime};
1014 1014
  $form->{lastmtime} = $form->{mtime};
1015 1015

  
1016
  $form->{exchangerate}  = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "sell");
1016
  ($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "sell", conv_i($form->{id}), 'ap');
1017 1017

  
1018 1018
  # get shipto
1019 1019
  $query = qq|SELECT * FROM shipto WHERE (trans_id = ?) AND (module = 'AP')|;
SL/IS.pm
2296 2296
    $form->{mtime} = $form->{itime} if !$form->{mtime};
2297 2297
    $form->{lastmtime} = $form->{mtime};
2298 2298

  
2299
    $form->{exchangerate} = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "buy");
2299
    ($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "buy", $id, 'ar');
2300 2300

  
2301 2301
    foreach my $vc (qw(customer vendor)) {
2302 2302
      next if !$form->{"delivery_${vc}_id"};
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}) {
bin/mozilla/ar.pl
378 378
                      ? ($form->current_date(\%myconfig) eq $form->{gldate})
379 379
                      : ($::instance_conf->get_ar_changeable == 1);
380 380
  $readonly = ($form->{radier}) ? "" : $readonly;
381
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
382
  if ($form->{currency} ne $form->{defaultcurrency}) {
383
    ($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, "buy", $form->{id}, 'ar');
384
  }
381 385

  
382
  $form->{forex}        = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'buy');
383
  $form->{exchangerate} = $form->{forex} if $form->{forex};
384 386

  
385 387
  $rows = max 2, $form->numtextrows($form->{notes}, 50);
386 388

  
bin/mozilla/is.pl
852 852
  if (!$form->{forex}) {        # read exchangerate from input field (not hidden)
853 853
    $form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call;
854 854
  }
855
  $form->{forex}        = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy');
855
  ($form->{forex}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency},
856
                                                                      $form->{invdate}, 'buy', $form->{id}, 'ar');
856 857
  $form->{exchangerate} = $form->{forex} if $form->{forex};
857

  
858 858
  for my $i (1 .. $form->{paidaccounts}) {
859 859
    next unless $form->{"paid_$i"};
860 860
    map { $form->{"${_}_$i"}   = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate);

Auch abrufbar als: Unified diff