Merge branch 'erweiterung-wiederkehrender-rechnungen'
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 3 Apr 2014 12:26:47 +0000 (14:26 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 3 Apr 2014 12:26:47 +0000 (14:26 +0200)
22 files changed:
SL/BackgroundJob/CreatePeriodicInvoices.pm
SL/Controller/FinancialControllingReport.pm
SL/Controller/FinancialOverview.pm
SL/DB/MetaSetup/PeriodicInvoicesConfig.pm
SL/DB/PeriodicInvoicesConfig.pm
SL/InstallationCheck.pm
SL/OE.pm
bin/mozilla/oe.pl
doc/dokumentation.xml
doc/html/ch03.html
doc/html/ch03s02.html
doc/html/ch04.html
doc/html/index.html
doc/kivitendo-Dokumentation.pdf
js/edit_periodic_invoices_config.js
js/locale/de.js
locale/de/all
sql/Pg-upgrade2/periodic_invoices_first_billing_date.sql [new file with mode: 0644]
templates/webpages/financial_overview/report_top.html
templates/webpages/oe/edit_periodic_invoices_config.html
templates/webpages/oe/form_footer.html
templates/webpages/oe/form_header.html

index fa5d649..dc740cc 100644 (file)
@@ -5,6 +5,7 @@ use strict;
 use parent qw(SL::BackgroundJob::Base);
 
 use Config::Std;
+use DateTime::Format::Strptime;
 use English qw(-no_match_vars);
 
 use SL::DB::AuthUser;
@@ -79,21 +80,22 @@ sub _generate_time_period_variables {
                            $::locale->text('January'), $::locale->text('February'), $::locale->text('March'),     $::locale->text('April'),   $::locale->text('May'),      $::locale->text('June'),
                            $::locale->text('July'),    $::locale->text('August'),   $::locale->text('September'), $::locale->text('October'), $::locale->text('November'), $::locale->text('December'));
 
-  my $vars = { current_quarter     => $period_start_date->quarter,
-               previous_quarter    => $period_start_date->clone->subtract(months => 3)->quarter,
-               next_quarter        => $period_start_date->clone->add(     months => 3)->quarter,
+  my $vars = {
+    current_quarter     => [ $period_start_date->clone->truncate(to => 'month'),                        sub { $_[0]->quarter } ],
+    previous_quarter    => [ $period_start_date->clone->truncate(to => 'month')->subtract(months => 3), sub { $_[0]->quarter } ],
+    next_quarter        => [ $period_start_date->clone->truncate(to => 'month')->add(     months => 3), sub { $_[0]->quarter } ],
 
-               current_month       => $period_start_date->month,
-               previous_month      => $period_start_date->clone->subtract(months => 1)->month,
-               next_month          => $period_start_date->clone->add(     months => 1)->month,
+    current_month       => [ $period_start_date->clone->truncate(to => 'month'),                        sub { $_[0]->month } ],
+    previous_month      => [ $period_start_date->clone->truncate(to => 'month')->subtract(months => 1), sub { $_[0]->month } ],
+    next_month          => [ $period_start_date->clone->truncate(to => 'month')->add(     months => 1), sub { $_[0]->month } ],
 
-               current_year        => $period_start_date->year,
-               previous_year       => $period_start_date->year - 1,
-               next_year           => $period_start_date->year + 1,
+    current_year        => [ $period_start_date->clone->truncate(to => 'year'),                         sub { $_[0]->year } ],
+    previous_year       => [ $period_start_date->clone->truncate(to => 'year')->subtract(years => 1),   sub { $_[0]->year } ],
+    next_year           => [ $period_start_date->clone->truncate(to => 'year')->add(     years => 1),   sub { $_[0]->year } ],
 
-               period_start_date   => $::locale->format_date(\%::myconfig, $period_start_date),
-               period_end_date     => $::locale->format_date(\%::myconfig, $period_end_date),
-             };
+    period_start_date   => [ $period_start_date->clone->truncate(to => 'month'), sub { $::locale->format_date(\%::myconfig, $_[0]) } ],
+    period_end_date     => [ $period_end_date  ->clone->truncate(to => 'month'), sub { $::locale->format_date(\%::myconfig, $_[0]) } ],
+  };
 
   map { $vars->{"${_}_month_long"} = $month_names[ $vars->{"${_}_month"} ] } qw(current previous next);
 
@@ -106,8 +108,23 @@ sub _replace_vars {
   my $sub    = shift;
   my $str    = $object->$sub;
 
-  my ($key, $value);
-  $str =~ s|<\%${key}\%>|$value|g while ($key, $value) = each %{ $vars };
+  $str =~ s{ <\% ([a-z0-9_]+) ( \s+ format \s*=\s* (.*?) \s* )? \%>}{
+    my ($key, $format) = ($1, $3);
+    if (!$vars->{$key}) {
+      '';
+
+    } elsif ($format) {
+      DateTime::Format::Strptime->new(
+        pattern     => $format,
+        locale      => 'de_DE',
+        time_zone   => 'local',
+      )->format_datetime($vars->{$key}->[0]);
+
+    } else {
+      $vars->{$1}->[1]->($vars->{$1}->[0]);
+    }
+  }eigx;
+
   $object->$sub($str);
 }
 
@@ -171,27 +188,8 @@ sub _create_periodic_invoice {
 }
 
 sub _calculate_dates {
-  my $config     = shift;
-
-  my $cur_date   = $config->start_date;
-  my $start_date = $config->get_previous_invoice_date || DateTime->new(year => 1970, month => 1, day => 1);
-  my $end_date   = $config->end_date                  || DateTime->new(year => 2100, month => 1, day => 1);
-  my $tomorrow   = DateTime->today_local->add(days => 1);
-  my $period_len = $config->get_period_length;
-
-  $end_date      = $tomorrow if $end_date > $tomorrow;
-
-  my @dates;
-
-  while (1) {
-    last if $cur_date >= $end_date;
-
-    push @dates, $cur_date->clone if $cur_date > $start_date;
-
-    $cur_date->add(months => $period_len);
-  }
-
-  return @dates;
+  my ($config) = @_;
+  return $config->calculate_invoice_dates(end_date => DateTime->today_local->add(days => 1));
 }
 
 sub _send_email {
index bedc762..f0be9ad 100644 (file)
@@ -24,7 +24,6 @@ my %sort_columns = (
   transaction_description => t8('Transaction description'),
   globalprojectnumber     => t8('Project'),
   globalproject_type      => t8('Project Type'),
-  netamount               => t8('Order amount'),
 );
 
 sub action_list {
@@ -51,13 +50,13 @@ sub prepare_report {
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
-  my @columns     = qw(customer globalprojectnumber globalproject_type ordnumber netamount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
+  my @columns     = qw(customer globalprojectnumber globalproject_type ordnumber net_amount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
                        billable_amount billable_amount_p other_amount);
-  my @sortable    = qw(ordnumber transdate customer netamount globalprojectnumber globalproject_type);
-  $self->{number_columns} = [ qw(netamount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
+  my @sortable    = qw(ordnumber transdate customer globalprojectnumber globalproject_type);
+  $self->{number_columns} = [ qw(net_amount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
 
   my %column_defs           = (
-    netamount               => {                                                                                         },
+    net_amount              => { text     => $::locale->text('Order amount')                                             },
     billed_amount           => { text     => $::locale->text('Billed amount')                                            },
     billed_amount_p         => { text     => $::locale->text('%')                                                        },
     delivered_amount        => { text     => $::locale->text('Delivered amount')                                         },
@@ -120,8 +119,16 @@ sub calculate_data {
     $order->{other_amount}      = $billed_amount             - $order->{billed_amount};
     $order->{billable_amount}   = $order->{delivered_amount} - $order->{billed_amount};
 
+    if ($order->periodic_invoices_config) {
+      my @dates = $order->periodic_invoices_config->calculate_invoice_dates(past_dates => 1, end_date => $order->periodic_invoices_config->end_date || DateTime->today_local);
+      $order->{net_amount} = $order->netamount * scalar(@dates);
+
+    } else {
+      $order->{net_amount} = $order->netamount;
+    }
+
     foreach (qw(delivered billed paid billable)) {
-      $order->{"${_}_amount_p"} = $order->netamount * 1 ? $order->{"${_}_amount"} * 100 / $order->netamount : undef;
+      $order->{"${_}_amount_p"} = $order->{net_amount} * 1 ? $order->{"${_}_amount"} * 100 / $order->{net_amount} : undef;
     }
   }
 }
@@ -219,8 +226,20 @@ sub init_models {
           'globalproject.active' => 1,
           'globalproject.valid'  => 1,
         ]],
+      # keine WR
+      # oder aber (WR aktiv und (kein enddatum oder enddatum noch nicht überschritten))
+      or => [
+        'periodic_invoices_config.id' => undef,
+        # and => [
+          'periodic_invoices_config.active' => 1,
+        #   or => [
+        #     'periodic_invoices_config.end_date' => undef,
+        #     'periodic_invoices_config.end_date' => { le => DateTime->today_local },
+        # ]
+        # ]
+      ],
     ],
-    with_objects => [ 'customer', 'globalproject', 'globalproject.project_type' ],
+    with_objects => [ 'customer', 'globalproject', 'globalproject.project_type', 'periodic_invoices_config' ],
   );
 }
 
index 38d2fc6..49c0469 100644 (file)
@@ -5,14 +5,17 @@ use parent qw(SL::Controller::Base);
 
 use List::MoreUtils qw(none);
 
+use SL::DB::Employee;
 use SL::DB::Invoice;
 use SL::DB::Order;
+use SL::DB::PeriodicInvoicesConfig;
 use SL::DB::PurchaseInvoice;
 use SL::Controller::Helper::ReportGenerator;
 use SL::Locale::String;
 
 use Rose::Object::MakeMethods::Generic (
-  scalar => [ qw(report number_columns year current_year types objects data subtotals_per_quarter) ],
+  scalar                  => [ qw(report number_columns year current_year objects subtotals_per_quarter salesman_id) ],
+  'scalar --get_set_init' => [ qw(employees types data) ],
 );
 
 __PACKAGE__->run_before(sub { $::auth->assert('report'); });
@@ -20,10 +23,11 @@ __PACKAGE__->run_before(sub { $::auth->assert('report'); });
 sub action_list {
   my ($self) = @_;
 
-  $self->subtotals_per_quarter($::form->{subtotals_per_quarter});
+  $self->$_($::form->{$_}) for qw(subtotals_per_quarter salesman_id);
 
   $self->get_objects;
-  $self->calculate_data;
+  $self->calculate_one_time_data;
+  $self->calculate_periodic_invoices;
   $self->prepare_report;
   $self->list_data;
 }
@@ -64,7 +68,7 @@ sub prepare_report {
   );
   $self->report->set_columns(%column_defs);
   $self->report->set_column_order(@columns);
-  $self->report->set_export_options(qw(list year subtotals_per_quarter));
+  $self->report->set_export_options(qw(list year subtotals_per_quarter salesman_id));
   $self->report->set_options_from_form;
 }
 
@@ -77,22 +81,26 @@ sub get_objects {
   my $start       = DateTime->new(year => $self->year, month => 1, day => 1);
   my $end         = DateTime->new(year => $self->year, month => 12, day => 31);
 
-  my @date_filter = (and => [ transdate => { ge => $start }, transdate => { le => $end } ]);
+  my @f_date      = (transdate => { ge => $start }, transdate => { le => $end });
+  my @f_salesman  = $self->salesman_id ? (salesman_id => $self->salesman_id) : ();
 
   $self->objects({
-    sales_quotations       => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('sales_quotation')   ]]),
-    sales_orders           => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('sales_order')       ]]),
-    requests_for_quotation => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('request_quotation') ]]),
-    purchase_orders        => SL::DB::Manager::Order->get_all(          where => [ and => [ @date_filter, SL::DB::Manager::Order->type_filter('purchase_order')    ]]),
-    sales_invoices         => SL::DB::Manager::Invoice->get_all(        where => \@date_filter),
-    purchase_invoices      => SL::DB::Manager::PurchaseInvoice->get_all(where => \@date_filter),
+    sales_quotations       => SL::DB::Manager::Order->get_all(          where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('sales_quotation')   ]]),
+    sales_orders           => SL::DB::Manager::Order->get_all(          where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('sales_order')       ]], with_objects => [ qw(periodic_invoices_config) ]),
+    requests_for_quotation => SL::DB::Manager::Order->get_all(          where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('request_quotation') ]]),
+    purchase_orders        => SL::DB::Manager::Order->get_all(          where => [ and => [ @f_date, @f_salesman, SL::DB::Manager::Order->type_filter('purchase_order')    ]]),
+    sales_invoices         => SL::DB::Manager::Invoice->get_all(        where => [ and => [ @f_date, @f_salesman, ]]),
+    purchase_invoices      => SL::DB::Manager::PurchaseInvoice->get_all(where => [ and =>  \@f_date ]),
+    periodic_invoices_cfg  => SL::DB::Manager::PeriodicInvoicesConfig->get_all(where => [ active => 1 ]),
   });
+
+  $self->objects->{sales_orders} = [ grep { !$_->periodic_invoices_config || !$_->periodic_invoices_config->active } @{ $self->objects->{sales_orders} } ];
 }
 
-sub calculate_data {
-  my ($self) = @_;
+sub init_types { [ qw(sales_quotations sales_orders sales_invoices requests_for_quotation purchase_orders purchase_invoices) ] }
 
-  $self->types([ qw(sales_quotations sales_orders sales_invoices requests_for_quotation purchase_orders purchase_invoices) ]);
+sub init_data {
+  my ($self) = @_;
 
   my %data  = (
     year    => [ ($self->year) x 12                   ],
@@ -107,18 +115,47 @@ sub calculate_data {
     } @{ $self->types },
   );
 
-  foreach my $type (keys %{ $self->objects }) {
+  return \%data;
+}
+
+sub calculate_one_time_data {
+  my ($self) = @_;
+
+  foreach my $type (@{ $self->types }) {
     foreach my $object (@{ $self->objects->{ $type } }) {
       my $month                              = $object->transdate->month - 1;
-      my $tdata                              = $data{$type};
+      my $tdata                              = $self->data->{$type};
 
       $tdata->{months}->[$month]            += $object->netamount;
       $tdata->{quarters}->[int($month / 3)] += $object->netamount;
       $tdata->{year}                        += $object->netamount;
     }
   }
+}
+
+sub calculate_periodic_invoices {
+  my ($self)     = @_;
 
-  $self->data(\%data);
+  my $start_date = DateTime->new(year => $self->year, month =>  1, day =>  1, time_zone => $::locale->get_local_time_zone);
+  my $end_date   = DateTime->new(year => $self->year, month => 12, day => 31, time_zone => $::locale->get_local_time_zone);
+
+  $self->calculate_one_periodic_invoice(config => $_, start_date => $start_date, end_date => $end_date) for @{ $self->objects->{periodic_invoices_cfg} };
+}
+
+sub calculate_one_periodic_invoice {
+  my ($self, %params) = @_;
+
+  my @dates           = $params{config}->calculate_invoice_dates(start_date => $params{start_date}, end_date => $params{end_date}, past_dates => 1);
+  my $first_date      = $dates[0];
+
+  return if !$first_date;
+
+  my $net  = $params{config}->order->netamount * scalar(@dates);
+  my $sord = $self->data->{sales_orders};
+
+  $sord->{months  }->[ $first_date->month   - 1 ] += $net;
+  $sord->{quarters}->[ $first_date->quarter - 1 ] += $net;
+  $sord->{year}                                   += $net;
 }
 
 sub list_data {
@@ -162,4 +199,6 @@ sub list_data {
   return $self->report->generate_with_headers;
 }
 
+sub init_employees { SL::DB::Manager::Employee->get_all_sorted }
+
 1;
index e914a64..eae8481 100644 (file)
@@ -14,6 +14,7 @@ __PACKAGE__->meta->columns(
   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 },
index 7480c3a..074d4e3 100644 (file)
@@ -4,6 +4,8 @@ use strict;
 
 use SL::DB::MetaSetup::PeriodicInvoicesConfig;
 
+use List::Util qw(max min);
+
 __PACKAGE__->meta->initialize;
 
 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
@@ -58,20 +60,42 @@ sub handle_automatic_extension {
   return $end_date;
 }
 
-sub get_previous_invoice_date {
+sub get_previous_billed_period_start_date {
   my $self  = shift;
 
   my $query = <<SQL;
-    SELECT MAX(ar.transdate)
+    SELECT MAX(period_start_date)
     FROM periodic_invoices
-    LEFT JOIN ar ON (ar.id = periodic_invoices.ar_id)
-    WHERE periodic_invoices.config_id = ?
+    WHERE config_id = ?
 SQL
 
-  my ($max_transdate) = $self->dbh->selectrow_array($query, undef, $self->id);
+  my ($date) = $self->dbh->selectrow_array($query, undef, $self->id);
+
+  return undef unless $date;
+  return ref $date ? $date : $self->db->parse_date($date);
+}
+
+sub calculate_invoice_dates {
+  my ($self, %params) = @_;
+
+  my $period_len = $self->get_period_length;
+  my $cur_date   = $self->first_billing_date || $self->start_date;
+  my $end_date   = $self->end_date           || DateTime->today_local->add(years => 10);
+  my $start_date = $params{past_dates} ? undef                       : $self->get_previous_billed_period_start_date;
+  $start_date    = $start_date         ? $start_date->add(days => 1) : $cur_date->clone;
+
+  $start_date    = max($start_date, $params{start_date}) if $params{start_date};
+  $end_date      = min($end_date,   $params{end_date})   if $params{end_date};
+
+  my @dates;
+
+  while ($cur_date <= $end_date) {
+    push @dates, $cur_date->clone if $cur_date >= $start_date;
+
+    $cur_date->add(months => $period_len);
+  }
 
-  return undef unless $max_transdate;
-  return ref $max_transdate ? $max_transdate : $self->db->parse_date($max_transdate);
+  return @dates;
 }
 
 1;
index a3aa509..499ef67 100644 (file)
@@ -21,6 +21,7 @@ BEGIN {
   { name => "Clone",                               url => "http://search.cpan.org/~rdf/",       debian => 'libclone-perl' },
   { name => "Config::Std",                         url => "http://search.cpan.org/~dconway/",   debian => 'libconfig-std-perl' },
   { name => "DateTime",                            url => "http://search.cpan.org/~drolsky/",   debian => 'libdatetime-perl' },
+  { name => "DateTime::Format::Strptime",          url => "http://search.cpan.org/~drolsky/",   debian => 'libdatetime-format-strptime-perl' },
   { name => "DBI",             version => '1.50',  url => "http://search.cpan.org/~timb/",      debian => 'libdbi-perl' },
   { name => "DBD::Pg",         version => '1.49',  url => "http://search.cpan.org/~dbdpg/",     debian => 'libdbd-pg-perl' },
   { name => "Email::Address",                      url => "http://search.cpan.org/~rjbs/",      debian => 'libemail-address-perl' },
index 13e735a..266945c 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 = { 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);
     }
index a2d7175..7bb96a1 100644 (file)
@@ -35,6 +35,7 @@
 use Carp;
 use POSIX qw(strftime);
 
+use SL::DB::Order;
 use SL::DO;
 use SL::FU;
 use SL::OE;
@@ -312,6 +313,18 @@ sub form_header {
   # Container for template variables. Unfortunately this has to be
   # visible in form_footer too, so package local level and not my here.
   %TMPL_VAR = ();
+  if ($form->{id}) {
+    my $obj = SL::DB::Order->new(id => $form->{id})->load;
+    $TMPL_VAR{warn_save_active_periodic_invoice} =
+         $obj->is_type('sales_order')
+      && $obj->periodic_invoices_config
+      && $obj->periodic_invoices_config->active
+      && (   !$obj->periodic_invoices_config->end_date
+          || ($obj->periodic_invoices_config->end_date > DateTime->today_local))
+      && $obj->periodic_invoices_config->get_previous_billed_period_start_date;
+
+    $TMPL_VAR{oe_obj} = $obj;
+  }
 
   $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
 
@@ -1930,13 +1943,13 @@ sub edit_periodic_invoices_config {
 
   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,
                };
   }
 
-  $config->{periodicity} = 'm' if none { $_ eq $config->{periodicity} } qw(m q y);
+  $config->{periodicity} = 'm' if none { $_ eq $config->{periodicity} } qw(m q y);
 
   $::form->get_lists(printers => "ALL_PRINTERS",
                      charts   => { key       => 'ALL_CHARTS',
@@ -1962,9 +1975,10 @@ sub save_periodic_invoices_config {
 
   my $config = { active                  => $::form->{active}     ? 1 : 0,
                  terminated              => $::form->{terminated} ? 1 : 0,
-                 periodicity             => (any { $_ eq $::form->{periodicity} } qw(m q y)) ? $::form->{periodicity} : 'm',
+                 periodicity             => (any { $_ eq $::form->{periodicity} } qw(m q 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,
index aeeb56f..5e86d1a 100644 (file)
@@ -2232,6 +2232,12 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
           Abrechnungszeitraum explizit auszuweisen. Eine Variable hat dabei die Syntax <literal>&lt;%variablenname%&gt;</literal>.
         </para>
 
+        <para>
+         Sofern es sich um eine Datumsvariable handelt, kann das Ausgabeformat weiter bestimmt werden, indem an den Variablennamen
+         Formatoptionen angehängt werden. Die Syntax sieht dabei wie folgt aus: <literal>&lt;%variablenname
+         FORMAT=Formatinformation%&gt;</literal>. Die zur verfügung stehenden Formatinformationen werden unten genauer beschrieben.
+        </para>
+
         <para>
           Diese Variablen werden in den folgenden Elementen des Auftrags ersetzt:
         </para>
@@ -2297,6 +2303,172 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
             </listitem>
           </varlistentry>
         </variablelist>
+
+        <para>
+         Die invidiuellen Formatinformationen bestehen aus Paaren von Prozentzeichen und einem Buchstaben, welche beide zusammen durch den
+         dazugehörigen Wert ersetzt werden. So wird z.B. <literal>%Y</literal> durch das viertstellige Jahr ersetzt. Alle möglichen
+         Platzhalter sind:
+        </para>
+
+
+        <variablelist>
+         <varlistentry>
+          <term><varname>%a</varname></term>
+
+          <listitem>
+           <para>Der abgekürzte Wochentagsname.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%A</varname></term>
+
+          <listitem>
+           <para>Der ausgeschriebene Wochentagsname.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%b</varname></term>
+
+          <listitem>
+           <para>Der abgekürzte Monatsname.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%B</varname></term>
+
+          <listitem>
+           <para>Der ausgeschriebene Monatsname.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%C</varname></term>
+
+          <listitem>
+           <para>Das Jahrhundert (Jahr/100) als eine zweistellige Zahl.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%d</varname></term>
+
+          <listitem>
+           <para>Der Monatstag als Zahl zwischen 01 und 31.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%D</varname></term>
+
+          <listitem>
+           <para>Entspricht %m/%d/%y (amerikanisches Datumsformat).</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%e</varname></term>
+
+          <listitem>
+           <para>Wie %d (Monatstag als Zahl zwischen 1 und 31), allerdings werden führende Nullen durch Leerzeichen ersetzt.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%F</varname></term>
+
+          <listitem>
+           <para>Entspricht %Y-%m-%d (das ISO-8601-Datumsformat).</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%j</varname></term>
+
+          <listitem>
+           <para>Der Tag im Jahr als Zahl zwischen 001 und 366 inklusive.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%m</varname></term>
+
+          <listitem>
+           <para>Der Monat als Zahl zwischen 01 und 12 inklusive.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%u</varname></term>
+
+          <listitem>
+           <para>Der Wochentag als Zahl zwischen 1 und 7 inklusive, wobei die 1 dem Montag entspricht.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%U</varname></term>
+
+          <listitem>
+           <para>Die Wochennummer als Zahl zwischen 00 und 53 inklusive, wobei der erste Sonntag im Jahr das Startdatum von Woche 01 ist.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%V</varname></term>
+
+          <listitem>
+           <para>Die ISO-8601:1988-Wochennummer als Zahl zwischen 01 und 53 inklusive, wobei Woche 01 die erste Woche, von der mindestens vier Tage im Jahr liegen; Montag ist erster Tag der Woche.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%w</varname></term>
+
+          <listitem>
+           <para>Der Wochentag als Zahl zwischen 0 und 6 inklusive, wobei die 0 dem Sonntag entspricht.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%W</varname></term>
+
+          <listitem>
+           <para>Die Wochennummer als Zahl zwischen 00 und 53 inklusive, wobei der erste Montag im Jahr das Startdatum von Woche 01 ist.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%y</varname></term>
+
+          <listitem>
+           <para>Das Jahr als zweistellige Zahl zwischen 00 und 99 inklusive.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%Y</varname></term>
+
+          <listitem>
+           <para>Das Jahr als vierstellige Zahl.</para>
+          </listitem>
+         </varlistentry>
+
+         <varlistentry>
+          <term><varname>%%</varname></term>
+
+          <listitem>
+           <para>Das Prozentzeichen selber.</para>
+          </listitem>
+         </varlistentry>
+        </variablelist>
+
+        <para>
+         Anwendungsbeispiel für die Ausgabe, von welchem Monat und Jahr bis zu welchem Monat und Jahr die aktuelle Abrechnungsperiode
+         dauert: <literal>Abrechnungszeitrum: &lt;%period_start_date FORMAT=%m/%Y%&gt; bis &lt;%period_end_date FORMAT=%m/%Y%&gt;</literal>
+        </para>
       </sect2>
 
       <sect2 id="features.periodic-invoices.reports">
index 8b59e52..5e91f1a 100644 (file)
           Um die erzeugten Rechnungen individualisieren zu können, werden beim Umwandeln des Auftrags in eine Rechnung einige speziell
           formatierte Variablen durch für die jeweils aktuelle Abrechnungsperiode gültigen Werte ersetzt. Damit ist es möglich, z.B. den
           Abrechnungszeitraum explizit auszuweisen. Eine Variable hat dabei die Syntax <code class="literal">&lt;%variablenname%&gt;</code>.
+        </p><p>
+         Sofern es sich um eine Datumsvariable handelt, kann das Ausgabeformat weiter bestimmt werden, indem an den Variablennamen
+         Formatoptionen angehängt werden. Die Syntax sieht dabei wie folgt aus: <code class="literal">&lt;%variablenname
+         FORMAT=Formatinformation%&gt;</code>. Die zur verfügung stehenden Formatinformationen werden unten genauer beschrieben.
         </p><p>
           Diese Variablen werden in den folgenden Elementen des Auftrags ersetzt:
         </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Bemerkungen</p></li><li class="listitem"><p>Interne Bemerkungen</p></li><li class="listitem"><p>Vorgangsbezeichnung</p></li><li class="listitem"><p>In den Beschreibungs- und Langtextfeldern aller Positionen</p></li></ul></div><p>Die zur Verfügung stehenden Variablen sind die Folgenden:</p><div class="variablelist"><dl><dt><span class="term">
                   </span></dt><dd><p>
                 Formatiertes Datum des ersten und letzten Tages im Abrechnungszeitraum (z.B. bei quartalsweiser Abrechnung und im ersten
                 Quartal von 2013 wären dies der <code class="literal">01.01.2013</code> und <code class="literal">31.03.2013</code>).
-              </p></dd></dl></div></div><div class="sect2" title="3.1.4. Auflisten"><div class="titlepage"><div><div><h3 class="title"><a name="features.periodic-invoices.reports"></a>3.1.4. Auflisten</h3></div></div></div><p>Unter Verkauf-&gt;Berichte-&gt;Aufträge finden sich zwei neue
+              </p></dd></dl></div><p>
+         Die invidiuellen Formatinformationen bestehen aus Paaren von Prozentzeichen und einem Buchstaben, welche beide zusammen durch den
+         dazugehörigen Wert ersetzt werden. So wird z.B. <code class="literal">%Y</code> durch das viertstellige Jahr ersetzt. Alle möglichen
+         Platzhalter sind:
+        </p><div class="variablelist"><dl><dt><span class="term">
+                     <code class="varname">%a</code>
+                  </span></dt><dd><p>Der abgekürzte Wochentagsname.</p></dd><dt><span class="term">
+                     <code class="varname">%A</code>
+                  </span></dt><dd><p>Der ausgeschriebene Wochentagsname.</p></dd><dt><span class="term">
+                     <code class="varname">%b</code>
+                  </span></dt><dd><p>Der abgekürzte Monatsname.</p></dd><dt><span class="term">
+                     <code class="varname">%B</code>
+                  </span></dt><dd><p>Der ausgeschriebene Monatsname.</p></dd><dt><span class="term">
+                     <code class="varname">%C</code>
+                  </span></dt><dd><p>Das Jahrhundert (Jahr/100) als eine zweistellige Zahl.</p></dd><dt><span class="term">
+                     <code class="varname">%d</code>
+                  </span></dt><dd><p>Der Monatstag als Zahl zwischen 01 und 31.</p></dd><dt><span class="term">
+                     <code class="varname">%D</code>
+                  </span></dt><dd><p>Entspricht %m/%d/%y (amerikanisches Datumsformat).</p></dd><dt><span class="term">
+                     <code class="varname">%e</code>
+                  </span></dt><dd><p>Wie %d (Monatstag als Zahl zwischen 1 und 31), allerdings werden führende Nullen durch Leerzeichen ersetzt.</p></dd><dt><span class="term">
+                     <code class="varname">%F</code>
+                  </span></dt><dd><p>Entspricht %Y-%m-%d (das ISO-8601-Datumsformat).</p></dd><dt><span class="term">
+                     <code class="varname">%j</code>
+                  </span></dt><dd><p>Der Tag im Jahr als Zahl zwischen 001 und 366 inklusive.</p></dd><dt><span class="term">
+                     <code class="varname">%m</code>
+                  </span></dt><dd><p>Der Monat als Zahl zwischen 01 und 12 inklusive.</p></dd><dt><span class="term">
+                     <code class="varname">%u</code>
+                  </span></dt><dd><p>Der Wochentag als Zahl zwischen 1 und 7 inklusive, wobei die 1 dem Montag entspricht.</p></dd><dt><span class="term">
+                     <code class="varname">%U</code>
+                  </span></dt><dd><p>Die Wochennummer als Zahl zwischen 00 und 53 inklusive, wobei der erste Sonntag im Jahr das Startdatum von Woche 01 ist.</p></dd><dt><span class="term">
+                     <code class="varname">%V</code>
+                  </span></dt><dd><p>Die ISO-8601:1988-Wochennummer als Zahl zwischen 01 und 53 inklusive, wobei Woche 01 die erste Woche, von der mindestens vier Tage im Jahr liegen; Montag ist erster Tag der Woche.</p></dd><dt><span class="term">
+                     <code class="varname">%w</code>
+                  </span></dt><dd><p>Der Wochentag als Zahl zwischen 0 und 6 inklusive, wobei die 0 dem Sonntag entspricht.</p></dd><dt><span class="term">
+                     <code class="varname">%W</code>
+                  </span></dt><dd><p>Die Wochennummer als Zahl zwischen 00 und 53 inklusive, wobei der erste Montag im Jahr das Startdatum von Woche 01 ist.</p></dd><dt><span class="term">
+                     <code class="varname">%y</code>
+                  </span></dt><dd><p>Das Jahr als zweistellige Zahl zwischen 00 und 99 inklusive.</p></dd><dt><span class="term">
+                     <code class="varname">%Y</code>
+                  </span></dt><dd><p>Das Jahr als vierstellige Zahl.</p></dd><dt><span class="term">
+                     <code class="varname">%%</code>
+                  </span></dt><dd><p>Das Prozentzeichen selber.</p></dd></dl></div><p>
+         Anwendungsbeispiel für die Ausgabe, von welchem Monat und Jahr bis zu welchem Monat und Jahr die aktuelle Abrechnungsperiode
+         dauert: <code class="literal">Abrechnungszeitrum: &lt;%period_start_date FORMAT=%m/%Y%&gt; bis &lt;%period_end_date FORMAT=%m/%Y%&gt;</code>
+        
+            </p></div><div class="sect2" title="3.1.4. Auflisten"><div class="titlepage"><div><div><h3 class="title"><a name="features.periodic-invoices.reports"></a>3.1.4. Auflisten</h3></div></div></div><p>Unter Verkauf-&gt;Berichte-&gt;Aufträge finden sich zwei neue
         Checkboxen, "Wiederkehrende Rechnungen aktiv" und "Wiederkehrende
         Rechnungen inaktiv", mit denen man sich einen Überglick über die
         wiederkehrenden Rechnungen verschaffen kann.</p></div><div class="sect2" title="3.1.5. Erzeugung der eigentlichen Rechnungen"><div class="titlepage"><div><div><h3 class="title"><a name="features.periodic-invoices.task-server"></a>3.1.5. Erzeugung der eigentlichen Rechnungen</h3></div></div></div><p>Die zeitliche und periodische Überprüfung, ob eine
index 7bbd9e5..a3381b1 100644 (file)
                         <code class="varname">ordnumber_oe</code>
                      </span></dt><dd><p>Auftragsnummer des Originalauftrags, wenn die Rechnung
                 aus einem Sammelauftrag erstellt wurde</p></dd><dt><span class="term">
+                        <code class="varname">donumber_do</code>
+                     </span></dt><dd><p>Lieferscheinnummer desjenigen Lieferscheins, aus dem die Position stammt, sofern die Rechnung aus einem oder
+                mehreren Lieferscheinen erstellt wurde</p></dd><dt><span class="term">
                         <code class="varname">p_discount</code>
                      </span></dt><dd><p>Rabatt in Prozent</p></dd><dt><span class="term">
                         <code class="varname">partnotes</code>
                         <code class="varname">invdate</code>
                      </span></dt><dd><p>Rechnungsdatum</p></dd><dt><span class="term">
                         <code class="varname">invnumber</code>
-                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4776"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
+                     </span></dt><dd><p>Rechnungsnummer</p></dd></dl></div></div></div><div class="sect2" title="3.2.10. Variablen in anderen Vorlagen"><div class="titlepage"><div><div><h3 class="title"><a name="dokumentenvorlagen-und-variablen.andere-vorlagen"></a>3.2.10. Variablen in anderen Vorlagen</h3></div></div></div><div class="sect3" title="3.2.10.1. Einführung"><div class="titlepage"><div><div><h4 class="title"><a name="d0e4972"></a>3.2.10.1. Einführung</h4></div></div></div><p>Die Variablen in anderen Vorlagen sind ähnlich wie in der
           Rechnung. Allerdings heißen die Variablen, die mit
           <code class="varname">inv</code> beginnen, jetzt anders. Bei den Angeboten
           fangen sie mit <code class="varname">quo</code> für "quotation" an:
index 55a00d7..72b87bb 100644 (file)
@@ -1,6 +1,6 @@
 <html><head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s04.html" title="3.4. Mandantenkonfiguration Lager"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s04.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e5414"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5420"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
+   <title>Kapitel 4. Entwicklerdokumentation</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><link rel="up" href="index.html" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><link rel="prev" href="ch03s04.html" title="3.4. Mandantenkonfiguration Lager"><link rel="next" href="ch04s02.html" title="4.2. Entwicklung unter FastCGI"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Kapitel 4. Entwicklerdokumentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s04.html">Zurück</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr></table><hr></div><div class="chapter" title="Kapitel 4. Entwicklerdokumentation"><div class="titlepage"><div><div><h2 class="title"><a name="d0e5610"></a>Kapitel 4. Entwicklerdokumentation</h2></div></div></div><div class="sect1" title="4.1. Globale Variablen"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="devel.globals"></a>4.1. Globale Variablen</h2></div></div></div><div class="sect2" title="4.1.1. Wie sehen globale Variablen in Perl aus?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5616"></a>4.1.1. Wie sehen globale Variablen in Perl aus?</h3></div></div></div><p>Globale Variablen liegen in einem speziellen namespace namens
         "main", der von überall erreichbar ist. Darüber hinaus sind bareword
         globs global und die meisten speziellen Variablen sind...
         speziell.</p><p>Daraus ergeben sich folgende Formen:</p><div class="variablelist"><dl><dt><span class="term">
@@ -25,7 +25,7 @@
               <code class="varname">$PACKAGE::form</code>.</p></dd><dt><span class="term">
                      <code class="literal">local $form</code>
                   </span></dt><dd><p>Alle Änderungen an <code class="varname">$form</code> werden am Ende
-              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5521"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
+              des scopes zurückgesetzt</p></dd></dl></div></div><div class="sect2" title="4.1.2. Warum sind globale Variablen ein Problem?"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5717"></a>4.1.2. Warum sind globale Variablen ein Problem?</h3></div></div></div><p>Das erste Problem ist <span class="productname">FCGI</span>™.</p><p>
                <span class="productname">SQL-Ledger</span>™ hat fast alles im globalen
         namespace abgelegt, und erwartet, dass es da auch wiederzufinden ist.
         Unter <span class="productname">FCGI</span>™ müssen diese Sachen aber wieder
@@ -39,7 +39,7 @@
         dies hat, seit der Einführung, u.a. schon so manche langwierige
         Bug-Suche verkürzt. Da globale Variablen aber implizit mit Package
         angegeben werden, werden die nicht geprüft, und somit kann sich
-        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5554"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
+        schnell ein Tippfehler einschleichen.</p></div><div class="sect2" title="4.1.3. Kanonische globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5750"></a>4.1.3. Kanonische globale Variablen</h3></div></div></div><p>Um dieses Problem im Griff zu halten gibt es einige wenige
         globale Variablen, die kanonisch sind, d.h. sie haben bestimmte
         vorgegebenen Eigenschaften, und alles andere sollte anderweitig
         umhergereicht werden.</p><p>Diese Variablen sind im Moment die folgenden neun:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
@@ -62,7 +62,7 @@
                      <code class="varname">$::request</code>
                   </p></li></ul></div><p>Damit diese nicht erneut als Müllhalde missbraucht werden, im
         Folgenden eine kurze Erläuterung der bestimmten vorgegebenen
-        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5618"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
+        Eigenschaften (Konventionen):</p><div class="sect3" title="4.1.3.1. $::form"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5814"></a>4.1.3.1. $::form</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Ist ein Objekt der Klasse
               "<code class="classname">Form</code>"</p></li><li class="listitem"><p>Wird nach jedem Request gelöscht</p></li><li class="listitem"><p>Muss auch in Tests und Konsolenscripts vorhanden
               sein.</p></li><li class="listitem"><p>Enthält am Anfang eines Requests die Requestparameter vom
               User</p></li><li class="listitem"><p>Kann zwar intern über Requestgrenzen ein Datenbankhandle
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{number} },          $form-&gt;{"partnumber_$i"};
   push @{ $form-&gt;{TEMPLATE_ARRAYS}{description} },     $form-&gt;{"description_$i"};
   # ...
-}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5702"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
+}</pre></div><div class="sect3" title="4.1.3.2. %::myconfig"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5898"></a>4.1.3.2. %::myconfig</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Das einzige Hash unter den globalen Variablen</p></li><li class="listitem"><p>Wird spätestens benötigt wenn auf die Datenbank
               zugegriffen wird</p></li><li class="listitem"><p>Wird bei jedem Request neu erstellt.</p></li><li class="listitem"><p>Enthält die Userdaten des aktuellen Logins</p></li><li class="listitem"><p>Sollte nicht ohne Filterung irgendwo gedumpt werden oder
               extern serialisiert werden, weil da auch der Datenbankzugriff
               für diesen user drinsteht.</p></li><li class="listitem"><p>Enthält unter anderem Listenbegrenzung vclimit,
           überwiegend die Daten, die sich unter <span class="guimenu">Programm</span>
           -&gt; <span class="guimenuitem">Einstellungen</span> befinden, bzw. die
           Informationen über den Benutzer die über die
-          Administrator-Schnittstelle eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5741"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
+          Administrator-Schnittstelle eingegeben wurden.</p></div><div class="sect3" title="4.1.3.3. $::locale"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5937"></a>4.1.3.3. $::locale</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "Locale"</p></li><li class="listitem"><p>Wird pro Request erstellt</p></li><li class="listitem"><p>Muss auch für Tests und Scripte immer verfügbar
               sein.</p></li><li class="listitem"><p>Cached intern über Requestgrenzen hinweg benutzte
               Locales</p></li></ul></div><p>Lokalisierung für den aktuellen User. Alle Übersetzungen,
-          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5759"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
+          Zahlen- und Datumsformatierungen laufen über dieses Objekt.</p></div><div class="sect3" title="4.1.3.4. $::lxdebug"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5955"></a>4.1.3.4. $::lxdebug</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "LXDebug"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Muss immer verfügbar sein, in nahezu allen
               Funktionen</p></li></ul></div><p>
                   <code class="varname">$::lxdebug</code> stellt Debuggingfunktionen
           bereit, wie "<code class="function">enter_sub</code>" und
           "<code class="function">message</code>" und "<code class="function">dump</code>" mit
           denen man flott Informationen ins Log (tmp/kivitendo-debug.log)
           packen kann.</p><p>Beispielsweise so:</p><pre class="programlisting">$main::lxdebug-&gt;message(0, 'Meine Konfig:' . Dumper (%::myconfig));
-$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5796"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
+$main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{vc});</pre></div><div class="sect3" title="4.1.3.5. $::auth"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5992"></a>4.1.3.5. $::auth</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse "SL::Auth"</p></li><li class="listitem"><p>Wird global gecached</p></li><li class="listitem"><p>Hat eine permanente DB Verbindung zur Authdatenbank</p></li><li class="listitem"><p>Wird nach jedem Request resettet.</p></li></ul></div><p>
                   <code class="varname">$::auth</code> stellt Funktionen bereit um die
           Rechte des aktuellen Users abzufragen. Obwohl diese Informationen
           vom aktuellen User abhängen wird das Objekt aus
           Geschwindigkeitsgründen nur einmal angelegt und dann nach jedem
           Request kurz resettet.</p><p>Dieses Objekt kapselt auch den gerade aktiven Mandanten. Dessen Einstellungen können über
           <code class="literal">$::auth-&gt;client</code> abgefragt werden; Rückgabewert ist ein Hash mit den Werten aus der Tabelle
-          <code class="literal">auth.clients</code>.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5825"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          <code class="literal">auth.clients</code>.</p></div><div class="sect3" title="4.1.3.6. $::lx_office_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6021"></a>4.1.3.6. $::lx_office_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::LxOfficeConf</code>"</p></li><li class="listitem"><p>Global gecached</p></li><li class="listitem"><p>Repräsentation der
               <code class="filename">config/kivitendo.conf[.default]</code>-Dateien</p></li></ul></div><p>Globale Konfiguration. Configdateien werden zum Start gelesen
           und danach nicht mehr angefasst. Es ist derzeit nicht geplant, dass
@@ -152,16 +152,16 @@ $main::lxdebug-&gt;message(0, 'Wer bin ich? Kunde oder Lieferant:' . $form-&gt;{
 file_name = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">file</code> im Programm als
           <code class="varname">$::lx_office_conf-&gt;{debug}{file}</code>
           erreichbar.</p><div class="warning" title="Warnung" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Warning"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Warnung]" src="system/docbook-xsl/images/warning.png"></td><th align="left">Warnung</th></tr><tr><td align="left" valign="top"><p>Zugriff auf die Konfiguration erfolgt im Moment über
-            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5861"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+            Hashkeys, sind also nicht gegen Tippfehler abgesichert.</p></td></tr></table></div></div><div class="sect3" title="4.1.3.7. $::instance_conf"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6057"></a>4.1.3.7. $::instance_conf</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="classname">SL::InstanceConfiguration</code>"</p></li><li class="listitem"><p>wird pro Request neu erstellt</p></li></ul></div><p>Funktioniert wie <code class="varname">$::lx_office_conf</code>,
           speichert aber Daten die von der Instanz abhängig sind. Eine Instanz
           ist hier eine Mandantendatenbank. Beispielsweise überprüft
           </p><pre class="programlisting">$::instance_conf-&gt;get_inventory_system eq 'perpetual'</pre><p>
-          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5882"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
+          ob die berüchtigte Bestandsmethode zur Anwendung kommt.</p></div><div class="sect3" title="4.1.3.8. $::dispatcher"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6078"></a>4.1.3.8. $::dispatcher</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Objekt der Klasse
               "<code class="varname">SL::Dispatcher</code>"</p></li><li class="listitem"><p>wird pro Serverprozess erstellt.</p></li><li class="listitem"><p>enthält Informationen über die technische Verbindung zum
               Server</p></li></ul></div><p>Der dritte Punkt ist auch der einzige Grund warum das Objekt
           global gespeichert wird. Wird vermutlich irgendwann in einem anderen
-          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5900"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
+          Objekt untergebracht.</p></div><div class="sect3" title="4.1.3.9. $::request"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6096"></a>4.1.3.9. $::request</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>Hashref (evtl später Objekt)</p></li><li class="listitem"><p>Wird pro Request neu initialisiert.</p></li><li class="listitem"><p>Keine Unterstruktur garantiert.</p></li></ul></div><p>
                   <code class="varname">$::request</code> ist ein generischer Platz um
           Daten "für den aktuellen Request" abzulegen. Sollte nicht für action
           at a distance benutzt werden, sondern um lokales memoizing zu
@@ -174,20 +174,20 @@ file_name = /tmp/kivitendo-debug.log</pre><p>ist der Key <code class="varname">f
               <code class="varname">$::request</code>
                      </p></li><li class="listitem"><p>Muss ich von anderen Teilen des Programms lesend drauf
               zugreifen? Dann <code class="varname">$::request</code>, aber Zugriff über
-              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e5942"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
-        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5947"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
+              Wrappermethode</p></li></ul></div></div></div><div class="sect2" title="4.1.4. Ehemalige globale Variablen"><div class="titlepage"><div><div><h3 class="title"><a name="d0e6138"></a>4.1.4. Ehemalige globale Variablen</h3></div></div></div><p>Die folgenden Variablen waren einmal im Programm, und wurden
+        entfernt.</p><div class="sect3" title="4.1.4.1. $::cgi"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6143"></a>4.1.4.1. $::cgi</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil cookie Methoden nicht als
               Klassenfunktionen funktionieren</p></li><li class="listitem"><p>Aufruf als Klasse erzeugt Dummyobjekt was im
               Klassennamespace gehalten wird und über Requestgrenzen
               leaked</p></li><li class="listitem"><p>liegt jetzt unter
               <code class="varname">$::request-&gt;{cgi}</code>
-                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5963"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
+                     </p></li></ul></div></div><div class="sect3" title="4.1.4.2. $::all_units"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6159"></a>4.1.4.2. $::all_units</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>war nötig, weil einige Funktionen in Schleifen zum Teil
               ein paar hundert mal pro Request eine Liste der Einheiten
               brauchen, und de als Parameter durch einen Riesenstack von
               Funktionen geschleift werden müssten.</p></li><li class="listitem"><p>Liegt jetzt unter
               <code class="varname">$::request-&gt;{cache}{all_units}</code>
                      </p></li><li class="listitem"><p>Wird nur in
               <code class="function">AM-&gt;retrieve_all_units()</code> gesetzt oder
-              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e5982"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
+              gelesen.</p></li></ul></div></div><div class="sect3" title="4.1.4.3. %::called_subs"><div class="titlepage"><div><div><h4 class="title"><a name="d0e6178"></a>4.1.4.3. %::called_subs</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>wurde benutzt um callsub deep recursions
               abzufangen.</p></li><li class="listitem"><p>Wurde entfernt, weil callsub nur einen Bruchteil der
               möglichen Rekursioenen darstellt, und da nie welche
               auftreten.</p></li><li class="listitem"><p>komplette recursion protection wurde entfernt.</p></li></ul></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s04.html">Zurück</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch04s02.html">Weiter</a></td></tr><tr><td width="40%" align="left" valign="top">3.4. Mandantenkonfiguration Lager&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Zum Anfang</a></td><td width="40%" align="right" valign="top">&nbsp;4.2. Entwicklung unter FastCGI</td></tr></table></div></body></html>
\ No newline at end of file
index 7827645..8fa725c 100644 (file)
@@ -3,7 +3,7 @@
    <title>kivitendo 3.1.0: Installation, Konfiguration, Entwicklung</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1-RC2"><link rel="home" href="index.html" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><link rel="next" href="ch01.html" title="Kapitel 1. Aktuelle Hinweise"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">kivitendo 3.1.0: Installation, Konfiguration, Entwicklung</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch01.html">Weiter</a></td></tr></table><hr></div><div lang="de" class="book" title="kivitendo 3.1.0: Installation, Konfiguration, Entwicklung"><div class="titlepage"><div><div><h1 class="title"><a name="kivitendo-documentation"></a>kivitendo 3.1.0: Installation, Konfiguration, Entwicklung</h1></div></div><hr></div><div class="toc"><p><b>Inhaltsverzeichnis</b></p><dl><dt><span class="chapter"><a href="ch01.html">1. Aktuelle Hinweise</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. Installation und Grundkonfiguration</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#Installation-%C3%9Cbersicht">2.1. Übersicht</a></span></dt><dt><span class="sect1"><a href="ch02s02.html">2.2. Benötigte Software und Pakete</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s02.html#Betriebssystem">2.2.1. Betriebssystem</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#Pakete">2.2.2. Benötigte Perl-Pakete installieren</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s03.html">2.3. Manuelle Installation des Programmpaketes</a></span></dt><dt><span class="sect1"><a href="ch02s04.html">2.4. kivitendo-Konfigurationsdatei</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s04.html#config.config-file.introduction">2.4.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#config.config-file.sections-parameters">2.4.2. Abschnitte und Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s04.html#config.config-file.prior-versions">2.4.3. Versionen vor 2.6.3</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s05.html">2.5. Anpassung der PostgreSQL-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s05.html#Zeichens%C3%A4tze-die-Verwendung-von-UTF-8">2.5.1. Zeichensätze/die Verwendung von Unicode/UTF-8</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#%C3%84nderungen-an-Konfigurationsdateien">2.5.2. Änderungen an Konfigurationsdateien</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Erweiterung-f%C3%BCr-servergespeicherte-Prozeduren">2.5.3. Erweiterung für servergespeicherte Prozeduren</a></span></dt><dt><span class="sect2"><a href="ch02s05.html#Datenbankbenutzer-anlegen">2.5.4. Datenbankbenutzer anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s06.html">2.6. Webserver-Konfiguration</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s06.html#d0e725">2.6.1. Grundkonfiguration mittels CGI</a></span></dt><dt><span class="sect2"><a href="ch02s06.html#Apache-Konfiguration.FCGI">2.6.2. Konfiguration für FastCGI/FCGI</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s07.html">2.7. Der Task-Server</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s07.html#Konfiguration-des-Task-Servers">2.7.1. Verfügbare und notwendige Konfigurationsoptionen</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Einbinden-in-den-Boot-Prozess">2.7.2. Automatisches Starten des Task-Servers beim Booten</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Prozesskontrolle">2.7.3. Wie der Task-Server gestartet und beendet wird</a></span></dt><dt><span class="sect2"><a href="ch02s07.html#Prozesskontrolle2">2.7.4. Task-Server mit mehreren Mandanten</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s08.html">2.8. Benutzerauthentifizierung und Administratorpasswort</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s08.html#Grundlagen-zur-Benutzerauthentifizierung">2.8.1. Grundlagen zur Benutzerauthentifizierung</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Administratorpasswort">2.8.2. Administratorpasswort</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Authentifizierungsdatenbank">2.8.3. Authentifizierungsdatenbank</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Passwort%C3%BCberpr%C3%BCfung">2.8.4. Passwortüberprüfung</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Name-des-Session-Cookies">2.8.5. Name des Session-Cookies</a></span></dt><dt><span class="sect2"><a href="ch02s08.html#Anlegen-der-Authentifizierungsdatenbank">2.8.6. Anlegen der Authentifizierungsdatenbank</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s09.html">2.9. Mandanten-, Benutzer- und Gruppenverwaltung</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s09.html#Zusammenh%C3%A4nge">2.9.1. Zusammenhänge</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Mandanten-Benutzer-Gruppen">2.9.2. Mandanten, Benutzer und Gruppen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Datenbanken-anlegen">2.9.3. Datenbanken anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Gruppen-anlegen">2.9.4. Gruppen anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Benutzer-anlegen">2.9.5. Benutzer anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#Mandanten-anlegen">2.9.6. Mandanten anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s10.html">2.10. Drucker- und Systemverwaltung</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s10.html#Druckeradministration">2.10.1. Druckeradministration</a></span></dt><dt><span class="sect2"><a href="ch02s10.html#System">2.10.2. System sperren / entsperren</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s11.html">2.11. E-Mail-Versand aus kivitendo heraus</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s11.html#config.sending-email.sendmail">2.11.1. Versand über lokalen E-Mail-Server</a></span></dt><dt><span class="sect2"><a href="ch02s11.html#config.sending-email.smtp">2.11.2. Versand über einen SMTP-Server</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s12.html">2.12. Drucken mit kivitendo</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s12.html#Vorlagenverzeichnis-anlegen">2.12.1. Vorlagenverzeichnis anlegen</a></span></dt><dt><span class="sect2"><a href="ch02s12.html#Vorlagen-Standard">2.12.2. Standard</a></span></dt><dt><span class="sect2"><a href="ch02s12.html#f-tex">2.12.3. f-tex</a></span></dt><dt><span class="sect2"><a href="ch02s12.html#Vorlagen-RB">2.12.4. Der Druckvorlagensatz RB</a></span></dt><dt><span class="sect2"><a href="ch02s12.html#allgemeine-hinweise-zu-latex">2.12.5. Allgemeine Hinweise zu LaTeX Vorlagen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s13.html">2.13. OpenDocument-Vorlagen</a></span></dt><dt><span class="sect1"><a href="ch02s14.html">2.14. Konfiguration zur Einnahmenüberschussrechnung/Bilanzierung:
       EUR</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s14.html#config.eur.introduction">2.14.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s14.html#config.eur.parameters">2.14.2. Konfigurationsparameter</a></span></dt><dt><span class="sect2"><a href="ch02s14.html#config.eur.setting-parameters">2.14.3. Festlegen der Parameter</a></span></dt><dt><span class="sect2"><a href="ch02s14.html#config.eur.inventory-system-perpetual">2.14.4. Bemerkungen zu Bestandsmethode</a></span></dt><dt><span class="sect2"><a href="ch02s14.html#config.eur.knonw-issues">2.14.5. Bekannte Probleme</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s15.html">2.15. SKR04 19% Umstellung für innergemeinschaftlichen Erwerb</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s15.html#config.skr04-update-3804.introduction">2.15.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch02s15.html#config.skr04-update-3804.create-chart">2.15.2. Konto 3804 manuell anlegen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s16.html">2.16. Verhalten des Bilanzberichts</a></span></dt><dt><span class="sect1"><a href="ch02s17.html">2.17. Einstellungen pro Mandant</a></span></dt><dt><span class="sect1"><a href="ch02s18.html">2.18. kivitendo ERP verwenden</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Features und Funktionen</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch03.html#features.periodic-invoices">3.1. Wiederkehrende Rechnungen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.introduction">3.1.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.configuration">3.1.2. Konfiguration</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.variables">3.1.3. Spezielle Variablen</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.reports">3.1.4. Auflisten</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.task-server">3.1.5. Erzeugung der eigentlichen Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03.html#features.periodic-invoices.create-for-current-month">3.1.6. Erste Rechnung für aktuellen Monat erstellen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s02.html">3.2. Dokumentenvorlagen und verfügbare Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.einf%C3%BChrung">3.2.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.variablen-ausgeben">3.2.2. Variablen ausgeben</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.verwendung-in-druckbefehlen">3.2.3. Verwendung in Druckbefehlen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.tag-style">3.2.4. Anfang und Ende der Tags verändern</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.zuordnung-dateinamen">3.2.5. Zuordnung von den Dateinamen zu den Funktionen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dateinamen-erweitert">3.2.6. Sprache, Drucker und E-Mail</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.allgemeine-variablen">3.2.7. Allgemeine Variablen, die in allen Vorlagen vorhanden
         sind</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.invoice">3.2.8. Variablen in Rechnungen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.dunning">3.2.9. Variablen in Mahnungen und Rechnungen über Mahngebühren</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.andere-vorlagen">3.2.10. Variablen in anderen Vorlagen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.bloecke">3.2.11. Blöcke, bedingte Anweisungen und Schleifen</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#dokumentenvorlagen-und-variablen.markup">3.2.12. Markup-Code zur Textformatierung innerhalb von
-        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">3.4. Mandantenkonfiguration Lager</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e5420">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5521">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5554">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5942">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format-perl-files">4.3.3. Format von in Perl geschriebenen Datenbankupgradescripten</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.4. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.character-set">4.4.2. Character set</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.3. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Die kivitendo-Test-Suite</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.intro">4.5.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.prerequisites">4.5.2. Voraussetzungen</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.execution">4.5.3. 
+        Formularen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">3.3. Excel-Vorlagen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#excel-templates.summary">3.3.1. Zusammenfassung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.usage">3.3.2. Bedienung</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.syntax">3.3.3. Variablensyntax</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#excel-templates.limitations">3.3.4. Einschränkungen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">3.4. Mandantenkonfiguration Lager</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Entwicklerdokumentation</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#devel.globals">4.1. Globale Variablen</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04.html#d0e5616">4.1.1. Wie sehen globale Variablen in Perl aus?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5717">4.1.2. Warum sind globale Variablen ein Problem?</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e5750">4.1.3. Kanonische globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04.html#d0e6138">4.1.4. Ehemalige globale Variablen</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s02.html">4.2. Entwicklung unter FastCGI</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.general">4.2.1. Allgemeines</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.exiting">4.2.2. Programmende und Ausnahmen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.globals">4.2.3. Globale Variablen</a></span></dt><dt><span class="sect2"><a href="ch04s02.html#devel.fcgi.performance">4.2.4. Performance und Statistiken</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s03.html">4.3. SQL-Upgradedateien</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.introduction">4.3.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format">4.3.2. Format der Kontrollinformationen</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.format-perl-files">4.3.3. Format von in Perl geschriebenen Datenbankupgradescripten</a></span></dt><dt><span class="sect2"><a href="ch04s03.html#db-upgrade-files.dbupgrade-tool">4.3.4. Hilfsscript dbupgrade2_tool.pl</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s04.html">4.4. Translations and languages</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s04.html#translations-languages.introduction">4.4.1. Introduction</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.character-set">4.4.2. Character set</a></span></dt><dt><span class="sect2"><a href="ch04s04.html#translations-languages.file-structure">4.4.3. File structure</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch04s05.html">4.5. Die kivitendo-Test-Suite</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.intro">4.5.1. Einführung</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.prerequisites">4.5.2. Voraussetzungen</a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.execution">4.5.3. 
           Existierende Tests ausführen
         </a></span></dt><dt><span class="sect2"><a href="ch04s05.html#devel.testsuite.meaning_of_scripts">4.5.4. 
           Bedeutung der verschiedenen Test-Scripte
index 35e4a15..99a3743 100644 (file)
Binary files a/doc/kivitendo-Dokumentation.pdf and b/doc/kivitendo-Dokumentation.pdf differ
index 6aaf88e..44ebd19 100644 (file)
@@ -9,8 +9,12 @@ function edit_periodic_invoices_config() {
   var url       = "oe.pl?" +
     "action=edit_periodic_invoices_config&" +
     "periodic_invoices_config=" + encodeURIComponent(config) + "&" +
-    "transdate="                + encodeURIComponent(transdate);
+    "transdate="                + encodeURIComponent(transdate || '');
 
   // alert(url);
   window.open(url, "_new_generic", parm);
 }
+
+function warn_save_active_periodic_invoice() {
+  return confirm(kivi.t8('This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?'));
+}
index 3fbe538..ac0f136 100644 (file)
@@ -10,5 +10,6 @@ namespace("kivi").setupLocale({
 "The name is missing.":"Der Name fehlt.",
 "The name must only consist of letters, numbers and underscores and start with a letter.":"Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.",
 "The option field is empty.":"Das Optionsfeld ist leer.",
-"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?"
+"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?",
+"This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Wollen Sie speichern?"
 });
index 0a228c4..e1361b2 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 first invoice on'     => 'Erste Rechnung erzeugen am',
   'Create invoice?'             => 'Rechnung erstellen?',
   'Create new'                  => 'Neu erfassen',
   'Create new background job'   => 'Neuen Hintergrund-Job anlegen',
@@ -790,6 +791,7 @@ $self->{texts} = {
   'Duplicate in CSV file'       => 'Duplikat in CSV-Datei',
   'Duplicate in database'       => 'Duplikat in Datenbank',
   'During the next update a taxkey 0 with tax rate of 0 will automatically created.' => 'Beim nächsten Ausführen des Updates wird ein Steuerschlüssel 0 mit einem Steuersatz von 0% automatisch erzeugt.',
+  'E-Mail'                      => '',
   'E-mail'                      => 'E-Mail',
   'E-mail Statement to'         => 'Fälligkeitsabrechnung als E-Mail an',
   'E-mail address missing!'     => 'E-Mail-Adresse fehlt!',
@@ -1091,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 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:',
@@ -1664,6 +1667,7 @@ $self->{texts} = {
   'Printer management'          => 'Druckerverwaltung',
   'Printing ... '               => 'Es wird gedruckt.',
   'Prior year'                  => 'Vorheriges Jahr',
+  'Private E-Mail'              => '',
   'Private E-mail'              => 'Private E-Mail',
   'Private Phone'               => 'Privates Tel.',
   'Problem'                     => 'Problem',
@@ -2342,6 +2346,7 @@ $self->{texts} = {
   'This option controls the posting and calculation behavior for the accounting method.' => 'Dieser Parameter steuert die Buchungs- und Berechnungsmethoden für die Versteuerungsart.',
   'This partnumber is not unique. You should change it.' => 'Diese Artikelnummer ist nicht eindeutig. Bitte wählen Sie eine andere.',
   '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.',
+  'This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?' => 'Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Wollen Sie speichern?',
   'This transaction has to be split into several transactions manually.' => 'Diese Buchung muss manuell in mehrere Buchungen aufgeteilt werden.',
   'This update will change the nature the onhand of goods is tracked.' => 'Dieses update &auml;ndert die Art und Weise wie Lagermengen gez&auml;lt werden.',
   'This user is a member in the following groups' => 'Dieser Benutzer ist Mitglied in den folgenden Gruppen',
@@ -2757,6 +2762,7 @@ $self->{texts} = {
   'saved'                       => 'gespeichert',
   'saved!'                      => 'gespeichert',
   'saving data'                 => 'Speichere Daten',
+  'semiannually'                => 'halbjährlich',
   'sent'                        => 'gesendet',
   'sent to printer'             => 'an Drucker geschickt',
   'service'                     => 'Dienstleistung',
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 ae362ab..e128e87 100644 (file)
@@ -1,7 +1,7 @@
 [%- USE L %][% USE LxERP %]
 <form method="post" id="form" action="controller.pl">
  [% L.hidden_tag('action', 'FinancialOverview/list') %]
- <a href="[% SELF.url_for(action='list', year=(SELF.year - 1), subtotals_per_quarter=SELF.subtotals_per_quarter) %]">&laquo; [%- LxERP.t8("Prior year") %]: [% SELF.year - 1 %]</a>
+ <a href="[% SELF.url_for(action='list', year=(SELF.year - 1), subtotals_per_quarter=SELF.subtotals_per_quarter, salesman_id=SELF.salesman_id) %]">&laquo; [%- LxERP.t8("Prior year") %]: [% SELF.year - 1 %]</a>
  |
 
  [% LxERP.t8("Current year") %]:
@@ -9,10 +9,14 @@
 
  [% IF SELF.year < SELF.current_year %]
   |
-  <a href="[% SELF.url_for(action='list', year=(SELF.year + 1), subtotals_per_quarter=SELF.subtotals_per_quarter) %]">[%- LxERP.t8("Following year") %]: [% SELF.year + 1 %] &raquo;</a>
+  <a href="[% SELF.url_for(action='list', year=(SELF.year + 1), subtotals_per_quarter=SELF.subtotals_per_quarter, salesman_id=SELF.salesman_id) %]">[%- LxERP.t8("Following year") %]: [% SELF.year + 1 %] &raquo;</a>
  [% END %]
-
  <br>
+
  [% L.checkbox_tag('subtotals_per_quarter', checked=SELF.subtotals_per_quarter, label=LxERP.t8('Subtotals per quarter'), onchange='$("#form").submit();') %]
+ <br>
+
+ [% LxERP.t8("Salesperson") %]:
+ [% L.select_tag('salesman_id', SELF.employees, with_empty=1, title_key='name', onchange='$("#form").submit();', default=SELF.salesman_id) %]</p>
 </form>
 <hr>
index 74fb123..2e6b5a4 100644 (file)
@@ -27,6 +27,8 @@
       <br>
       [% L.radio_button_tag("periodicity", value => "q", label => LxERP.t8("every third month"), checked => periodicity == 'q') %]
       <br>
+      [% L.radio_button_tag("periodicity", value => "b", label => LxERP.t8("semiannually"), checked => periodicity == 'b') %]
+      <br>
       [% L.radio_button_tag("periodicity", value => "y", label => LxERP.t8("yearly"),    checked => periodicity == 'y') %]
      </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">
@@ -83,6 +92,7 @@
   <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') %]
 
index 7c72a45..1896f76 100644 (file)
@@ -40,6 +40,7 @@
               [% L.button_tag("edit_periodic_invoices_config(); return false;", LxERP.t8('Configure')) %]
               ([% HTML.escape(periodic_invoices_status) %])
               [% L.hidden_tag("periodic_invoices_config", periodic_invoices_config) %]
+              <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank">?</a>
              </td>
             </tr>
 [%- END %]
 <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
 <input class="submit" type="submit" name="action_print" value="[% 'Print' | $T8 %]">
 <input class="submit" type="submit" name="action_e_mail" value="[% 'E-mail' | $T8 %]">
-<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]">
-<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]">
+<input class="submit" type="submit" name="action_save" value="[% 'Save' | $T8 %]"[% IF warn_save_active_periodic_invoice %] onclick="return warn_save_active_periodic_invoice();"[% END %]>
+<input class="submit" type="submit" name="action_save_and_close" value="[% 'Save and Close' | $T8 %]"[% IF warn_save_active_periodic_invoice %] onclick="return warn_save_active_periodic_invoice();"[% END %]>
 
 [%- IF id %]
   <input type="button" class="submit" onclick="follow_up_window()" value="[% 'Follow-Up' | $T8 %]">
index 5d4afdc..c68d6c9 100644 (file)
                      [%- END %]
                     </th>
                     <td nowrap>
-                      [% L.date_tag('transdate', transdate) %]
+                      [% L.date_tag('transdate', transdate, id='transdate') %]
                     </td>
                   </tr>
                   <tr>
                      [%- END %]
                     </th>
                     <td nowrap>
-                      [% L.date_tag('reqdate', reqdate) %]
+                      [% L.date_tag('reqdate', reqdate, id='reqdate') %]
                     </td>
                   </tr>
                   <tr>