VK/EK-Lieferschein: Warnung beim Workflow zur RG, falls nicht aus/eingelagert
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Oct 2020 15:10:48 +0000 (17:10 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Fri, 9 Oct 2020 15:10:48 +0000 (17:10 +0200)
In Mandantenkonfig einschaltbar.

SL/DB/MetaSetup/Default.pm
bin/mozilla/do.pl
locale/de/all
locale/en/all
sql/Pg-upgrade2/defaults_delivery_orders_check_stocked.sql [new file with mode: 0644]
templates/webpages/client_config/_features.html

index 7a4b5de..5f3f6f3 100644 (file)
@@ -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' },
index bd906d4..b1bc8b5 100644 (file)
@@ -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 => [
index bec30d1..5fd830f 100755 (executable)
@@ -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.',
index ea12150..a8df39e 100644 (file)
@@ -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 (file)
index 0000000..b719521
--- /dev/null
@@ -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;
index ec622e5..cc31217 100644 (file)
    <td>[% L.yes_no_tag("defaults.order_warn_no_deliverydate", SELF.defaults.order_warn_no_deliverydate) %]</td>
    <td>[% LxERP.t8("If enabled a warning will be shown in sales and purchase orders if there the delivery date is empty.") %]</td>
   </tr>
+  <tr>
+   <td align="right">[% LxERP.t8("For sales delivery orders, warn on workflow to invoice if not stocked out") %]</td>
+   <td>[% L.yes_no_tag("defaults.sales_delivery_order_check_stocked", SELF.defaults.sales_delivery_order_check_stocked) %]</td>
+   <td>[% LxERP.t8("If enabled a warning will be shown in sales delivery orders on workflow to invoices if positions are not stocked out.") %]</td>
+  </tr>
+  <tr>
+  <tr>
+   <td align="right">[% LxERP.t8("For purchase delivery orders, warn on workflow to invoice if not stocked in") %]</td>
+   <td>[% L.yes_no_tag("defaults.purchase_delivery_order_check_stocked", SELF.defaults.purchase_delivery_order_check_stocked) %]</td>
+   <td>[% LxERP.t8("If enabled a warning will be shown in purchase delivery orders on workflow to invoices if positions are not stocked in.") %]</td>
+  </tr>
+  <tr>
   <tr>
    <td align="right">[% LxERP.t8("Create sales invoices with ZUGFeRD data") %]</td>
    <td>[% 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') ] ],