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' },
$subq_expense = "NULL";
}
+ normalize_text_blocks();
+
$query =
qq|UPDATE parts SET
partnumber = ?,
$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;
$::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
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
<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>
<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>