Revision c14aab2d
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
1474 | 1474 |
pdonumber = ?, |
1475 | 1475 |
yearend = ?, |
1476 | 1476 |
curr = ?, |
1477 |
businessnumber = ?|; |
|
1477 |
businessnumber = ?, |
|
1478 |
weightunit = ?|; |
|
1478 | 1479 |
my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno}, |
1479 | 1480 |
$accnos{fxgain_accno}, $accnos{fxloss_accno}, |
1480 | 1481 |
$form->{invnumber}, $form->{cnnumber}, |
... | ... | |
1484 | 1485 |
$form->{articlenumber}, $form->{servicenumber}, |
1485 | 1486 |
$form->{sdonumber}, $form->{pdonumber}, |
1486 | 1487 |
$form->{yearend}, $currency, |
1487 |
$form->{businessnumber}); |
|
1488 |
$form->{businessnumber}, $form->{weightunit});
|
|
1488 | 1489 |
do_query($form, $dbh, $query, @values); |
1489 | 1490 |
|
1490 | 1491 |
$dbh->commit(); |
... | ... | |
1574 | 1575 |
return $rc; |
1575 | 1576 |
} |
1576 | 1577 |
|
1578 |
sub get_defaults { |
|
1579 |
$main::lxdebug->enter_sub(); |
|
1580 |
|
|
1581 |
my $self = shift; |
|
1582 |
my %params = @_; |
|
1583 |
|
|
1584 |
my $myconfig = \%main::myconfig; |
|
1585 |
my $form = $main::form; |
|
1586 |
|
|
1587 |
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); |
|
1588 |
|
|
1589 |
my $defaults = selectfirst_hashref_query($form, $dbh, qq|SELECT * FROM defaults|) || {}; |
|
1590 |
|
|
1591 |
$defaults->{weightunit} ||= 'kg'; |
|
1592 |
|
|
1593 |
$main::lxdebug->leave_sub(); |
|
1594 |
|
|
1595 |
return $defaults; |
|
1596 |
} |
|
1597 |
|
|
1577 | 1598 |
sub defaultaccounts { |
1578 | 1599 |
$main::lxdebug->enter_sub(); |
1579 | 1600 |
|
... | ... | |
1587 | 1608 |
my $sth = $dbh->prepare($query); |
1588 | 1609 |
$sth->execute || $form->dberror($query); |
1589 | 1610 |
|
1590 |
$form->{defaults} = $sth->fetchrow_hashref(NAME_lc); |
|
1591 |
$form->{defaults}{IC} = $form->{defaults}{inventory_accno_id}; |
|
1592 |
$form->{defaults}{IC_income} = $form->{defaults}{income_accno_id}; |
|
1593 |
$form->{defaults}{IC_expense} = $form->{defaults}{expense_accno_id}; |
|
1594 |
$form->{defaults}{FX_gain} = $form->{defaults}{fxgain_accno_id}; |
|
1595 |
$form->{defaults}{FX_loss} = $form->{defaults}{fxloss_accno_id}; |
|
1611 |
$form->{defaults} = $sth->fetchrow_hashref(NAME_lc); |
|
1612 |
$form->{defaults}{IC} = $form->{defaults}{inventory_accno_id}; |
|
1613 |
$form->{defaults}{IC_income} = $form->{defaults}{income_accno_id}; |
|
1614 |
$form->{defaults}{IC_expense} = $form->{defaults}{expense_accno_id}; |
|
1615 |
$form->{defaults}{FX_gain} = $form->{defaults}{fxgain_accno_id}; |
|
1616 |
$form->{defaults}{FX_loss} = $form->{defaults}{fxloss_accno_id}; |
|
1617 |
|
|
1618 |
$form->{defaults}{weightunit} ||= 'kg'; |
|
1596 | 1619 |
|
1597 | 1620 |
$sth->finish; |
1598 | 1621 |
|
Auch abrufbar als: Unified diff
Das Feld "Gewichtseinheit" in den Einstellungen wieder eingeführt und in den Warenstammdaten- und -berichtsmasken angezeigt.
Fix für Bug 963.