Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 87599e47

Von Sven Schöling vor etwa 7 Jahren hinzugefügt

  • ID 87599e477cc6e1df8dded5fda69f21d01278e71e
  • Vorgänger 80f2a2f4
  • Nachfolger dd1ab30b

oe: auf prototyp auf einzelnes add umgeschrieben

Unterschiede anzeigen:

bin/mozilla/oe.pl
452 452

  
453 453
  my $tpca_remainder = 0;
454 454

  
455
  $::request->layout->get('actionbar')->add_actions(
456
    [ t8('Update'),                submit => [ '#form', { action_update         => 1 } ] ],
457
    [ t8('Ship to'),               submit => [ '#form', { action_ship_to        => 1 } ] ],
458
    [ t8('Print'),                 submit => [ '#form', { action_print          => 1 } ], checks => [ qw(kivi.SalesPurchase.check_transaction_description) ] ],
459
    [ t8('E Mail'),                submit => [ '#form', { action_print          => 1 } ], checks => [ qw(kivi.SalesPurchase.check_transaction_description) ] ],
460
    [ t8('Save'),                  submit => [ '#form', { action_save           => 1 } ], checks => [ qw(kivi.SalesPurchase.check_transaction_description) ], confirm => t8('Missing transport cost: #1  Are you sure?', $tpca_remainder) ], # always, optional warn_save_active_periodic_invoice,
461
    [ t8('Save and Close'),        submit => [ '#form', { action_save_and_close => 1 } ], checks => [ qw(kivi.SalesPurchase.check_transaction_description) ], confirm => t8('Missing transport cost: #1  Are you sure?', $tpca_remainder) ], # always, optional warn_save_active_periodic_invoice,
462
    [ t8('Follow-Up'),           function => [ 'follow_up_window' ], disabled => !$::form->{id} ],
463
    [ t8('History'),             function => [ 'set_history_window', $::form->{id} * 1, 'id' ], disabled => !$::form->{id} ],
464
    [ t8('Save as new'),           submit => [ '#form', { action_save_as_new    => 1 } ], checks => [ qw(kivi.SalesPurchase.check_transaction_description) ], disabled => !$::form->{id} ],
465
   ([ t8('Delete'),                submit => [ '#form', { action_delete         => 1 } ], disabled => !$::form->{id} ]) x!!( $::form->{id} && (!$is_sales_ord || $::instance_conf->get_sales_order_show_delete) && (!$is_pur_ord || $::instance_conf->get_purchase_order_show_delete ) ),
466
   ([ t8('Sales Order'),           submit => [ '#form', { action_sales_order    => 1 } ], disabled => !$::form->{id} ]) x!!($is_sales_quo ),
467
   ([ t8('Purchase Order'),        submit => [ '#form', { action_sales_order    => 1 } ], disabled => !$::form->{id} ]) x!!($is_req_quo ),
468
   ([ t8('Delivery Order'),        submit => [ '#form', { action_delivery_order => 1 } ], disabled => !$::form->{id} ]) x!!(($is_sales_ord || $is_pur_ord ) ),
469
   ([ t8('Invoice'),               submit => [ '#form', { action_invoice        => 1 } ], disabled => !$::form->{id} ]) x!!($allow_invoice ),
470
    [ t8('Quotation'),             submit => [ '#form', { action_quotation      => 1 } ], disabled => !$::form->{id} ],
471
    [ t8('Request for Quotation'), submit => [ '#form', { action_reqest_for_quotation => 1 } ], disabled => !$::form->{id} ],
472
  );
455
  for my $bar ($::request->layout->get('actionbar')) {
456
    $bar->add_actions([ t8('Update'),
457
      submit => [ '#form', { action_update         => 1 } ],
458
    ]);
459
    $bar->add_actions([ t8('Ship to'),
460
      submit => [ '#form', { action_ship_to        => 1 } ],
461
    ]);
462
    $bar->add_actions([ t8('Print'),
463
      submit => [ '#form', { action_print          => 1 } ],
464
      checks => [ qw(kivi.SalesPurchase.check_transaction_description) ],
465
    ]);
466
    $bar->add_actions([ t8('E Mail'),
467
      submit => [ '#form', { action_print          => 1 } ],
468
      checks => [ qw(kivi.SalesPurchase.check_transaction_description) ],
469
    ]);
470
    $bar->add_actions([ t8('Save'),
471
      submit => [ '#form', { action_save           => 1 } ],
472
      checks => [ qw(kivi.SalesPurchase.check_transaction_description) ],
473
      confirm => t8('Missing transport cost: #1  Are you sure?', $tpca_remainder),
474
      # optional warn_save_active_periodic_invoice,
475
    ]);
476
    $bar->add_actions([ t8('Save and Close'),
477
      submit => [ '#form', { action_save_and_close => 1 } ],
478
      checks => [ qw(kivi.SalesPurchase.check_transaction_description) ],
479
      confirm => t8('Missing transport cost: #1  Are you sure?', $tpca_remainder),
480
      # always, optional warn_save_active_periodic_invoice,
481
    ]);
482
    $bar->add_actions([ t8('Follow-Up'),
483
      function => [ 'follow_up_window' ],
484
      disabled => !$::form->{id},
485
    ]);
486
    $bar->add_actions([ t8('History'),
487
      function => [ 'set_history_window', $::form->{id} * 1, 'id' ],
488
      disabled => !$::form->{id},
489
    ]);
490
    $bar->add_actions([ t8('Save as new'),
491
      submit => [ '#form', { action_save_as_new    => 1 } ],
492
      checks => [ qw(kivi.SalesPurchase.check_transaction_description) ],
493
      disabled => !$::form->{id},
494
    ]);
495
    $bar->add_actions([ t8('Delete'),
496
      submit => [ '#form', { action_delete         => 1 } ],
497
      disabled => !$::form->{id},
498
    ]) if $::form->{id} && (!$is_sales_ord || $::instance_conf->get_sales_order_show_delete) && (!$is_pur_ord || $::instance_conf->get_purchase_order_show_delete);
499
    $bar->add_actions([ t8('Sales Order'),
500
      submit => [ '#form', { action_sales_order    => 1 } ],
501
      disabled => !$::form->{id},
502
    ]) if $is_sales_quo;
503
    $bar->add_actions([ t8('Purchase Order'),
504
      submit => [ '#form', { action_sales_order    => 1 } ],
505
      disabled => !$::form->{id},
506
    ]) if $is_req_quo;
507
    $bar->add_actions([ t8('Delivery Order'),
508
      submit => [ '#form', { action_delivery_order => 1 } ],
509
      disabled => !$::form->{id},
510
    ]) if $is_sales_ord || $is_pur_ord;
511
    $bar->add_actions([ t8('Invoice'),
512
      submit => [ '#form', { action_invoice        => 1 } ],
513
      disabled => !$::form->{id},
514
    ]) if $allow_invoice;
515
    $bar->add_actions([ t8('Quotation'),
516
      submit => [ '#form', { action_quotation      => 1 } ],
517
      disabled => !$::form->{id},
518
    ]);
519
    $bar->add_actions([ t8('Request for Quotation'),
520
      submit => [ '#form', { action_reqest_for_quotation => 1 } ],
521
      disabled => !$::form->{id}
522
    ]);
523
  }
473 524

  
474 525
  $form->header;
475 526
  if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) {

Auch abrufbar als: Unified diff