return $error;
}
-sub save_preferences {
+sub save_defaults {
$main::lxdebug->enter_sub();
- my ($self, $myconfig, $form, $memberfile, $userspath, $webdav) = @_;
+ my $self = shift;
+ my %params = @_;
- map { ($form->{$_}) = split(/--/, $form->{$_}) }
- qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
+ my $myconfig = \%main::myconfig;
+ my $form = $main::form;
- my @a;
- $form->{curr} =~ s/ //g;
- map { push(@a, uc pack "A3", $_) if $_ } split(/:/, $form->{curr});
- $form->{curr} = join ':', @a;
+ my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig);
- # connect to database
- my $dbh = $form->dbconnect_noauto($myconfig);
+ my %accnos;
+ map { ($accnos{$_}) = split(m/--/, $form->{$_}) } qw(inventory_accno income_accno expense_accno fxgain_accno fxloss_accno);
+
+ $form->{curr} =~ s/ //g;
+ my @currencies = grep { $_ ne '' } split m/:/, $form->{curr};
+ my $currency = join ':', @currencies;
# these defaults are database wide
- # user specific variables are in myconfig
- # save defaults
+
my $query =
- qq|UPDATE defaults SET | .
- qq|inventory_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?), | .
- qq|income_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?), | .
- qq|expense_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?), | .
- qq|fxgain_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?), | .
- qq|fxloss_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?), | .
- qq|invnumber = ?, | .
- qq|cnnumber = ?, | .
- qq|sonumber = ?, | .
- qq|ponumber = ?, | .
- qq|sqnumber = ?, | .
- qq|rfqnumber = ?, | .
- qq|customernumber = ?, | .
- qq|vendornumber = ?, | .
- qq|articlenumber = ?, | .
- qq|servicenumber = ?, | .
- qq|yearend = ?, | .
- qq|curr = ?, | .
- qq|businessnumber = ?|;
- my @values = ($form->{inventory_accno}, $form->{income_accno},
- $form->{expense_accno},
- $form->{fxgain_accno}, $form->{fxloss_accno},
- $form->{invnumber}, $form->{cnnumber},
- $form->{sonumber}, $form->{ponumber},
- $form->{sqnumber}, $form->{rfqnumber},
- $form->{customernumber}, $form->{vendornumber},
- $form->{articlenumber}, $form->{servicenumber},
- $form->{yearend}, $form->{curr},
+ qq|UPDATE defaults SET
+ inventory_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ income_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ expense_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ fxgain_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ fxloss_accno_id = (SELECT c.id FROM chart c WHERE c.accno = ?),
+ invnumber = ?,
+ cnnumber = ?,
+ sonumber = ?,
+ ponumber = ?,
+ sqnumber = ?,
+ rfqnumber = ?,
+ customernumber = ?,
+ vendornumber = ?,
+ articlenumber = ?,
+ servicenumber = ?,
+ yearend = ?,
+ curr = ?,
+ businessnumber = ?|;
+ my @values = ($accnos{inventory_accno}, $accnos{income_accno}, $accnos{expense_accno},
+ $accnos{fxgain_accno}, $accnos{fxloss_accno},
+ $form->{invnumber}, $form->{cnnumber},
+ $form->{sonumber}, $form->{ponumber},
+ $form->{sqnumber}, $form->{rfqnumber},
+ $form->{customernumber}, $form->{vendornumber},
+ $form->{articlenumber}, $form->{servicenumber},
+ $form->{yearend}, $currency,
$form->{businessnumber});
do_query($form, $dbh, $query, @values);
+ $dbh->commit();
+
+ $main::lxdebug->leave_sub();
+}
+
+
+sub save_preferences {
+ $main::lxdebug->enter_sub();
+
+ my ($self, $myconfig, $form, $memberfile, $userspath, $webdav) = @_;
+
+ my $dbh = $form->get_standard_dbh($myconfig);
+
+ my ($currency, $businessnumber) = selectrow_query($form, $dbh, qq|SELECT curr, businessnumber FROM defaults|);
+
# update name
- $query = qq|UPDATE employee
- SET name = ?
- WHERE login = ?|;
+ my $query = qq|UPDATE employee SET name = ? WHERE login = ?|;
do_query($form, $dbh, $query, $form->{name}, $form->{login});
- my $rc = $dbh->commit;
- $dbh->disconnect;
+ my $rc = $dbh->commit();
# save first currency in myconfig
- $form->{currency} = substr($form->{curr}, 0, 3);
+ $currency =~ s/:.*//;
+ $form->{currency} = $currency;
+
+ $form->{businessnumber} = $businessnumber;
$myconfig = new User "$memberfile", "$form->{login}";
$lxdebug->leave_sub();
}
+sub edit_defaults {
+ $lxdebug->enter_sub();
+
+ # get defaults for account numbers and last numbers
+ AM->defaultaccounts(\%myconfig, \%$form);
+
+ map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
+
+ foreach $key (keys %{ $form->{IC} }) {
+ foreach $accno (sort keys %{ $form->{IC}->{$key} }) {
+ my $array = "ACCNOS_" . uc($key);
+ $form->{$array} ||= [];
+
+ my $value = "${accno}--" . $form->{IC}->{$key}->{$accno}->{description};
+ push @{ $form->{$array} }, {
+ 'name' => $value,
+ 'value' => $value,
+ 'selected' => $form->{IC}->{$key}->{$accno}->{id} == $form->{defaults}->{$key},
+ };
+ }
+ }
+
+ $form->{title} = $locale->text('Ranges of numbers and default accounts');
+
+ $form->header();
+ print $form->parse_html_template('am/edit_defaults');
+
+ $lxdebug->leave_sub();
+}
+
+sub save_defaults {
+ $lxdebug->enter_sub();
+
+ AM->save_defaults();
+
+ $form->redirect($locale->text('Defaults saved.'));
+
+ $lxdebug->leave_sub();
+}
+
sub _build_cfg_options {
my $idx = shift;
my $array = uc($idx) . 'S';
sub config {
$lxdebug->enter_sub();
- # get defaults for account numbers and last numbers
- AM->defaultaccounts(\%myconfig, \%$form);
-
- map { $form->{"defaults_${_}"} = $form->{defaults}->{$_} } keys %{ $form->{defaults} };
-
_build_cfg_options('dateformat', qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd));
_build_cfg_options('numberformat', qw(1,000.00 1000.00 1.000,00 1000,00));
};
}
- foreach $key (keys %{ $form->{IC} }) {
- foreach $accno (sort keys %{ $form->{IC}->{$key} }) {
- my $array = "ACCNOS_" . uc($key);
- $form->{$array} ||= [];
-
- my $value = "${accno}--" . $form->{IC}->{$key}->{$accno}->{description};
- push @{ $form->{$array} }, {
- 'name' => $value,
- 'value' => $value,
- 'selected' => $form->{IC}->{$key}->{$accno}->{id} == $form->{defaults}->{$key},
- };
- }
- }
-
$form->{STYLESHEETS} = [];
foreach $item (qw(lx-office-erp.css Win2000.css)) {
push @{ $form->{STYLESHEETS} }, {
'Credit Tax Account' => 'Umsatzsteuerkonto',
'Credit note (one letter abbreviation)' => 'G',
'Curr' => 'Währung',
+ 'Currencies' => 'Währungen',
'Currency' => 'Währung',
'Current' => 'Betrag',
'Current / Next Level' => 'Aktuelles / Nächstes Mahnlevel',
'December' => 'Dezember',
'Decimalplaces' => 'Dezimalstellen',
'Decrease' => 'Verringern',
+ 'Default Accounts' => 'Standardkonten',
'Default output medium' => 'Standardausgabekanal',
'Default printer' => 'Standarddrucker',
'Default template format' => 'Standardvorlagenformat',
+ 'Defaults saved.' => 'Die Standardeinstellungen wurden gespeichert.',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Delete Dataset' => 'Datenbank löschen',
'Last Credit Note Number' => 'Letzte Gutschriftnummer',
'Last Customer Number' => 'Letzte Kundennummer',
'Last Invoice Number' => 'Letzte Rechnungsnummer',
- 'Last Numbers & Default Accounts' => 'Laufende Zähler und Standardkonten',
'Last Purchase Order Number' => 'Letzte Lieferantenautragsnummer',
'Last RFQ Number' => 'Letzte Anfragenummer',
'Last Sales Order Number' => 'Letzte Auftragsnummer',
'Method' => 'Verfahren',
'Microfiche' => 'Mikrofilm',
'Minimum Amount' => 'Mindestbetrag',
+ 'Miscellaneous' => 'Verschiedenes',
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
'Missing Method!' => 'Fehlender Voranmeldungszeitraum',
'RFQ Number' => 'Anfragenummer',
'RFQs' => 'Preisanfragen',
'ROP' => 'Mindestlagerbestand',
+ 'Ranges of numbers' => 'Nummernkreise',
+ 'Ranges of numbers and default accounts' => 'Nummernkreise und Standardkonten',
'Receipt' => 'Zahlungseingang',
'Receipt posted!' => 'Beleg gebucht!',
'Receipts' => 'Zahlungseingänge',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date' => 'Datum',
'Date Format' => 'Datumsformat',
+ 'Defaults saved.' => 'Die Standardeinstellungen wurden gespeichert.',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Department deleted!' => 'Abteilung gelöscht.',
'Queue' => 'Warteschlange',
'Quotation' => 'Angebot',
'RFQ' => 'Anfrage',
+ 'Ranges of numbers and default accounts' => 'Nummernkreise und Standardkonten',
'Revenue' => 'Erlöskonto',
'Revenues EU with UStId' => 'Erlöse EU m. UStId',
'Revenues EU without UStId' => 'Erlöse EU o. UStId',
'edit_account' => 'edit_account',
'edit_buchungsgruppe' => 'edit_buchungsgruppe',
'edit_business' => 'edit_business',
+ 'edit_defaults' => 'edit_defaults',
'edit_department' => 'edit_department',
'edit_language' => 'edit_language',
'edit_lead' => 'edit_lead',
'save_account' => 'save_account',
'save_buchungsgruppe' => 'save_buchungsgruppe',
'save_business' => 'save_business',
+ 'save_defaults' => 'save_defaults',
'save_department' => 'save_department',
'save_language' => 'save_language',
'save_lead' => 'save_lead',
'Purchase Orders' => 'Lieferantenaufträge',
'Quotations' => 'Angebote',
'RFQs' => 'Preisanfragen',
+ 'Ranges of numbers and default accounts' => 'Nummernkreise und Standardkonten',
'Receipt' => 'Zahlungseingang',
'Receipts' => 'Zahlungseingänge',
'Reconciliation' => 'Kontenabgleich',
'Purchase Orders' => 'Lieferantenaufträge',
'Quotations' => 'Angebote',
'RFQs' => 'Preisanfragen',
+ 'Ranges of numbers and default accounts' => 'Nummernkreise und Standardkonten',
'Receipt' => 'Zahlungseingang',
'Receipts' => 'Zahlungseingänge',
'Reconciliation' => 'Kontenabgleich',
[System]
+
+[System--Ranges of numbers and default accounts]
+module=am.pl
+action=edit_defaults
+
[System--UStVa Einstellungen]
module=ustva.pl
action=config_step1
<th align="right">Anzahl Kopien</th>
<td><input name="copies" size="10" value="[% HTML.escape(myconfig_copies) %]"></td>
</tr>
-
-
- <tr class="listheading">
- <th colspan="2"> </th>
- </tr>
-
- <tr>
- <th align="right">Firmennummer</th>
- <td><input name="businessnumber" size="25" value="[% HTML.escape(myconfig_businessnumber) %]"></td>
- </tr>
- <tr>
- <th align="right">Jahresende (mm/dd)</th>
- <td><input name="yearend" size="5" value="[% HTML.escape(defaults_yearend) %]"></td>
- </tr>
-
- <tr class="listheading">
- <th colspan="2">Laufende Zähler und Standardkonten</th>
- </tr>
-
- <tr>
- <td colspan="2">
- <table width="100%">
- <tr>
- <th align="right" nowrap>Warenbestand</th>
- <td>
- <select name="inventory_accno">
- [%- FOREACH row = ACCNOS_IC %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Erlöskonto</th>
- <td>
- <select name="income_accno">
- [%- FOREACH row = ACCNOS_IC_INCOME %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Aufwandskonto</th>
- <td>
- <select name="expense_accno">
- [%- FOREACH row = ACCNOS_IC_EXPENSE %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Wechselkurserträge</th>
- <td>
- <select name="fxgain_accno">
- [%- FOREACH row = ACCNOS_FX_GAIN %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Wechselkursaufwendungen</th>
- <td>
- <select name="fxloss_accno">
- [%- FOREACH row = ACCNOS_FX_LOSS %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- Geben Sie Ihre und weitere Währungen mit bis zu drei Buchstaben pro Währung und Währungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)<br>
- <input name="curr" size="40" value="[% HTML.escape(defaults_curr) %]">
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table width="100"%>
- <tr>
- <th align="right" nowrap>Letzte Rechnungsnummer</th>
- <td><input name="invnumber" size="10" value="[% HTML.escape(defaults_invnumber) %]"></td>
- <th align="right" nowrap>Letzte Kundennummer</th>
- <td><input name="customernumber" size="10" value="[% HTML.escape(defaults_customernumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Gutschriftnummer</th>
- <td><input name="cnnumber" size="10" value="[% HTML.escape(defaults_cnnumber) %]"></td>
- <th align="right" nowrap>Letzte Lieferantennummer</th>
- <td><input name="vendornumber" size="10" value="[% HTML.escape(defaults_vendornumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Auftragsnummer</th>
- <td><input name="sonumber" size="10" value="[% HTML.escape(defaults_sonumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Lieferantenautragsnummer</th>
- <td><input name="ponumber" size="10" value="[% HTML.escape(defaults_ponumber) %]"></td>
- <th align="right" nowrap>Letzte Artikelnummer</th>
- <td><input name="articlenumber" size="10" value="[% HTML.escape(defaults_articlenumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Angebotsnummer</th>
- <td><input name="sqnumber" size="10" value="[% HTML.escape(defaults_sqnumber) %]"></td>
- <th align="right" nowrap>Letzte Dienstleistungsnr.</th>
- <td><input name="servicenumber" size="10" value="[% HTML.escape(defaults_servicenumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap>Letzte Anfragenummer</th>
- <td><input name="rfqnumber" size="10" value="[% HTML.escape(defaults_rfqnumber) %]"></td>
- </tr>
-
- </table>
- </td>
- </tr>
</table>
</p>
<th align="right"><translate>Number of copies</translate></th>
<td><input name="copies" size="10" value="[% HTML.escape(myconfig_copies) %]"></td>
</tr>
-
-
- <tr class="listheading">
- <th colspan="2"> </th>
- </tr>
-
- <tr>
- <th align="right"><translate>Business Number</translate></th>
- <td><input name="businessnumber" size="25" value="[% HTML.escape(myconfig_businessnumber) %]"></td>
- </tr>
- <tr>
- <th align="right"><translate>Year End</translate> (mm/dd)</th>
- <td><input name="yearend" size="5" value="[% HTML.escape(defaults_yearend) %]"></td>
- </tr>
-
- <tr class="listheading">
- <th colspan="2"><translate>Last Numbers & Default Accounts</translate></th>
- </tr>
-
- <tr>
- <td colspan="2">
- <table width="100%">
- <tr>
- <th align="right" nowrap><translate>Inventory Account</translate></th>
- <td>
- <select name="inventory_accno">
- [%- FOREACH row = ACCNOS_IC %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Revenue Account</translate></th>
- <td>
- <select name="income_accno">
- [%- FOREACH row = ACCNOS_IC_INCOME %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Expense Account</translate></th>
- <td>
- <select name="expense_accno">
- [%- FOREACH row = ACCNOS_IC_EXPENSE %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Foreign Exchange Gain</translate></th>
- <td>
- <select name="fxgain_accno">
- [%- FOREACH row = ACCNOS_FX_GAIN %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Foreign Exchange Loss</translate></th>
- <td>
- <select name="fxloss_accno">
- [%- FOREACH row = ACCNOS_FX_LOSS %]
- <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
- [%- END %]
- </select>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <translate>Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies</translate><br>
- <input name="curr" size="40" value="[% HTML.escape(defaults_curr) %]">
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td colspan="2">
- <table width="100"%>
- <tr>
- <th align="right" nowrap><translate>Last Invoice Number</translate></th>
- <td><input name="invnumber" size="10" value="[% HTML.escape(defaults_invnumber) %]"></td>
- <th align="right" nowrap><translate>Last Customer Number</translate></th>
- <td><input name="customernumber" size="10" value="[% HTML.escape(defaults_customernumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last Credit Note Number</translate></th>
- <td><input name="cnnumber" size="10" value="[% HTML.escape(defaults_cnnumber) %]"></td>
- <th align="right" nowrap><translate>Last Vendor Number</translate></th>
- <td><input name="vendornumber" size="10" value="[% HTML.escape(defaults_vendornumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last Sales Order Number</translate></th>
- <td><input name="sonumber" size="10" value="[% HTML.escape(defaults_sonumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last Purchase Order Number</translate></th>
- <td><input name="ponumber" size="10" value="[% HTML.escape(defaults_ponumber) %]"></td>
- <th align="right" nowrap><translate>Last Article Number</translate></th>
- <td><input name="articlenumber" size="10" value="[% HTML.escape(defaults_articlenumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last Sales Quotation Number</translate></th>
- <td><input name="sqnumber" size="10" value="[% HTML.escape(defaults_sqnumber) %]"></td>
- <th align="right" nowrap><translate>Last Service Number</translate></th>
- <td><input name="servicenumber" size="10" value="[% HTML.escape(defaults_servicenumber) %]"></td>
- </tr>
-
- <tr>
- <th align="right" nowrap><translate>Last RFQ Number</translate></th>
- <td><input name="rfqnumber" size="10" value="[% HTML.escape(defaults_rfqnumber) %]"></td>
- </tr>
-
- </table>
- </td>
- </tr>
</table>
</p>
--- /dev/null
+[% USE HTML %]<body>
+
+ <div class="listtop">[% title %]</div>
+
+ <form method="post" action="am.pl"name="Form">
+
+ <input type="hidden" name="type" value="defaults">
+ <input type="hidden" name="login" value="[% HTML.escape(login) %]">
+ <input type="hidden" name="password" value="[% HTML.escape(password) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th colspan="4">Nummernkreise</th>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Rechnungsnummer</th>
+ <td><input name="invnumber" size="10" value="[% HTML.escape(defaults_invnumber) %]"></td>
+ <th align="right" nowrap>Letzte Kundennummer</th>
+ <td><input name="customernumber" size="10" value="[% HTML.escape(defaults_customernumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Gutschriftnummer</th>
+ <td><input name="cnnumber" size="10" value="[% HTML.escape(defaults_cnnumber) %]"></td>
+ <th align="right" nowrap>Letzte Lieferantennummer</th>
+ <td><input name="vendornumber" size="10" value="[% HTML.escape(defaults_vendornumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Auftragsnummer</th>
+ <td><input name="sonumber" size="10" value="[% HTML.escape(defaults_sonumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Lieferantenautragsnummer</th>
+ <td><input name="ponumber" size="10" value="[% HTML.escape(defaults_ponumber) %]"></td>
+ <th align="right" nowrap>Letzte Artikelnummer</th>
+ <td><input name="articlenumber" size="10" value="[% HTML.escape(defaults_articlenumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Angebotsnummer</th>
+ <td><input name="sqnumber" size="10" value="[% HTML.escape(defaults_sqnumber) %]"></td>
+ <th align="right" nowrap>Letzte Dienstleistungsnr.</th>
+ <td><input name="servicenumber" size="10" value="[% HTML.escape(defaults_servicenumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Letzte Anfragenummer</th>
+ <td><input name="rfqnumber" size="10" value="[% HTML.escape(defaults_rfqnumber) %]"></td>
+ </tr>
+
+ <tr class="listheading">
+ <th colspan="4">Standardkonten</th>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Warenbestand</th>
+ <td colspan="3">
+ <select name="inventory_accno">
+ [%- FOREACH row = ACCNOS_IC %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Erlöskonto</th>
+ <td colspan="3">
+ <select name="income_accno">
+ [%- FOREACH row = ACCNOS_IC_INCOME %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Aufwandskonto</th>
+ <td colspan="3">
+ <select name="expense_accno">
+ [%- FOREACH row = ACCNOS_IC_EXPENSE %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Wechselkurserträge</th>
+ <td colspan="3">
+ <select name="fxgain_accno">
+ [%- FOREACH row = ACCNOS_FX_GAIN %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap>Wechselkursaufwendungen</th>
+ <td colspan="3">
+ <select name="fxloss_accno">
+ [%- FOREACH row = ACCNOS_FX_LOSS %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr class="listheading">
+ <th colspan="4">Verschiedenes</th>
+ </tr>
+
+ <tr>
+ <th align="right">Firmennummer</th>
+ <td colspan="3"><input name="businessnumber" size="25" value="[% HTML.escape(defaults_businessnumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right">Jahresende (mm/dd)</th>
+ <td colspan="3"><input name="yearend" size="5" value="[% HTML.escape(defaults_yearend) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right">Währungen <sup>(1)</sup></th>
+ <td colspan="3"><input name="curr" size="20" value="[% HTML.escape(defaults_curr) %]"></td>
+ </tr>
+
+ </table>
+ </p>
+
+ <hr height="3" noshade>
+
+ <p><input type="submit" class="submit" name="action" value="Speichern"></p>
+
+ <hr height="3" noshade>
+
+ <p>
+ (1) Geben Sie Ihre und weitere Währungen mit bis zu drei Buchstaben pro Währung und Währungen durch Doppelpunkte getrennt ein (z.B. EUR:USD:CAD)
+ </p>
+ </form>
+
+</body>
+</html>
--- /dev/null
+[% USE HTML %]<body>
+
+ <div class="listtop">[% title %]</div>
+
+ <form method="post" action="am.pl"name="Form">
+
+ <input type="hidden" name="type" value="defaults">
+ <input type="hidden" name="login" value="[% HTML.escape(login) %]">
+ <input type="hidden" name="password" value="[% HTML.escape(password) %]">
+
+ <p>
+ <table>
+ <tr class="listheading">
+ <th colspan="4"><translate>Ranges of numbers</translate></th>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last Invoice Number</translate></th>
+ <td><input name="invnumber" size="10" value="[% HTML.escape(defaults_invnumber) %]"></td>
+ <th align="right" nowrap><translate>Last Customer Number</translate></th>
+ <td><input name="customernumber" size="10" value="[% HTML.escape(defaults_customernumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last Credit Note Number</translate></th>
+ <td><input name="cnnumber" size="10" value="[% HTML.escape(defaults_cnnumber) %]"></td>
+ <th align="right" nowrap><translate>Last Vendor Number</translate></th>
+ <td><input name="vendornumber" size="10" value="[% HTML.escape(defaults_vendornumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last Sales Order Number</translate></th>
+ <td><input name="sonumber" size="10" value="[% HTML.escape(defaults_sonumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last Purchase Order Number</translate></th>
+ <td><input name="ponumber" size="10" value="[% HTML.escape(defaults_ponumber) %]"></td>
+ <th align="right" nowrap><translate>Last Article Number</translate></th>
+ <td><input name="articlenumber" size="10" value="[% HTML.escape(defaults_articlenumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last Sales Quotation Number</translate></th>
+ <td><input name="sqnumber" size="10" value="[% HTML.escape(defaults_sqnumber) %]"></td>
+ <th align="right" nowrap><translate>Last Service Number</translate></th>
+ <td><input name="servicenumber" size="10" value="[% HTML.escape(defaults_servicenumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Last RFQ Number</translate></th>
+ <td><input name="rfqnumber" size="10" value="[% HTML.escape(defaults_rfqnumber) %]"></td>
+ </tr>
+
+ <tr class="listheading">
+ <th colspan="4"><translate>Default Accounts</translate></th>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Inventory Account</translate></th>
+ <td colspan="3">
+ <select name="inventory_accno">
+ [%- FOREACH row = ACCNOS_IC %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Revenue Account</translate></th>
+ <td colspan="3">
+ <select name="income_accno">
+ [%- FOREACH row = ACCNOS_IC_INCOME %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Expense Account</translate></th>
+ <td colspan="3">
+ <select name="expense_accno">
+ [%- FOREACH row = ACCNOS_IC_EXPENSE %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Foreign Exchange Gain</translate></th>
+ <td colspan="3">
+ <select name="fxgain_accno">
+ [%- FOREACH row = ACCNOS_FX_GAIN %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <th align="right" nowrap><translate>Foreign Exchange Loss</translate></th>
+ <td colspan="3">
+ <select name="fxloss_accno">
+ [%- FOREACH row = ACCNOS_FX_LOSS %]
+ <option value="[% HTML.escape(row.value) %]"[% IF row.selected %] selected[% END %]>[% HTML.escape(row.name) %]</option>
+ [%- END %]
+ </select>
+ </td>
+ </tr>
+
+ <tr class="listheading">
+ <th colspan="4"><translate>Miscellaneous</translate></th>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Business Number</translate></th>
+ <td colspan="3"><input name="businessnumber" size="25" value="[% HTML.escape(defaults_businessnumber) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Year End</translate> (mm/dd)</th>
+ <td colspan="3"><input name="yearend" size="5" value="[% HTML.escape(defaults_yearend) %]"></td>
+ </tr>
+
+ <tr>
+ <th align="right"><translate>Currencies</translate> <sup>(1)</sup></th>
+ <td colspan="3"><input name="curr" size="20" value="[% HTML.escape(defaults_curr) %]"></td>
+ </tr>
+
+ </table>
+ </p>
+
+ <hr height="3" noshade>
+
+ <p><input type="submit" class="submit" name="action" value="<translate>Save</translate>"></p>
+
+ <hr height="3" noshade>
+
+ <p>
+ (1) <translate>Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies</translate>
+ </p>
+ </form>
+
+</body>
+</html>