Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 33c4acb3

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 33c4acb352efa452a974ad75ce37364044bbf915
  • Vorgänger 1e04485f
  • Nachfolger 3ae2f520

Order: FIX: überprüfen von Werten in der Form bei Workflows

Unterschiede anzeigen:

SL/Controller/Order.pm
2206 2206
sub setup_edit_action_bar {
2207 2207
  my ($self, %params) = @_;
2208 2208

  
2209
  my @valid = qw( 
2210
    kivi.Order.check_cv
2211
  );
2212
  push @valid, "kivi.Order.check_duplicate_parts" if $::instance_conf->get_order_warn_duplicate_parts;
2213
  push @valid, "kivi.Order.check_valid_reqdate"   if $::instance_conf->get_order_warn_no_deliverydate;
2209 2214
  my @req_trans_cost_art = qw(kivi.Order.check_transport_cost_article_presence) x!!$::instance_conf->get_transport_cost_reminder_article_number_id;
2210 2215
  my @req_cusordnumber   = qw(kivi.Order.check_cusordnumber_presence)           x(( any {$self->type eq $_} (SALES_ORDER_INTAKE_TYPE(), SALES_ORDER_TYPE()) ) && $::instance_conf->get_order_warn_no_cusordnumber);
2211 2216

  
......
2287 2292
        action => [
2288 2293
          t8('Save and Quotation'),
2289 2294
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => SALES_QUOTATION_TYPE()), '#order_form' ],
2290
          checks   => [ @req_trans_cost_art, @req_cusordnumber ],
2295
          checks   => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
2291 2296
          only_if  => $self->type_data->show_menu('save_and_quotation'),
2292 2297
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2293 2298
        ],
2294 2299
        action => [
2295 2300
          t8('Save and RFQ'),
2296 2301
          call     => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => REQUEST_QUOTATION_TYPE() } ],
2302
          checks   => [ @valid ],
2297 2303
          only_if  => $self->type_data->show_menu('save_and_rfq'),
2298 2304
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2299 2305
        ],
......
2312 2318
        action => [
2313 2319
          t8('Save and Sales Order Confirmation'),
2314 2320
          call     => [ 'kivi.submit_ajax_form', $self->url_for(action => "save_and_order_workflow", to_type => SALES_ORDER_TYPE()), '#order_form' ],
2315
          checks   => [ @req_trans_cost_art ],
2321
          checks   => [ @valid, @req_trans_cost_art ],
2316 2322
          only_if  => $self->type_data->show_menu('save_and_sales_order'),
2317 2323
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2318 2324
        ],
2319 2325
        action => [
2320 2326
          t8('Save and Purchase Order'),
2321 2327
          call      => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_TYPE() } ],
2322
          checks    => [ @req_trans_cost_art, @req_cusordnumber ],
2328
          checks    => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
2323 2329
          only_if   => $self->type_data->show_menu('save_and_purchase_order'),
2324 2330
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2325 2331
        ],
......
2368 2374
          call      => [ 'kivi.Order.save', {
2369 2375
              action             => 'save_and_new_record',
2370 2376
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2377
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2371 2378
              form_params        => [
2372 2379
                { name => 'to_type',
2373 2380
                  value => $self->order->is_sales ? SALES_RECLAMATION_TYPE()
......
2381 2388
          call      => [ 'kivi.Order.save', {
2382 2389
              action             => 'save_and_invoice',
2383 2390
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2391
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2384 2392
            }],
2385 2393
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2386 2394
                         @req_trans_cost_art, @req_cusordnumber,

Auch abrufbar als: Unified diff