Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4836a949

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 4836a9491d0b0ec8b9dd72f487b531a20aa5e758
  • Vorgänger 77e57dde
  • Nachfolger f20c7a4a

Records: js-save Aufrufe angepasst und vereinheitlicht

Unterschiede anzeigen:

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

  
42 43
use SL::Helper::CreatePDF qw(:all);
......
2163 2164
      combobox => [
2164 2165
        action => [
2165 2166
          t8('Save'),
2166
          call      => [ 'kivi.Order.save', { action             => 'save',
2167
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2168
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2169
          ],
2167
          call      => [ 'kivi.Order.save', {
2168
              action             => 'save',
2169
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2170
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2171
            }],
2170 2172
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'],
2171 2173
                         @req_trans_cost_art, @req_cusordnumber,
2172 2174
          ],
......
2175 2177
        ],
2176 2178
        action => [
2177 2179
          t8('Save and Close'),
2178
          call      => [ 'kivi.Order.save', { action             => 'save',
2179
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2180
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2181
                                              back_to_caller     => 1 },
2182
          ],
2180
          call      => [ 'kivi.Order.save', {
2181
              action             => 'save',
2182
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2183
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2184
              form_params        => [
2185
                { name => 'back_to_caller', value => 1 },
2186
              ],
2187
            }],
2183 2188
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'],
2184 2189
                         @req_trans_cost_art, @req_cusordnumber,
2185 2190
          ],
......
2188 2193
        ],
2189 2194
        action => [
2190 2195
          t8('Create Sub-Version'),
2191
          call      => [ 'kivi.Order.save', { action => 'add_subversion' }, ],
2196
          call      => [ 'kivi.Order.save', { action => 'add_subversion' } ],
2192 2197
          only_if   => $::instance_conf->get_lock_oe_subversions,
2193 2198
          disabled => !$may_edit_create  ? t8('You do not have the permissions to access this function.')
2194 2199
                    : !$is_final_version ? t8('This sub-version is not yet finalized')
......
2196 2201
        ],
2197 2202
        action => [
2198 2203
          t8('Save as new'),
2199
          call      => [ 'kivi.Order.save', { action             => 'save_as_new',
2200
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2201
          ],
2204
          call      => [ 'kivi.Order.save', {
2205
              action             => 'save_as_new',
2206
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2207
            }],
2202 2208
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2203 2209
                         @req_trans_cost_art, @req_cusordnumber,
2204 2210
          ],
......
2241 2247
        ],
2242 2248
        action => [
2243 2249
          t8('Save and Delivery Order'),
2244
          call      => [ 'kivi.Order.save', { action             => 'save_and_delivery_order',
2245
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2246
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2247
          ],
2250
          call      => [ 'kivi.Order.save', {
2251
              action             => 'save_and_delivery_order',
2252
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2253
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2254
            }],
2248 2255
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2249 2256
                         @req_trans_cost_art, @req_cusordnumber,
2250 2257
          ],
......
2253 2260
        ],
2254 2261
        action => [
2255 2262
          t8('Save and Supplier Delivery Order'),
2256
          call      => [ 'kivi.Order.save', { action             => 'save_and_supplier_delivery_order',
2257
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2258
                                              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2259
          ],
2263
          call      => [ 'kivi.Order.save', {
2264
              action             => 'save_and_new_record',
2265
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2266
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2267
              form_params        => [
2268
                { name => 'to_type', value => SUPPLIER_DELIVERY_ORDER_TYPE() },
2269
              ],
2270
            }],
2260 2271
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2261 2272
                         @req_trans_cost_art, @req_cusordnumber,
2262 2273
          ],
......
2265 2276
        ],
2266 2277
        action => [
2267 2278
          t8('Save and Reclamation'),
2268
          call      => [ 'kivi.Order.save', { action             => 'save_and_reclamation',
2269
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2270
          ],
2279
          call      => [ 'kivi.Order.save', {
2280
              action             => 'save_and_new_record',
2281
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2282
              form_params        => [
2283
                { name => 'to_type',
2284
                  value => $self->order->is_sales ? SALES_RECLAMATION_TYPE()
2285
                                                  : PURCHASE_RECLAMATION_TYPE() },
2286
              ],
2287
            }],
2271 2288
          only_if   =>$self->type_data->show_menu('save_and_reclamation')
2272 2289
        ],
2273 2290
        action => [
2274 2291
          t8('Save and Invoice'),
2275
          call      => [ 'kivi.Order.save', { action             => 'save_and_invoice',
2276
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2277
          ],
2292
          call      => [ 'kivi.Order.save', {
2293
              action             => 'save_and_invoice',
2294
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2295
            }],
2278 2296
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2279 2297
                         @req_trans_cost_art, @req_cusordnumber,
2280 2298
          ],
......
2283 2301
        ],
2284 2302
        action => [
2285 2303
          ($has_invoice_for_advance_payment ? t8('Save and Further Invoice for Advance Payment') : t8('Save and Invoice for Advance Payment')),
2286
          call      => [ 'kivi.Order.save', { action             => 'save_and_invoice_for_advance_payment',
2287
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2288
          ],
2304
          call      => [ 'kivi.Order.save', {
2305
              action             => 'save_and_invoice_for_advance_payment',
2306
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2307
            }],
2289 2308
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2290 2309
                         @req_trans_cost_art, @req_cusordnumber,
2291 2310
          ],
......
2296 2315
        ],
2297 2316
        action => [
2298 2317
          t8('Save and Final Invoice'),
2299
          call      => [ 'kivi.Order.save', { action             => 'save_and_final_invoice',
2300
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2301
          ],
2318
          call      => [ 'kivi.Order.save', {
2319
              action             => 'save_and_final_invoice',
2320
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2321
            }],
2302 2322
          checks    => [ 'kivi.Order.check_save_active_periodic_invoices',
2303 2323
                         @req_trans_cost_art, @req_cusordnumber,
2304 2324
          ],
......
2309 2329
        ],
2310 2330
        action => [
2311 2331
          t8('Save and AP Transaction'),
2312
          call      => [ 'kivi.Order.save', { action             => 'save_and_ap_transaction',
2313
                                              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts },
2314
          ],
2332
          call      => [ 'kivi.Order.save', {
2333
              action             => 'save_and_ap_transaction',
2334
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2335
            }],
2315 2336
          only_if   => $self->type_data->show_menu('save_and_ap_transaction'),
2316 2337
          disabled  => !$may_edit_create  ? t8('You do not have the permissions to access this function.') : undef,
2317 2338
        ],
......
2324 2345
        ],
2325 2346
        action => [
2326 2347
          t8('Save and preview PDF'),
2327
          call     => [ 'kivi.Order.save', { action             => 'preview_pdf',
2328
                                             warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2329
                                             warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2330
          ],
2348
          call     => [ 'kivi.Order.save', {
2349
              action             => 'preview_pdf',
2350
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2351
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2352
            }],
2331 2353
          checks   => [ @req_trans_cost_art, @req_cusordnumber ],
2332 2354
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
2333 2355
                    : $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
......
2344 2366
        action => [
2345 2367
          ($is_final_version ? t8('E-mail') : t8('Save and E-mail')),
2346 2368
          id       => 'save_and_email_action',
2347
          call     => [ 'kivi.Order.save', { action             => 'save_and_show_email_dialog',
2348
                                             warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2349
                                             warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate },
2350
          ],
2369
          call     => [ 'kivi.Order.save', {
2370
              action             => 'save_and_show_email_dialog',
2371
              warn_on_duplicates => $::instance_conf->get_order_warn_duplicate_parts,
2372
              warn_on_reqdate    => $::instance_conf->get_order_warn_no_deliverydate,
2373
            }],
2351 2374
          disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
2352 2375
                    : !$self->order->id ? t8('This object has not been saved yet.')
2353 2376
                    : undef,

Auch abrufbar als: Unified diff