Projekt

Allgemein

Profil

Fehler #338 » 338-customer-vendor.patch

diff CustomerVendor.pm - Jan Büren, 10.01.2018 11:18

Unterschiede anzeigen:

SL/Controller/CustomerVendor.pm
if (1 == scalar @{ $exact_matches = $manager->get_all(
query => [
obsolete => 0,
(salesman_id => SL::DB::Manager::Employee->current->id) x !$::auth->assert('customer_vendor_all_edit', 1),
#(salesman_id => SL::DB::Manager::Employee->current->id) x !$::auth->assert('customer_vendor_all_edit', 1),
or => [
name => { ilike => $::form->{filter}{'all:substr:multi::ilike'} },
$number => { ilike => $::form->{filter}{'all:substr:multi::ilike'} },
......
t8('Save'),
submit => [ '#form', { action => "CustomerVendor/save" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
accesskey => 'enter',
],
action => [
t8('Save and Close'),
submit => [ '#form', { action => "CustomerVendor/save_and_close" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
],
], # end of combobox "Save"
],
# end of combobox "Save"
combobox => [
action => [ t8('Workflow') ],
......
t8('Save and AP Transaction'),
submit => [ '#form', { action => "CustomerVendor/save_and_ap_transaction" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
]) x !!$self->is_vendor,
(action => [
t8('Save and AR Transaction'),
submit => [ '#form', { action => "CustomerVendor/save_and_ar_transaction" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
]) x !$self->is_vendor,
action => [
t8('Save and Invoice'),
submit => [ '#form', { action => "CustomerVendor/save_and_invoice" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
],
action => [
t8('Save and Order'),
submit => [ '#form', { action => "CustomerVendor/save_and_order" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
],
(action => [
t8('Save and RFQ'),
......
t8('Save and Quotation'),
submit => [ '#form', { action => "CustomerVendor/save_and_quotation" } ],
checks => [ 'check_taxzone_and_ustid' ],
disabled => [ _check_customer_vendor_all_edit ],
]) x !$self->is_vendor,
], # end of combobox "Workflow"
......
confirm => t8('Do you really want to delete this object?'),
disabled => !$self->{cv}->id ? t8('This object has not been saved yet.')
: !$self->is_orphaned ? t8('This object has already been used.')
: undef,
: _check_customer_vendor_all_edit ? t8('This is not your client')
: undef,
],
'separator',
    (1-1/1)