Erweiterung: Mandantenkonfiguration um einen Standardartikel der auf Vorhandensein
überprüft wird (oe). Falls nicht wird eine entsprechende Warnung ausgegeben.
Verbesserungsmöglichkei 1: Artikelnummer per partpicker auswählen
Verbesserungsmöglichkei 2: Erinnerung anolog zu Vorgangsbezeichnung vergeben implementieren
transfer_default_ignore_onhand => { type => 'boolean', default => 'false' },
transfer_default_services => { type => 'boolean', default => 'true' },
transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' },
+ transport_cost_reminder_article_number => { type => 'text' },
vendornumber => { type => 'text' },
version => { type => 'varchar', length => 8 },
vertreter => { type => 'boolean', default => 'false' },
$TMPL_VAR{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
+ my $tpca_reminder = check_transport_cost_reminder_article_number() if $::instance_conf->get_transport_cost_reminder_article_number;
print $form->parse_html_template("oe/form_footer", {
%TMPL_VAR,
webdav => $::instance_conf->get_webdav,
+ tpca_reminder => $tpca_reminder,
print_options => print_options(inline => 1),
label_edit => $locale->text("Edit the $form->{type}"),
label_workflow => $locale->text("Workflow $form->{type}"),
_remove_billed_or_delivered_rows(quantities => \%handled_base_qtys);
}
+# iterate all positions and match articlenumber
+sub check_transport_cost_reminder_article_number {
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+
+ check_oe_access();
+
+ my $transport_article = $::instance_conf->get_transport_cost_reminder_article_number;
+ for my $i (1 .. $form->{rowcount}) {
+ return undef if $form->{"partnumber_${i}"} eq $transport_article;
+ }
+
+ return $transport_article;
+
+ $main::lxdebug->leave_sub();
+}
sub dispatcher {
foreach my $action (qw(delete delivery_order e_mail invoice print purchase_order purchase_order quotation
request_for_quotation sales_order sales_order save save_and_close save_as_new ship_to update)) {
'Bcc' => 'Bcc',
'Bcc E-mail' => 'BCC (E-Mail)',
'Because the useability gets worse 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.',
+ 'Before saving a sales order, this article will be checked and a warning is generated.' => 'Vor dem Speichern eines Angebots oder Auftrags wird überprüft, ob die hier definierte Artikelnnumer vorhanden ist (Versandkosten01, etc.) und eine entsprechende Hinweiswarnung angezeigt',
'Belegnummer' => 'Buchungsnummer',
'Beratername' => 'Beratername',
'Beraternummer' => 'Beraternummer',
'Default output medium' => 'Standardausgabekanal',
'Default printer' => 'Standarddrucker',
'Default template format' => 'Standardvorlagenformat',
+ 'Default transport article number' => 'Standard Versand / Transport-Erinnerungs-Artikel',
'Default unit' => 'Standardeinheit',
'Default value' => 'Standardwert',
'Delete' => 'Löschen',
'Missing parameter (at least one of #1) in call to sub #2.' => 'Fehlernder Parameter (mindestens einer aus \'#1\') in Funktionsaufruf \'#2\'.',
'Missing parameter for WebDAV file copy' => 'Fehlender Parameter für WebDAV Datei kopieren',
'Missing taxkeys in invoices with taxes.' => 'Fehlende Steuerschlüssel in Rechnungen mit Steuern',
+ 'Missing transport cost: #1 Are you sure?' => 'Fehlender Transportkosten-Artikel #1 Trotzdem speichern?',
'Mitarbeiter' => 'Mitarbeiter',
'Mixed (requires column "type")' => 'Gemischt (erfordert Spalte "type")',
'Mobile' => 'Mobiltelefon',
'Save and Order' => 'Speichern und Auftrag erfassen',
'Save and Quotation' => 'Speichern und Angebot',
'Save and RFQ' => 'Speichern und Lieferantenanfrage',
- 'Save and close' => 'Speichern und schließen',
+ 'Save and close' => 'Speichern und schließen',
'Save and execute' => 'Speichern und ausführen',
'Save and keep open' => 'Speichern und geöffnet lassen',
'Save as new' => 'als neu speichern',
'Transfer successful' => 'Lagervorgang erfolgreich',
'Translation' => 'Übersetzung',
'Translations' => 'Übersetzungen',
+ 'Transport and service costs reminder' => 'Transport- und Versandkosten-Erinnerung',
'Trial Balance' => 'Summen- und Saldenliste',
'Trial balance between %s and %s' => 'Summen- und Saldenlisten vom %s bis zum %s',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
--- /dev/null
+# @tag: defaults_transport_cost_reminder
+# @description: Artikelname der beim Auftrag auf Vorhandensein überprüft wird (Versandkostenerinnerung).
+# @depends: release_3_1_0
+package SL::DBUpgrade2::defaults_transport_cost_reminder;
+
+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 transport_cost_reminder_article_number text|);
+ return 1;
+}
+
+1;
</td>
<td>[% LxERP.t8('When converting a requirement spec into a quotation or an oder each section gets converted into a line position in the new record. This is the article used by default for this conversion.') %]</td>
</tr>
+ <tr><td class="listheading" colspan="4">[% LxERP.t8('Transport and service costs reminder') %]</td></tr>
+ <tr>
+ <td align="right">[% LxERP.t8('Default transport article number') %]</td>
+ <td>[% L.input_tag('defaults.transport_cost_reminder_article_number', SELF.defaults.transport_cost_reminder_article_number, style=style) %]</td>
+ <td>[% LxERP.t8('Before saving a sales order, this article will be checked and a warning is generated.') %]</td>
+ </tr>
</table>
</div>
<input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
<input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
<input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]" data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
-<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
-<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+
+[% IF not tpca_reminder %]
+ <input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+ <input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] data-warn-save-active-periodic-invoice="1"[% END %] data-require-transaction-description="[% INSTANCE_CONF.get_require_transaction_description_ps %]">
+[% ELSE %]
+ [% IF warn_save_active_periodic_invoice %] [% warn_save_active_periodic_invoice=1 %] [% END %]
+ [% L.submit_tag('action_save', LxERP.t8('Save'), confirm=LxERP.t8('Missing transport cost: #1 Are you sure?', tpca_reminder), 'data-require-transaction-description'=INSTANCE_CONF.get_require_transaction_description_ps, 'data-warn-save-active-periodic-invoice'=warn_save_active_periodic_invoice) %]
+ [% L.submit_tag('action_save_and_close', LxERP.t8('Save and close'), confirm=LxERP.t8('Missing transport cost: #1 Are you sure?', tpca_reminder), 'data-require-transaction-description'=INSTANCE_CONF.get_require_transaction_description_ps, 'data-warn-save-active-periodic-invoice'=warn_save_active_periodic_invoice) %]
+[% END %]
[%- IF id %]
<input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">