From a751b16cead5e56b62e18ee616e04323919f5fe1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 26 Mar 2007 08:16:37 +0000 Subject: [PATCH] =?utf8?q?Speichern=20von=20Verk=C3=A4ufern=20bei=20Kunden?= =?utf8?q?stammdaten.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 16 +++++++++++ bin/mozilla/ct.pl | 72 ++++++++++++++++++----------------------------- locale/de/all | 4 +-- locale/de/am | 2 +- locale/de/ct | 67 +++++++++++++++++++++++++++++++++++++++---- locale/de/is | 1 + 6 files changed, 108 insertions(+), 54 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 5069c16f2..e1ea94174 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1578,6 +1578,18 @@ sub _get_taxcharts { $main::lxdebug->leave_sub(); } +sub _get_employees { + $main::lxdebug->enter_sub(); + + my ($self, $dbh, $key) = @_; + + $key = "all_employees" unless ($key); + $self->{$key} = + selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee|); + + $main::lxdebug->leave_sub(); +} + sub get_lists { $main::lxdebug->enter_sub(); @@ -1616,6 +1628,10 @@ sub get_lists { $self->_get_taxcharts($dbh, $params{"taxcharts"}); } + if ($params{"employees"}) { + $self->_get_employees($dbh, $params{"employees"}); + } + $dbh->disconnect(); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 254726b60..84e495122 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -42,6 +42,8 @@ use CGI::Ajax; use CGI; use Data::Dumper; +require "bin/mozilla/common.pl"; + 1; # end of main @@ -583,6 +585,8 @@ sub edit { sub form_header { $lxdebug->enter_sub(); + $form->get_lists("employees" => "ALL_SALESMEN"); + $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : ""; $form->{creditlimit} = $form->format_amount(\%myconfig, $form->{creditlimit}, 0); @@ -638,11 +642,10 @@ sub form_header { } $taxzone = qq| - | . $locale->text('Steuersatz') . qq| - |; +|; $get_contact_url = "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_contact"; @@ -772,32 +775,28 @@ sub form_header { |; } - $business_salesman = ""; - $business = ""; - if ($vertreter) { - $business_salesman = qq| - - - - - - - - - -
| . $locale->text('Type of Business') . qq|| . $locale->text('Salesman') . qq|
- - |; - $business = qq| - | . $locale->text('Username') . qq| - - | . $locale->text('Password') . qq| - |; - } else { - $business = qq| + + $business = qq| | . $locale->text('Type of Business') . qq| |; + + $salesman = ""; + + if ($form->{db} eq "customer") { + my (@salesman_values, %salesman_labels); + push(@salesman_values, undef); + foreach my $item (@{ $form->{ALL_SALESMEN} }) { + push(@salesman_values, $item->{id}); + $salesman_labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login}; + } + + $salesman = + qq| | . $locale->text('Salesman') . qq| + | . + NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id}, + '-values' => \@salesman_values, '-labels' => \%salesman_labels)) + . qq||; } ## LINET: Create a drop-down box with all prior titles and greetings. @@ -895,7 +894,6 @@ sub form_header { - $business_salesman @@ -992,7 +990,10 @@ sub form_header { - $taxzone + + $taxzone + $salesman +
| . $locale->text($label . ' Number') . qq| {db}number"}">| . $locale->text('Obsolete') . qq| {obsolete}>
@@ -1199,13 +1200,6 @@ sub form_footer { ($form->{db} eq 'customer') ? $locale->text('Save and AR Transaction') : $locale->text('Save and AP Transaction'); - if ($vertreter) { - $update_button = - qq||; - } else { - $update_button = ""; - } ## ## @@ -1228,7 +1222,6 @@ sub form_footer {
-$update_button text("Name missing!")); - if ($vertreter && $form->{db} eq "customer") { - $form->isblank("salesman_id", $locale->text("Salesman missing!")); - } &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); $form->{callback} = $form->escape($form->{callback}, 1); @@ -1397,9 +1387,6 @@ sub save_and_close { $imsg .= " saved!"; $form->isblank("name", $locale->text("Name missing!")); - if ($vertreter && $form->{db} eq "customer") { - $form->isblank("salesman_id", $locale->text("Salesman missing!")); - } $rc = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); if ($rc == 3) { $form->error($locale->text('customernumber not unique!')); @@ -1425,9 +1412,6 @@ sub save { $imsg .= " saved!"; $form->isblank("name", $locale->text("Name missing!")); - if ($vertreter && $form->{db} eq "customer") { - $form->isblank("salesman_id", $locale->text("Salesman missing!")); - } my $res = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); diff --git a/locale/de/all b/locale/de/all index 41fa87593..dcd498d55 100644 --- a/locale/de/all +++ b/locale/de/all @@ -897,8 +897,7 @@ gestartet', 'Sales Invoices' => 'Kundenrechnung', 'Sales Order' => 'Kundenauftrag', 'Sales Orders' => 'Aufträge', - 'Salesman' => 'Vertreter', - 'Salesman missing!' => 'Vertreter fehlt!', + 'Salesman' => 'Verkäufer/in', 'Salesperson' => 'Verkäufer', 'Sat. Fax' => 'Sat. Fax', 'Sat. Phone' => 'Sat. Tel.', @@ -1152,7 +1151,6 @@ gestartet', 'User Config' => 'Benutzereinstellungen', 'User deleted!' => 'Benutzer gelöscht!', 'User saved!' => 'Benutzer gespeichert!', - 'Username' => 'Benutzername', 'Ust-IDNr' => 'USt-IdNr.', 'Valid until' => 'gültig bis', 'Value' => 'Wert', diff --git a/locale/de/am b/locale/de/am index da5385385..1f86f2740 100644 --- a/locale/de/am +++ b/locale/de/am @@ -222,7 +222,7 @@ $self->{texts} = { 'SAVED' => 'Gespeichert', 'SAVED FOR DUNNING' => 'Gespeichert', 'SCREENED' => 'Angezeigt', - 'Salesman' => 'Vertreter', + 'Salesman' => 'Verkäufer/in', 'Save' => 'Speichern', 'Screen' => 'Bildschirm', 'Select a Customer' => 'Endkunde auswählen', diff --git a/locale/de/ct b/locale/de/ct index 4f4641a0f..5930113bc 100644 --- a/locale/de/ct +++ b/locale/de/ct @@ -1,5 +1,6 @@ $self->{texts} = { ' Number' => ' Nummer', + 'ADDED' => 'Hinzugefügt', 'Abteilung' => 'Abteilung', 'Account Number' => 'Kontonummer', 'Add' => 'Erfassen', @@ -27,18 +28,23 @@ $self->{texts} = { 'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.', 'Customer saved!' => 'Kunde gespeichert!', 'Customers' => 'Kunden', + 'DELETED' => 'Gelöscht', + 'DUNNING STARTED' => 'DUNNING STARTED', 'Delete' => 'Löschen', 'Department' => 'Abteilung', 'Description' => 'Beschreibung', 'Discount' => 'Rabatt', 'E-mail' => 'eMail', + 'ELSE' => 'Zusatz', 'Edit Customer' => 'Kunde editieren', 'Edit Vendor' => 'Lieferant editieren', + 'Enter longdescription' => 'Langtext eingeben', 'Fax' => 'Fax', 'From' => 'Von', 'GIFI' => 'GIFI', 'Given Name' => 'Vorname', 'Greeting' => 'Anrede', + 'History' => 'Historie', 'Homepage' => 'Homepage', 'ID' => 'Buchungsnummer', 'Include in Report' => 'In Bericht aufnehmen', @@ -49,31 +55,47 @@ $self->{texts} = { 'Kundennummer' => 'Kundennummer', 'Language' => 'Sprache', 'Lieferungen' => 'Lieferungen', + 'MAILED' => 'Gesendet', 'Mobile1' => 'Mobile 1', 'Mobile2' => 'Mobile 2', 'Name' => 'Name', 'Name missing!' => 'Name fehlt!', + '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 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.', 'Notes' => 'Bemerkungen', 'Number' => 'Nummer', 'Obsolete' => 'Ungültig', 'Order' => 'Auftrag', 'Orders' => 'Aufträge', 'Orphaned' => 'Nie benutzt', - 'Password' => 'Passwort', + 'PAYMENT POSTED' => 'Rechung gebucht', + 'POSTED' => 'Gebucht', + 'POSTED AS NEW' => 'Als neu gebucht', + 'PRINTED' => 'Gedruckt', + 'Part Number' => 'Artikelnummer', + 'Part description' => 'Artikelbeschreibung', 'Payment Terms' => 'Zahlungskonditionen', 'Phone' => 'Telefon', 'Phone1' => 'Telefon 1 ', 'Phone2' => 'Telefon 2', + 'Please enter values' => 'Bitte Werte eingeben', 'Preisklasse' => 'Preisgruppe', 'Private E-mail' => 'Private eMail', 'Private Phone' => 'Privates Tel.', 'Project' => 'Projekt', + 'Project Number' => 'Projektnummer', + 'Project description' => 'Projektbeschreibung', 'Qty' => 'Menge', 'Quotation' => 'Angebot', 'Quotations' => 'Angebote', + 'SAVED' => 'Gespeichert', + 'SAVED FOR DUNNING' => 'Gespeichert', + 'SCREENED' => 'Angezeigt', 'SIC' => 'SIC', - 'Salesman' => 'Vertreter', - 'Salesman missing!' => 'Vertreter fehlt!', + 'Salesman' => 'Verkäufer/in', 'Sat. Fax' => 'Sat. Fax', 'Sat. Phone' => 'Sat. Tel.', 'Save' => 'Speichern', @@ -84,6 +106,10 @@ $self->{texts} = { 'Save and Order' => 'Speichern und Auftrag erfassen', 'Save and Quotation' => 'Speichern und Angebot', 'Save and RFQ' => 'Speichern und Lieferantenanfrage', + 'Select a Customer' => 'Endkunde auswählen', + 'Select a part' => 'Artikel auswählen', + 'Select a project' => 'Projekt auswählen', + 'Select an employee' => 'Angestellten auswählen', 'Select from one of the names below' => 'Wählen Sie einen der untenstehenden Namen', 'Shipping Address' => 'Lieferadresse', 'Steuersatz' => 'Steuersatz', @@ -99,33 +125,55 @@ $self->{texts} = { 'Type of Business' => 'Kunden-/Lieferantentyp', 'USt-IdNr.' => 'USt-IdNr.', 'Unit' => 'Einheit', - 'Update' => 'Erneuern', - 'Username' => 'Benutzername', + 'Value' => 'Wert', + 'Variable' => 'Variable', 'Vendor Number' => 'Lieferantennummer', 'Vendor deleted!' => 'Lieferant gelöscht!', 'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.', 'Vendor saved!' => 'Lieferant gespeichert!', 'Vendors' => 'Lieferanten', 'Zipcode' => 'PLZ', + 'bin_list' => 'Lagerliste', 'customernumber not unique!' => 'Die Kundennummer ist schon vergeben', 'history' => 'Historie', + 'invoice' => 'Rechnung', + 'packing_list' => 'Versandliste', + 'pick_list' => 'Entnahmeliste', + 'proforma' => 'Proforma', + 'purchase_order' => 'Auftrag', + 'request_quotation' => 'Angebotsanforderung', 's' => 's', + 'sales_order' => 'Kundenauftrag', + 'sales_quotation' => 'Verkaufsangebot', }; $self->{subs} = { + 'E' => 'E', + 'H' => 'H', + 'NTI' => 'NTI', + 'Q' => 'Q', 'add' => 'add', 'add_transaction' => 'add_transaction', + 'build_std_url' => 'build_std_url', + 'calculate_qty' => 'calculate_qty', 'check_salesman' => 'check_salesman', 'continue' => 'continue', 'delete' => 'delete', + 'delivery_customer_selection' => 'delivery_customer_selection', 'display' => 'display', 'edit' => 'edit', + 'employee_selection_internal' => 'employee_selection_internal', 'form_footer' => 'form_footer', 'form_header' => 'form_header', + 'format_dates' => 'format_dates', 'get_contact' => 'get_contact', 'get_delivery' => 'get_delivery', 'get_shipto' => 'get_shipto', 'list_names' => 'list_names', + 'part_selection_internal' => 'part_selection_internal', + 'project_selection_internal' => 'project_selection_internal', + 'reformat_numbers' => 'reformat_numbers', + 'restore_form' => 'restore_form', 'salesman_selected' => 'salesman_selected', 'save' => 'save', 'save_and_ap_transaction' => 'save_and_ap_transaction', @@ -135,10 +183,18 @@ $self->{subs} = { 'save_and_order' => 'save_and_order', 'save_and_quotation' => 'save_and_quotation', 'save_and_rfq' => 'save_and_rfq', + 'save_form' => 'save_form', 'search' => 'search', 'search_delivery' => 'search_delivery', + 'select_employee' => 'select_employee', + 'select_employee_internal' => 'select_employee_internal', + 'select_part' => 'select_part', + 'select_part_internal' => 'select_part_internal', 'select_salesman' => 'select_salesman', + 'set_longdescription' => 'set_longdescription', + 'show_history' => 'show_history', 'update' => 'update', + 'vendor_selection' => 'vendor_selection', 'erfassen' => 'add', 'weiter' => 'continue', 'löschen' => 'delete', @@ -150,7 +206,6 @@ $self->{subs} = { 'speichern_und_auftrag_erfassen' => 'save_and_order', 'speichern_und_angebot' => 'save_and_quotation', 'speichern_und_lieferantenanfrage' => 'save_and_rfq', - 'erneuern' => 'update', }; 1; diff --git a/locale/de/is b/locale/de/is index 6332f6f4c..b638f9c73 100644 --- a/locale/de/is +++ b/locale/de/is @@ -278,6 +278,7 @@ $self->{subs} = { 'display_row' => 'display_row', 'dont_load_draft' => 'dont_load_draft', 'draft_action_dispatcher' => 'draft_action_dispatcher', + 'e_mail' => 'e_mail', 'edit' => 'edit', 'edit_e_mail' => 'edit_e_mail', 'employee_selection_internal' => 'employee_selection_internal', -- 2.20.1