Revision 939b2613
Von Philip Reetz vor mehr als 15 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
346 | 346 |
} |
347 | 347 |
|
348 | 348 |
if ($payments_only) { |
349 |
$query = qq|UPDATE ap SET paid = ? WHERE id = ?|; |
|
350 |
do_query($form, $dbh, $query, $form->{invpaid}, conv_i($form->{id}));
|
|
349 |
$query = qq|UPDATE ap SET paid = ?, datepaid = ? WHERE id = ?|;
|
|
350 |
do_query($form, $dbh, $query, $form->{invpaid}, $form->{invpaid} ? conv_date($form->{datepaid}) : undef, conv_i($form->{id}));
|
|
351 | 351 |
} |
352 | 352 |
|
353 | 353 |
my $rc = 1; |
SL/AR.pm | ||
---|---|---|
196 | 196 |
|
197 | 197 |
} else { |
198 | 198 |
# Record paid amount. |
199 |
do_query($form, $dbh, qq|UPDATE ar SET paid = ? WHERE id = ?|, $form->{paid}, conv_i($form->{id})); |
|
199 |
$query = qq|UPDATE ar SET paid = ?, datepaid = ? WHERE id = ?|; |
|
200 |
do_query($form, $dbh, $query, $form->{paid}, $form->{paid} ? conv_date($form->{datepaid}) : undef, conv_i($form->{id})); |
|
200 | 201 |
} |
201 | 202 |
|
202 | 203 |
# add paid transactions |
sql/Pg-upgrade2/update_date_paid.sql | ||
---|---|---|
1 |
-- @tag: update_date_paid |
|
2 |
-- @description: Aktualisieren des Zahldatums in der Datenbank bei Kreditoren- und Debitorenbuchungen, wo die Funktion "Zahlung buchen" verwendet wurde |
|
3 |
-- @depends: release_2_6_0 |
|
4 |
UPDATE ap a SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id=a.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice; |
|
5 |
UPDATE ar a SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id=a.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice; |
Auch abrufbar als: Unified diff
Fehler in der Funktion "Zahlung buchen" bei Kreditoren- und Debitorenbuchungen.
Zahlungsdatum wurde nicht in der Datenbank gespeichert.