+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
+ ],
+ action => [
+ ($has_invoice_for_advance_payment ? t8('Save and Further Invoice for Advance Payment') : t8('Save and Invoice for Advance Payment')),
+ call => [ 'kivi.Order.save', 'save_and_invoice_for_advance_payment', $::instance_conf->get_order_warn_duplicate_parts ],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices',
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
+ : $has_final_invoice ? t8('This order has already a final invoice.')
+ : undef,
+ only_if => (any { $self->type eq $_ } (sales_order_type())),
+ ],
+ action => [
+ t8('Save and Final Invoice'),
+ call => [ 'kivi.Order.save', 'save_and_final_invoice', $::instance_conf->get_order_warn_duplicate_parts ],
+ checks => [ 'kivi.Order.check_save_active_periodic_invoices',
+ @req_trans_cost_art, @req_cusordnumber,
+ ],
+ disabled => !$may_edit_create ? t8('You do not have the permissions to access this function.')
+ : $has_final_invoice ? t8('This order has already a final invoice.')
+ : undef,
+ only_if => (any { $self->type eq $_ } (sales_order_type())) && $has_invoice_for_advance_payment,