qq|terms = ?, | .
qq|business_id = ?, | .
qq|taxnumber = ?, | .
- qq|sic_code = ?, | .
qq|language = ?, | .
qq|account_number = ?, | .
qq|bank_code = ?, | .
qq|taxzone_id = ?, | .
qq|user_password = ?, | .
qq|c_vendor_id = ?, | .
- qq|klass = ? | .
+ qq|klass = ?, | .
+ qq|v_customer_id = ? | .
qq|WHERE id = ?|;
my @values = (
$form->{customernumber},
conv_i($form->{terms}),
conv_i($form->{business}),
$form->{taxnumber},
- $form->{sic},
$form->{language},
$form->{account_number},
$form->{bank_code},
$form->{user_password},
$form->{c_vendor_id},
conv_i($form->{klass}),
+ $form->{v_customer_id},
$form->{id}
);
do_query( $form, $dbh, $query, @values );
qq| creditlimit = ?, | .
qq| business_id = ?, | .
qq| taxnumber = ?, | .
- qq| sic_code = ?, | .
qq| language = ?, | .
qq| account_number = ?, | .
qq| bank_code = ?, | .
$form->{creditlimit},
conv_i($form->{business}),
$form->{taxnumber},
- $form->{sic},
$form->{language},
$form->{account_number},
$form->{bank_code},
my @values;
my %allowed_sort_columns =
- map({ $_, 1 } qw(id customernumber vendornumber name address contact phone fax email
- taxnumber sic_code business invnumber ordnumber quonumber));
+ map({ $_, 1 } qw(id customernumber vendornumber name contact phone fax email
+ taxnumber business invnumber ordnumber quonumber));
$sortorder = $form->{sort} && $allowed_sort_columns{$form->{sort}} ? $form->{sort} : "name";
$form->{sort} = $sortorder;
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
- if ($sortorder eq "address") {
- $sortorder = "lower(country) ${sortdir}, lower(city) ${sortdir}, lower(street) ${sortdir}";
- } elsif ($sortorder ne 'id') {
+if ($sortorder ne 'id') {
$sortorder = "lower($sortorder) ${sortdir}";
} else {
$sortorder .= " ${sortdir}";
}
}
+ if ($form->{cp_name}) {
+ $where .= " AND ct.id IN (SELECT cp_cv_id FROM contacts WHERE lower(cp_name) LIKE lower(?))";
+ push @values, '%' . $form->{cp_name} . '%';
+ }
+
+ if ($form->{addr_city}) {
+ $where .= " AND ((lower(ct.city) LIKE lower(?))
+ OR
+ (ct.id IN (
+ SELECT trans_id
+ FROM shipto
+ WHERE (module = 'CT')
+ AND (lower(shiptocity) LIKE lower(?))
+ ))
+ )";
+ push @values, ('%' . $form->{addr_city} . '%') x 2;
+ }
+
if ( $form->{status} eq 'orphaned' ) {
$where .=
qq| AND ct.id NOT IN | .
$where .= qq| AND ($cvar_where)|;
push @values, @cvar_values;
}
-
+ # Um nach Straße in der Berichtsmaske zu suchen ... jb 13.11.2008
+ if ($form->{addr_street}) {
+ $where .= qq| AND (street ILIKE ?)|;
+ push @values, ('%' . $form->{addr_street} . '%');
+ }
+
+ # Um nach PLZ in der Berichtsmaske zu suchen ... jb 13.11.2008
+ if ($form->{addr_zipcode}) {
+ $where .= qq| AND (zipcode ILIKE ?)|;
+ push @values, ($form->{addr_zipcode} . '%');
+ }
my $query =
qq|SELECT ct.*, b.description AS business | .
qq|FROM $cv ct | .
$query .= qq| ORDER BY $sortorder|;
$form->{CT} = selectall_hashref_query($form, $dbh, $query, @values);
- map({ my $ref = $_; $ref->{address} = join(" ", map({ $ref->{$_} } qw(street zipcode city country))); }
- @{ $form->{CT} });
$main::lxdebug->leave_sub();
}
push @options, $locale->text('Contact') . " : $form->{contact}" if $form->{contact};
push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}| if $form->{"$form->{db}number"};
push @options, $locale->text('E-mail') . " : $form->{email}" if $form->{email};
+ push @options, $locale->text('Contact person (surname)')
+ . " : $form->{cp_name}" if $form->{cp_name};
+ push @options, $locale->text('Billing/shipping address (city)')
+ . " : $form->{addr_city}" if $form->{addr_city};
+
+ push @options, $locale->text('Billing/shipping address (zipcode)')
+ . " : $form->{zipcode}" if $form->{addr_zipcode};
+ push @options, $locale->text('Billing/shipping address (street)')
+ . " : $form->{street}" if $form->{addr_street};
my @columns = (
- 'id', 'name', "$form->{db}number", 'address', 'contact', 'phone',
- 'fax', 'email', 'taxnumber', 'sic_code', 'business', 'invnumber',
+ 'id', 'name', "$form->{db}number", 'contact', 'phone',
+ 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', 'business', 'invnumber',
'ordnumber', 'quonumber'
);
'id' => { 'text' => $locale->text('ID'), },
"$form->{db}number" => { 'text' => $form->{IS_CUSTOMER} ? $locale->text('Customer Number') : $locale->text('Vendor Number'), },
'name' => { 'text' => $locale->text('Name'), },
- 'address' => { 'text' => $locale->text('Address'), },
'contact' => { 'text' => $locale->text('Contact'), },
'phone' => { 'text' => $locale->text('Phone'), },
'fax' => { 'text' => $locale->text('Fax'), },
'email' => { 'text' => $locale->text('E-mail'), },
'cc' => { 'text' => $locale->text('Cc'), },
'taxnumber' => { 'text' => $locale->text('Tax Number'), },
- 'sic_code' => { 'text' => $locale->text('SIC'), },
'business' => { 'text' => $locale->text('Type of Business'), },
'invnumber' => { 'text' => $locale->text('Invoice'), },
'ordnumber' => { 'text' => $form->{IS_CUSTOMER} ? $locale->text('Sales Order') : $locale->text('Purchase Order'), },
'quonumber' => { 'text' => $form->{IS_CUSTOMER} ? $locale->text('Quotation') : $locale->text('Request for Quotation'), },
+ 'street' => { 'text' => $locale->text('Street'), },
+ 'zipcode' => { 'text' => $locale->text('Zipcode'), },
+ 'city' => { 'text' => $locale->text('City'), },
%column_defs_cvars,
);
'Add to group' => 'Zu Gruppe hinzufügen',
'Add unit' => 'Einheit hinzufügen',
'Address' => 'Adresse',
- 'Admin' => '',
'Administration' => 'Administration',
'Administration area' => 'Administrationsbereich',
'Advance turnover tax return' => 'Umsatzsteuervoranmeldung',
'Attachment name' => 'Name des Anhangs',
'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.',
'Audit Control' => 'Bücherkontrolle',
- 'Auftragschance' => '',
'Aug' => 'Aug',
'August' => 'August',
'Authentification database creation' => 'Anlegen der Datenbank zur Benutzerauthentifizierung',
'Batch Printing' => 'Druck',
'Bcc' => 'Bcc',
'Belegnummer' => 'Buchungsnummer',
- 'Benutzer' => '',
'Beratername' => 'Beratername',
'Beraternummer' => 'Beraternummer',
'Bestandskonto' => 'Bestandskonto',
'Bilanz' => 'Bilanz',
'Billing Address' => 'Rechnungsadresse',
+ 'Billing/shipping address (city)' => 'Rechnungsadresse (Stadt)',
+ 'Billing/shipping address (street)' => 'Rechnungsadresse (Straße)',
+ 'Billing/shipping address (zipcode)' => 'Rechnungsadresse (PLZ)',
'Bin' => 'Lagerplatz',
'Bin From' => 'Quelllagerplatz',
'Bin List' => 'Lagerliste',
'Business saved!' => 'Firma gespeichert.',
'CANCELED' => 'Storniert',
'CB Transaction' => 'SB-Buchung',
- 'CRM' => 'CRM',
'CRM admin' => 'Administration',
'CRM create customers, vendors and contacts' => 'Erfassen (Kunden, Lieferanten, Personen)',
'CRM follow up' => 'Wiedervorlage',
'Confirmation' => 'Auftragsbestätigung',
'Contact' => 'Kontakt',
'Contact Person' => 'Ansprechpartner',
+ 'Contact person (surname)' => 'Ansprechpartner (Nachname)',
'Contacts' => 'Kontakte',
'Continue' => 'Weiter',
'Contra' => 'gegen',
'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => 'Wollen Sie diese Lieferadresse in den neuen Lieferantenauftrag übernehmen, damit der Händler die Waren direkt an Ihren Kunden liefern kann?',
'Do you want to store the existing onhand values into a new warehouse?' => 'Möchten Sie die vorhandenen Mengendaten in ein Lager übertragen?',
'Documents in the WebDAV repository' => 'Dokumente im WebDAV-Repository',
- 'Dokumentvorlage' => '',
'Done' => 'Fertig',
'Download the backup' => 'Die Sicherungsdatei herunterladen',
'Draft saved.' => 'Entwurf gespeichert.',
'Ertrag' => 'Ertrag',
'Ertrag prozentual' => 'Ertrag prozentual',
'Escape character' => 'Escape-Zeichen',
- 'Etiketten' => '',
'Exact' => 'Genau',
'Exch' => 'Wechselkurs.',
'Exchangerate' => 'Wechselkurs',
'Group missing!' => 'Warengruppe fehlt!',
'Group saved!' => 'Warengruppe gespeichert!',
'Groups' => 'Warengruppen',
- 'Gruppen' => '',
'HTML' => 'HTML',
'HTML Templates' => 'HTML-Vorlagen',
'Header' => 'Überschrift',
'Help' => 'Hilfe',
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:',
'Hide by default' => 'Standardmäßig verstecken',
- 'Hilfe' => '',
'History' => 'Historie',
'History Search' => 'Historien Suche',
'History Search Engine' => 'Historien Suchmaschine',
'Keine Suchergebnisse gefunden!' => 'Keine Suchergebnisse gefunden!',
'Konten' => 'Konten',
'Kontonummernerweiterung (KNE)' => 'Kontonummernerweiterung (KNE)',
- 'Kunden' => '',
'L' => 'L',
'LP' => 'LP',
'LaTeX Templates' => 'LaTeX-Vorlagen',
'License key' => 'Lizenzschlüssel',
'Licensed to' => 'Lizensiert für',
'Licenses' => 'Lizenzen',
- 'Lieferant' => '',
'Lieferungen' => 'Lieferungen',
'Limit part selection' => 'Artikelauswahl eingrenzen',
'Line Total' => 'Zeilensumme',
'Mark closed' => 'Schließen',
'Marked as paid' => 'Als bezahlt markiert',
'Marked entries printed!' => 'Markierte Einträge wurden gedruckt!',
- 'Maschinen' => '',
- 'Maschinen erfassen' => '',
'Master Data' => 'Stammdaten',
'Max. Dunning Level' => 'höchste Mahnstufe',
'May' => 'Mai',
'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.',
'Missing parameter (at least one of #1) in call to sub #2.' => 'Fehlernder Parameter (mindestens einer aus \'#1\') in Funktionsaufruf \'#2\'.',
'Mitarbeiter' => 'Mitarbeiter',
- 'Mitteilungen' => '',
'Mobile1' => 'Mobile 1',
'Mobile2' => 'Mobile 2',
'Model' => 'Modell',
'Nothing has been selected for transfer.' => 'Es wurde nichts zum Umlagern ausgewählt.',
'Nothing selected!' => 'Es wurde nichts ausgewählt!',
'Nothing to delete!' => 'Es konnte nichts gelöscht werden!',
- 'Notizen' => '',
'Nov' => 'Nov',
'November' => 'November',
'Now the user must select a single Buchungsgruppe for each part instead of three distinct accounts.' => 'Der Benutzer muss nun für jeden Artikel nur noch die Buchungsgruppe anstelle der drei einzelnen Konten auswählen.',
'Payments' => 'Zahlungsausgänge',
'Period' => 'Zeitraum',
'Personal settings' => 'Persönliche Einstellungen',
- 'Personen' => '',
'Pg Database Administration' => 'Datenbankadministration',
'Phone' => 'Telefon',
'Phone1' => 'Telefon 1 ',
'SAVED' => 'Gespeichert',
'SAVED FOR DUNNING' => 'Gespeichert',
'SCREENED' => 'Angezeigt',
- 'SIC' => 'SIC',
'Saldo Credit' => 'Saldo Haben',
'Saldo Debit' => 'Saldo Soll',
'Saldo neu' => 'Saldo neu',
'Save as new' => 'als neu speichern',
'Save draft' => 'Entwurf speichern',
'Saving the file \'%s\' failed. OS error message: %s' => 'Das Speichern der Datei \'%s\' schlug fehl. Fehlermeldung des Betriebssystems: %s',
- 'Schnellsuche' => '',
'Screen' => 'Bildschirm',
'Search Dunning' => 'Mahnung suchen',
'Searchable' => 'Durchsuchbar',
'Statement Balance' => 'Sammelrechnungsbilanz',
'Statement sent to' => 'Sammelrechnung verschickt an',
'Statements sent to printer!' => 'Sammelrechnungen an Drucker geschickt!',
- 'Status' => '',
'Step 1 of 3: Parts' => 'Schritt 1 von 3: Waren',
'Step 2 of 3: Services' => 'Schritt 2 von 3: Dienstleistungen',
'Step 3 of 3: Assemblies' => 'Schritt 3 von 3: Erzeugnisse',
'Template Code missing!' => 'Vorlagenkürzel fehlt!',
'Template database' => 'Datenbankvorlage',
'Templates' => 'Vorlagen',
- 'Termine' => '',
'Terms missing in row ' => '+Tage fehlen in Zeile ',
'Test connection' => 'Verbindung testen',
'Text field' => 'Textfeld',
'Warehouse saved.' => 'Lager gespeichert.',
'Warehouses' => 'Lager',
'Warnings during template upgrade' => 'Warnungen bei Aktualisierung der Dokumentenvorlagen',
- 'Wartungsvertrag' => '',
- 'Wartungsvertrag erfassen' => '',
'WebDAV link' => 'WebDAV-Link',
'Weight' => 'Gewicht',
'What type of item is this?' => 'Was ist dieser Artikel?',
'What\'s the <b>term</b> you\'re looking for?' => 'Nach welchem <b>Begriff</b> wollen Sie suchen?',
- 'Wiedervorlage' => '',
- 'Wissens-DB' => '',
'With Extension Of Time' => 'mit Dauerfristverlängerung',
'Workflow Delivery Order' => 'Workflow Lieferschein',
'Workflow purchase_order' => 'Workflow Lieferantenauftrag',
'You\'re not editing a file.' => 'Sie bearbeiten momentan keine Datei.',
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:',
'Your PostgreSQL installationen uses UTF-8 as its encoding. Therefore you have to configure Lx-Office to use UTF-8 as well.' => 'Ihre PostgreSQL-Installation benutzt UTF-8 als Zeichensatz. Sie müssen deshalb Lx-Office so konfigurieren, dass es ebenfalls UTF-8 als Zeichensatz benutzt.',
+ 'Your Request' => 'Ihre Anfrage',
'Your TODO list' => 'Ihre Aufgabenliste',
'Zeitpunkt' => 'Zeitpunkt',
'Zeitraum' => 'Zeitraum',
'down' => 'runter',
'drucken' => 'drucken',
'dunning_list' => 'mahnungsliste',
- 'eMail' => '',
'eMail Send?' => 'eMail-Versand?',
'eMail?' => 'eMail?',
'ea' => 'St.',
'emailed to' => 'gemailt an',
- 'erfassen' => '',
'follow_up_list' => 'wiedervorlageliste',
'for' => 'für',
'for Period' => 'für den Zeitraum',
<input type="hidden" name="db" value="[% HTML.escape(db) %]">
- <div class="listtop" width="100%">[% title %]</div>
+ <div class="listtop">[% title %]</div>
<table>
<tr>
<th align="right" nowrap><translate>E-mail</translate></th>
<td><input name="email" size="35"></td>
</tr>
-
+ <tr>
+ <th align="right" nowrap><translate>Contact person (surname)</translate></th>
+ <td><input name="cp_name" size="35"></td>
+ </tr>
+ </tr>
+ <th align="right" nowrap><translate>Billing/shipping address (street)</translate></th>
+ <td><input name="addr_street" size="35"></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap><translate>Billing/shipping address (zipcode)</translate></th>
+ <td><input name="addr_zipcode" size="35"></td>
+ </tr>
+ <tr>
+ <th align="right" nowrap><translate>Billing/shipping address (city)</translate></th>
+ <td><input name="addr_city" size="35"></td>
+ </tr>
[% IF SHOW_BUSINESS_TYPES %]
<tr>
<th align="right" nowrap>[% IF IS_CUSTOMER %]<translate>Customer type</translate>[% ELSE %]<translate>Vendor type</translate>[% END %]</th>
<tr>
<th align="right" nowrap><translate>Include in Report</translate></th>
<td>
- <table>
+ <table border="0">
<tr>
<td>
<input name="l_id" id="l_id" type="checkbox" class="checkbox" value="Y">
<label for="l_id"><translate>ID</translate></label>
</td>
<td>
- <input name="l_[% db %]number" id="l_[% db %]number" type="checkbox" class="checkbox" value="Y">
+ <input name="l_[% db %]number" id="l_[% db %]number" type="checkbox" class="checkbox" value="Y" checked>
<label for="l_[% db %]number">[% IF IS_CUSTOMER %]<translate>Customer Number</translate>[% ELSE %]<translate>Vendor Number</translate>[% END %]</label>
</td>
<td>
<label for="l_name"><translate>Company Name</translate></label>
</td>
<td>
- <input name="l_address" id="l_address" type="checkbox" class="checkbox" value="Y">
- <label for="l_address"><translate>Address</translate></label>
+ <input name="l_street" id="l_street" type="checkbox" class="checkbox" value="Y" checked>
+ <label for="l_street"><translate>Street</translate></label>
</td>
</tr>
<label for="l_fax"><translate>Fax</translate></label>
</td>
<td>
- <input name="l_email" id="l_email" type="checkbox" class="checkbox" value="Y" checked>
- <label for="l_email"><translate>E-mail</translate></label>
+ <input name="l_zipcode" id="l_zipcode" type="checkbox" class="checkbox" value="Y" checked>
+ <label for="l_zipcode"><translate>Zipcode</translate></label>
</td>
</tr>
<label for="l_taxnumber"><translate>Tax Number</translate></label>
</td>
<td>
- <input name="l_sic_code" id="l_sic_code" type="checkbox" class="checkbox" value="Y">
- <label for="l_sic_code"><translate>SIC</translate></label>
+ <input name="l_email" id="l_email" type="checkbox" class="checkbox" value="Y" checked>
+ <label for="l_email"><translate>E-mail</translate></label>
</td>
<td>
<input name="l_business" id="l_business" type="checkbox" class="checkbox" value="Y">
<label for="l_business">[% IF IS_CUSTOMER %]<translate>Customer type</translate>[% ELSE %]<translate>Vendor type</translate>[% END %]</label>
</td>
+ <td>
+ <input name="l_city" id="l_city" type="checkbox" class="checkbox" value="Y" checked>
+ <label for="l_city"><translate>City</translate></label>
+ </td>
</tr>
<tr>
<input name="l_quonumber" id="l_quonumber" type="checkbox" class="checkbox" value="Y">
<label for="l_quonumber">[% IF IS_CUSTOMER %]<translate>Quotations</translate>[% ELSE %]<translate>RFQs</translate>[% END %]</label>
</td>
+ <td>
+ </td>
</tr>
[% CUSTOM_VARIABLES_INCLUSION_CODE %]