610 |
610 |
if (1 == scalar @{ $exact_matches = $manager->get_all(
|
611 |
611 |
query => [
|
612 |
612 |
obsolete => 0,
|
613 |
|
(salesman_id => SL::DB::Manager::Employee->current->id) x !$::auth->assert('customer_vendor_all_edit', 1),
|
|
613 |
#(salesman_id => SL::DB::Manager::Employee->current->id) x !$::auth->assert('customer_vendor_all_edit', 1),
|
614 |
614 |
or => [
|
615 |
615 |
name => { ilike => $::form->{filter}{'all:substr:multi::ilike'} },
|
616 |
616 |
$number => { ilike => $::form->{filter}{'all:substr:multi::ilike'} },
|
... | ... | |
954 |
954 |
t8('Save'),
|
955 |
955 |
submit => [ '#form', { action => "CustomerVendor/save" } ],
|
956 |
956 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
957 |
disabled => [ _check_customer_vendor_all_edit ],
|
957 |
958 |
accesskey => 'enter',
|
958 |
959 |
],
|
959 |
960 |
action => [
|
960 |
961 |
t8('Save and Close'),
|
961 |
962 |
submit => [ '#form', { action => "CustomerVendor/save_and_close" } ],
|
962 |
963 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
964 |
disabled => [ _check_customer_vendor_all_edit ],
|
963 |
965 |
],
|
964 |
|
], # end of combobox "Save"
|
|
966 |
],
|
|
967 |
|
|
968 |
# end of combobox "Save"
|
965 |
969 |
|
966 |
970 |
combobox => [
|
967 |
971 |
action => [ t8('Workflow') ],
|
... | ... | |
969 |
973 |
t8('Save and AP Transaction'),
|
970 |
974 |
submit => [ '#form', { action => "CustomerVendor/save_and_ap_transaction" } ],
|
971 |
975 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
976 |
disabled => [ _check_customer_vendor_all_edit ],
|
972 |
977 |
]) x !!$self->is_vendor,
|
973 |
978 |
(action => [
|
974 |
979 |
t8('Save and AR Transaction'),
|
975 |
980 |
submit => [ '#form', { action => "CustomerVendor/save_and_ar_transaction" } ],
|
976 |
981 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
982 |
disabled => [ _check_customer_vendor_all_edit ],
|
977 |
983 |
]) x !$self->is_vendor,
|
978 |
984 |
action => [
|
979 |
985 |
t8('Save and Invoice'),
|
980 |
986 |
submit => [ '#form', { action => "CustomerVendor/save_and_invoice" } ],
|
981 |
987 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
988 |
disabled => [ _check_customer_vendor_all_edit ],
|
982 |
989 |
],
|
983 |
990 |
action => [
|
984 |
991 |
t8('Save and Order'),
|
985 |
992 |
submit => [ '#form', { action => "CustomerVendor/save_and_order" } ],
|
986 |
993 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
994 |
disabled => [ _check_customer_vendor_all_edit ],
|
987 |
995 |
],
|
988 |
996 |
(action => [
|
989 |
997 |
t8('Save and RFQ'),
|
... | ... | |
994 |
1002 |
t8('Save and Quotation'),
|
995 |
1003 |
submit => [ '#form', { action => "CustomerVendor/save_and_quotation" } ],
|
996 |
1004 |
checks => [ 'check_taxzone_and_ustid' ],
|
|
1005 |
disabled => [ _check_customer_vendor_all_edit ],
|
997 |
1006 |
]) x !$self->is_vendor,
|
998 |
1007 |
], # end of combobox "Workflow"
|
999 |
1008 |
|
... | ... | |
1003 |
1012 |
confirm => t8('Do you really want to delete this object?'),
|
1004 |
1013 |
disabled => !$self->{cv}->id ? t8('This object has not been saved yet.')
|
1005 |
1014 |
: !$self->is_orphaned ? t8('This object has already been used.')
|
1006 |
|
: undef,
|
|
1015 |
: _check_customer_vendor_all_edit ? t8('This is not your client')
|
|
1016 |
: undef,
|
1007 |
1017 |
],
|
1008 |
1018 |
|
1009 |
1019 |
'separator',
|