Revision 40a94352
Von Jan Büren vor etwa 2 Jahren hinzugefügt
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 | ||
---|---|---|
2308 | 2308 |
$form->{mtime} = $form->{itime} if !$form->{mtime}; |
2309 | 2309 |
$form->{lastmtime} = $form->{mtime}; |
2310 | 2310 |
|
2311 |
$form->{exchangerate} = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "buy");
|
|
2311 |
($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate($myconfig, $form->{currency}, $form->{invdate}, "buy", $id, 'ar');
|
|
2312 | 2312 |
|
2313 | 2313 |
foreach my $vc (qw(customer vendor)) { |
2314 | 2314 |
next if !$form->{"delivery_${vc}_id"}; |
bin/mozilla/ap.pl | ||
---|---|---|
353 | 353 |
# build the popup menus |
354 | 354 |
$form->{taxincluded} = ($form->{id}) ? $form->{taxincluded} : "checked"; |
355 | 355 |
|
356 |
# currencies |
|
357 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
|
358 |
|
|
359 | 356 |
$::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted; |
360 | 357 |
|
361 | 358 |
$form->{employee} = "$form->{employee}--$form->{employee_id}"; |
... | ... | |
413 | 410 |
|
414 | 411 |
$form->{readonly} = $readonly; |
415 | 412 |
|
416 |
$form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell'); |
|
417 |
if ( $form->{forex} ) { |
|
418 |
$form->{exchangerate} = $form->{forex}; |
|
413 |
# currencies |
|
414 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
|
415 |
if ($form->{currency} ne $form->{defaultcurrency}) { |
|
416 |
($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, "sell", $form->{id}, 'ap'); |
|
419 | 417 |
} |
420 | 418 |
|
421 | 419 |
# format amounts |
422 |
$form->{exchangerate} = $form->{exchangerate} ? $form->format_amount(\%myconfig, $form->{exchangerate}) : ''; |
|
423 | 420 |
$form->{creditlimit} = $form->format_amount(\%myconfig, $form->{creditlimit}, 0, "0"); |
424 | 421 |
$form->{creditremaining} = $form->format_amount(\%myconfig, $form->{creditremaining}, 0, "0"); |
425 | 422 |
|
... | ... | |
698 | 695 |
|
699 | 696 |
map { $form->{invtotal} += $form->{"amount_$_"} } (1 .. $form->{rowcount}); |
700 | 697 |
|
701 |
$form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'sell'); |
|
702 |
$form->{exchangerate} = $form->{forex} if $form->{forex}; |
|
703 |
|
|
704 | 698 |
$form->{invdate} = $form->{transdate}; |
705 | 699 |
|
706 | 700 |
if (($form->{previous_vendor_id} || $form->{vendor_id}) != $form->{vendor_id}) { |
bin/mozilla/ar.pl | ||
---|---|---|
385 | 385 |
? ($form->current_date(\%myconfig) eq $form->{gldate}) |
386 | 386 |
: ($::instance_conf->get_ar_changeable == 1); |
387 | 387 |
$readonly = ($form->{radier}) ? "" : $readonly; |
388 |
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig); |
|
389 |
if ($form->{currency} ne $form->{defaultcurrency}) { |
|
390 |
($form->{exchangerate}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, "buy", $form->{id}, 'ar'); |
|
391 |
} |
|
388 | 392 |
|
389 |
$form->{forex} = $form->check_exchangerate( \%myconfig, $form->{currency}, $form->{transdate}, 'buy'); |
|
390 |
$form->{exchangerate} = $form->{forex} if $form->{forex}; |
|
391 | 393 |
|
392 | 394 |
$rows = max 2, $form->numtextrows($form->{notes}, 50); |
393 | 395 |
|
bin/mozilla/is.pl | ||
---|---|---|
858 | 858 |
if (!$form->{forex}) { # read exchangerate from input field (not hidden) |
859 | 859 |
$form->{exchangerate} = $form->parse_amount(\%myconfig, $form->{exchangerate}) unless $recursive_call; |
860 | 860 |
} |
861 |
$form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, 'buy'); |
|
861 |
($form->{forex}, $form->{record_forex}) = $form->check_exchangerate(\%myconfig, $form->{currency}, |
|
862 |
$form->{invdate}, 'buy', $form->{id}, 'ar'); |
|
862 | 863 |
$form->{exchangerate} = $form->{forex} if $form->{forex}; |
863 |
|
|
864 | 864 |
for my $i (1 .. $form->{paidaccounts}) { |
865 | 865 |
next unless $form->{"paid_$i"}; |
866 | 866 |
map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate); |
Auch abrufbar als: Unified diff
Wechselkurs beim Laden des Belegs in form_header oder retrieve_invoice holen