Revision 3a868c37
Von Jan Büren vor fast 3 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
279 | 279 |
my $payments_balanced = ($::form->{oldtotalpaid} == 0); |
280 | 280 |
my $has_storno = ($::form->{storno} && !$::form->{storno_id}); |
281 | 281 |
my $may_edit_create = $::auth->assert('invoice_edit', 1); |
282 |
my $is_linked_bank_transaction;
|
|
282 |
my ($is_linked_bank_transaction, $warn_unlinked_delivery_order);
|
|
283 | 283 |
if ($::form->{id} |
284 | 284 |
&& SL::DB::Default->get->payments_changeable != 0 |
285 | 285 |
&& SL::DB::Manager::BankTransactionAccTrans->find_by(ar_id => $::form->{id})) { |
286 | 286 |
|
287 | 287 |
$is_linked_bank_transaction = 1; |
288 | 288 |
} |
289 |
|
|
289 |
if ($::instance_conf->get_warn_no_delivery_order_for_invoice && !$form->{id}) { |
|
290 |
$warn_unlinked_delivery_order = 1 unless $form->{convert_from_do_ids}; |
|
291 |
} |
|
290 | 292 |
for my $bar ($::request->layout->get('actionbar')) { |
291 | 293 |
$bar->add( |
292 | 294 |
action => [ |
... | ... | |
304 | 306 |
t8('Post'), |
305 | 307 |
submit => [ '#form', { action => "post" } ], |
306 | 308 |
checks => [ 'kivi.validate_form' ], |
309 |
confirm => t8('The invoice is not linked with a sales delivery order. Post anyway?') x !!$warn_unlinked_delivery_order, |
|
307 | 310 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
308 | 311 |
: $form->{locked} ? t8('The billing period has already been locked.') |
309 | 312 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
... | ... | |
400 | 403 |
action => [ t8('Print and Post'), |
401 | 404 |
call => [ 'kivi.SalesPurchase.show_print_dialog', 'print_and_post' ], |
402 | 405 |
checks => [ 'kivi.validate_form' ], |
406 |
confirm => t8('The invoice is not linked with a sales delivery order. Post anyway?') x !!$warn_unlinked_delivery_order, |
|
403 | 407 |
disabled => !$may_edit_create ? t8('You must not change this invoice.') |
404 | 408 |
: $form->{locked} ? t8('The billing period has already been locked.') |
405 | 409 |
: $form->{storno} ? t8('A canceled invoice cannot be posted.') |
Auch abrufbar als: Unified diff
Warnung bei fehlendem Lieferschein als Vorgänger zur Rechnung