Revision 6eea36b2
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
991 | 991 |
conv_i($form->{"cp_id"}), $form->{transaction_description}, |
992 | 992 |
conv_i($form->{"id"})); |
993 | 993 |
do_query($form, $dbh, $query, @values); |
994 |
|
|
994 |
|
|
995 |
if($form->{"formname"} eq "credit_note") { |
|
996 |
for my $i (1 .. $form->{paidaccounts}) { |
|
997 |
$query = qq|UPDATE parts SET onhand = onhand - ? WHERE id = ?|; |
|
998 |
@values = (conv_i($form->{"qty_$i"}), conv_i($form->{"id_$i"})); |
|
999 |
do_query($form, $dbh, $query, @values); |
|
1000 |
} |
|
1001 |
} |
|
1002 |
|
|
995 | 1003 |
if ($form->{storno}) { |
996 | 1004 |
$query = |
997 | 1005 |
qq!UPDATE ar SET |
... | ... | |
1524 | 1532 |
(SELECT tk.tax_id |
1525 | 1533 |
FROM taxkeys tk |
1526 | 1534 |
WHERE tk.chart_id = (SELECT id FROM chart WHERE accno = ?) |
1527 |
AND startdate <= $transdate
|
|
1535 |
AND startdate <= date($transdate)
|
|
1528 | 1536 |
ORDER BY startdate DESC |
1529 | 1537 |
LIMIT 1) |
1530 | 1538 |
ORDER BY c.accno|; |
... | ... | |
1711 | 1719 |
qq|SELECT tk.tax_id, t.rate |
1712 | 1720 |
FROM taxkeys tk |
1713 | 1721 |
LEFT JOIN tax t ON tk.tax_id = t.id |
1714 |
WHERE (tk.chart_id = ?) AND (startdate <= ?)
|
|
1722 |
WHERE (tk.chart_id = ?) AND (startdate <= date(?))
|
|
1715 | 1723 |
ORDER BY tk.startdate DESC |
1716 | 1724 |
LIMIT 1|; |
1717 | 1725 |
my ($tax_id, $rate) = |
... | ... | |
1868 | 1876 |
ORDER BY startdate DESC |
1869 | 1877 |
LIMIT 1) |
1870 | 1878 |
ORDER BY c.accno|; |
1871 |
@values = ($accno_id, $transdate); |
|
1879 |
@values = ($accno_id, $transdate eq "current_date" ? "now" : $transdate);
|
|
1872 | 1880 |
$stw = $dbh->prepare($query); |
1873 | 1881 |
$stw->execute(@values) || $form->dberror($query); |
1874 | 1882 |
|
Auch abrufbar als: Unified diff
Gutschriften heben jetzt auch den Lagerbestand an (Bug 636)