Revision 2a4ad354
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
bin/mozilla/dn.pl | ||
---|---|---|
|
||
sub add {
|
||
$lxdebug->enter_sub();
|
||
|
||
# setup customer selection
|
||
$form->all_vc(\%myconfig, "customer", "AR");
|
||
|
||
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>|;
|
||
}
|
||
|
||
# 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};
|
||
$form->{SHOW_CUSTOMER_SELECTION} = $form->{all_customer} && scalar @{ $form->{all_customer} };
|
||
$form->{SHOW_DUNNING_LEVEL_SELECTION} = $form->{DUNNING} && scalar @{ $form->{DUNNING} };
|
||
$form->{SHOW_DEPARTMENT_SELECTION} = $form->{all_departments} && scalar @{ $form->{all_departments} };
|
||
|
||
# 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('Start Dunning Process');
|
||
$form->{nextsub} = "show_invoices";
|
||
|
||
$form->{jsscript} = 1;
|
||
$form->{fokus} = "search.customer";
|
||
$form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
|
||
$form->{title} = $locale->text('Start Dunning Process');
|
||
$form->{jsscript} = 1;
|
||
$form->{fokus} = "search.customer";
|
||
$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>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><hr size=3 noshade></td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<table>
|
||
<tr>
|
||
<th align=right nowrap>| . $locale->text('Minimum Amount') . qq|</th>
|
||
<td><input name=minamount size=6></td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowrap>| . $locale->text('Group Invoices') . qq|</th>
|
||
<td><input type=checkbox value=1 name=groupinvoices checked></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/add");
|
||
|
||
$lxdebug->leave_sub();
|
||
|
||
}
|
||
|
||
sub show_invoices {
|
locale/de/all | ||
---|---|---|
'Workflow sales_order' => 'Workflow Auftrag',
|
||
'Workflow sales_quotation' => 'Workflow Angebot',
|
||
'Wrong Period' => 'Falscher Zeitraum',
|
||
'Wrong date format!' => 'Falsches Datumsformat!',
|
||
'YYYY' => 'JJJJ',
|
||
'Year' => 'Jahr',
|
||
'Year End' => 'Jahresende',
|
locale/de/dn | ||
---|---|---|
'Feb' => 'Feb',
|
||
'February' => 'Februar',
|
||
'Group' => 'Warengruppe',
|
||
'Group Invoices' => 'Rechnungen zusammenfassen',
|
||
'History' => 'Historie',
|
||
'In-line' => 'im Text',
|
||
'Interest' => 'Zinsen',
|
||
... | ... | |
'March' => 'M?rz',
|
||
'May' => 'Mai',
|
||
'May ' => 'Mai',
|
||
'Minimum Amount' => 'Mindestbetrag',
|
||
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
|
||
'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\'.',
|
templates/webpages/dunning/add_de.html | ||
---|---|---|
<script type="text/javascript" src="js/common.js"></script>
|
||
<script type="text/javascript">
|
||
<!--
|
||
function setup_controls() {
|
||
fokus();
|
||
setupDateFormat('<TMPL_VAR myconfig_dateformat>', 'Falsches Datumsformat!');
|
||
setupPoints('<TMPL_VAR myconfig_numberformat>', 'Falsches Format');
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<body onLoad="setup_controls();">
|
||
|
||
<div class="listtop"><TMPL_VAR title></div>
|
||
|
||
<form method="post" name="search" action="dn.pl">
|
||
|
||
<table>
|
||
<tr>
|
||
<th align="right">Kunde</th>
|
||
<td colspan="3">
|
||
<TMPL_IF SHOW_CUSTOMER_SELECTION>
|
||
<select name="customer">
|
||
<option></option>
|
||
<TMPL_LOOP all_customer><option><TMPL_VAR name ESCAPE=HTML>--<TMPL_VAR id ESCAPE=HTML></option></TMPL_LOOP>
|
||
</select>
|
||
<TMPL_ELSE>
|
||
<input name=customer size=35>
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
|
||
<TMPL_IF SHOW_DUNNING_LEVEL_SELECTION>
|
||
<tr>
|
||
<th align="right">N?chste Mahnstufe</th>
|
||
<td colspan="3">
|
||
<select name="dunning_level">
|
||
<option></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_SELECTION>
|
||
<tr>
|
||
<th align="right">Abteilung</th>
|
||
<td colspan="3">
|
||
<select name="department">
|
||
<option></option>
|
||
<TMPL_LOOP all_departments><option><TMPL_VAR description ESCAPE=HTML>--<TMPL_VAR id 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><td colspan="2"><hr size="3" noshade></td></tr>
|
||
|
||
<tr>
|
||
<th align="right" nowrap>Mindestbetrag</th>
|
||
<td><input name="minamount" size="6"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="right" nowrap>Rechnungen zusammenfassen</th>
|
||
<td><input type="checkbox" value="1" name="groupinvoices" checked></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<input type="hidden" name="nextsub" value="show_invoices">
|
||
|
||
<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>
|
||
|
||
</body>
|
||
|
||
</html>
|
templates/webpages/dunning/add_master.html | ||
---|---|---|
<script type="text/javascript" src="js/common.js"></script>
|
||
<script type="text/javascript">
|
||
<!--
|
||
function setup_controls() {
|
||
fokus();
|
||
setupDateFormat('<TMPL_VAR myconfig_dateformat>', '<translate>Wrong date format!</translate>');
|
||
setupPoints('<TMPL_VAR myconfig_numberformat>', '<translate>wrongformat</translate>');
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<body onLoad="setup_controls();">
|
||
|
||
<div class="listtop"><TMPL_VAR title></div>
|
||
|
||
<form method="post" name="search" action="dn.pl">
|
||
|
||
<table>
|
||
<tr>
|
||
<th align="right"><translate>Customer</translate></th>
|
||
<td colspan="3">
|
||
<TMPL_IF SHOW_CUSTOMER_SELECTION>
|
||
<select name="customer">
|
||
<option></option>
|
||
<TMPL_LOOP all_customer><option><TMPL_VAR name ESCAPE=HTML>--<TMPL_VAR id ESCAPE=HTML></option></TMPL_LOOP>
|
||
</select>
|
||
<TMPL_ELSE>
|
||
<input name=customer size=35>
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
|
||
<TMPL_IF SHOW_DUNNING_LEVEL_SELECTION>
|
||
<tr>
|
||
<th align="right"><translate>Next Dunning Level</translate></th>
|
||
<td colspan="3">
|
||
<select name="dunning_level">
|
||
<option></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_SELECTION>
|
||
<tr>
|
||
<th align="right"><translate>Department</translate></th>
|
||
<td colspan="3">
|
||
<select name="department">
|
||
<option></option>
|
||
<TMPL_LOOP all_departments><option><TMPL_VAR description ESCAPE=HTML>--<TMPL_VAR id 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><td colspan="2"><hr size="3" noshade></td></tr>
|
||
|
||
<tr>
|
||
<th align="right" nowrap><translate>Minimum Amount</translate></th>
|
||
<td><input name="minamount" size="6"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="right" nowrap><translate>Group Invoices</translate></th>
|
||
<td><input type="checkbox" value="1" name="groupinvoices" checked></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<input type="hidden" name="nextsub" value="show_invoices">
|
||
|
||
<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>
|
||
|
||
</body>
|
||
|
||
</html>
|
Auch abrufbar als: Unified diff
Umstellung der Filtermaske für neue Mahnungen auf das HTML-Vorlagensystem.