Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 16dcabdf

Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt

  • ID 16dcabdf324312e6d3a38c3b505d2ed254161fa9
  • Vorgänger 79629ddd
  • Nachfolger 74b53ff2

CSV-Import Kreditorenbuchungen

Kopie und Anpassung vom Debitorenbuchungsimport

Unterschiede anzeigen:

SL/Controller/CsvImport.pm
23 23
use SL::Controller::CsvImport::Order;
24 24
use SL::Controller::CsvImport::DeliveryOrder;
25 25
use SL::Controller::CsvImport::ARTransaction;
26
use SL::Controller::CsvImport::APTransaction;
26 27
use SL::JSON;
27 28
use SL::Controller::CsvImport::BankTransaction;
28 29
use SL::BackgroundJob::CsvImport;
......
312 313
sub check_type {
313 314
  my ($self) = @_;
314 315

  
315
  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts inventories customers_vendors billing_addresses addresses contacts projects orders delivery_orders bank_transactions ar_transactions);
316
  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts inventories customers_vendors billing_addresses addresses contacts projects orders delivery_orders bank_transactions ar_transactions ap_transactions);
316 317
  $self->type($::form->{profile}->{type});
317 318
}
318 319

  
......
363 364
            : $self->type eq 'delivery_orders'   ? $::locale->text('CSV import: delivery orders')
364 365
            : $self->type eq 'bank_transactions' ? $::locale->text('CSV import: bank transactions')
365 366
            : $self->type eq 'ar_transactions'   ? $::locale->text('CSV import: ar transactions')
367
            : $self->type eq 'ap_transactions'   ? $::locale->text('CSV import: ap transactions')
366 368
            : die;
367 369

  
368
  if ( any { $_ eq $self->{type} } qw(customers_vendors orders delivery_orders ar_transactions) ) {
370
  if ( any { $_ eq $self->{type} } qw(customers_vendors orders delivery_orders ar_transactions ap_transactions) ) {
369 371
    $self->all_taxzones(SL::DB::Manager::TaxZone->get_all_sorted(query => [ obsolete => 0 ]));
370 372
  };
371 373

  
......
514 516
    $::form->{settings}->{sellprice_adjustment} = $::form->parse_amount(\%::myconfig, $::form->{settings}->{sellprice_adjustment});
515 517
  }
516 518

  
517
  if ($self->type eq 'orders' or $self->{type} eq 'ar_transactions') {
519
  if ( any { $_ eq $self->{type} } qw(orders ar_transactions ap_transactions) ) {
518 520
    $::form->{settings}->{max_amount_diff} = $::form->parse_amount(\%::myconfig, $::form->{settings}->{max_amount_diff});
519 521
  }
520 522

  
......
735 737
       : $self->{type} eq 'delivery_orders'   ? SL::Controller::CsvImport::DeliveryOrder->new(@args)
736 738
       : $self->{type} eq 'bank_transactions' ? SL::Controller::CsvImport::BankTransaction->new(@args)
737 739
       : $self->{type} eq 'ar_transactions'   ? SL::Controller::CsvImport::ARTransaction->new(@args)
740
       : $self->{type} eq 'ap_transactions'   ? SL::Controller::CsvImport::APTransaction->new(@args)
738 741
       :                                        die "Program logic error";
739 742
}
740 743

  

Auch abrufbar als: Unified diff