From 9970377d6f8a332a72d1d05ca2e07f3226853b6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 9 Oct 2020 17:10:48 +0200 Subject: [PATCH] VK/EK-Lieferschein: Warnung beim Workflow zur RG, falls nicht aus/eingelagert In Mandantenkonfig einschaltbar. --- SL/DB/MetaSetup/Default.pm | 2 ++ bin/mozilla/do.pl | 4 ++++ locale/de/all | 6 ++++++ locale/en/all | 6 ++++++ .../defaults_delivery_orders_check_stocked.sql | 6 ++++++ templates/webpages/client_config/_features.html | 12 ++++++++++++ 6 files changed, 36 insertions(+) create mode 100644 sql/Pg-upgrade2/defaults_delivery_orders_check_stocked.sql diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index 7a4b5de5d..5f3f6f320 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -127,6 +127,7 @@ __PACKAGE__->meta->columns( profit_determination => { type => 'text' }, project_status_id => { type => 'integer' }, project_type_id => { type => 'integer' }, + purchase_delivery_order_check_stocked => { type => 'boolean', default => 'false' }, purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' }, purchase_order_show_delete => { type => 'boolean', default => 'true' }, quick_search_modules => { type => 'array' }, @@ -138,6 +139,7 @@ __PACKAGE__->meta->columns( rmanumber => { type => 'text' }, rndgain_accno_id => { type => 'integer' }, rndloss_accno_id => { type => 'integer' }, + sales_delivery_order_check_stocked => { type => 'boolean', default => 'false' }, sales_delivery_order_show_delete => { type => 'boolean', default => 'true' }, sales_order_show_delete => { type => 'boolean', default => 'true' }, sales_purchase_order_ship_missing_column => { type => 'boolean', default => 'false' }, diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index bd906d40a..b1bc8b5f9 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -323,6 +323,10 @@ sub setup_do_action_bar { t8('Invoice'), submit => [ '#form', { action => "invoice" } ], disabled => !$::form->{id} ? t8('This record has not been saved yet.') : undef, + confirm => $::form->{delivered} ? undef + : ($::form->{vc} eq 'customer' && $::instance_conf->get_sales_delivery_order_check_stocked) ? t8('This record has not been stocked out. Proceed?') + : ($::form->{vc} eq 'vendor' && $::instance_conf->get_purchase_delivery_order_check_stocked) ? t8('This record has not been stocked in. Proceed?') + : undef, ], combobox => [ diff --git a/locale/de/all b/locale/de/all index bec30d1db..5fd830fd2 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1487,6 +1487,8 @@ $self->{texts} = { 'For part "#1" there are missing #2 #3 in the default warehouse/bin "#4/#5".' => 'Es fehlen #2 #3 des Artikels "#1" im Standardlager "#4/#5".', 'For part "#1" there is no default warehouse and bin defined.' => 'Für Artikel "#1" ist kein Standardlager/-lagerplatz angegeben.', 'For part "#1" there is no default warehouse and bin for ignoring onhand defined.' => 'Für Artikel "#1" ist kein Standardlager/-lagerplatz für das Auslagern ohne Bestandsprüfung angegeben.', + 'For purchase delivery orders, warn on workflow to invoice if not stocked in' => 'Warnung in Einkaufslieferscheinen beim Workflow zur Rechnung ausgeben, wenn nicht eingelagert', + 'For sales delivery orders, warn on workflow to invoice if not stocked out' => 'Warnung in Verkaufslieferscheinen beim Workflow zur Rechnung ausgeben, wenn nicht ausgelagert', 'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' => 'Für den Typ "Kunde" wird das Perl Module JSON benötigt. Überprüfbar im Installationspfad mit: $ ./scripts/installation_check.pl', 'Foreign Exchange Gain' => 'Wechselkurserträge', 'Foreign Exchange Loss' => 'Wechselkursaufwendungen', @@ -1613,8 +1615,10 @@ $self->{texts} = { 'If disabled sales quotations cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsangebote nicht direkt in Verkaufsrechnungen umgewandelt werden.', 'If enabled ZUGFeRD-conformant sales invoice PDFs will be created.' => 'Falls aktiviert, werden ZUGFeRD-konforme PDFs für Verkaufsrechnungen erzeugt.', 'If enabled a column will be shown in sales and purchase orders that lists both the amount and the value not shipped yet for each item.' => 'Falls eingeschaltet, wird für jede Position in Auftragsbestätigungen und Lieferantenaufträgen eine Spalte mit noch nicht gelieferter Menge und Wert angezeigt.', + 'If enabled a warning will be shown in purchase delivery orders on workflow to invoices if positions are not stocked in.' => 'Falls aktiviert, wird eine Warnung beim Workflow von Einkaufslieferscheinen zu Rechnungen ausgegeben, wenn die Positionen noch nicht eingelagert sind.', 'If enabled a warning will be shown in sales and purchase orders if there are two or more positions of the same part (new controller only).' => 'Falls eingeschaltet, wird eine Warnung angezeigt, wenn der Auftrag mehrere gleiche Artikel enthält (nur neuer Controller).', 'If enabled a warning will be shown in sales and purchase orders if there the delivery date is empty.' => 'Falls aktiviert, Warnungen ausgeben sobald Aufträge (Einkauf- und Verkauf) keinen Liefertermin haben.', + 'If enabled a warning will be shown in sales delivery orders on workflow to invoices if positions are not stocked out.' => 'Falls aktiviert, wird eine Warnung beim Workflow von Verkaufslieferscheinen zu Rechnungen ausgegeben, wenn die Positionen noch nicht ausgelagert sind.', 'If enabled only those projects that are assigned to the currently selected customer are offered for selection in sales records.' => 'Wenn eingeschaltet, so werden in Verkaufsbelegen nur diejenigen Projekte zur Auswahl angeboten, die dem aktuell ausgewählten Kunden zugewiesen wurden.', 'If enabled purchase and sales records cannot be saved if no transaction description has been entered.' => 'Wenn angeschaltet, so können Einkaufs- und Verkaufsbelege nicht gespeichert werden, solange keine Vorgangsbezeichnung eingegeben wurde.', 'If item not found, allow creation of new item' => 'Falls Artikel nicht gefunden, erlaube Erfassen eines Neuen', @@ -3644,6 +3648,8 @@ $self->{texts} = { 'This record has already been closed.' => 'Dieser Beleg wurde bereits geschlossen.', 'This record has already been delivered.' => 'Dieser Beleg wurde bereits geliefert.', 'This record has not been saved yet.' => 'Der Beleg wurde noch nicht gespeichert.', + 'This record has not been stocked in. Proceed?' => 'Dieser Beleg wurde noch nicht eingelagert. Fortfahren?', + 'This record has not been stocked out. Proceed?' => 'Dieser Beleg wurde noch nicht ausgelagert. Fortfahren?', 'This requirement spec is currently linked to the following project:' => 'Dieses Pflichtenheft ist mit dem folgenden Projekt verknüpft:', 'This requirement spec is currently not linked to a project.' => 'Dieses Pflichtenheft ist noch nicht mit einem Projekt verknüpft.', 'This requires you to manually correct entries for which an automatic conversion failed and to check those for which it succeeded.' => 'Dies erfordert, dass Sie diejenigen Einträge manuell korrigieren, für die die automatische Umstellung fehlschlug, sowie dass Sie diejenigen überprüfen, für die die Umstellung erfolgreich war.', diff --git a/locale/en/all b/locale/en/all index ea121506c..a8df39e1f 100644 --- a/locale/en/all +++ b/locale/en/all @@ -1487,6 +1487,8 @@ $self->{texts} = { 'For part "#1" there are missing #2 #3 in the default warehouse/bin "#4/#5".' => '', 'For part "#1" there is no default warehouse and bin defined.' => '', 'For part "#1" there is no default warehouse and bin for ignoring onhand defined.' => '', + 'For purchase delivery orders, warn on workflow to invoice if not stocked in' => '', + 'For sales delivery orders, warn on workflow to invoice if not stocked out' => '', 'For type "customer" the perl module JSON is required. Please check this on system level: $ ./scripts/installation_check.pl' => '', 'Foreign Exchange Gain' => '', 'Foreign Exchange Loss' => '', @@ -1613,8 +1615,10 @@ $self->{texts} = { 'If disabled sales quotations cannot be converted into sales invoices directly.' => '', 'If enabled ZUGFeRD-conformant sales invoice PDFs will be created.' => '', 'If enabled a column will be shown in sales and purchase orders that lists both the amount and the value not shipped yet for each item.' => '', + 'If enabled a warning will be shown in purchase delivery orders on workflow to invoices if positions are not stocked in.' => '', 'If enabled a warning will be shown in sales and purchase orders if there are two or more positions of the same part (new controller only).' => '', 'If enabled a warning will be shown in sales and purchase orders if there the delivery date is empty.' => '', + 'If enabled a warning will be shown in sales delivery orders on workflow to invoices if positions are not stocked out.' => '', 'If enabled only those projects that are assigned to the currently selected customer are offered for selection in sales records.' => '', 'If enabled purchase and sales records cannot be saved if no transaction description has been entered.' => '', 'If item not found, allow creation of new item' => '', @@ -3643,6 +3647,8 @@ $self->{texts} = { 'This record has already been closed.' => '', 'This record has already been delivered.' => '', 'This record has not been saved yet.' => '', + 'This record has not been stocked in. Proceed?' => '', + 'This record has not been stocked out. Proceed?' => '', 'This requirement spec is currently linked to the following project:' => '', 'This requirement spec is currently not linked to a project.' => '', 'This requires you to manually correct entries for which an automatic conversion failed and to check those for which it succeeded.' => '', diff --git a/sql/Pg-upgrade2/defaults_delivery_orders_check_stocked.sql b/sql/Pg-upgrade2/defaults_delivery_orders_check_stocked.sql new file mode 100644 index 000000000..b719521f1 --- /dev/null +++ b/sql/Pg-upgrade2/defaults_delivery_orders_check_stocked.sql @@ -0,0 +1,6 @@ +-- @tag: defaults_delivery_orders_check_stocked +-- @description: Mandantenkonfiguration: Prüfung, ob Lieferscheine ausgelagert sein müssen für den Workflow zur Rechnung +-- @depends: release_3_5_6_1 + +ALTER TABLE defaults ADD COLUMN sales_delivery_order_check_stocked BOOLEAN DEFAULT FALSE; +ALTER TABLE defaults ADD COLUMN purchase_delivery_order_check_stocked BOOLEAN DEFAULT FALSE; diff --git a/templates/webpages/client_config/_features.html b/templates/webpages/client_config/_features.html index ec622e5a8..cc31217c7 100644 --- a/templates/webpages/client_config/_features.html +++ b/templates/webpages/client_config/_features.html @@ -238,6 +238,18 @@ [% L.yes_no_tag("defaults.order_warn_no_deliverydate", SELF.defaults.order_warn_no_deliverydate) %] [% LxERP.t8("If enabled a warning will be shown in sales and purchase orders if there the delivery date is empty.") %] + + [% LxERP.t8("For sales delivery orders, warn on workflow to invoice if not stocked out") %] + [% L.yes_no_tag("defaults.sales_delivery_order_check_stocked", SELF.defaults.sales_delivery_order_check_stocked) %] + [% LxERP.t8("If enabled a warning will be shown in sales delivery orders on workflow to invoices if positions are not stocked out.") %] + + + + [% LxERP.t8("For purchase delivery orders, warn on workflow to invoice if not stocked in") %] + [% L.yes_no_tag("defaults.purchase_delivery_order_check_stocked", SELF.defaults.purchase_delivery_order_check_stocked) %] + [% LxERP.t8("If enabled a warning will be shown in purchase delivery orders on workflow to invoices if positions are not stocked in.") %] + + [% LxERP.t8("Create sales invoices with ZUGFeRD data") %] [% L.select_tag("defaults.create_zugferd_invoices", [ [ 0, LxERP.t8('Do not create ZUGFeRD invoices') ], [ 1, LxERP.t8('Create ZUGFeRD invoices') ], [ 2, LxERP.t8('Create ZUGFeRD invoices in test mode') ] ], -- 2.20.1