Revision 40c2c37c
Von Moritz Bunkus vor etwa 15 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
41 | 41 |
use SL::DBUtils; |
42 | 42 |
use SL::DO; |
43 | 43 |
use SL::GenericTranslations; |
44 |
use SL::IO; |
|
44 | 45 |
use SL::MoreCommon; |
45 | 46 |
use List::Util qw(min); |
46 | 47 |
|
... | ... | |
507 | 508 |
} |
508 | 509 |
} |
509 | 510 |
|
511 |
IO->set_datepaid(table => 'ap', id => $form->{id}, dbh => $dbh); |
|
512 |
|
|
510 | 513 |
if ($payments_only) { |
511 |
$query = qq|UPDATE ap SET paid = ?, datepaid = ? WHERE id = ?|;
|
|
512 |
do_query($form, $dbh, $query, $form->{paid}, $form->{paid} ? conv_date($form->{datepaid}) : undef, conv_i($form->{id}));
|
|
514 |
$query = qq|UPDATE ap SET paid = ? WHERE id = ?|; |
|
515 |
do_query($form, $dbh, $query, $form->{paid}, conv_i($form->{id}));
|
|
513 | 516 |
|
514 | 517 |
if (!$provided_dbh) { |
515 | 518 |
$dbh->commit(); |
... | ... | |
533 | 536 |
$query = qq|UPDATE ap SET |
534 | 537 |
invnumber = ?, ordnumber = ?, quonumber = ?, transdate = ?, |
535 | 538 |
orddate = ?, quodate = ?, vendor_id = ?, amount = ?, |
536 |
netamount = ?, paid = ?, duedate = ?, datepaid = ?,
|
|
539 |
netamount = ?, paid = ?, duedate = ?, |
|
537 | 540 |
invoice = ?, taxzone_id = ?, notes = ?, taxincluded = ?, |
538 | 541 |
intnotes = ?, curr = ?, storno_id = ?, storno = ?, |
539 | 542 |
cp_id = ?, employee_id = ?, department_id = ?, |
... | ... | |
542 | 545 |
@values = ( |
543 | 546 |
$form->{invnumber}, $form->{ordnumber}, $form->{quonumber}, conv_date($form->{invdate}), |
544 | 547 |
conv_date($form->{orddate}), conv_date($form->{quodate}), conv_i($form->{vendor_id}), $amount, |
545 |
$netamount, $form->{paid}, conv_date($form->{duedate}), $form->{paid} ? conv_date($form->{datepaid}) : undef,
|
|
548 |
$netamount, $form->{paid}, conv_date($form->{duedate}), |
|
546 | 549 |
'1', $taxzone_id, $form->{notes}, $form->{taxincluded} ? 't' : 'f', |
547 | 550 |
$form->{intnotes}, $form->{currency}, conv_i($form->{storno_id}), $form->{storno} ? 't' : 'f', |
548 | 551 |
conv_i($form->{cp_id}), conv_i($form->{employee_id}), conv_i($form->{department_id}), |
Auch abrufbar als: Unified diff
Beim Buchen von Rechnungen/Zahlungen das Feld "datepaid" richtig setzen.
Zusätzlich noch ein Datenbankupgradescript, das die Felder in
bestehenden Einträgen berichtigt.