Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 93d8a5ea

Von Jan Büren vor mehr als 1 Jahr hinzugefügt

  • ID 93d8a5ea3ed3c8285229bafcb9067ec56a1ebee2
  • Vorgänger fe243aca
  • Nachfolger abbf7a3f

Wechselkurs in form_header anzeigen, inkl. Herkunft (Beleg oder Tageskurs)

> form>radier entfernt und den Zustand readonly in allen 4
Buchungsmasken auch anhand der Zustände der action_bar Knöpfe
abhängig gemacht (in form oder TMPL_VARS gesetzt)

Unterschiede anzeigen:

bin/mozilla/ir.pl
247 247
}
248 248

  
249 249
sub setup_ir_action_bar {
250
  my ($tmpl_var)              = @_;
250 251
  my $form                    = $::form;
251 252
  my $change_never            = $::instance_conf->get_ir_changeable == 0;
252 253
  my $change_on_same_day_only = $::instance_conf->get_ir_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate});
......
269 270

  
270 271
    $is_linked_bank_transaction = 1;
271 272
  }
273
  # add readonly state in tmpl_vars
274
  $tmpl_var->{readonly} = !$may_edit_create                     ? 1
275
                    : $form->{locked}                           ? 1
276
                    : $form->{storno}                           ? 1
277
                    : ($form->{id} && $change_never)            ? 1
278
                    : ($form->{id} && $change_on_same_day_only) ? 1
279
                    : $is_linked_bank_transaction               ? 1
280
                    : $has_sepa_exports                         ? 1
281
                    : 0;
272 282

  
273 283
  my $create_post_action = sub {
274 284
    # $_[0]: description
......
283 293
                : $form->{storno}                           ? t8('A canceled invoice cannot be posted.')
284 294
                : ($form->{id} && $change_never)            ? t8('Changing invoices has been disabled in the configuration.')
285 295
                : ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
296
                : $has_sepa_exports                         ? t8('This invoice has been linked with a sepa export, undo this first.')
286 297
                : $is_linked_bank_transaction               ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
287 298
                :                                             undef,
288 299
    ],
......
498 509

  
499 510
  $::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 autocomplete_project client_js));
500 511

  
501
  setup_ir_action_bar();
512
  setup_ir_action_bar(\%TMPL_VAR);
502 513

  
503 514
  $form->header();
504 515

  

Auch abrufbar als: Unified diff