'Basic Data' => 'Basisdaten',
'Batch Printing' => 'Druck',
'Bcc' => 'Bcc',
+ 'Because the useability gets worth if one partnumber is used for several parts (for example if you are searching a position for an invoice), partnumbers should be unique.' => 'Da die Benutzerfreundlichkeit durch doppelte Artikelnummern erheblich verschlechtert wird (zum Beispiel, wenn man einen Artikel für eine Rechnung sucht), sollten Artikelnummern eindeutig vergeben sein.',
'Belegnummer' => 'Buchungsnummer',
'Beratername' => 'Beratername',
'Beraternummer' => 'Beraternummer',
'Fristsetzung' => 'Fristsetzung',
'From' => 'Von',
'From Date' => 'Von',
- 'From this version on the partnumer of articles and assemblies have to be unique.' => 'Ab dieser Version muss die Artikelnummer eindeutig sein.',
+ 'From this version on the partnumber of services, articles and assemblies have to be unique.' => 'Ab dieser Version müssen Artikelnummern eindeutig vergeben werden.',
'From this version on the taxkey 0 must have a tax rate of 0 (for DATEV compatibility).' => 'Ab dieser Version muss der Steuerschlüssel 0 einen Steuersatz von 0% haben (auf Grund der DATEV-Kompatibilität).',
'Full Access' => 'Vollzugriff',
'Full Preview' => 'Alles',
'Skipping due to existing entry in database' => 'Wegen existierendem Eintrag mit selber Nummer übersprungen',
'Skonto' => 'Skonto',
'Skonto Terms' => 'Zahlungsziel Skonto',
+ 'So far you could use one partnumber for severel parts, for example a service and an article.' => 'Bisher war es möglich eine Artikelnummer für mehrere Artikel zu verwenden, zum Beispiel eine Artikelnummer für eine Dienstleistung, eine Ware und ein Erzeugnis.',
'Sold' => 'Verkauft',
'Solution' => 'Lösung',
'Sort By' => 'Sortiert nach',
'saving data' => 'Speichere Daten',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
+ 'service' => 'Dienstleistung',
'service_list' => 'dienstleistungsliste',
'shipped' => 'verschickt',
'singular first char' => 'S',
}
sub do_update {
- my $query = qq|SELECT id, partnumber, description, unit, notes, assembly, ean, inventory_accno_id
+ if ( $main::form->{'continued'} ) {
+ my $update_query;
+ foreach my $i (1 .. $main::form->{rowcount}) {
+ $update_query = qq|UPDATE parts SET partnumber = '| . $main::form->{"partnumber_$i"} . qq|' WHERE id = | . $main::form->{"partid_$i"};
+ do_query($update_query);
+ print FH $i;
+ }
+ $dbh->commit();
+ }
+
+ my $query = qq|SELECT id, partnumber, description, unit, notes, assembly, ean, inventory_accno_id
FROM parts pa
WHERE (SELECT COUNT(*)
FROM parts p
$main::form->{PARTS} = [];
while (my $ref = $sth->fetchrow_hashref("NAME_lc")) {
+ map {$ref->{$_} = $::locale->{iconv_utf8}->convert($ref->{$_})} keys %$ref;
push @{ $main::form->{PARTS} }, $ref;
}
if ( scalar @{ $main::form->{PARTS} } > 0 ) {
&print_error_message;
- return 0;
+ return 2;
}
$query = qq|ALTER TABLE parts ADD UNIQUE (partnumber)|;
<form name="Form" method="post" action="login.pl">
<input type="hidden" name="action" value="login">
+<input type="hidden" name="continued" value="1">
<p>[% 'There are double partnumbers in your database.' | $T8 %]</p>
-<p>[% 'From this version on the partnumer of articles and assemblies have to be unique.' | $T8 %]</p>
+<p>[% 'From this version on the partnumber of services, articles and assemblies have to be unique.' | $T8 %]</p>
+<p>[% 'So far you could use one partnumber for severel parts, for example a service and an article.' | $T8 %]</p>
+<p>[% 'Because the useability gets worth if one partnumber is used for several parts (for example if you are searching a position for an invoice), partnumbers should be unique.' | $T8 %]</p>
<p>[% 'Please change the partnumber of the following parts and run the update again:' | $T8 %]</p>
<table>
[% SET row_odd = '1' %][% FOREACH row = PARTS %]
<tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
- <td align="right">[% HTML.escape(row.partnumber) %]</td>
+ <td align="right"><input name='partnumber_[% loop.count %]' value='[% HTML.escape(row.partnumber) %]'></td>
+ <input type="hidden" name='partid_[% loop.count %]' value='[% HTML.escape(row.id) %]'>
<td align="left"> [% HTML.escape(row.description) %]</a></td>
<td align="right">[% HTML.escape(row.unit) %]</td>
<td align="right">[% HTML.escape(row.notes) %]</td>
<td align="right">[% HTML.escape(row.ean) %]</td>
- <td align="right">[% IF row.assembly %] [% 'assembly' | $T8 %] [% ELSE %] [% IF row.inventory_accno_id %] [% 'part' | $T8 %] [% ELSE %] [% 'service' %] [% END %] [% END %]</td>
+ <td align="right">[% IF row.assembly %] [% 'assembly' | $T8 %] [% ELSE %] [% IF row.inventory_accno_id %] [% 'part' | $T8 %] [% ELSE %] [% 'service' | $T8 %] [% END %] [% END %]</td>
</tr>
+ [% SET rowcount = loop.count %]
[% END %]
+ <input type="hidden" name="rowcount" value="[% rowcount %]">
</table>
+<input type="submit" value="[% 'Continue' | $T8 %]">
+
</form>