Revision 839ed59d
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/User.pm | ||
---|---|---|
286 | 286 |
# load chart of accounts |
287 | 287 |
$dbupdater->process_query($dbh, "sql/$form->{chart}-chart.sql", undef, $db_charset); |
288 | 288 |
|
289 |
$query = "UPDATE defaults SET coa = ?"; |
|
290 |
do_query($form, $dbh, $query, $form->{chart}); |
|
291 |
$query = "UPDATE defaults SET accounting_method = ?"; |
|
292 |
do_query($form, $dbh, $query, $form->{accounting_method}); |
|
293 |
$query = "UPDATE defaults SET profit_determination = ?"; |
|
294 |
do_query($form, $dbh, $query, $form->{profit_determination}); |
|
295 |
$query = "UPDATE defaults SET inventory_system = ?"; |
|
296 |
do_query($form, $dbh, $query, $form->{inventory_system}); |
|
297 |
$query = "UPDATE defaults SET curr = ?"; |
|
298 |
do_query($form, $dbh, $query, $form->{defaultcurrency}); |
|
289 |
my $query = qq|UPDATE defaults SET coa = ?, accounting_method = ?, profit_determination = ?, inventory_system = ?, curr = ?|; |
|
290 |
do_query($form, $dbh, $query, map { $form->{$_} } qw(chart accounting_method profit_determination inventory_system defaultcurrency)); |
|
299 | 291 |
|
300 | 292 |
$dbh->disconnect; |
301 | 293 |
|
Auch abrufbar als: Unified diff
Zusammenfassung einzelner UPDATE-Queries auf defaults zu einem einzigen