Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c6af9711

Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt

  • ID c6af9711e167b2bba757e337bca50861e60d34f5
  • Vorgänger 2c3ecbd0
  • Nachfolger 58d09211

Payment-Helfer: Kosmetik (Einrückung, keine ; am Ende von if)

Unterschiede anzeigen:

SL/DB/Helper/Payment.pm
278 278
    # than adding them to the transaction relation array.
279 279
    $self->forget_related('transactions');
280 280

  
281
  my $datev_check = 0;
282
  if ( $is_sales )  {
283
    if ( (  $self->invoice && $::instance_conf->get_datev_check_on_sales_invoice  ) ||
284
         ( !$self->invoice && $::instance_conf->get_datev_check_on_ar_transaction )) {
285
      $datev_check = 1;
286
    };
287
  } else {
288
    if ( (  $self->invoice && $::instance_conf->get_datev_check_on_purchase_invoice ) ||
289
         ( !$self->invoice && $::instance_conf->get_datev_check_on_ap_transaction   )) {
290
      $datev_check = 1;
291
    };
292
  };
281
    my $datev_check = 0;
282
    if ( $is_sales )  {
283
      if ( (  $self->invoice && $::instance_conf->get_datev_check_on_sales_invoice  ) ||
284
           ( !$self->invoice && $::instance_conf->get_datev_check_on_ar_transaction )) {
285
        $datev_check = 1;
286
      }
287
    } else {
288
      if ( (  $self->invoice && $::instance_conf->get_datev_check_on_purchase_invoice ) ||
289
           ( !$self->invoice && $::instance_conf->get_datev_check_on_ap_transaction   )) {
290
        $datev_check = 1;
291
      }
292
    }
293 293

  
294
  if ( $datev_check ) {
294
    if ( $datev_check ) {
295 295

  
296
    my $datev = SL::DATEV->new(
297
      exporttype => DATEV_ET_BUCHUNGEN,
298
      format     => DATEV_FORMAT_KNE,
299
      dbh        => $db->dbh,
300
      trans_id   => $self->{id},
301
    );
296
      my $datev = SL::DATEV->new(
297
        exporttype => DATEV_ET_BUCHUNGEN,
298
        format     => DATEV_FORMAT_KNE,
299
        dbh        => $db->dbh,
300
        trans_id   => $self->{id},
301
      );
302 302

  
303
    $datev->clean_temporary_directories;
304
    $datev->export;
303
      $datev->clean_temporary_directories;
304
      $datev->export;
305 305

  
306
    if ($datev->errors) {
307
      # this exception should be caught by do_transaction, which handles the rollback
308
      die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
306
      if ($datev->errors) {
307
        # this exception should be caught by do_transaction, which handles the rollback
308
        die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;
309
      }
309 310
    }
310
  };
311 311

  
312 312
  }) || die t8('error while paying invoice #1 : ', $self->invnumber) . $db->error . "\n";
313 313

  

Auch abrufbar als: Unified diff