]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Wiederkehrende Rechnung: Option "erste Rechnung erzeugen am"
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 14 Oct 2013 13:09:56 +0000 (15:09 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 3 Apr 2014 12:14:50 +0000 (14:14 +0200)
Bisher nur die Masken; noch nicht im Backgroundjob implementiert

SL/DB/MetaSetup/PeriodicInvoicesConfig.pm
SL/OE.pm
bin/mozilla/oe.pl
locale/de/all
sql/Pg-upgrade2/periodic_invoices_first_billing_date.sql [new file with mode: 0644]
templates/webpages/oe/edit_periodic_invoices_config.html

index e914a6449650302c8de2012fc0282d741620d87e..eae8481d42160b4f9a32df2160daff8b32fe0428 100644 (file)
@@ -14,6 +14,7 @@ __PACKAGE__->meta->columns(
   copies                  => { type => 'integer' },
   end_date                => { type => 'date' },
   extend_automatically_by => { type => 'integer' },
   copies                  => { type => 'integer' },
   end_date                => { type => 'date' },
   extend_automatically_by => { type => 'integer' },
+  first_billing_date      => { type => 'date' },
   id                      => { type => 'integer', not_null => 1, sequence => 'id' },
   oe_id                   => { type => 'integer', not_null => 1 },
   periodicity             => { type => 'varchar', length => 10, not_null => 1 },
   id                      => { type => 'integer', not_null => 1, sequence => 'id' },
   oe_id                   => { type => 'integer', not_null => 1 },
   periodicity             => { type => 'varchar', length => 10, not_null => 1 },
index 13e735a384fcec8b3d3f738129301787efb9335c..266945ce37da7aa69fd1a211cbf3ada3ff0300d5 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -662,7 +662,7 @@ sub load_periodic_invoice_config {
     my $config_obj = SL::DB::Manager::PeriodicInvoicesConfig->find_by(oe_id => $form->{id});
 
     if ($config_obj) {
     my $config_obj = SL::DB::Manager::PeriodicInvoicesConfig->find_by(oe_id => $form->{id});
 
     if ($config_obj) {
-      my $config = { map { $_ => $config_obj->$_ } qw(active terminated periodicity start_date_as_date end_date_as_date extend_automatically_by ar_chart_id
+      my $config = { map { $_ => $config_obj->$_ } qw(active terminated periodicity start_date_as_date end_date_as_date first_billing_date_as_date extend_automatically_by ar_chart_id
                                                       print printer_id copies) };
       $form->{periodic_invoices_config} = YAML::Dump($config);
     }
                                                       print printer_id copies) };
       $form->{periodic_invoices_config} = YAML::Dump($config);
     }
index 285f5aaa419dd1c14a6a61661768e72bf23e2afc..e59e95c8faf67e0c9acec90dc49c602148059d50 100644 (file)
@@ -1930,7 +1930,7 @@ sub edit_periodic_invoices_config {
 
   if ('HASH' ne ref $config) {
     $config =  { periodicity             => 'y',
 
   if ('HASH' ne ref $config) {
     $config =  { periodicity             => 'y',
-                 start_date_as_date      => $::form->{transdate},
+                 start_date_as_date      => $::form->{transdate} || $::form->current_date,
                  extend_automatically_by => 12,
                  active                  => 1,
                };
                  extend_automatically_by => 12,
                  active                  => 1,
                };
@@ -1965,6 +1965,7 @@ sub save_periodic_invoices_config {
                  periodicity             => (any { $_ eq $::form->{periodicity} } qw(m q b y)) ? $::form->{periodicity} : 'm',
                  start_date_as_date      => $::form->{start_date_as_date},
                  end_date_as_date        => $::form->{end_date_as_date},
                  periodicity             => (any { $_ eq $::form->{periodicity} } qw(m q b y)) ? $::form->{periodicity} : 'm',
                  start_date_as_date      => $::form->{start_date_as_date},
                  end_date_as_date        => $::form->{end_date_as_date},
+                 first_billing_date_as_date => $::form->{first_billing_date_as_date},
                  print                   => $::form->{print} ? 1 : 0,
                  printer_id              => $::form->{print} ? $::form->{printer_id} * 1 : undef,
                  copies                  => $::form->{copies} * 1 ? $::form->{copies} : 1,
                  print                   => $::form->{print} ? 1 : 0,
                  printer_id              => $::form->{print} ? $::form->{printer_id} * 1 : undef,
                  copies                  => $::form->{copies} * 1 ? $::form->{copies} : 1,
index 911f0279fb915fd224ad7bbd98a966ecfad93be7..62892ef544fb4d7fcf97dc5071be64b6c0830187 100755 (executable)
@@ -543,6 +543,7 @@ $self->{texts} = {
   'Create bank transfer via SEPA XML' => 'Überweisung via SEPA XML erzeugen',
   'Create customers and vendors. Edit all vendors. Edit all customers' => 'Kunden und Lieferanten erfassen. Alle Lieferanten bearbeiten. Alle Kunden bearbeiten',
   'Create customers and vendors. Edit all vendors. Edit only customers where salesman equals employee (login)' => 'Kunden und Lieferanten erfassen. Alle Lieferanten bearbeiten. Nur Kunden bearbeiten bei denen der Verkäufer gleich Bearbeiter (login) ist',
   'Create bank transfer via SEPA XML' => 'Überweisung via SEPA XML erzeugen',
   'Create customers and vendors. Edit all vendors. Edit all customers' => 'Kunden und Lieferanten erfassen. Alle Lieferanten bearbeiten. Alle Kunden bearbeiten',
   'Create customers and vendors. Edit all vendors. Edit only customers where salesman equals employee (login)' => 'Kunden und Lieferanten erfassen. Alle Lieferanten bearbeiten. Nur Kunden bearbeiten bei denen der Verkäufer gleich Bearbeiter (login) ist',
+  'Create first invoice on'     => 'Erste Rechnung erzeugen am',
   'Create invoice?'             => 'Rechnung erstellen?',
   'Create new'                  => 'Neu erfassen',
   'Create new background job'   => 'Neuen Hintergrund-Job anlegen',
   'Create invoice?'             => 'Rechnung erstellen?',
   'Create new'                  => 'Neu erfassen',
   'Create new background job'   => 'Neuen Hintergrund-Job anlegen',
@@ -1092,6 +1093,7 @@ $self->{texts} = {
   'If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.' => 'Weichen die Beträge mehr als die "maximale Betragsabweichung" (siehe Einstellungen) ab, so wird diese Position als ungültig markiert.',
   'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' => 'Falls angehakt wird der DATEV-Steuerschlüssel bei Buchungen auf dieses Konto nicht beim DATEV-Export mitexportiert, allerdings nur wenn zusätzlich der Konto-Steuerschlüssel vom Buchungs (Hauptbuch) Steuerschlüssel abweicht',
   'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' => 'Falls konfiguriert, wird dieses Lager mit Lagerplatz für neu angelegte Waren vorausgewählt.',
   'If amounts differ more than "Maximal amount difference" (see settings), this item is marked as invalid.' => 'Weichen die Beträge mehr als die "maximale Betragsabweichung" (siehe Einstellungen) ab, so wird diese Position als ungültig markiert.',
   'If checked the taxkey will not be exported in the DATEV Export, but only IF chart taxkeys differ from general ledger taxkeys' => 'Falls angehakt wird der DATEV-Steuerschlüssel bei Buchungen auf dieses Konto nicht beim DATEV-Export mitexportiert, allerdings nur wenn zusätzlich der Konto-Steuerschlüssel vom Buchungs (Hauptbuch) Steuerschlüssel abweicht',
   'If configured this bin will be preselected for all new parts. Also this bin will be used as the master default bin, if default transfer out with master bin is activated.' => 'Falls konfiguriert, wird dieses Lager mit Lagerplatz für neu angelegte Waren vorausgewählt.',
+  'If missing then the start date will be used.' => 'Falls es fehlt, so wird die erste Rechnung für das Startdatum erzeugt.',
   'If the article type is set to \'mixed\' then a column called \'type\' must be present.' => 'Falls der Artikeltyp auf \'gemischt\' gestellt wird, muss eine Spalte namens \'type\' vorhanden sein.',
   'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => 'Wenn das automatische Erstellen einer Rechnung &uuml;ber Mahngeb&uuml;hren und Zinsen f&uuml;r ein Mahnlevel aktiviert ist, so werden die folgenden Konten f&uuml;r die Rechnung benutzt.',
   'If the database user listed above does not have the right to create a database then enter the name and password of the superuser below:' => 'Falls der oben genannte Datenbankbenutzer nicht die Berechtigung zum Anlegen neuer Datenbanken hat, so k&ouml;nnen Sie hier den Namen und das Passwort des Datenbankadministratoraccounts angeben:',
   'If the article type is set to \'mixed\' then a column called \'type\' must be present.' => 'Falls der Artikeltyp auf \'gemischt\' gestellt wird, muss eine Spalte namens \'type\' vorhanden sein.',
   'If the automatic creation of invoices for fees and interest is switched on for a dunning level then the following accounts will be used for the invoice.' => 'Wenn das automatische Erstellen einer Rechnung &uuml;ber Mahngeb&uuml;hren und Zinsen f&uuml;r ein Mahnlevel aktiviert ist, so werden die folgenden Konten f&uuml;r die Rechnung benutzt.',
   'If the database user listed above does not have the right to create a database then enter the name and password of the superuser below:' => 'Falls der oben genannte Datenbankbenutzer nicht die Berechtigung zum Anlegen neuer Datenbanken hat, so k&ouml;nnen Sie hier den Namen und das Passwort des Datenbankadministratoraccounts angeben:',
diff --git a/sql/Pg-upgrade2/periodic_invoices_first_billing_date.sql b/sql/Pg-upgrade2/periodic_invoices_first_billing_date.sql
new file mode 100644 (file)
index 0000000..8487982
--- /dev/null
@@ -0,0 +1,5 @@
+-- @tag: periodic_invoices_first_billing_date
+-- @description: Wiederkehrende Rechnungen: Feld für erstes Rechnungsdatum
+-- @depends: periodic_invoices
+-- @charset: utf-8
+ALTER TABLE periodic_invoices_configs ADD COLUMN first_billing_date DATE;
index 3c2042fb3d00df5b80e28f8ecbf4e6ef5aef2b8a..2e6b5a406fd4e66f56927c260444692f7219d3ef 100644 (file)
      </td>
     </tr>
 
      </td>
     </tr>
 
+    <tr>
+     <th align="right">[%- LxERP.t8('Create first invoice on') %]<sup>(2)</sup></th>
+     <td valign="top">
+      [% L.date_tag("first_billing_date_as_date", first_billing_date_as_date) %]
+     </td>
+    </tr>
+
     <tr>
      <th align="right">[% LxERP.t8('Extend automatically by n months') %]</th>
      <td valign="top">
     <tr>
      <th align="right">[% LxERP.t8('Extend automatically by n months') %]</th>
      <td valign="top">
@@ -85,6 +92,7 @@
   <hr>
 
   <p>(1): [%- LxERP.t8('The end date is the last day for which invoices will possibly be created.') %]</p>
   <hr>
 
   <p>(1): [%- LxERP.t8('The end date is the last day for which invoices will possibly be created.') %]</p>
+  <p>(2): [% LxERP.t8("If missing then the start date will be used.") %]</p>
 
   [% L.hidden_tag('action', 'save_periodic_invoices_config') %]
 
 
   [% L.hidden_tag('action', 'save_periodic_invoices_config') %]