- if (@{ $form->{DUNNING_CONFIG} }) {
- foreach $item (@{ $form->{DUNNING_CONFIG} }) {
- $form->{selectdunning} .=
- "<option value=$item->{id}>$item->{dunning_description}</option>";
- }
- }
-
-
- $form->{nextsub} = "save_dunning";
-
- $form->{jsscript} = 1;
- $form->{javascript} .= qq|<script type="text/javascript" src="js/checkbox_utils.js"></script>|;
-
- $form->{callback} =
- "$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}"
- unless $form->{callback};
-
- @column_index = qw(dunning_description dunning_description_next active email customername invnumber invdate inv_duedate amount next_duedate fee interest );
-
- $column_header{dunning_description} =
- qq|<th class="listheading" colspan="2">|
- . $locale->text('Current / Next Level')
- . qq|</th>|;
- $column_header{active} =
- qq|<th class=listheading>|
- . NTI($cgi->checkbox('-name' => 'selectall_active',
- '-label' => $locale->text('Active?'),
- '-checked' => 0,
- '-onclick' => "checkbox_check_all('selectall_active', 'active_', 1, " . scalar(@{ $form->{DUNNINGS} }) . ")"))
- . qq|</th>|;
- $column_header{email} =
- qq|<th class=listheading>|
- . NTI($cgi->checkbox('-name' => 'selectall_email',
- '-label' => $locale->text('eMail?'),
- '-checked' => 0,
- '-onclick' => "checkbox_check_all('selectall_email', 'email_', 1, " . scalar(@{ $form->{DUNNINGS} }) . ")"))
- . qq|</th>|;
- $column_header{customername} =
- qq|<th class=listheading>|
- . $locale->text('Customername')
- . qq|</th>|;
- $column_header{invnumber} =
- qq|<th class=listheading>|
- . $locale->text('Invno.')
- . qq|</th>|;
- $column_header{inv_duedate} =
- qq|<th class=listheading>|
- . $locale->text('Inv. Duedate')
- . qq|</th>|;
- $column_header{next_duedate} =
- qq|<th class=listheading>|
- . $locale->text('Dunning Duedate')
- . qq|</th>|;
- $column_header{invdate} =
- qq|<th class=listheading>|
- . $locale->text('Invdate')
- . qq|</th>|;
- $column_header{amount} =
- qq|<th class=listheading>|
- . $locale->text('Amount')
- . qq|</th>|;
- $column_header{fee} =
- qq|<th class=listheading>|
- . $locale->text('Total Fees')
- . qq|</th>|;
- $column_header{interest} =
- qq|<th class=listheading>|
- . $locale->text('Interest')
- . qq|</th>|;
-
- $form->header;
-
-
- print qq|
-<body>
-<script type="text/javascript" src="js/common.js"></script>
-<script type="text/javascript" src="js/dunning.js"></script>
-<form name=Form method=post action=$form->{script}>
-
-
-<table width=100%>
- <tr>
- <th class=listtop colspan=12>$form->{title}</th>
- </tr>
- <tr height="5"></tr>
- <tr>|;
- map { print "$column_header{$_}\n" if $column_header{$_}; } @column_index;
-
- print qq|
- </tr>
-|;
- my $i = 0;
- foreach $ref (@{ $form->{DUNNINGS} }) {
-
- $i++;
- my $j = $i % 2;