Revision 5032fc48
Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
2208 | 2208 |
# 3. save and subversion new version without email_id -> open |
2209 | 2209 |
# 4. send email set email_id for current subversion -> final |
2210 | 2210 |
# for all versions > 1 set postfix -2 .. -n for recordnumber |
2211 |
my $final_sales_version = $::instance_conf->get_lock_oe_subversions ? # conf enabled
|
|
2212 |
$self->order->id ? # is saved
|
|
2213 |
$self->order->is_final_version : # is final
|
|
2214 |
undef : # is not final
|
|
2215 |
undef; # conf disabled
|
|
2211 |
my $is_final_version = $::instance_conf->get_lock_oe_subversions ? # conf enabled
|
|
2212 |
$self->order->id ? # is saved |
|
2213 |
$self->order->is_final_version : # is final |
|
2214 |
undef : # is not final |
|
2215 |
undef; # conf disabled |
|
2216 | 2216 |
|
2217 | 2217 |
for my $bar ($::request->layout->get('actionbar')) { |
2218 | 2218 |
$bar->add( |
... | ... | |
2225 | 2225 |
checks => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'], |
2226 | 2226 |
@req_trans_cost_art, @req_cusordnumber, |
2227 | 2227 |
], |
2228 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
2229 |
: $final_sales_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2228 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2229 |
: $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2230 | 2230 |
], |
2231 | 2231 |
action => [ |
2232 | 2232 |
t8('Save and Close'), |
... | ... | |
2237 | 2237 |
checks => [ 'kivi.Order.check_save_active_periodic_invoices', ['kivi.validate_form','#order_form'], |
2238 | 2238 |
@req_trans_cost_art, @req_cusordnumber, |
2239 | 2239 |
], |
2240 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
2241 |
: $final_sales_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2240 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2241 |
: $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2242 | 2242 |
], |
2243 | 2243 |
action => [ |
2244 | 2244 |
t8('Create Sub-Version'), |
2245 | 2245 |
call => [ 'kivi.Order.save', 'add_subversion', |
2246 | 2246 |
], |
2247 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2248 |
: !$final_sales_version |
|
2249 |
? t8('This sub-version is not yet finalized') . ' ' . t8('or the feature is disabled in the configuration settings.') |
|
2250 |
: undef, |
|
2247 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2248 |
: !$is_final_version ? t8('This sub-version is not yet finalized') . ' ' . t8('or the feature is disabled in the configuration settings.') |
|
2249 |
: undef, |
|
2251 | 2250 |
], |
2252 | 2251 |
action => [ |
2253 | 2252 |
t8('Save as new'), |
... | ... | |
2363 | 2362 |
$::instance_conf->get_order_warn_no_deliverydate, |
2364 | 2363 |
], |
2365 | 2364 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
2366 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
2367 |
: $final_sales_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2365 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2366 |
: $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2368 | 2367 |
], |
2369 | 2368 |
action => [ |
2370 | 2369 |
t8('Save and print'), |
... | ... | |
2372 | 2371 |
$::instance_conf->get_order_warn_no_deliverydate, |
2373 | 2372 |
], |
2374 | 2373 |
checks => [ @req_trans_cost_art, @req_cusordnumber ], |
2375 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
2376 |
: $final_sales_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2374 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2375 |
: $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2377 | 2376 |
], |
2378 | 2377 |
action => [ |
2379 | 2378 |
t8('Save and E-mail'), |
... | ... | |
2381 | 2380 |
call => [ 'kivi.Order.save', 'save_and_show_email_dialog', $::instance_conf->get_order_warn_duplicate_parts, |
2382 | 2381 |
$::instance_conf->get_order_warn_no_deliverydate, |
2383 | 2382 |
], |
2384 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
|
|
2385 |
: !$self->order->id ? t8('This object has not been saved yet.')
|
|
2386 |
: $final_sales_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2383 |
disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') |
|
2384 |
: !$self->order->id ? t8('This object has not been saved yet.') |
|
2385 |
: $is_final_version ? t8('This record is the final version. Please create a new sub-version') : undef,
|
|
2387 | 2386 |
], |
2388 | 2387 |
action => [ |
2389 | 2388 |
t8('Download attachments of all parts'), |
Auch abrufbar als: Unified diff
Unterversionen: Controller: Variable umbenannt und Kosmetik