Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision abaf49cc

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

  • ID abaf49cca1f299eb7a45f5ef4f8162ede6b642d7
  • Vorgänger 1ba38eaf
  • Nachfolger 9996587d

ActionBar: CustomerVendor

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
101 101

  
102 102
  $self->_pre_render();
103 103
  $self->{cv}->assign_attributes(hourly_rate => $::instance_conf->get_customer_hourly_rate) if $self->{cv}->is_customer;
104

  
104 105
  $self->render(
105 106
    'customer_vendor/form',
106 107
    title => ($self->is_vendor() ? $::locale->text('Add Vendor') : $::locale->text('Add Customer')),
......
941 942
  $::request->{layout}->add_javascripts('autocomplete_customer.js');
942 943
  $::request->{layout}->add_javascripts('kivi.CustomerVendor.js');
943 944
  $::request->{layout}->add_javascripts('kivi.File.js');
945

  
946
  for my $bar ($::request->layout->get('actionbar')) {
947
    $bar->add_actions("combobox");
948
    $bar->actions->[-1]->add_actions([ t8('Save'),
949
      submit => [ '#form', { action_save           => 1 } ],
950
      checks => [ 'check_taxzone_and_ustid' ],
951
    ]);
952
     $bar->actions->[-1]->add_actions([ t8('Save and Close'),
953
      submit => [ '#form', { action_save_and_close => 1 } ],
954
      checks => [ 'check_taxzone_and_ustid' ],
955
    ]);
956
    $bar->add_actions('combobox');
957
    $bar->actions->[-1]->add_actions([ t8('Workflow'),
958
      disabled => 1,
959
    ]);
960
    $bar->actions->[-1]->add_actions([ t8('Save and AP Transaction'),
961
      submit => [ '#form', { action_save_and_ap_transaction => 1 } ],
962
      checks => [ 'check_taxzone_and_ustid' ],
963
    ]) if $self->is_vendor;
964
    $bar->actions->[-1]->add_actions([ t8('Save and AR Transaction'),
965
      submit => [ '#form', { action_save_and_ar_transaction => 1 } ],
966
      checks => [ 'check_taxzone_and_ustid' ],
967
    ]) if !$self->is_vendor;
968
    $bar->actions->[-1]->add_actions([ t8('Save and Invoice'),
969
      submit => [ '#form', { action_save_and_invoice => 1 } ],
970
      checks => [ 'check_taxzone_and_ustid' ],
971
    ]);
972
    $bar->actions->[-1]->add_actions([ t8('Save and Order'),
973
      submit => [ '#form', { action_save_and_order => 1 } ],
974
      checks => [ 'check_taxzone_and_ustid' ],
975
    ]);
976
    $bar->actions->[-1]->add_actions([ t8('Save and RFQ'),
977
      submit => [ '#form', { action_save_and_rfq => 1 } ],
978
      checks => [ 'check_taxzone_and_ustid' ],
979
    ]) if $self->is_vendor;
980
    $bar->actions->[-1]->add_actions([ t8('Save and Quotation'),
981
      submit => [ '#form', { action_save_and_quotation => 1 } ],
982
      checks => [ 'check_taxzone_and_ustid' ],
983
    ]) if !$self->is_vendor;
984
    $bar->add_actions([ t8('Delete'),
985
      submit => [ '#form', { action_delete         => 1 } ],
986
      confirm => t8('Do you really want to delete this object?'),
987
      disabled => !$self->{cv}->id || !$self->is_orphaned,
988
    ]);
989
    $bar->add_actions('separator');
990
    $bar->add_actions([ t8('History'),
991
      call     => [ 'kivi.CustomerVendor.showHistoryWindow', $self->{cv}->id ],
992
      disabled => !$self->{cv}->id,
993
    ]);
994
  }
944 995
}
945 996

  
946 997
sub _prepare_cvar_configs_for_ajaj {

Auch abrufbar als: Unified diff