$main::lxdebug->enter_sub();
my $rc = SL::DB->client->with_transaction(\&_save_dunning, $self, $myconfig, $form, $rows);
+
+ if (!$rc) {
+ die SL::DB->client->error
+ }
$::lxdebug->leave_sub;
return $rc;
ar.transdate, ar.duedate, ar.customer_id,
ar.invnumber, ar.ordnumber, ar.cp_id,
ar.amount, ar.netamount, ar.paid,
- (SELECT cu.name FROM currencies cu WHERE cu.id=ar.currency_id) AS curr,
+ (SELECT cu.name FROM currencies cu WHERE cu.id = ar.currency_id) AS curr,
+ (SELECT description from department WHERE id = ar.department_id) AS department,
ar.amount - ar.paid AS open_amount,
ar.amount - ar.paid + da.fee + da.interest AS linetotal