projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inventory_accno_id aufräumen
[kivitendo-erp.git]
/
SL
/
DN.pm
diff --git
a/SL/DN.pm
b/SL/DN.pm
index
8191c5c
..
69db005
100644
(file)
--- a/
SL/DN.pm
+++ b/
SL/DN.pm
@@
-292,6
+292,10
@@
sub save_dunning {
$main::lxdebug->enter_sub();
my $rc = SL::DB->client->with_transaction(\&_save_dunning, $self, $myconfig, $form, $rows);
$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;
$::lxdebug->leave_sub;
return $rc;
@@
-471,11
+475,11
@@
sub set_template_options {
# prepare meta information for template introspection
$form->{template_meta} = {
formname => $form->{formname},
# prepare meta information for template introspection
$form->{template_meta} = {
formname => $form->{formname},
- language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id}),
+ language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id}
|| undef
),
format => $form->{format},
media => $form->{media},
extension => $extension,
format => $form->{format},
media => $form->{media},
extension => $extension,
- printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id}),
+ printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id}
|| undef
),
today => DateTime->today,
};
today => DateTime->today,
};
@@
-799,7
+803,8
@@
sub print_dunning {
ar.transdate, ar.duedate, ar.customer_id,
ar.invnumber, ar.ordnumber, ar.cp_id,
ar.amount, ar.netamount, ar.paid,
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
ar.amount - ar.paid AS open_amount,
ar.amount - ar.paid + da.fee + da.interest AS linetotal