]> wagnertech.de Git - mfinanz.git/commitdiff
ZUGFeRD: Feature über Mandantenkonfiguration abschaltbar
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 28 Feb 2020 16:23:38 +0000 (17:23 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 28 Feb 2020 16:24:00 +0000 (17:24 +0100)
SL/DB/MetaSetup/Default.pm
bin/mozilla/io.pl
locale/de/all
sql/Pg-upgrade2/defaults_create_zugferd_data.sql [new file with mode: 0644]
templates/webpages/client_config/_features.html

index 73b75fe1bf3dd38b5cfc8b96ee879ec6ac980869..cccd690f9017b90a614d1eaf39b4c2aecbc94997 100644 (file)
@@ -41,6 +41,7 @@ __PACKAGE__->meta->columns(
   coa                                       => { type => 'text' },
   company                                   => { type => 'text' },
   create_part_if_not_found                  => { type => 'boolean', default => 'false' },
   coa                                       => { type => 'text' },
   company                                   => { type => 'text' },
   create_part_if_not_found                  => { type => 'boolean', default => 'false' },
+  create_zugferd_invoices                   => { type => 'boolean' },
   currency_id                               => { type => 'integer', not_null => 1 },
   customer_hourly_rate                      => { type => 'numeric', precision => 8, scale => 2 },
   customer_projects_only_in_sales           => { type => 'boolean', default => 'false', not_null => 1 },
   currency_id                               => { type => 'integer', not_null => 1 },
   customer_hourly_rate                      => { type => 'numeric', precision => 8, scale => 2 },
   customer_projects_only_in_sales           => { type => 'boolean', default => 'false', not_null => 1 },
index 0cde59cec08488435662692efba1846a271afd84..718653383e30664d7597f5d31d58d0101bab42d9 100644 (file)
@@ -2118,6 +2118,8 @@ sub send_sales_purchase_email {
 sub _maybe_attach_zugferd_data {
   my ($form) = @_;
 
 sub _maybe_attach_zugferd_data {
   my ($form) = @_;
 
+  return if !$::instance_conf->get_create_zugferd_invoices;
+
   my $record = _make_record();
 
   return if !$record || !$record->can('create_pdf_a_print_options') || !$record->can('create_zugferd_data');
   my $record = _make_record();
 
   return if !$record || !$record->can('create_pdf_a_print_options') || !$record->can('create_zugferd_data');
index 550a53e4a489dce5d849227bb9c51f82d5952014..e6d43d4b229af586948df5f75bb6786a0fa6ce04 100755 (executable)
@@ -763,6 +763,7 @@ $self->{texts} = {
   'Create new version'          => 'Neue Version anlegen',
   'Create one from the context menu by right-clicking on this text.' => 'Erstellen Sie einen aus dem Kontextmenü, indem Sie auf diesen Text rechtsklicken.',
   'Create order'                => 'Auftrag erstellen',
   'Create new version'          => 'Neue Version anlegen',
   'Create one from the context menu by right-clicking on this text.' => 'Erstellen Sie einen aus dem Kontextmenü, indem Sie auf diesen Text rechtsklicken.',
   'Create order'                => 'Auftrag erstellen',
+  'Create sales invoices with ZUGFeRD data' => 'Verkaufsrechnungen mit ZUGFeRD-Daten erzeugen',
   'Create tables'               => 'Tabellen anlegen',
   'Created by'                  => 'Erstellt von',
   'Created for'                 => 'Erstellt für',
   'Create tables'               => 'Tabellen anlegen',
   'Created by'                  => 'Erstellt von',
   'Created for'                 => 'Erstellt für',
@@ -1585,6 +1586,7 @@ $self->{texts} = {
   'If disabled purchase invoices can only be created by conversion from existing requests for quotations, purchase orders and purchase delivery orders.' => 'Falls deaktiviert, so können Einkaufsrechnungen nur durch Umwandlung aus bestehenden Preisanfragen, Lieferantenaufträgen und Einkaufslieferscheinen angelegt werden.',
   'If disabled sales orders cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsaufträge nicht direkt in Verkaufsrechnungen umgewandelt werden.',
   'If disabled sales quotations cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsangebote nicht direkt in Verkaufsrechnungen umgewandelt werden.',
   'If disabled purchase invoices can only be created by conversion from existing requests for quotations, purchase orders and purchase delivery orders.' => 'Falls deaktiviert, so können Einkaufsrechnungen nur durch Umwandlung aus bestehenden Preisanfragen, Lieferantenaufträgen und Einkaufslieferscheinen angelegt werden.',
   'If disabled sales orders cannot be converted into sales invoices directly.' => 'Falls deaktiviert, so können Verkaufsaufträge nicht direkt in Verkaufsrechnungen umgewandelt werden.',
   '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 create.' => '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 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 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 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.',
diff --git a/sql/Pg-upgrade2/defaults_create_zugferd_data.sql b/sql/Pg-upgrade2/defaults_create_zugferd_data.sql
new file mode 100644 (file)
index 0000000..aa938fe
--- /dev/null
@@ -0,0 +1,5 @@
+-- @tag: defaults_create_zugferd_data
+-- @description: ZUGFeRD-Informationserzeugung option abstellen
+-- @depends: release_3_5_5
+ALTER TABLE defaults ADD COLUMN create_zugferd_invoices BOOLEAN;
+UPDATE defaults SET create_zugferd_invoices = TRUE;
index 09c807512d3af2c3fc7ff9c76f6136707a3922f8..349ada093e754a592791384e4f8315ad922c472f 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>
    <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("Create sales invoices with ZUGFeRD data") %]</td>
+   <td>[% L.yes_no_tag("defaults.create_zugferd_invoices", SELF.defaults.create_zugferd_invoices) %]</td>
+   <td>[% LxERP.t8("If enabled ZUGFeRD-conformant sales invoice PDFs will be create.") %]</td>
+  </tr>
 
   <tr><td class="listheading" colspan="4">[% LxERP.t8("E-mail") %]</td></tr>
 
 
   <tr><td class="listheading" colspan="4">[% LxERP.t8("E-mail") %]</td></tr>