Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 00f239f3

Von Jan Büren vor etwa 2 Jahren hinzugefügt

  • ID 00f239f3b3643eb209b94c6e5ed267612b789a01
  • Vorgänger 75ace081
  • Nachfolger 3741e66b

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
242 242
}
243 243

  
244 244
sub setup_ir_action_bar {
245
  my ($tmpl_var)              = @_;
245 246
  my $form                    = $::form;
246 247
  my $change_never            = $::instance_conf->get_ir_changeable == 0;
247 248
  my $change_on_same_day_only = $::instance_conf->get_ir_changeable == 2 && ($form->current_date(\%::myconfig) ne $form->{gldate});
......
262 263

  
263 264
    $is_linked_bank_transaction = 1;
264 265
  }
266
  # add readonly state in tmpl_vars
267
  $tmpl_var->{readonly} = !$may_edit_create                     ? 1
268
                    : $form->{locked}                           ? 1
269
                    : $form->{storno}                           ? 1
270
                    : ($form->{id} && $change_never)            ? 1
271
                    : ($form->{id} && $change_on_same_day_only) ? 1
272
                    : $is_linked_bank_transaction               ? 1
273
                    : $has_sepa_exports                         ? 1
274
                    : 0;
265 275

  
266 276
  my $create_post_action = sub {
267 277
    # $_[0]: description
......
276 286
                : $form->{storno}                           ? t8('A canceled invoice cannot be posted.')
277 287
                : ($form->{id} && $change_never)            ? t8('Changing invoices has been disabled in the configuration.')
278 288
                : ($form->{id} && $change_on_same_day_only) ? t8('Invoices can only be changed on the day they are posted.')
289
                : $has_sepa_exports                         ? t8('This invoice has been linked with a sepa export, undo this first.')
279 290
                : $is_linked_bank_transaction               ? t8('This transaction is linked with a bank transaction. Please undo and redo the bank transaction booking if needed.')
280 291
                :                                             undef,
281 292
    ],
......
478 489

  
479 490
  $::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));
480 491

  
481
  setup_ir_action_bar();
492
  setup_ir_action_bar(\%TMPL_VAR);
482 493

  
483 494
  $form->header();
484 495

  

Auch abrufbar als: Unified diff