Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6ff3e807

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 6ff3e8078b8c47a9258dd354086cf1d05ca9ede0
  • Vorgänger 84346ba1
  • Nachfolger df6b0ea2

Angebotsflag aus Datenbankzugriffen entfernt

Unterschiede anzeigen:

SL/Controller/Order.pm
1439 1439

  
1440 1440
  my $sales_quotations   = SL::DB::Manager::Order->get_all(where => [id            => $::form->{ids},
1441 1441
                                                                     or             => [closed => 0, closed => undef],
1442
                                                                     quotation      => 1,
1443
                                                                     '!customer_id' => undef]);
1442
                                                                     record_type    => SALES_QUOTATION_TYPE()]);
1444 1443

  
1445 1444
  my $request_quotations = SL::DB::Manager::Order->get_all(where => [id            => $::form->{ids},
1446 1445
                                                                     or             => [closed => 0, closed => undef],
1447
                                                                     quotation      => 1,
1448
                                                                     '!vendor_id'   => undef]);
1446
                                                                     record_type    => REQUEST_QUOTATION_TYPE()]);
1449 1447

  
1450 1448
  $::auth->assert('sales_quotation_edit')   if scalar @$sales_quotations;
1451 1449
  $::auth->assert('request_quotation_edit') if scalar @$request_quotations;
......
1861 1859
  $order   = SL::DB::Order->new(id => $::form->{id})->load(with => [ 'orderitems', 'orderitems.part' ]) if $::form->{id};
1862 1860
  $order ||= SL::DB::Order->new(orderitems  => [],
1863 1861
                                record_type => $self->type,
1864
                                quotation   => (any { $self->type eq $_ } (SALES_QUOTATION_TYPE(), REQUEST_QUOTATION_TYPE())),
1865 1862
                                currency_id => $::instance_conf->get_currency_id(),);
1866 1863

  
1867 1864
  my $cv_id_method = $self->cv . '_id';
......
2114 2111
  }
2115 2112

  
2116 2113
  my $objects_to_close = scalar @converted_from_oe_ids
2117
                       ? SL::DB::Manager::Order->get_all(where => [id => \@converted_from_oe_ids, quotation => 1])
2114
                       ? SL::DB::Manager::Order->get_all(where => [
2115
                           id => \@converted_from_oe_ids,
2116
                           or => [ record_type => SALES_QUOTATION_TYPE(),
2117
                                   record_type => REQUEST_QUOTATION_TYPE()]
2118
                           ])
2118 2119
                       : undef;
2119 2120

  
2120 2121
  my $items_to_delete  = scalar @{ $self->item_ids_to_delete || [] }

Auch abrufbar als: Unified diff