Revision a84085ef
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1535 | 1535 |
|
1536 | 1536 |
my ($self, $myconfig, $currency, $transdate, $rate, $fld) = @_; |
1537 | 1537 |
|
1538 |
my $dbh = $self->dbconnect($myconfig); |
|
1539 |
|
|
1540 |
my ($buy, $sell); |
|
1541 |
|
|
1542 |
$buy = $rate if $fld eq 'buy'; |
|
1543 |
$sell = $rate if $fld eq 'sell'; |
|
1538 |
SL::DB->client->with_transaction(sub { |
|
1539 |
my $dbh = SL::DB->client->dbh; |
|
1544 | 1540 |
|
1541 |
my ($buy, $sell); |
|
1545 | 1542 |
|
1546 |
$self->update_exchangerate($dbh, $currency, $transdate, $buy, $sell); |
|
1543 |
$buy = $rate if $fld eq 'buy'; |
|
1544 |
$sell = $rate if $fld eq 'sell'; |
|
1547 | 1545 |
|
1548 | 1546 |
|
1549 |
$dbh->disconnect; |
|
1547 |
$self->update_exchangerate($dbh, $currency, $transdate, $buy, $sell); |
|
1548 |
1; |
|
1549 |
}) or do { die SL::DB->client->error }; |
|
1550 | 1550 |
|
1551 | 1551 |
$main::lxdebug->leave_sub(); |
1552 | 1552 |
} |
Auch abrufbar als: Unified diff
Form: single-dbh disconnects