Revision 5ba855af
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub save_exchangerate {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my ($self, $myconfig, $currency, $transdate, $rate, $fld) = @_;
|
||
|
||
SL::DB->client->with_transaction(sub {
|
||
my $dbh = SL::DB->client->dbh;
|
||
|
||
my ($buy, $sell);
|
||
|
||
$buy = $rate if $fld eq 'buy';
|
||
$sell = $rate if $fld eq 'sell';
|
||
|
||
|
||
$self->update_exchangerate($dbh, $currency, $transdate, $buy, $sell);
|
||
1;
|
||
}) or do { die SL::DB->client->error };
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub check_exchangerate {
|
||
$main::lxdebug->enter_sub();
|
||
|
bin/mozilla/oe.pl | ||
---|---|---|
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub save_exchangerate {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
my $form = $main::form;
|
||
my %myconfig = %main::myconfig;
|
||
my $locale = $main::locale;
|
||
|
||
$form->isblank("exchangerate", $locale->text('Exchangerate missing!'));
|
||
$form->{exchangerate} =
|
||
$form->parse_amount(\%myconfig, $form->{exchangerate});
|
||
$form->save_exchangerate(\%myconfig, $form->{currency},
|
||
$form->{exchangeratedate},
|
||
$form->{exchangerate}, $form->{buysell});
|
||
|
||
&invoice;
|
||
|
||
$main::lxdebug->leave_sub();
|
||
}
|
||
|
||
sub save_as_new {
|
||
$main::lxdebug->enter_sub();
|
||
|
Auch abrufbar als: Unified diff
save_exchangerate entfernt (wurde benötigt für backorder_exchangerate)