1;
+require "$form->{path}/common.pl";
+
# end of main
sub add { &{"add_$form->{type}"} }
# $locale->text('Buchungsgruppe hinzufügen')
# $locale->text('Buchungsgruppe bearbeiten')
- $form->{description} =~ s/\"/"/g;
+ my ($acc_inventory, $acc_income, $acc_expense) = ({}, {}, {});
+ my %acc_type_map = (
+ "IC" => $acc_inventory,
+ "IC_income" => $acc_income,
+ "IC_sale" => $acc_income,
+ "IC_expense" => $acc_expense,
+ "IC_cogs" => $acc_expense,
+ );
- # build the popup menus
- $form->{taxaccounts} = "";
- foreach $key (keys %{ $form->{IC_links} }) {
+ foreach $key (keys(%acc_type_map)) {
foreach $ref (@{ $form->{IC_links}{$key} }) {
-
- # if this is a tax field
- if ($key =~ /IC_tax/) {
- if ($key =~ /$item/) {
- $form->{taxaccounts} .= "$ref->{accno} ";
- $form->{"IC_tax_$ref->{accno}_description"} =
- "$ref->{accno}--$ref->{description}";
-
- if ($form->{id}) {
- if ($form->{amount}{ $ref->{accno} }) {
- $form->{"IC_tax_$ref->{accno}"} = "checked";
- }
- } else {
- $form->{"IC_tax_$ref->{accno}"} = "checked";
- }
- }
- } else {
-
- $form->{"select$key"} .=
- "<option value=$ref->{id} $ref->{selected}>$ref->{accno}--$ref->{description}\n";
- if (($key eq "IC") && ($ref->{selected} eq "selected")) {
- $form->{IC_default} = $ref->{id};
- }
- if ($form->{amount}{$key} eq $ref->{accno}) {
- $form->{$key} = "$ref->{accno}--$ref->{description}";
- }
-
- }
+ $acc_type_map{$key}->{$ref->{"id"}} = $ref;
}
}
- $form->{selectIC_income} = $form->{selectIC_sale};
- $form->{selectIC_expense} = $form->{selectIC_cogs};
- $form->{IC_income} = $form->{IC_sale};
- $form->{IC_expense} = $form->{IC_cogs};
+
+ foreach my $type (qw(IC IC_income IC_expense)) {
+ $form->{"select$type"} =
+ join("",
+ map({ "<option value=$_->{id} $_->{selected}>" .
+ "$_->{accno}--" . H($_->{description}) . "</option>" }
+ sort({ $a->{"accno"} cmp $b->{"accno"} }
+ values(%{$acc_type_map{$type}}))));
+ }
if ($form->{id}) {
$form->{selectIC} =~ s/selected//g;
} else {
$linkaccounts = qq|
<input type=hidden name=inventory_accno_id value=$form->{inventory_accno_id}>|;
- }
+ }
- $linkaccounts .= qq|
+ $linkaccounts .= qq|
<tr>
<th align=right>| . $locale->text('Erlöse Inland') . qq|</th>
<td><select name=income_accno_id_0>$form->{selectIC_income}</select></td>
<tr height="5"></tr>
<tr>
<th align=right>| . $locale->text('Buchungsgruppe') . qq|</th>
- <td><input name=description size=30 value="$form->{description}"></td>
+ <td><input name=description size=30 value="| . $form->quote($form->{description}) . qq|"></td>
<tr>
$linkaccounts
<td colspan=2><hr size=3 noshade></td>
'Copy to COA' => 'In Kontenplan kopieren',
'Cost Center' => 'Kostenstelle',
'Credit' => 'Haben',
+ 'Customer Number' => 'Kundennummer',
'Customernumberinit' => 'Kundennummernkreis',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date Format' => 'Datumsformat',
'Edit Template' => 'Vorlage bearbeiten',
'Edit Warehouse' => 'Lager bearbeiten',
'Enforce transaction reversal for all dates' => 'Gegenbuchungen für jeden Zeitraum aktualisieren',
+ 'Enter longdescription' => 'Langtext eingeben',
'Enter up to 3 letters separated by a colon (i.e CAD:USD:EUR) for your native and foreign currencies' => '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)',
'Equity' => 'Passiva',
'Erlöse Ausland' => 'Erlöse Ausland',
'Name' => 'Name',
'Netto Terms' => 'Zahlungsziel netto',
'No' => 'Nein',
+ '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 email address for' => 'Keine eMailaddresse für',
+ 'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
+ 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
+ 'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
'Number' => 'Nummer',
'Output Number Format' => 'Zahlenformat (Ausgabe)',
+ 'Part Number' => 'Artikelnummer',
+ 'Part description' => 'Artikelbeschreibung',
'Parts Inventory' => 'Warenliste',
'Password' => 'Passwort',
'Payables' => 'Verbindlichkeiten',
'Payment Terms saved!' => 'Zahlungskonditionen gespeichert!',
'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!',
'Phone' => 'Telefon',
+ 'Please enter values' => 'Bitte Werte eingeben',
'Preferences saved!' => 'Einstellungen gespeichert!',
'Printer' => 'Drucker',
'Printer Command' => 'Druckbefehl',
'Printer deleted!' => 'Drucker gelöscht!',
'Printer saved!' => 'Drucker gespeichert!',
'Profit Center' => 'Erfolgsbereich',
+ 'Project Number' => 'Projektnummer',
+ 'Project description' => 'Projektbeschreibung',
'Ranking' => 'Ranking',
'Rate' => 'Rate',
'Receipt' => 'Zahlungseingang',
'SIC saved!' => 'SIC gespeichert',
'Salesman' => 'Vertreter',
'Save' => 'Speichern',
+ 'Select a Customer' => 'Endkunde auswählen',
+ 'Select a part' => 'Artikel auswählen',
+ 'Select a project' => 'Projekt auswählen',
+ 'Select an employee' => 'Angestellten auswählen',
'Service Items' => 'Dienstleistungen',
'Setup Menu' => 'Menüsetup',
'Signature' => 'Unterschrift',
'UStVA-Nr. 97 rechts' => 'Kz. 97 rechts',
'UStVA-Nr. 98' => 'Kz. 98',
'Umsatzsteuervoranmeldung' => 'Umsatzsteuervoranmeldung',
+ 'Unit' => 'Einheit',
+ 'Value' => 'Wert',
+ 'Variable' => 'Variable',
'Warehouse deleted!' => 'Das Lager wurde gelöscht.',
'Warehouse saved!' => 'Das Lager wurde gespeichert.',
'Warehouses' => 'Lager',
};
$self->{subs} = {
+ 'H' => 'H',
'acc_menu' => 'acc_menu',
'account_header' => 'account_header',
'add' => 'add',
'backup' => 'backup',
'buchungsgruppe_header' => 'buchungsgruppe_header',
'business_header' => 'business_header',
+ 'calculate_qty' => 'calculate_qty',
'config' => 'config',
'continue' => 'continue',
'copy_to_coa' => 'copy_to_coa',
'delete_printer' => 'delete_printer',
'delete_sic' => 'delete_sic',
'delete_warehouse' => 'delete_warehouse',
+ 'delivery_customer_selection' => 'delivery_customer_selection',
'department_header' => 'department_header',
'display' => 'display',
'display_form' => 'display_form',
'edit_template' => 'edit_template',
'edit_units' => 'edit_units',
'edit_warehouse' => 'edit_warehouse',
+ 'employee_selection_internal' => 'employee_selection_internal',
'form_footer' => 'form_footer',
'gifi_footer' => 'gifi_footer',
'gifi_header' => 'gifi_header',
'list_printer' => 'list_printer',
'list_sic' => 'list_sic',
'list_warehouse' => 'list_warehouse',
+ 'part_selection_internal' => 'part_selection_internal',
'payment_header' => 'payment_header',
'printer_header' => 'printer_header',
+ 'project_selection_internal' => 'project_selection_internal',
+ 'restore_form' => 'restore_form',
'save' => 'save',
'save_account' => 'save_account',
'save_buchungsgruppe' => 'save_buchungsgruppe',
'save_business' => 'save_business',
'save_department' => 'save_department',
+ 'save_form' => 'save_form',
'save_gifi' => 'save_gifi',
'save_language' => 'save_language',
'save_lead' => 'save_lead',
'save_unit' => 'save_unit',
'save_warehouse' => 'save_warehouse',
'section_menu' => 'section_menu',
+ 'select_employee' => 'select_employee',
+ 'select_employee_internal' => 'select_employee_internal',
+ 'select_part' => 'select_part',
+ 'select_part_internal' => 'select_part_internal',
+ 'set_longdescription' => 'set_longdescription',
'sic_header' => 'sic_header',
+ 'vendor_selection' => 'vendor_selection',
'warehouse_header' => 'warehouse_header',
'erfassen' => 'add',
'konto_erfassen' => 'add_account',