$form->{"template_$i"}, $form->{"fee_$i"}, $form->{"interest_rate_$i"},
$form->{"active_$i"} ? 't' : 'f', $form->{"auto_$i"} ? 't' : 'f', $form->{"email_$i"} ? 't' : 'f',
$form->{"email_attachment_$i"} ? 't' : 'f', conv_i($form->{"payment_terms_$i"}), conv_i($form->{"terms_$i"}),
- $form->{"create_invoices_for_fees_$i"} ? 't' : 'f');
+ $form->{"create_invoices_for_fees_$i"} ? 't' : 'f',
+ $form->{"print_original_invoice_$i"} ? 't' : 'f');
if ($form->{"id_$i"}) {
$query =
qq|UPDATE dunning_config SET
template = ?, fee = ?, interest_rate = ?,
active = ?, auto = ?, email = ?,
email_attachment = ?, payment_terms = ?, terms = ?,
- create_invoices_for_fees = ?
+ create_invoices_for_fees = ?,
+ print_original_invoice = ?
WHERE id = ?|;
push(@values, conv_i($form->{"id_$i"}));
} else {
qq|INSERT INTO dunning_config
(dunning_level, dunning_description, email_subject, email_body,
template, fee, interest_rate, active, auto, email,
- email_attachment, payment_terms, terms, create_invoices_for_fees)
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
+ email_attachment, payment_terms, terms, create_invoices_for_fees,
+ print_original_invoice)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
}
do_query($form, $dbh, $query, @values);
}
nextcfg.dunning_description AS next_dunning_description,
nextcfg.id AS next_dunning_config_id,
- nextcfg.terms, nextcfg.active, nextcfg.email
+ nextcfg.terms, nextcfg.active, nextcfg.email, nextcfg.print_original_invoice
FROM ar a
<th class="listheading">[% 'eMail Send?' | $T8 %]</th>
<!-- <th class="listheading">[% 'Auto Send?' | $T8 %]</th> -->
<th class="listheading">[% 'Create invoice?' | $T8 %]</th>
+ <th class="listheading">[% 'Include original Invoices?' | $T8 %]</th>
<th class="listheading">[% 'Fristsetzung' | $T8 %]</th>
<th class="listheading">[% 'Duedate +Days' | $T8 %]</th>
<th class="listheading">[% 'Fee' | $T8 %]</th>
<!-- <td><input type="checkbox" name="auto_[% DUNNING_it.count %]" value="1" [% IF row.auto %]checked[% END %]></td> -->
<td><input type="checkbox" name="create_invoices_for_fees_[% DUNNING_it.count %]" value="1" [% IF row.create_invoices_for_fees %]checked[% END %]></td>
+ <td><input type="checkbox" name="print_original_invoice_[% DUNNING_it.count %]" value="1" [% IF row.print_original_invoice %]checked[% END %]></td>
<td><input name="payment_terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.payment_terms) %]"></td>
<td><input name="terms_[% DUNNING_it.count %]" size="3" value="[% HTML.escape(row.terms) %]"></td>
<td><input name="fee_[% DUNNING_it.count %]" size="5" value="[% HTML.escape(row.fee) %]"></td>
<!-- <td><input type="checkbox" name="auto_[% rowcount %]" value="1" checked></td> -->
<td><input type="checkbox" name="create_invoices_for_fees_[% rowcount %]" value="1" checked></td>
+ <td><input type="checkbox" name="print_original_invoice_[% DUNNING_it.count %]" value="1" [% IF row.print_original_invoice %]checked[% END %]></td>
<td><input name="payment_terms_[% rowcount %]" size="3"></td>
<td><input name="terms_[% rowcount %]" size="3"></td>
<td><input name="fee_[% rowcount %]" size="5"></td>
[% SET all_active = 1 %][% FOREACH row = DUNNINGS %][% IF !row.active %][% SET all_active = 0 %][% LAST %][% END %][% END %]
[% SET all_email = 1 %][% FOREACH row = DUNNINGS %][% IF !row.email %][% SET all_email = 0 %][% LAST %][% END %][% END %]
+[% SET all_include_invoices = 1 %][% FOREACH row = DUNNINGS %][% IF !row.print_original_invoice %][% SET all_include_invoices = 0 %][% LAST %][% END %][% END %]
<form name="Form" method="post" action="dn.pl" id="form">
<h2>[% LxERP.t8("Print options") %]</h2>
<td><input type="checkbox" name="active_[% loop.count %]" value="1" [% IF row.active %]checked[% END %]></td>
<td><input type="checkbox" name="email_[% loop.count %]" value="1" [% IF row.email %]checked[% END %]></td>
- <td><input type="checkbox" name="include_invoice_[% loop.count %]" value="1" [% IF row.include_invoices %]checked[% END %]></td>
+ <td><input type="checkbox" name="include_invoice_[% loop.count %]" value="1" [% IF row.print_original_invoice %]checked[% END %]></td>
<td><input type="hidden" name="customername_[% loop.count %]" size="6" value="[% HTML.escape(row.customername) %]">[% HTML.escape(row.customername) %]</td>
<td><input type="hidden" name="department_[% loop.count %]" size="6" value="[% HTML.escape(row.departmentname) %]">[% HTML.escape(row.departmentname) %]</td>
<td><input type="hidden" name="language_id_[% loop.count %]" size="6" value="[% HTML.escape(row.language_id) %]">[% HTML.escape(row.language) %]</td>