Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 16 Jan 2014 14:37:53 +0000 (15:37 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 16 Jan 2014 14:37:53 +0000 (15:37 +0100)
SL/DB/MetaSetup/Default.pm
SL/IC.pm
SL/Template/Plugin/L.pm
doc/release_management.txt
templates/webpages/client_config/_features.html
templates/webpages/ustva/ustva.html

index 0efdbe2..4855128 100644 (file)
@@ -55,7 +55,7 @@ __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_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' },
index d37f66f..649ad2f 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -324,6 +324,8 @@ sub save {
     $subq_expense = "NULL";
   }
 
+  normalize_text_blocks();
+
   $query =
     qq|UPDATE parts SET
          partnumber = ?,
@@ -1697,5 +1699,24 @@ sub prepare_parts_for_printing {
   $main::lxdebug->leave_sub();
 }
 
+sub normalize_text_blocks {
+  $main::lxdebug->enter_sub();
+
+  my $self     = shift;
+  my %params   = @_;
+
+  my $form     = $params{form}     || $main::form;
+
+  # check if feature is enabled (select normalize_part_descriptions from defaults)
+  return unless ($::instance_conf->get_normalize_part_descriptions);
+
+  foreach (qw(description notes)) {
+    $form->{$_} =~ s/\s+$//s;
+    $form->{$_} =~ s/^\s+//s;
+    $form->{$_} =~ s/ {2,}/ /g;
+  }
+   $main::lxdebug->leave_sub();
+}
+
 
 1;
index 0c3fe74..2411416 100644 (file)
@@ -247,7 +247,7 @@ sub customer_picker {
   $::request->{layout}->add_javascripts('autocomplete_customer.js');
 
   $self->hidden_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => 'customer_autocomplete') .
-  $self->input_tag("$name_e\_name", (ref $value && $value->can('name')) ? $value->name : '', %params);
+  $self->input_tag('', (ref $value && $value->can('name')) ? $value->name : '', id => $self->name_to_id("$name_e\_name"), %params);
 }
 
 # simple version with select_tag
index 533915f..05a18d3 100644 (file)
@@ -20,12 +20,12 @@ als freundliche Checkliste zum ausdrucken und erweitern.
 1. KONSISTENZ DES PROGRAMMS
 ===========================
 
-* Testlauf t/test.sh
+* Testlauf mit t/test.pl
+  Benutzer und Mandant muss hierfür entsprechend in kivitendo.conf > Abschnitt testing
+  konfiguriert sein.
 
   - Im Moment sind 3 Fehler optimal (die sind noch nicht angegangen):
-    o  bin/mozilla/ic.pl contains at least 130 html tags.
-    o  bin/mozilla/ap.pl contains at least 183 html tags.
-    o  bin/mozilla/admin.pl DOES NOT use proper system or exec calls
+    o  bin/mozilla/ic.pl contains at least 123 html tags.
   - Einige Tests setzen eine korrekt aufgesetzte Datenbank für tests voraus.
     TODO: diese Tests korrekt skippen wenn keine DB gefunden wurde.
     TODO: Dokumentieren wie der Releasemanager sich so eine DB baut, die
index 3d3b216..28a00ec 100644 (file)
    <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>
+ <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 -->
+</tr>
  </table>
 </div>
index d4aa703..b69d3b4 100644 (file)
@@ -194,7 +194,7 @@ Vorsteuerabzug. </b><br />Ums&auml;tze nach &sect; 4 Nr. 8 bis 20 UStG</td>
     <tr>
       <td class="text2"><b class="h4">neuer Fahrzeuge von Lieferern</b>
              von Lieferanten <b>ohne</b> USt.IdNr. <br class="nodis" />
-            zum allgemeinen Steuersatz</td>
+       zum allgemeinen Steuersatz</td>
       <td class="spalte ausfuellen"><span class="nodis">(Spalte </span>94<span class="nodis">)</span></td>
       <td class="betrag ausfuellen">[%pos_ustva_94%]</td>
       <td class="spalte"><span class="nodis">(Spalte </span>96<span class="nodis">)</span></td>