1 #=====================================================================
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
7 #=====================================================================
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
11 # Author: Dieter Simader
12 # Email: dsimader@sql-ledger.org
13 # Web: http://www.sql-ledger.org
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #======================================================================
30 # Dunning process module
32 #======================================================================
39 require "bin/mozilla/common.pl";
40 require "bin/mozilla/io.pl";
41 require "bin/mozilla/arap.pl";
46 $lxdebug->enter_sub();
48 DN->get_config(\%myconfig, \%$form);
50 $form->{title} = $locale->text('Edit Dunning Process Config');
51 $form->{callback} ||= build_std_url("action=edit_config");
52 $form->{rowcount} = 1 + scalar @{ $form->{DUNNING} };
53 $form->{rowcount_odd} = $form->{rowcount} % 2;
56 print $form->parse_html_template("dunning/edit_config");
58 $lxdebug->leave_sub();
62 $lxdebug->enter_sub();
63 # setup customer selection
64 $form->all_vc(\%myconfig, "customer", "AR");
66 DN->get_config(\%myconfig, \%$form);
68 if (@{ $form->{all_customer} }) {
69 map { $customer .= "<option>$_->{name}--$_->{id}\n" }
70 @{ $form->{all_customer} };
71 $customer = qq|<select name=customer><option>\n$customer</select>|;
73 $customer = qq|<input name=customer size=35>|;
77 if (@{ $form->{DUNNING} }) {
78 $form->{selectdunning_level} = "<option></option\n";
80 $form->{selectdunning_level} .=
81 "<option value=$_->{id}>$_->{dunning_description}</option>\n"
82 } (@{ $form->{DUNNING} });
86 <th align=right nowrap>| . $locale->text('Next Dunning Level') . qq|</th>
87 <td colspan=3><select name=dunning_level>$form->{selectdunning_level}</select></td>
89 | if $form->{selectdunning_level};
92 if (@{ $form->{all_departments} }) {
93 $form->{selectdepartment} = "<option>\n";
95 $form->{selectdepartment} .=
96 "<option>$_->{description}--$_->{id}\n"
97 } (@{ $form->{all_departments} });
101 <th align=right nowrap>| . $locale->text('Department') . qq|</th>
102 <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
104 | if $form->{selectdepartment};
106 $form->{title} = $locale->text('Start Dunning Process');
107 $form->{nextsub} = "show_invoices";
109 $form->{jsscript} = 1;
110 $form->{fokus} = "search.customer";
111 $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
114 $onload = qq|focus()|;
115 $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
116 $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
119 <body onLoad="$onload">
121 <form method=post name="search" action=$form->{script}>
124 <tr><th class=listtop>$form->{title}</th></tr>
130 <th align=right>| . $locale->text('Customer') . qq|</th>
131 <td colspan=3>$customer</td>
136 <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
137 <td colspan=3><input name=invnumber size=20></td>
140 <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
141 <td colspan=3><input name=ordnumber size=20></td>
144 <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
145 <td colspan=3><input name=notes size=40></td>
151 <td><hr size=3 noshade></td>
157 <th align=right nowrap>| . $locale->text('Minimum Amount') . qq|</th>
158 <td><input name=minamount size=6></td>
161 <th align=right nowrap>| . $locale->text('Group Invoices') . qq|</th>
162 <td><input type=checkbox value=1 name=groupinvoices checked></td>
169 <input type=hidden name=nextsub value=$form->{nextsub}>
171 <input type=hidden name=login value=$form->{login}>
172 <input type=hidden name=password value=$form->{password}>
175 <input class=submit type=submit name=action value="|
176 . $locale->text('Continue') . qq|">
187 $lxdebug->leave_sub();
192 $lxdebug->enter_sub();
194 DN->get_invoices(\%myconfig, \%$form);
195 $form->{title} = $locale->text('Start Dunning Process');
197 if (@{ $form->{DUNNING_CONFIG} }) {
198 foreach $item (@{ $form->{DUNNING_CONFIG} }) {
199 $form->{selectdunning} .=
200 "<option value=$item->{id}>$item->{dunning_description}</option>";
205 $form->{nextsub} = "save_dunning";
207 $form->{jsscript} = 1;
208 $form->{javascript} .= qq|<script type="text/javascript" src="js/checkbox_utils.js"></script>|;
211 "$form->{script}?action=show_invoices&login=$form->{login}&password=$form->{password}&customer=$form->{customer}&invnumber=$form->{invnumber}&ordnumber=$form->{ordnumber}&paymentuntil=$form->{paymentuntil}&groupinvoices=$form->{groupinvoices}&minamount=$form->{minamount}&dunning_level=$form->{dunning_level}¬es=$form->{notes}"
212 unless $form->{callback};
214 @column_index = qw(dunning_description dunning_description_next active email customername invnumber invdate inv_duedate amount next_duedate fee interest );
216 $column_header{dunning_description} =
217 qq|<th class="listheading" colspan="2">|
218 . $locale->text('Current / Next Level')
220 $column_header{active} =
221 qq|<th class=listheading>|
222 . NTI($cgi->checkbox('-name' => 'selectall_active',
223 '-label' => $locale->text('Active?'),
225 '-onclick' => "checkbox_check_all('selectall_active', 'active_', 1, " . scalar(@{ $form->{DUNNINGS} }) . ")"))
227 $column_header{email} =
228 qq|<th class=listheading>|
229 . NTI($cgi->checkbox('-name' => 'selectall_email',
230 '-label' => $locale->text('eMail?'),
232 '-onclick' => "checkbox_check_all('selectall_email', 'email_', 1, " . scalar(@{ $form->{DUNNINGS} }) . ")"))
234 $column_header{customername} =
235 qq|<th class=listheading>|
236 . $locale->text('Customername')
238 $column_header{invnumber} =
239 qq|<th class=listheading>|
240 . $locale->text('Invno.')
242 $column_header{inv_duedate} =
243 qq|<th class=listheading>|
244 . $locale->text('Inv. Duedate')
246 $column_header{next_duedate} =
247 qq|<th class=listheading>|
248 . $locale->text('Dunning Duedate')
250 $column_header{invdate} =
251 qq|<th class=listheading>|
252 . $locale->text('Invdate')
254 $column_header{amount} =
255 qq|<th class=listheading>|
256 . $locale->text('Amount')
258 $column_header{fee} =
259 qq|<th class=listheading>|
260 . $locale->text('Total Fees')
262 $column_header{interest} =
263 qq|<th class=listheading>|
264 . $locale->text('Interest')
272 <script type="text/javascript" src="js/common.js"></script>
273 <script type="text/javascript" src="js/dunning.js"></script>
274 <form name=Form method=post action=$form->{script}>
279 <th class=listtop colspan=12>$form->{title}</th>
283 map { print "$column_header{$_}\n" if $column_header{$_}; } @column_index;
289 foreach $ref (@{ $form->{DUNNINGS} }) {
295 <tr valign=top class=listrow$j>
298 $form->{selectdunning} =~ s/ selected//g;
299 if ($ref->{next_dunning_config_id} ne "") {
300 $form->{selectdunning} =~ s/value=$ref->{next_dunning_config_id}/value=$ref->{next_dunning_config_id} selected/;
303 $column_data{dunning_description} =
305 . qq|<input type=hidden name=inv_id_$i size=2 value="$ref->{id}">|
306 . qq|<input type=hidden name=customer_id_$i size=2 value="$ref->{customer_id}">|
307 . ($ref->{dunning_level} ? $ref->{dunning_level} : " ")
309 $column_data{dunning_description_next} =
311 . qq|<select name=next_dunning_config_id_$i>$form->{selectdunning}</select>|
313 my $active = ($ref->{active}) ? "checked" : "";
314 $column_data{active} =
315 qq|<td><input type=checkbox name=active_$i value=1 $active></td>|;
316 my $email = ($ref->{email}) ? "checked" : "";
317 $column_data{email} =
318 qq|<td><input type=checkbox name=email_$i value=1 $email></td>|;
319 $column_data{next_duedate} = qq|<td>$ref->{next_duedate}</td>|;
321 $column_data{inv_duedate} = qq|<td><input type=hidden name=inv_duedate_$i size=6 value="$ref->{duedate}">$ref->{duedate}</td>|;
322 $column_data{invdate} = qq|<td><input type=hidden name=invdate_$i size=6 value="$ref->{transdate}">$ref->{transdate}</td>|;
323 $column_data{invnumber} = qq|<td><input type=hidden name=invnumber_$i size=6 value="$ref->{invnumber}">$ref->{invnumber}</td>|;
324 $column_data{customername} = qq|<td><input type=hidden name=customername_$i size=6 value="$ref->{customername}">$ref->{customername}</td>|;
326 map { $column_data{$_} =
327 qq|<td align="right">|
328 . H($form->format_amount(\%myconfig, $ref->{$_} * 1, -2))
330 } qw(amount fee interest);
332 map { print "$column_data{$_}\n" } @column_index;
339 $form->{rowcount} = $i;
346 <td><hr size=3 noshade></td>
352 <form method=post action=$form->{script}>
354 <input name=callback type=hidden value="$form->{callback}">
355 <input name=rowcount type=hidden value="$form->{rowcount}">
356 <input name=nextsub type=hidden value="$form->{nextsub}">
357 <input name=groupinvoices type=hidden value="$form->{groupinvoices}">
360 <input type=hidden name=login value=$form->{login}>
361 <input type=hidden name=password value=$form->{password}>
362 <input type="hidden" name="action">
363 <input type="submit" name="dummy" value="|
364 . $locale->text('Continue') . qq|" onclick="this.disabled=true; this.value='| . $locale->text("The dunning process started") . qq|'; document.Form.action.value='| . $locale->text('Continue') . qq|'; document.Form.submit()">
373 $lxdebug->leave_sub();
378 $lxdebug->enter_sub();
380 for my $i (1 .. $form->{rowcount}) {
381 if ($form->{"dunning_description_$i"} ne "") {
382 $form->isblank("dunning_level_$i", $locale->text('Dunning Level missing in row '). $i);
383 $form->isblank("dunning_description_$i", $locale->text('Dunning Description missing in row '). $i);
384 $form->isblank("terms_$i", $locale->text('Terms missing in row '). $i);
385 $form->isblank("payment_terms_$i", $locale->text('Payment Terms missing in row '). $i);
389 DN->save_config(\%myconfig, \%$form);
391 if(!exists $form->{addition} && $form->{id} ne "") {
392 $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
393 $form->{addition} = "SAVED FOR DUNNING";
394 $form->save_history($form->dbconnect(\%myconfig));
396 # /saving the history
397 $form->redirect($locale->text('Dunning Process Config saved!'));
399 $lxdebug->leave_sub();
403 $lxdebug->enter_sub();
407 undef($form->{DUNNING_PDFS});
409 if ($form->{groupinvoices}) {
412 for my $i (1 .. $form->{rowcount}) {
413 next unless ($form->{"active_$i"});
415 $dunnings_for{$form->{"customer_id_$i"}} ||= {};
416 my $dunning_levels = $dunnings_for{$form->{"customer_id_$i"}};
418 $dunning_levels->{$form->{"next_dunning_config_id_$i"}} ||= [];
419 my $level = $dunning_levels->{$form->{"next_dunning_config_id_$i"}};
421 push @{ $level }, { "row" => $i,
422 "invoice_id" => $form->{"inv_id_$i"},
423 "customer_id" => $form->{"customer_id_$i"},
424 "next_dunning_config_id" => $form->{"next_dunning_config_id_$i"},
425 "email" => $form->{"email_$i"}, };
428 foreach my $levels (values %dunnings_for) {
429 foreach my $level (values %{ $levels }) {
430 next unless scalar @{ $level };
432 DN->save_dunning(\%myconfig, \%$form, $level, $userspath, $spool, $sendmail);
437 for my $i (1 .. $form->{rowcount}) {
438 next unless $form->{"active_$i"};
440 my $level = [ { "row" => $i,
441 "invoice_id" => $form->{"inv_id_$i"},
442 "customer_id" => $form->{"customer_id_$i"},
443 "next_dunning_config_id" => $form->{"next_dunning_config_id_$i"},
444 "email" => $form->{"email_$i"}, } ];
445 DN->save_dunning(\%myconfig, \%$form, $level, $userspath, $spool, $sendmail);
449 if($form->{DUNNING_PDFS}) {
450 DN->melt_pdfs(\%myconfig, \%$form,$spool);
454 if(!exists $form->{addition} && $form->{id} ne "") {
455 $form->{snumbers} = qq|dunning_id_| . $form->{"dunning_id"};
456 $form->{addition} = "DUNNING STARTED";
457 $form->save_history($form->dbconnect(\%myconfig));
459 # /saving the history
461 $form->redirect($locale->text('Dunning Process started for selected invoices!'));
463 $lxdebug->leave_sub();
467 $lxdebug->enter_sub();
470 my $callback = "$form->{script}?action=set_email&";
471 map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" }
472 (qw(login password name input_subject input_body input_attachment email_subject email_body email_attachment), grep({ /^[fl]_/ } keys %$form)));
474 if ($form->{email_attachment}) {
475 $form->{email_attachment} = "checked";
477 $form->{"title"} = $locale->text("Set eMail text");
479 print($form->parse_html_template("dunning/set_email"));
481 $lxdebug->leave_sub();
485 $lxdebug->enter_sub();
486 # setup customer selection
487 $form->all_vc(\%myconfig, "customer", "AR");
489 DN->get_config(\%myconfig, \%$form);
491 if (@{ $form->{all_customer} }) {
492 map { $customer .= "<option>$_->{name}--$_->{id}\n" }
493 @{ $form->{all_customer} };
494 $customer = qq|<select name=customer><option>\n$customer</select>|;
496 $customer = qq|<input name=customer size=35>|;
500 if (@{ $form->{DUNNING} }) {
501 $form->{selectdunning_level} = "<option></option\n";
503 $form->{selectdunning_level} .=
504 "<option value=$_->{id}>$_->{dunning_description}</option>\n"
505 } (@{ $form->{DUNNING} });
509 <th align=right nowrap>| . $locale->text('Next Dunning Level') . qq|</th>
510 <td colspan=3><select name=dunning_level>$form->{selectdunning_level}</select></td>
512 | if $form->{selectdunning_level};
515 if (@{ $form->{all_departments} }) {
516 $form->{selectdepartment} = "<option>\n";
518 $form->{selectdepartment} .=
519 "<option>$_->{description}--$_->{id}\n"
520 } (@{ $form->{all_departments} });
524 <th align=right nowrap>| . $locale->text('Department') . qq|</th>
525 <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
527 | if $form->{selectdepartment};
528 $form->{title} = $locale->text('Search Dunning');
529 $form->{nextsub} = "show_dunning";
531 # use JavaScript Calendar or not
532 $form->{jsscript} = $jscalendar;
534 if ($form->{jsscript}) {
536 # with JavaScript Calendar
538 <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
539 <input type=button name=transdatefrom id="trigger1" value=|
540 . $locale->text('button') . qq|></td>
543 <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
544 <input type=button name=transdateto id="trigger2" value=|
545 . $locale->text('button') . qq|></td>
548 <td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
549 <input type=button name=dunningfrom id="trigger3" value=|
550 . $locale->text('button') . qq|></td>
553 <td><input name=dunningto id=dunningto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
554 <input type=button name=dunningto id="trigger4" value=|
555 . $locale->text('button') . qq|></td>
560 Form->write_trigger(\%myconfig, "4", "transdatefrom", "BR", "trigger1", "transdateto", "BR", "trigger2", "dunningfrom", "BR", "trigger3", "dunningto", "BR", "trigger4");
563 # without JavaScript Calendar
565 qq|<td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
567 qq|<td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
569 qq|<td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
571 qq|<td><input name=dunningfrom id=dunningto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
574 $form->{fokus} = "search.customer";
575 $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
577 $onload = qq|focus()|;
578 $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
579 $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
582 <body onLoad="$onload">
584 <form method=post name="search" action=$form->{script}>
587 <tr><th class=listtop>$form->{title}</th></tr>
593 <th align=right>| . $locale->text('Customer') . qq|</th>
594 <td colspan=3>$customer</td>
599 <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
600 <td colspan=3><input name=invnumber size=20></td>
603 <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
604 <td colspan=3><input name=ordnumber size=20></td>
607 <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
608 <td colspan=3><input name=notes size=40></td>
611 <th align=right nowrap>| . $locale->text('Invdate from') . qq|</th>
613 <th align=right nowrap>| . $locale->text('To') . qq|</th>
617 <th align=right nowrap>| . $locale->text('Dunning Date from') . qq|</th>
619 <th align=right nowrap>| . $locale->text('To') . qq|</th>
627 <td><hr size=3 noshade></td>
633 <th align=right nowrap>| . $locale->text('Show old dunnings') . qq|</th>
634 <td><input type=checkbox value=1 name=showold></td>
641 <input type=hidden name=nextsub value=$form->{nextsub}>
643 <input type=hidden name=login value=$form->{login}>
644 <input type=hidden name=password value=$form->{password}>
647 <input class=submit type=submit name=action value="|
648 . $locale->text('Continue') . qq|">
659 $lxdebug->leave_sub();
664 $lxdebug->enter_sub();
666 DN->get_dunning(\%myconfig, \%$form);
667 $form->{title} = $locale->text('Dunning overview');
674 "$form->{script}?action=show_dunning&login=$form->{login}&password=$form->{password}&customer=$form->{customer}&invnumber=$form->{invnumber}&ordnumber=$form->{ordnumber}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&dunningfrom=$form->{dunningfrom}&dunningto=$form->{dunningto}¬es=$form->{notes}&showold=$form->{showold}&dunning_level=$form->{dunning_level}"
675 unless $form->{callback};
677 @column_index = qw(dunning_description customername invnumber invdate inv_duedate invamount dunning_date next_duedate fee interest );
679 $column_header{dunning_description} =
680 qq|<th class=listheading>|
681 . $locale->text('Dunning Level')
683 $column_header{customername} =
684 qq|<th class=listheading>|
685 . $locale->text('Customername')
687 $column_header{invnumber} =
688 qq|<th class=listheading>|
689 . $locale->text('Invnumber')
691 $column_header{inv_duedate} =
692 qq|<th class=listheading>|
693 . $locale->text('Invoice Duedate')
695 $column_header{dunning_date} =
696 qq|<th class=listheading>|
697 . $locale->text('Dunning Date')
699 $column_header{next_duedate} =
700 qq|<th class=listheading>|
701 . $locale->text('Dunning Duedate')
703 $column_header{invdate} =
704 qq|<th class=listheading>|
705 . $locale->text('Invdate')
707 $column_header{invamount} =
708 qq|<th class=listheading>|
709 . $locale->text('Amount')
711 $column_header{fee} =
712 qq|<th class=listheading>|
713 . $locale->text('Total Fees')
715 $column_header{interest} =
716 qq|<th class=listheading>|
717 . $locale->text('Interest')
725 <script type="text/javascript" src="js/common.js"></script>
726 <script type="text/javascript" src="js/dunning.js"></script>
727 <form method=post action=$form->{script}>
732 <th class=listtop colspan=10>$form->{title}</th>
736 map { print "$column_header{$_}\n" } @column_index;
743 "dunning_duedate" => "next_duedate",
744 "duedate" => "inv_duedate",
745 "transdate" => "invdate",
746 "amount" => "invamount",
751 my ($previous_dunning_id, $first_row_for_dunning);
752 foreach $ref (@{ $form->{DUNNINGS} }) {
755 if ($previous_dunning_id != $ref->{dunning_id}) {
758 $first_row_for_dunning = 1;
760 $first_row_for_dunning = 0;
762 $previous_dunning_id = $ref->{dunning_id};
765 <tr valign=top class=listrow$j>
770 foreach (qw(dunning_date dunning_duedate duedate transdate customername amount fee interest)) {
771 my $col = $columns{$_} ? $columns{$_} : $_;
772 $column_data{$col} = "<td>" . H($ref->{$_}) . "</td>";
775 if ($first_row_for_dunning) {
776 $column_data{dunning_description} =
777 qq|<td><a href="dn.pl?action=print_dunning&format=pdf&media=screen&| .
778 qq|dunning_id=| . E($ref->{dunning_id}) .
779 join("", map({ "&${_}=" . E($form->{$_}) } qw(login password callback))) .
780 qq|">| . H($ref->{dunning_description}) . qq|</a></td>|;
782 $column_data{dunning_description} = qq|<td> </td>|;
783 $column_data{customername} = qq|<td> </td>|;
786 $column_data{invnumber} =
787 qq|<td><a href="| . ($ref->{invoice} ? "is.pl" : "ar.pl" ) .
788 qq|?action=edit&id=| . H($ref->{id}) .
789 join("", map({ "&${_}=" . E($form->{$_}) } qw(login password callback))) .
790 qq|">| . H($ref->{invnumber}) . qq|</a></td>|;
792 map { print "$column_data{$_}\n" } @column_index;
799 $form->{rowcount} = $i;
806 <td><hr size=3 noshade></td>
811 <form method=post action=$form->{script}>
813 <input name=callback type=hidden value="$form->{callback}">
814 <input name=rowcount type=hidden value="$form->{rowcount}">
815 <input name=nextsub type=hidden value="$form->{nextsub}">
818 <input type=hidden name=login value=$form->{login}>
819 <input type=hidden name=password value=$form->{password}>
828 $lxdebug->leave_sub();
833 $lxdebug->enter_sub();
835 DN->print_dunning(\%myconfig, \%$form, $form->{dunning_id}, $userspath, $spool, $sendmail);
837 if($form->{DUNNING_PDFS}) {
838 DN->melt_pdfs(\%myconfig, \%$form,$spool);
840 $form->redirect($locale->text('Could not create dunning copy!'));
843 $lxdebug->leave_sub();