Revision eb701c64
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1482 | 1482 |
$main::lxdebug->leave_sub(); |
1483 | 1483 |
} |
1484 | 1484 |
|
1485 |
sub save_exchangerate { |
|
1486 |
$main::lxdebug->enter_sub(); |
|
1487 |
|
|
1488 |
my ($self, $myconfig, $currency, $transdate, $rate, $fld) = @_; |
|
1489 |
|
|
1490 |
SL::DB->client->with_transaction(sub { |
|
1491 |
my $dbh = SL::DB->client->dbh; |
|
1492 |
|
|
1493 |
my ($buy, $sell); |
|
1494 |
|
|
1495 |
$buy = $rate if $fld eq 'buy'; |
|
1496 |
$sell = $rate if $fld eq 'sell'; |
|
1497 |
|
|
1498 |
|
|
1499 |
$self->update_exchangerate($dbh, $currency, $transdate, $buy, $sell); |
|
1500 |
1; |
|
1501 |
}) or do { die SL::DB->client->error }; |
|
1502 |
|
|
1503 |
$main::lxdebug->leave_sub(); |
|
1504 |
} |
|
1505 |
|
|
1506 | 1485 |
sub check_exchangerate { |
1507 | 1486 |
$main::lxdebug->enter_sub(); |
1508 | 1487 |
|
bin/mozilla/oe.pl | ||
---|---|---|
1794 | 1794 |
$main::lxdebug->leave_sub(); |
1795 | 1795 |
} |
1796 | 1796 |
|
1797 |
sub save_exchangerate { |
|
1798 |
$main::lxdebug->enter_sub(); |
|
1799 |
|
|
1800 |
my $form = $main::form; |
|
1801 |
my %myconfig = %main::myconfig; |
|
1802 |
my $locale = $main::locale; |
|
1803 |
|
|
1804 |
$form->isblank("exchangerate", $locale->text('Exchangerate missing!')); |
|
1805 |
$form->{exchangerate} = |
|
1806 |
$form->parse_amount(\%myconfig, $form->{exchangerate}); |
|
1807 |
$form->save_exchangerate(\%myconfig, $form->{currency}, |
|
1808 |
$form->{exchangeratedate}, |
|
1809 |
$form->{exchangerate}, $form->{buysell}); |
|
1810 |
|
|
1811 |
&invoice; |
|
1812 |
|
|
1813 |
$main::lxdebug->leave_sub(); |
|
1814 |
} |
|
1815 |
|
|
1816 | 1797 |
sub save_as_new { |
1817 | 1798 |
$main::lxdebug->enter_sub(); |
1818 | 1799 |
|
Auch abrufbar als: Unified diff
save_exchangerate entfernt (wurde benötigt für backorder_exchangerate)