Merge branch 'sales-purchase-longdescription-jquery-dialog'
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 15 Jan 2014 11:38:03 +0000 (12:38 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 15 Jan 2014 11:38:03 +0000 (12:38 +0100)
SL/Controller/CustomerVendor.pm
SL/DB/MetaSetup/Default.pm
locale/de/all
scripts/rose_auto_create_model.pl
sql/Pg-upgrade2/defaults_feature2.pl [new file with mode: 0644]
templates/webpages/client_config/_features.html

index dcb8b2d..3b6db29 100644 (file)
@@ -865,6 +865,9 @@ sub _pre_render {
 sub normalize_name {
   my ($self) = @_;
 
+  # check if feature is enabled (select normalize_vc_names from defaults)
+  return unless ($::instance_conf->get_normalize_vc_names);
+
   return unless $self->{cv};
   my $name = $self->{cv}->name;
   $name =~ s/\s+$//;
index f6e5ffc..0efdbe2 100644 (file)
@@ -55,6 +55,8 @@ __PACKAGE__->meta->columns(
   language_id                             => { type => 'integer' },
   max_future_booking_interval             => { type => 'integer', default => 360 },
   mtime                                   => { type => 'timestamp' },
+  # normalize_part_descriptions             => { type => 'boolean', default => 'true' },
+  normalize_vc_names                      => { type => 'boolean', default => 'true' },
   parts_image_css                         => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' },
   parts_listing_image                     => { type => 'boolean', default => 'true' },
   parts_show_image                        => { type => 'boolean', default => 'true' },
index c7c9a06..14151a6 100755 (executable)
@@ -256,6 +256,8 @@ $self->{texts} = {
   'Authentification database creation' => 'Anlegen der Datenbank zur Benutzerauthentifizierung',
   'Authentification tables creation' => 'Anlegen der Tabellen zur Benutzerauthentifizierung',
   'Auto Send?'                  => 'Auto. Versand?',
+  'Automatic deletion of leading, trailing and excessive (repetitive) spaces in customer or vendor names' => 'Automatisches Löschen von voran-, mehrfach wiederholenten oder nachgestellten Leerzeichen im Kunden- oder Lieferantennamen (Bspw.: " Schmidt &nbsp;&nbsp;&nbsp;& Söhne GmbH" -> "Schmidt & Söhne GmbH"',
+  'Automatic deletion of leading, trailing and excessive (repetitive) spaces in part description and part notes. Affects also the CSV-Import.' => '',
   'Automatically created invoice for fee and interest for dunning %s' => 'Automatisch erzeugte Rechnung für Gebühren und Zinsen zu Mahnung %s',
   'Available'                   => 'Verfügbar',
   'Available qty'               => 'Lagerbestand',
@@ -792,9 +794,6 @@ $self->{texts} = {
   'EB-Wert'                     => 'EB-Wert',
   'EK'                          => 'EK',
   'ELSE'                        => 'Zusatz',
-  'ELSTER Export (Taxbird)'     => 'ELSTER-Export nach Taxbird',
-  'ELSTER Export (Winston)'     => 'ELSTER Export nach Winston',
-  'ELSTER Export nach Winston'  => 'ELSTER Export nach Winston',
   'ELSTER Tax Number'           => 'ELSTER-Steuernummer',
   'EQUITY'                      => 'EIGENTUM',
   'EUER'                        => 'Einnahmen-/Überschussrechnung',
@@ -1413,6 +1412,8 @@ $self->{texts} = {
   'No.'                         => 'Position',
   'None'                        => 'Kein',
   'Normal users cannot log in.' => 'Normale Benutzer können sich nicht anmelden.',
+  'Normalize Customer / Vendor names' => 'Normalisierung Kunden- / Lieferantennamen',
+  'Normalize part description and part notes' => 'Normalisierung Artikelbeschreibung und Artikellangtext (Bemerkung)',
   'Not Discountable'            => 'Nicht rabattierfähig',
   'Not delivered'               => 'Nicht geliefert',
   'Not done yet'                => 'Noch nicht fertig',
@@ -2403,7 +2404,6 @@ $self->{texts} = {
   'USt-IdNr.'                   => 'USt-IdNr.',
   'USt-Konto'                   => 'USt-Konto',
   'UStVA'                       => 'UStVA',
-  'UStVA (PDF-Dokument)'        => 'UStVa als PDF-Dokument',
   'UStVa'                       => 'UStVa',
   'UStVa Einstellungen'         => 'UStVa Einstellungen',
   'Unbalanced Ledger'           => 'Bilanzfehler',
@@ -2516,7 +2516,6 @@ $self->{texts} = {
   'Workflow sales_order'        => 'Workflow Auftrag',
   'Workflow sales_quotation'    => 'Workflow Angebot',
   'Write bin to default bin in part?' => 'Diesen Lagerplatz als Standardlagerplatz im Artikel setzen?',
-  'Wrong Period'                => 'Falscher Zeitraum',
   'Wrong tax keys recorded'     => 'Gespeicherte Steuerschlüssel sind falsch',
   'Wrong taxes recorded'        => 'Gespeicherte Steuern passen nicht zum Steuerschlüssel',
   'YYYY'                        => 'JJJJ',
index bb246f8..de7df3b 100755 (executable)
@@ -332,20 +332,20 @@ rose_auto_create_model - mana Rose::DB::Object classes for kivitendo
 
 =head1 SYNOPSIS
 
-  scripts/rose_create_model.pl --client name-or-id table1 [table2 ...]
-  scripts/rose_create_model.pl --client name-or-id [--all|-a]
+  scripts/rose_auto_create_model.pl --client name-or-id table1 [table2 ...]
+  scripts/rose_auto_create_model.pl --client name-or-id [--all|-a]
 
   # updates all models
-  scripts/rose_create_model.pl --client name-or-id --all
+  scripts/rose_auto_create_model.pl --client name-or-id --all
 
   # updates only customer table, login taken from config
-  scripts/rose_create_model.pl customer
+  scripts/rose_auto_create_model.pl customer
 
   # updates only parts table, package will be Part
-  scripts/rose_create_model.pl parts=Part
+  scripts/rose_auto_create_model.pl parts=Part
 
   # try to update parts, but don't do it. tell what would happen in detail
-  scripts/rose_create_model.pl --no-commit parts
+  scripts/rose_auto_create_model.pl --no-commit parts
 
 =head1 DESCRIPTION
 
diff --git a/sql/Pg-upgrade2/defaults_feature2.pl b/sql/Pg-upgrade2/defaults_feature2.pl
new file mode 100644 (file)
index 0000000..3abcf46
--- /dev/null
@@ -0,0 +1,20 @@
+# @tag: defaults_feature2
+# @description: Normalisieren von vc-Namen, als auch part.notes und part.descriptions als Feature konfigurierbar machen
+# @depends: release_3_0_0
+package SL::DBUpgrade2::defaults_feature2;
+
+use utf8;
+
+use parent qw(SL::DBUpgrade2::Base);
+use strict;
+
+sub run {
+  my ($self) = @_;
+
+  # this query will fail if column already exist (new database)
+  $self->db_query(qq|ALTER TABLE defaults ADD COLUMN normalize_vc_names  boolean DEFAULT true|);
+  $self->db_query(qq|ALTER TABLE defaults ADD COLUMN normalize_part_descriptions  boolean DEFAULT true|);
+  return 1;
+}
+
+1;
index c260ce8..3d3b216 100644 (file)
    <td>[% L.yes_no_tag('defaults.vertreter', SELF.defaults.vertreter) %]</td>
    <td>[% LxERP.t8('Representative for Customer') %]</td>
   </tr>
+ <tr>
+   <td align="right">[% LxERP.t8('Normalize Customer / Vendor names') %]</td>
+   <td>   [% L.yes_no_tag('defaults.normalize_vc_names', SELF.defaults.normalize_vc_names) %]</td>
+   <td>[% LxERP.t8('Automatic deletion of leading, trailing and excessive (repetitive) spaces in customer or vendor names') %]</td>
+  </tr>
 
   <tr><td class="listheading" colspan="4">[% LxERP.t8("Parts Master Data") %]</td></tr>
 
    <td>   [% L.input_tag('defaults.parts_image_css', SELF.defaults.parts_image_css, style=style) %]</td>
    <td>[% LxERP.t8('Style the picture with the following CSS code') %]</td>
   </tr>
+ <!-- tr>
+   <td align="right">[% LxERP.t8('Normalize part description and part notes') %]</td>
+   <td>   [% L.yes_no_tag('defaults.normalize_part_descriptions', SELF.defaults.normalize_part_descriptions) %]</td>
+   <td>[% LxERP.t8('Automatic deletion of leading, trailing and excessive (repetitive) spaces in part description and part notes. Affects also the CSV-Import.') %]</td>
+  </tr>
+</tr -->
  </table>
 </div>