projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c3ecbd
)
Payment-Helfer: Kosmetik (Einrückung, keine ; am Ende von if)
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 15 Aug 2016 14:42:19 +0000
(16:42 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 15 Aug 2016 14:42:19 +0000
(16:42 +0200)
SL/DB/Helper/Payment.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Helper/Payment.pm
b/SL/DB/Helper/Payment.pm
index
5b3a138
..
3d97be0
100644
(file)
--- 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');
# 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";
}) || die t8('error while paying invoice #1 : ', $self->invnumber) . $db->error . "\n";