From c6af9711e167b2bba757e337bca50861e60d34f5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 15 Aug 2016 16:42:19 +0200 Subject: [PATCH] =?utf8?q?Payment-Helfer:=20Kosmetik=20(Einr=C3=BCckung,?= =?utf8?q?=20keine=20;=20am=20Ende=20von=20if)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/Payment.pm | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/SL/DB/Helper/Payment.pm b/SL/DB/Helper/Payment.pm index 5b3a138b5..3d97be0f6 100644 --- a/SL/DB/Helper/Payment.pm +++ b/SL/DB/Helper/Payment.pm @@ -278,36 +278,36 @@ sub pay_invoice { # than adding them to the transaction relation array. $self->forget_related('transactions'); - my $datev_check = 0; - if ( $is_sales ) { - if ( ( $self->invoice && $::instance_conf->get_datev_check_on_sales_invoice ) || - ( !$self->invoice && $::instance_conf->get_datev_check_on_ar_transaction )) { - $datev_check = 1; - }; - } else { - if ( ( $self->invoice && $::instance_conf->get_datev_check_on_purchase_invoice ) || - ( !$self->invoice && $::instance_conf->get_datev_check_on_ap_transaction )) { - $datev_check = 1; - }; - }; + my $datev_check = 0; + if ( $is_sales ) { + if ( ( $self->invoice && $::instance_conf->get_datev_check_on_sales_invoice ) || + ( !$self->invoice && $::instance_conf->get_datev_check_on_ar_transaction )) { + $datev_check = 1; + } + } else { + if ( ( $self->invoice && $::instance_conf->get_datev_check_on_purchase_invoice ) || + ( !$self->invoice && $::instance_conf->get_datev_check_on_ap_transaction )) { + $datev_check = 1; + } + } - if ( $datev_check ) { + if ( $datev_check ) { - my $datev = SL::DATEV->new( - exporttype => DATEV_ET_BUCHUNGEN, - format => DATEV_FORMAT_KNE, - dbh => $db->dbh, - trans_id => $self->{id}, - ); + my $datev = SL::DATEV->new( + exporttype => DATEV_ET_BUCHUNGEN, + format => DATEV_FORMAT_KNE, + dbh => $db->dbh, + trans_id => $self->{id}, + ); - $datev->clean_temporary_directories; - $datev->export; + $datev->clean_temporary_directories; + $datev->export; - if ($datev->errors) { - # this exception should be caught by do_transaction, which handles the rollback - die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; + if ($datev->errors) { + # this exception should be caught by do_transaction, which handles the rollback + die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors; + } } - }; }) || die t8('error while paying invoice #1 : ', $self->invnumber) . $db->error . "\n"; -- 2.20.1