my @values;
- $form->{customer_id} = $1 if ($form->{customer} =~ /--(\d+)$/);
-
if ($form->{customer_id}) {
$where .= qq| AND (a.customer_id = ?)|;
push(@values, $form->{customer_id});
push(@values, '%' . $form->{customer} . '%');
}
-
my %columns = (
"ordnumber" => "a.ordnumber",
"invnumber" => "a.invnumber",
push(@values, conv_i($form->{dunning_level}));
}
- $form->{minamount} = $form->parse_amount($myconfig,$form->{minamount});
+ if ($form->{department_id}) {
+ $where .= qq| AND a.department_id = ?|;
+ push @values, conv_i($form->{department_id});
+ }
+
+ $form->{minamount} = $form->parse_amount($myconfig, $form->{minamount});
if ($form->{minamount}) {
$where .= qq| AND ((a.amount - a.paid) > ?) |;
push(@values, $form->{minamount});
$main::lxdebug->leave_sub();
}
+sub _get_departments {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $dbh, $key) = @_;
+
+ $key = "all_departments" unless ($key);
+
+ my $query = qq|SELECT * FROM department|;
+
+ $self->{$key} = selectall_hashref_query($self, $dbh, $query);
+
+ $main::lxdebug->leave_sub();
+}
+
sub get_lists {
$main::lxdebug->enter_sub();
$self->_get_payments($dbh, $params{"payments"});
}
+ if($params{"departments"}) {
+ $self->_get_departments($dbh, $params{"departments"});
+ }
+
$dbh->disconnect();
$main::lxdebug->leave_sub();
sub search {
$lxdebug->enter_sub();
- # setup customer selection
- $form->all_vc(\%myconfig, "customer", "AR");
+
+ $form->get_lists("customers" => "ALL_CUSTOMERS",
+ "departments" => "ALL_DEPARTMENTS");
DN->get_config(\%myconfig, \%$form);
- if (@{ $form->{all_customer} }) {
- map { $customer .= "<option>$_->{name}--$_->{id}\n" }
- @{ $form->{all_customer} };
- $customer = qq|<select name=customer><option>\n$customer</select>|;
- } else {
- $customer = qq|<input name=customer size=35>|;
- }
+ $form->{SHOW_CUSTOMER_DDBOX} = scalar @{ $form->{ALL_CUSTOMERS} } <= $myconfig{vclimit};
+ $form->{SHOW_DEPARTMENT_DDBOX} = scalar @{ $form->{ALL_CUSTOMERS} };
+ $form->{SHOW_DUNNING_LEVELS} = scalar @{ $form->{DUNNING} };
- # dunning levels
- if (@{ $form->{DUNNING} }) {
- $form->{selectdunning_level} = "<option></option\n";
- map {
- $form->{selectdunning_level} .=
- "<option value=$_->{id}>$_->{dunning_description}</option>\n"
- } (@{ $form->{DUNNING} });
- }
- $dunning_level = qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Next Dunning Level') . qq|</th>
- <td colspan=3><select name=dunning_level>$form->{selectdunning_level}</select></td>
- </tr>
- | if $form->{selectdunning_level};
-
- # departments
- if (@{ $form->{all_departments} }) {
- $form->{selectdepartment} = "<option>\n";
- map {
- $form->{selectdepartment} .=
- "<option>$_->{description}--$_->{id}\n"
- } (@{ $form->{all_departments} });
- }
- $department = qq|
- <tr>
- <th align=right nowrap>| . $locale->text('Department') . qq|</th>
- <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
- </tr>
- | if $form->{selectdepartment};
- $form->{title} = $locale->text('Search Dunning');
- $form->{nextsub} = "show_dunning";
-
- # use JavaScript Calendar or not
- $form->{jsscript} = 1;
- $jsscript = "";
- if ($form->{jsscript}) {
-
- # with JavaScript Calendar
- $button1 = qq|
- <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
- <input type=button name=transdatefrom id="trigger1" value=|
- . $locale->text('button') . qq|></td>
- |;
- $button2 = qq|
- <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
- <input type=button name=transdateto id="trigger2" value=|
- . $locale->text('button') . qq|></td>
- |;
- $button3 = qq|
- <td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
- <input type=button name=dunningfrom id="trigger3" value=|
- . $locale->text('button') . qq|></td>
- |;
- $button4 = qq|
- <td><input name=dunningto id=dunningto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\">
- <input type=button name=dunningto id="trigger4" value=|
- . $locale->text('button') . qq|></td>
- |;
-
- #write Trigger
- $jsscript =
- Form->write_trigger(\%myconfig, "4", "transdatefrom", "BR", "trigger1", "transdateto", "BR", "trigger2", "dunningfrom", "BR", "trigger3", "dunningto", "BR", "trigger4");
- } else {
+ $form->{jsscript} = 1;
+ $form->{title} = $locale->text('Search Dunning');
+ $form->{fokus} = "search.customer";
+ $form->{javascript} .= qq||;
+ $form->header;
- # without JavaScript Calendar
- $button1 =
- qq|<td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
- $button2 =
- qq|<td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
- $button3 =
- qq|<td><input name=dunningfrom id=dunningfrom size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
- $button4 =
- qq|<td><input name=dunningfrom id=dunningto size=11 title="$myconfig{dateformat}" onBlur=\"check_right_date_format(this)\"></td>|;
- }
+ $form->{onload} = qq|focus()|
+ . qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|
+ . qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
- $form->{fokus} = "search.customer";
- $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
- $form->header;
- $onload = qq|focus()|;
- $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
-
- print qq|
-<body onLoad="$onload">
-
-<form method=post name="search" action=$form->{script}>
-
-<table width=100%>
- <tr><th class=listtop>$form->{title}</th></tr>
- <tr height="5"></tr>
- <tr>
- <td>
- <table>
- <tr>
- <th align=right>| . $locale->text('Customer') . qq|</th>
- <td colspan=3>$customer</td>
- </tr>
- $dunning_level
- $department
- <tr>
- <th align=right nowrap>| . $locale->text('Invoice Number') . qq|</th>
- <td colspan=3><input name=invnumber size=20></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
- <td colspan=3><input name=ordnumber size=20></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Notes') . qq|</th>
- <td colspan=3><input name=notes size=40></td>
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Invdate from') . qq|</th>
- $button1
- <th align=right nowrap>| . $locale->text('To') . qq|</th>
- $button2
- </tr>
- <tr>
- <th align=right nowrap>| . $locale->text('Dunning Date from') . qq|</th>
- $button3
- <th align=right nowrap>| . $locale->text('To') . qq|</th>
- $button4
- </tr>
-
- </table>
- </td>
- </tr>
- <tr>
- <td><hr size=3 noshade></td>
- </tr>
- <tr>
- <td>
- <table>
- <tr>
- <th align=right nowrap>| . $locale->text('Show old dunnings') . qq|</th>
- <td><input type=checkbox value=1 name=showold></td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-<input type=hidden name=nextsub value=$form->{nextsub}>
-
-<input type=hidden name=login value=$form->{login}>
-<input type=hidden name=password value=$form->{password}>
-
-<br>
-<input class=submit type=submit name=action value="|
- . $locale->text('Continue') . qq|">
-
-</form>
-
-</body>
-
-$jsscript
-
-</html>
-|;
+ print $form->parse_html_template("dunning/search");
$lxdebug->leave_sub();
$lxdebug->enter_sub();
DN->get_dunning(\%myconfig, \%$form);
- $form->{title} = $locale->text('Dunning overview');
-
-
-
-
-
- $form->{callback} =
- "$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}"
- unless $form->{callback};
-
- @column_index = qw(dunning_description customername invnumber invdate inv_duedate invamount dunning_date next_duedate fee interest );
-
- $column_header{dunning_description} =
- qq|<th class=listheading>|
- . $locale->text('Dunning Level')
- . qq|</th>|;
- $column_header{customername} =
- qq|<th class=listheading>|
- . $locale->text('Customername')
- . qq|</th>|;
- $column_header{invnumber} =
- qq|<th class=listheading>|
- . $locale->text('Invnumber')
- . qq|</th>|;
- $column_header{inv_duedate} =
- qq|<th class=listheading>|
- . $locale->text('Invoice Duedate')
- . qq|</th>|;
- $column_header{dunning_date} =
- qq|<th class=listheading>|
- . $locale->text('Dunning Date')
- . 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{invamount} =
- 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 method=post action=$form->{script}>
-
-<table width=100%>
- <tr>
- <th class=listtop colspan=10>$form->{title}</th>
- </tr>
- <tr height="5"></tr>
- <tr>|;
- map { print "$column_header{$_}\n" } @column_index;
-
- print qq|
- </tr>
-|;
-
- my %columns = (
- "dunning_duedate" => "next_duedate",
- "duedate" => "inv_duedate",
- "transdate" => "invdate",
- "amount" => "invamount",
- );
-
- my $i = 0;
- my $j = 0;
+ my $odd_even = 0;
my ($previous_dunning_id, $first_row_for_dunning);
- foreach $ref (@{ $form->{DUNNINGS} }) {
- $i++;
+ foreach $ref (@{ $form->{DUNNINGS} }) {
if ($previous_dunning_id != $ref->{dunning_id}) {
- $j++;
- $j = $j % 2;
- $first_row_for_dunning = 1;
- } else {
- $first_row_for_dunning = 0;
- }
- $previous_dunning_id = $ref->{dunning_id};
-
- print qq|
- <tr valign=top class=listrow$j>
-|;
-
-
-
- foreach (qw(dunning_date dunning_duedate duedate transdate customername amount fee interest)) {
- my $col = $columns{$_} ? $columns{$_} : $_;
- $column_data{$col} = "<td>" . H($ref->{$_}) . "</td>";
- }
+ $odd_even = ($odd_even + 1) % 2;
+ $ref->{first_row_for_dunning} = 1;
- if ($first_row_for_dunning) {
- $column_data{dunning_description} =
- qq|<td><a href="dn.pl?action=print_dunning&format=pdf&media=screen&| .
- qq|dunning_id=| . E($ref->{dunning_id}) .
- join("", map({ "&${_}=" . E($form->{$_}) } qw(login password callback))) .
- qq|">| . H($ref->{dunning_description}) . qq|</a></td>|;
} else {
- $column_data{dunning_description} = qq|<td> </td>|;
- $column_data{customername} = qq|<td> </td>|;
+ $ref->{first_row_for_dunning} = 0;
}
- $column_data{invnumber} =
- qq|<td><a href="| . ($ref->{invoice} ? "is.pl" : "ar.pl" ) .
- qq|?action=edit&id=| . H($ref->{id}) .
- join("", map({ "&${_}=" . E($form->{$_}) } qw(login password callback))) .
- qq|">| . H($ref->{invnumber}) . qq|</a></td>|;
-
- map { print "$column_data{$_}\n" } @column_index;
-
- print qq|
- </tr>
-|;
+ $previous_dunning_id = $ref->{dunning_id};
+ $ref->{listrow_odd_even} = $odd_even;
}
- $form->{rowcount} = $i;
-
- print qq|
- </table>
- </td>
- </tr>
- <tr>
- <td><hr size=3 noshade></td>
- </tr>
-</table>
-
-<br>
-<form method=post action=$form->{script}>
-
-<input name=callback type=hidden value="$form->{callback}">
-<input name=rowcount type=hidden value="$form->{rowcount}">
-<input name=nextsub type=hidden value="$form->{nextsub}">
-
-
-<input type=hidden name=login value=$form->{login}>
-<input type=hidden name=password value=$form->{password}>
-
- </form>
+ if (!$form->{callback}) {
+ $form->{callback} =
+ build_std_url("action=show_dunning", qw(customer_id customer dunning_level department_id invnumber ordnumber
+ ransdatefrom transdateto dunningfrom dunningto notes showold));
+ }
- </body>
- </html>
-|;
+ $form->{title} = $locale->text('Dunning overview');
+ $form->header();
+ print $form->parse_html_template("dunning/show_dunning");
$lxdebug->leave_sub();
'Add Request for Quotation' => 'Anfrage erfassen',
'Add Sales Order' => 'Auftrag erfassen',
'Address' => 'Adresse',
- 'Amount' => 'Betrag',
'Apr' => 'Apr',
'April' => 'April',
'Attachment' => 'als Anhang',
'Could not create dunning copy!' => 'Eine Kopie der Zahlungserinnerung konnte nicht erstellt werden.',
'Country' => 'Land',
'Credit Note' => 'Gutschrift',
- 'Customer' => 'Kunde',
'Customer Number' => 'Kundennummer',
'Customer details' => 'Kundendetails',
'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.',
'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
- 'Customername' => 'Kundenname',
'DELETED' => 'Gelöscht',
'DUNNING STARTED' => 'Mahnprozess gestartet',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:',
'Description' => 'Beschreibung',
'Discount' => 'Rabatt',
- 'Dunning Date' => 'Mahndatum',
- 'Dunning Date from' => 'Mahnungen von',
'Dunning Description missing in row ' => 'Mahnstufenbeschreibung fehlt in Zeile ',
- 'Dunning Duedate' => 'Zahlbar bis',
- 'Dunning Level' => 'Mahnlevel',
'Dunning Level missing in row ' => 'Mahnlevel fehlt in ',
'Dunning Process Config saved!' => 'Mahnwesenkonfiguration gespeichert!',
'Dunning Process started for selected invoices!' => 'Mahnprozess für selektierte Rechnungen
'Group' => 'Warengruppe',
'History' => 'Historie',
'In-line' => 'im Text',
- 'Interest' => 'Zinsen',
- 'Invdate' => 'Rechnungsdatum',
- 'Invdate from' => 'Rechnungen von',
- 'Invnumber' => 'Rechnungsnummer',
'Invoice' => 'Rechnung',
'Invoice Date missing!' => 'Rechnungsdatum fehlt!',
- 'Invoice Duedate' => 'Fälligkeitsdatum',
- 'Invoice Number' => 'Rechnungsnummer',
'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
'Jan' => 'Jan',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.',
'Name' => 'Name',
- 'Next Dunning Level' => 'Nächste Mahnstufe',
'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden',
'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgewählt.',
'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.',
'No.' => 'Position',
- 'Notes' => 'Bemerkungen',
'Nov' => 'Nov',
'November' => 'November',
'Number' => 'Nummer',
'October' => 'Oktober',
'OpenDocument/OASIS' => 'OpenDocument/OASIS',
'Order Date missing!' => 'Auftragsdatum fehlt!',
- 'Order Number' => 'Auftragsnummer',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'PAYMENT POSTED' => 'Rechung gebucht',
'PDF' => 'PDF',
'Ship to' => 'Lieferadresse',
'Shipping Address' => 'Lieferadresse',
'Show details' => 'Details anzeigen',
- 'Show old dunnings' => 'Alte Mahnungen anzeigen',
'Start Dunning Process' => 'Mahnprozess starten',
'Storno Invoice' => 'Stornorechnung',
'Storno Packing List' => 'Stornolieferschein',
'Subtotal' => 'Zwischensumme',
'Terms missing in row ' => '+Tage fehlen in Zeile ',
'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
- 'To' => 'An',
- 'Total Fees' => 'Kumulierte Gebühren',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'What type of item is this?' => 'Was ist dieser Artikel?',
'Zipcode' => 'PLZ',
'bin_list' => 'Lagerliste',
- 'button' => '?',
'emailed to' => 'gemailt an',
'invoice' => 'Rechnung',
'none (pricegroup)' => 'keine',
--- /dev/null
+<body onLoad="<TMPL_VAR onload>">
+
+ <script type="text/javascript" src="js/common.js"></script>
+
+ <form method="post" name="search" action="dn.pl">
+
+ <div class="listtop"><TMPL_VAR title></div>
+
+ <table width="100%">
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align="right">Kunde</th>
+ <td colspan="3">
+ <TMPL_IF SHOW_CUSTOMER_DDBOX>
+ <select name="customer_id">
+ <option value=""></option>
+ <TMPL_LOOP ALL_CUSTOMERS><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR name ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ <TMPL_ELSE>
+ <input name="customer" size="35">
+ </TMPL_IF>
+ </td>
+ </tr>
+
+ <TMPL_IF SHOW_DUNNING_LEVELS>
+ <tr>
+ <th align="right" nowrap>Nächste Mahnstufe</th>
+ <td colspan="3">
+ <select name="dunning_level">
+ <option value=""></option>
+ <TMPL_LOOP DUNNING><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR dunning_description ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ </TMPL_IF>
+
+ <TMPL_IF SHOW_DEPARTMENT_DDBOX>
+ <tr>
+ <th align="right" nowrap>Abteilung</th>
+ <td colspan="3">
+ <select name="department_id">
+ <option value=""></option>
+ <TMPL_LOOP ALL_DEPARTMENTS><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR description ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ </TMPL_IF>
+
+ <tr>
+ <th align="right" nowrap>Rechnungsnummer</th>
+ <td colspan="3"><input name="invnumber" size="20"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Auftragsnummer</th>
+ <td colspan="3"><input name="ordnumber" size="20"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Bemerkungen</th>
+ <td colspan="3"><input name="notes" size="40"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Rechnungen von</th>
+ <td>
+ <input name="transdatefrom" id="transdatefrom" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdatefrom" id="trigger1" value="?">
+ </td>
+ <th align="right" nowrap>An</th>
+ <td>
+ <input name="transdateto" id="transdateto" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdateto" id="trigger2" value="?">
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Mahnungen von</th>
+ <td>
+ <input name="dunningfrom" id="dunningfrom" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="dunningfrom" id="trigger3" value="?">
+ </td>
+ <th align="right" nowrap>An</th>
+ <td>
+ <input name="dunningto" id="dunningto" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="dunningto" id="trigger4" value="?">
+ </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr><td><hr size="3" noshade></td></tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align="right" nowrap>Alte Mahnungen anzeigen</th>
+ <td><input type="checkbox" value="1" name="showold"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="nextsub" value="show_dunning">
+
+ <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
+ <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
+
+ <br>
+
+ <input class="submit" type="submit" name="action" value="Weiter">
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ Calendar.setup({ inputField : "transdatefrom", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger1" });
+ Calendar.setup({ inputField : "transdateto", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger2" });
+ Calendar.setup({ inputField : "dunningfrom", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger3" });
+ Calendar.setup({ inputField : "dunningto", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger4" });
+ -->
+ </script>
+
+</body>
+
+</html>
--- /dev/null
+<body onLoad="<TMPL_VAR onload>">
+
+ <script type="text/javascript" src="js/common.js"></script>
+
+ <form method="post" name="search" action="dn.pl">
+
+ <div class="listtop"><TMPL_VAR title></div>
+
+ <table width="100%">
+ <tr height="5"></tr>
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align="right"><translate>Customer</translate></th>
+ <td colspan="3">
+ <TMPL_IF SHOW_CUSTOMER_DDBOX>
+ <select name="customer_id">
+ <option value=""></option>
+ <TMPL_LOOP ALL_CUSTOMERS><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR name ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ <TMPL_ELSE>
+ <input name="customer" size="35">
+ </TMPL_IF>
+ </td>
+ </tr>
+
+ <TMPL_IF SHOW_DUNNING_LEVELS>
+ <tr>
+ <th align="right" nowrap><translate>Next Dunning Level</translate></th>
+ <td colspan="3">
+ <select name="dunning_level">
+ <option value=""></option>
+ <TMPL_LOOP DUNNING><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR dunning_description ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ </TMPL_IF>
+
+ <TMPL_IF SHOW_DEPARTMENT_DDBOX>
+ <tr>
+ <th align="right" nowrap><translate>Department</translate></th>
+ <td colspan="3">
+ <select name="department_id">
+ <option value=""></option>
+ <TMPL_LOOP ALL_DEPARTMENTS><option value="<TMPL_VAR id ESCAPE=HTML>"><TMPL_VAR description ESCAPE=HTML></option>
+ </TMPL_LOOP>
+ </select>
+ </td>
+ </tr>
+ </TMPL_IF>
+
+ <tr>
+ <th align="right" nowrap><translate>Invoice Number</translate></th>
+ <td colspan="3"><input name="invnumber" size="20"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Order Number</translate></th>
+ <td colspan="3"><input name="ordnumber" size="20"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Notes</translate></th>
+ <td colspan="3"><input name="notes" size="40"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Invdate from</translate></th>
+ <td>
+ <input name="transdatefrom" id="transdatefrom" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdatefrom" id="trigger1" value="?">
+ </td>
+ <th align="right" nowrap><translate>To</translate></th>
+ <td>
+ <input name="transdateto" id="transdateto" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="transdateto" id="trigger2" value="?">
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Dunning Date from</translate></th>
+ <td>
+ <input name="dunningfrom" id="dunningfrom" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="dunningfrom" id="trigger3" value="?">
+ </td>
+ <th align="right" nowrap><translate>To</translate></th>
+ <td>
+ <input name="dunningto" id="dunningto" size="11" title="<TMPL_VAR myconfig_dateformat" onBlur="check_right_date_format(this)">
+ <input type="button" name="dunningto" id="trigger4" value="?">
+ </td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr><td><hr size="3" noshade></td></tr>
+
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <th align="right" nowrap><translate>Show old dunnings</translate></th>
+ <td><input type="checkbox" value="1" name="showold"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="nextsub" value="show_dunning">
+
+ <input type="hidden" name="login" value="<TMPL_VAR login ESCAPE=HTML>">
+ <input type="hidden" name="password" value="<TMPL_VAR password ESCAPE=HTML>">
+
+ <br>
+
+ <input class="submit" type="submit" name="action" value="<translate>Continue</translate>">
+
+ </form>
+
+ <script type="text/javascript">
+ <!--
+ Calendar.setup({ inputField : "transdatefrom", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger1" });
+ Calendar.setup({ inputField : "transdateto", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger2" });
+ Calendar.setup({ inputField : "dunningfrom", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger3" });
+ Calendar.setup({ inputField : "dunningto", ifFormat :"<TMPL_VAR myconfig_jsc_dateformat>", align : "BR", button : "trigger4" });
+ -->
+ </script>
+
+</body>
+
+</html>
--- /dev/null
+<body>
+
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/dunning.js"></script>
+
+ <div class="listtop" width="100%"><TMPL_VAR title></div>
+
+ <p>
+ <table width="100%">
+ <tr>
+ <th class="listheading">Mahnlevel</th>
+ <th class="listheading">Kundenname</th>
+ <th class="listheading">Rechnungsnummer</th>
+ <th class="listheading">Rechnungsdatum</th>
+ <th class="listheading">Fälligkeitsdatum</th>
+ <th class="listheading">Betrag</th>
+ <th class="listheading">Mahndatum</th>
+ <th class="listheading">Zahlbar bis</th>
+ <th class="listheading">Kumulierte Gebühren</th>
+ <th class="listheading">Zinsen</th>
+ </tr>
+
+ <!-- Ausgabe der einzelnen Zeilen -->
+
+ <TMPL_LOOP DUNNINGS>
+ <tr class="listrow<TMPL_VAR listrow_odd_even>">
+ <td>
+ <TMPL_IF first_row_for_dunning>
+ <a href="dn.pl?action=print_dunning&format=pdf&media=screen&dunning_id=<TMPL_VAR dunning_id ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>">
+ <TMPL_VAR dunning_description ESCAPE=HTML>
+ </a>
+ <TMPL_ELSE>
+
+ </TMPL_IF>
+ </td>
+
+ <td><TMPL_IF first_row_for_dunning><TMPL_VAR customername ESCAPE=HTML><TMPL_ELSE> </TMPL_IF></td>
+
+ <td><a href="is.pl?action=edit&id=<TMPL_VAR id ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>"><TMPL_VAR invnumber ESCAPE=HTML></a></td>
+
+ <td align="right"><TMPL_VAR transdate ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR duedate ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR amount ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR dunning_date ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR dunning_duedate ESCAPE=HTML></td>
+ <td align="right"><TMPL_IF first_row_for_dunning><TMPL_VAR fee ESCAPE=HTML><TMPL_ELSE> </TMPL_IF></td>
+ <td align="right"><TMPL_VAR interest ESCAPE=HTML></td>
+ </tr>
+ </TMPL_LOOP>
+
+ <tr><td colspan="10"><hr size="3" noshade></td></tr>
+ </table>
+ </p>
+
+</body>
--- /dev/null
+<body>
+
+ <script type="text/javascript" src="js/common.js"></script>
+ <script type="text/javascript" src="js/dunning.js"></script>
+
+ <div class="listtop" width="100%"><TMPL_VAR title></div>
+
+ <p>
+ <table width="100%">
+ <tr>
+ <th class="listheading"><translate>Dunning Level</translate></th>
+ <th class="listheading"><translate>Customername</translate></th>
+ <th class="listheading"><translate>Invnumber</translate></th>
+ <th class="listheading"><translate>Invdate</translate></th>
+ <th class="listheading"><translate>Invoice Duedate</translate></th>
+ <th class="listheading"><translate>Amount</translate></th>
+ <th class="listheading"><translate>Dunning Date</translate></th>
+ <th class="listheading"><translate>Dunning Duedate</translate></th>
+ <th class="listheading"><translate>Total Fees</translate></th>
+ <th class="listheading"><translate>Interest</translate></th>
+ </tr>
+
+ <!-- Ausgabe der einzelnen Zeilen -->
+
+ <TMPL_LOOP DUNNINGS>
+ <tr class="listrow<TMPL_VAR listrow_odd_even>">
+ <td>
+ <TMPL_IF first_row_for_dunning>
+ <a href="dn.pl?action=print_dunning&format=pdf&media=screen&dunning_id=<TMPL_VAR dunning_id ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>">
+ <TMPL_VAR dunning_description ESCAPE=HTML>
+ </a>
+ <TMPL_ELSE>
+
+ </TMPL_IF>
+ </td>
+
+ <td><TMPL_IF first_row_for_dunning><TMPL_VAR customername ESCAPE=HTML><TMPL_ELSE> </TMPL_IF></td>
+
+ <td><a href="is.pl?action=edit&id=<TMPL_VAR id ESCAPE=URL>&login=<TMPL_VAR login ESCAPE=URL>&password=<TMPL_VAR password ESCAPE=URL>&callback=<TMPL_VAR callback ESCAPE=URL>"><TMPL_VAR invnumber ESCAPE=HTML></a></td>
+
+ <td align="right"><TMPL_VAR transdate ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR duedate ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR amount ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR dunning_date ESCAPE=HTML></td>
+ <td align="right"><TMPL_VAR dunning_duedate ESCAPE=HTML></td>
+ <td align="right"><TMPL_IF first_row_for_dunning><TMPL_VAR fee ESCAPE=HTML><TMPL_ELSE> </TMPL_IF></td>
+ <td align="right"><TMPL_VAR interest ESCAPE=HTML></td>
+ </tr>
+ </TMPL_LOOP>
+
+ <tr><td colspan="10"><hr size="3" noshade></td></tr>
+ </table>
+ </p>
+
+</body>