Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c8e91c4e

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID c8e91c4ee39a8915449a2edfcd6257e45d575baa
  • Vorgänger 4cff1777
  • Nachfolger 1881b66a

Records: js-save Aufrufe angepasst und vereinheitlicht

Unterschiede anzeigen:

SL/Controller/Order.pm
38 38
use SL::DB::Helper::Record qw(get_object_name_from_type get_class_from_type);
39 39
use SL::Model::Record;
40 40
use SL::DB::Order::TypeData qw(:types);
41
use SL::DB::DeliveryOrder::TypeData qw(:types);
41 42
use SL::DB::Reclamation::TypeData qw(:types);
42 43

  
43 44
use SL::Helper::CreatePDF qw(:all);
......
2228 2229
      combobox => [
2229 2230
        action => [
2230 2231
          t8('Save'),
2231
          call      => [ 'kivi.Order.save', { action             => 'save',
2232
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2233
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2234
          ],
2232
          call      => [ 'kivi.Order.save', {
2233
              action             => 'save',
2234
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2235
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2236
            }],
2235 2237
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'],
2236 2238
                         @req_trans_cost_art, @req_cusordnumber,
2237 2239
          ],
......
2240 2242
        ],
2241 2243
        action => [
2242 2244
          t8('Save and Close'),
2243
          call      => [ 'kivi.Order.save', { action             => 'save',
2244
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2245
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2246
                                              back_to_caller     => 1 },
2247
          ],
2245
          call      => [ 'kivi.Order.save', {
2246
              action             => 'save',
2247
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2248
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2249
              form_params        => [
2250
                { name => 'back_to_caller', value => 1 },
2251
              ],
2252
            }],
2248 2253
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'],
2249 2254
                         @req_trans_cost_art, @req_cusordnumber,
2250 2255
          ],
......
2253 2258
        ],
2254 2259
        action => [
2255 2260
          t8('Create Sub-Version'),
2256
          call      => [ 'kivi.Order.save', { action => 'add_subversion' }, ],
2261
          call      => [ 'kivi.Order.save', { action => 'add_subversion' } ],
2257 2262
          only_if   => $::instance_conf->get_lock_oe_subversions,
2258 2263
          disabled => !$may_edit_create  ? t8('You do not have the permissions to access this function.')
2259 2264
                    : !$is_final_version ? t8('This sub-version is not yet finalized')
......
2261 2266
        ],
2262 2267
        action => [
2263 2268
          t8('Save as new'),
2264
          call      => [ 'kivi.Order.save', { action             => 'save_as_new',
2265
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2266
          ],
2269
          call      => [ 'kivi.Order.save', {
2270
              action             => 'save_as_new',
2271
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2272
            }],
2267 2273
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2268 2274
                         @req_trans_cost_art, @req_cusordnumber,
2269 2275
          ],
......
2318 2324
        ],
2319 2325
        action => [
2320 2326
          t8('Save and Delivery Order'),
2321
          call      => [ 'kivi.Order.save', { action             => 'save_and_delivery_order',
2322
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2323
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2324
          ],
2327
          call      => [ 'kivi.Order.save', {
2328
              action             => 'save_and_delivery_order',
2329
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2330
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2331
            }],
2325 2332
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2326 2333
                         @req_trans_cost_art, @req_cusordnumber,
2327 2334
          ],
......
2341 2348
        ],
2342 2349
        action => [
2343 2350
          t8('Save and Supplier Delivery Order'),
2344
          call      => [ 'kivi.Order.save', { action             => 'save_and_supplier_delivery_order',
2345
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2346
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2347
          ],
2351
          call      => [ 'kivi.Order.save', {
2352
              action             => 'save_and_new_record',
2353
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2354
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2355
              form_params        => [
2356
                { name => 'to_type', value => SUPPLIER_DELIVERY_ORDER_TYPE() },
2357
              ],
2358
            }],
2348 2359
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2349 2360
                         @req_trans_cost_art, @req_cusordnumber,
2350 2361
          ],
......
2353 2364
        ],
2354 2365
        action => [
2355 2366
          t8('Save and Reclamation'),
2356
          call      => [ 'kivi.Order.save', { action             => 'save_and_reclamation',
2357
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2358
          ],
2367
          call      => [ 'kivi.Order.save', {
2368
              action             => 'save_and_new_record',
2369
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2370
              form_params        => [
2371
                { name => 'to_type',
2372
                  value => $self->order->is_sales ? SALES_RECLAMATION_TYPE()
2373
                                                  : PURCHASE_RECLAMATION_TYPE() },
2374
              ],
2375
            }],
2359 2376
          only_if   =>$self->type_data->show_menu('save_and_reclamation')
2360 2377
        ],
2361 2378
        action => [
2362 2379
          t8('Save and Invoice'),
2363
          call      => [ 'kivi.Order.save', { action             => 'save_and_invoice',
2364
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2365
          ],
2380
          call      => [ 'kivi.Order.save', {
2381
              action             => 'save_and_invoice',
2382
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2383
            }],
2366 2384
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2367 2385
                         @req_trans_cost_art, @req_cusordnumber,
2368 2386
          ],
......
2371 2389
        ],
2372 2390
        action => [
2373 2391
          ($has_invoice_for_advance_payment ? t8('Save and Further Invoice for Advance Payment') : t8('Save and Invoice for Advance Payment')),
2374
          call      => [ 'kivi.Order.save', { action             => 'save_and_invoice_for_advance_payment',
2375
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2376
          ],
2392
          call      => [ 'kivi.Order.save', {
2393
              action             => 'save_and_invoice_for_advance_payment',
2394
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2395
            }],
2377 2396
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2378 2397
                         @req_trans_cost_art, @req_cusordnumber,
2379 2398
          ],
......
2384 2403
        ],
2385 2404
        action => [
2386 2405
          t8('Save and Final Invoice'),
2387
          call      => [ 'kivi.Order.save', { action             => 'save_and_final_invoice',
2388
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2389
          ],
2406
          call      => [ 'kivi.Order.save', {
2407
              action             => 'save_and_final_invoice',
2408
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2409
            }],
2390 2410
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2391 2411
                         @req_trans_cost_art, @req_cusordnumber,
2392 2412
          ],
......
2397 2417
        ],
2398 2418
        action => [
2399 2419
          t8('Save and AP Transaction'),
2400
          call      => [ 'kivi.Order.save', { action             => 'save_and_ap_transaction',
2401
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2402
          ],
2420
          call      => [ 'kivi.Order.save', {
2421
              action             => 'save_and_ap_transaction',
2422
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2423
            }],
2403 2424
          only_if   => $self->type_data->show_menu('save_and_ap_transaction'),
2404 2425
          disabled  => !$may_edit_create  ? t8('You do not have the permissions to access this function.') : undef,
2405 2426
        ],
......
2412 2433
        ],
2413 2434
        action => [
2414 2435
          t8('Save and preview PDF'),
2415
          call     => [ 'kivi.Order.save', { action             => 'preview_pdf',
2416
                                             warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2417
                                             warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2418
          ],
2436
          call     => [ 'kivi.Order.save', {
2437
              action             => 'preview_pdf',
2438
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2439
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2440
            }],
2419 2441
          checks   => [ @req_trans_cost_art, @req_cusordnumber ],
2420 2442
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
2421 2443
                    : $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
......
2432 2454
        action => [
2433 2455
          ($is_final_version ? t8('E-mail') : t8('Save and E-mail')),
2434 2456
          id       => 'save_and_email_action',
2435
          call     => [ 'kivi.Order.save', { action             => 'save_and_show_email_dialog',
2436
                                             warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2437
                                             warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2438
          ],
2457
          call     => [ 'kivi.Order.save', {
2458
              action             => 'save_and_show_email_dialog',
2459
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2460
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2461
            }],
2439 2462
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
2440 2463
                    : !$self->order->id ? t8('This object has not been saved yet.')
2441 2464
                    : undef,

Auch abrufbar als: Unified diff