$query = qq|UPDATE ap SET paid = amount + paid, storno = 't' WHERE id = ?|;
do_query($form, $dbh, $query, $id);
- $form->new_lastmtime('ap') if $id == $form->{id};
-
# now copy acc_trans entries
$query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.acc_trans_id|;
my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
map { IO->set_datepaid(table => 'ap', id => $_, dbh => $dbh) } ($id, $new_id);
- $form->new_lastmtime('ap') if $storno_id == $form->{id};
-
$dbh->commit;
$main::lxdebug->leave_sub();
$query = qq|UPDATE ar SET paid = amount + paid, storno = 't' WHERE id = ?|;
do_query($form, $dbh, $query, $id);
- $form->new_lastmtime('ar') if $id == $form->{id};
-
# now copy acc_trans entries
$query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.acc_trans_id|;
my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
map { IO->set_datepaid(table => 'ar', id => $_, dbh => $dbh) } ($id, $new_id);
- $form->new_lastmtime('ar') if $storno_id == $form->{id};
-
$dbh->commit;
$main::lxdebug->leave_sub();