X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3ff5da55d203a1ac5dbd269737577f0abeb424e0..872f04a75528d55c3987c09fa0445451c35c6ef9:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index 82226ee52..db18d5a43 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -48,6 +48,7 @@ use SL::MoreCommon; use SL::IC; use SL::IO; use SL::TransNumber; +use SL::DB::Default; use Data::Dumper; use strict; @@ -258,8 +259,7 @@ sub invoice_details { $subtotal_header = 0; } else { - push @{ $form->{TEMPLATE_ARRAYS}->{discount_sub} }, ""; - push @{ $form->{TEMPLATE_ARRAYS}->{nodiscount_sub} }, ""; + push @{ $form->{TEMPLATE_ARRAYS}->{$_} }, "" for qw(discount_sub nodiscount_sub discount_sub_nofmt nodiscount_sub_nofmt); } if (!$form->{"discount_$i"}) { @@ -887,7 +887,7 @@ sub post_invoice { if ($form->{"acc_trans_id_$i"} && $payments_only - && ($::lx_office_conf{features}->{payments_changeable} == 0)) { + && (SL::DB::Default->get->payments_changeable == 0)) { next; } @@ -1077,7 +1077,7 @@ sub post_invoice { 'table' => 'ar',); # safety check datev export - if ($::lx_office_conf{datev_check}{check_on_sales_invoice}) { + if ($::instance_conf->get_datev_check_on_sales_invoice) { my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : undef; $transdate ||= DateTime->today; @@ -1158,7 +1158,7 @@ sub post_payment { $old_form = save_form(); # Delete all entries in acc_trans from prior payments. - if ($::lx_office_conf{features}->{payments_changeable} != 0) { + if (SL::DB::Default->get->payments_changeable != 0) { $self->_delete_payments($form, $dbh); }