X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=5a3e66452d026aa4ca8b7c04a0f86b2e2a83d71e;hb=a768ad93ce22a3b3f1f084c6d3644c7e3089085f;hp=2c50d7ee9feff688191a9fc8a5b03ebfba07bc70;hpb=b3259be1755d03539dfa8312f379bd0190526f25;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 2c50d7ee9..5a3e66452 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -296,7 +296,6 @@ sub setup_is_action_bar { : $form->{locked} ? t8('The billing period has already been locked.') : undef, id => 'update_button', - checks => [ 'kivi.validate_form' ], accesskey => 'enter', ], @@ -339,6 +338,8 @@ sub setup_is_action_bar { checks => [ 'kivi.validate_form' ], disabled => !$may_edit_create ? t8('You must not change this invoice.') : !$form->{id} ? t8('This invoice has not been posted yet.') + : $form->{storno} ? t8('Cannot storno storno invoice!') + : $form->{locked} ? t8('The billing period has already been locked.') : !$payments_balanced ? t8('Cancelling is disallowed. Either undo or balance the current payments until the open amount matches the invoice amount') : undef, ], @@ -375,6 +376,7 @@ sub setup_is_action_bar { disabled => !$may_edit_create ? t8('You must not change this invoice.') : $form->{type} eq "credit_note" ? t8('Credit notes cannot be converted into other credit notes.') : !$form->{id} ? t8('This invoice has not been posted yet.') + : $form->{storno} ? t8('A canceled invoice cannot be used. Please undo the cancellation first.') : undef, ], action => [ @@ -398,9 +400,13 @@ sub setup_is_action_bar { action => [ t8('Print and Post'), call => [ 'kivi.SalesPurchase.show_print_dialog', $form->{id} ? 'print' : 'print_and_post' ], checks => [ 'kivi.validate_form' ], - disabled => !$may_edit_create ? t8('You must not print this invoice.') - : $form->{id} ? t8('This invoice has already been posted.') - : undef,, + disabled => !$may_edit_create ? t8('You must not change this invoice.') + : $form->{locked} ? t8('The billing period has already been locked.') + : $form->{storno} ? t8('A canceled invoice cannot be posted.') + : ($form->{id} && $change_never) ? t8('Changing invoices has been disabled in the configuration.') + : ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.') + : $is_linked_bank_transaction ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.') + : undef, ], action => [ t8('E Mail'), call => [ 'kivi.SalesPurchase.show_email_dialog' ], @@ -466,6 +472,7 @@ sub form_header { "price_factors" => "ALL_PRICE_FACTORS"); $form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted; + $form->{ALL_LANGUAGES} = SL::DB::Manager::Language->get_all_sorted; # Projects my @old_project_ids = uniq grep { $_ } map { $_ * 1 } ($form->{"globalproject_id"}, map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); @@ -537,7 +544,7 @@ sub form_header { invoice_id show_details ), @custom_hiddens, - map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; + map { $_.'_rate', $_.'_description', $_.'_taxnumber', $_.'_tax_id' } split / /, $form->{taxaccounts}]; $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.Draft kivi.File kivi.SalesPurchase kivi.Part kivi.CustomerVendor kivi.Validator ckeditor/ckeditor ckeditor/adapters/jquery kivi.io client_js)); @@ -583,12 +590,6 @@ sub form_footer { $form->{invtotal} = $form->{invsubtotal}; - # note rows - $form->{rows} = max 2, - $form->numtextrows($form->{notes}, 26, 8), - $form->numtextrows($form->{intnotes}, 35, 8); - - # tax, total and subtotal calculations my ($tax, $subtotal); $form->{taxaccounts_array} = [ split(/ /, $form->{taxaccounts}) ]; @@ -734,10 +735,7 @@ sub update { for my $i (1 .. $form->{paidaccounts}) { next unless $form->{"paid_$i"}; - map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate); - if (!$form->{"forex_$i"}) { #read exchangerate from input field (not hidden) - $form->{exchangerate} = $form->{"exchangerate_$i"}; - } + map { $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"}) } qw(paid exchangerate); $form->{"forex_$i"} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{"datepaid_$i"}, 'buy'); $form->{"exchangerate_$i"} = $form->{"forex_$i"} if $form->{"forex_$i"}; }