Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6f1ffd59

Von Bernd Bleßmann vor mehr als 4 Jahren hinzugefügt

  • ID 6f1ffd59a04dab30e87d6ea38c5884624f4b926a
  • Vorgänger 15e3714a
  • Nachfolger 349cde39

Lieferscheine: Benutzerdef. Variablen in Lieferadressen gefixt

Unterschiede anzeigen:

bin/mozilla/do.pl
466 466

  
467 467
  $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.File kivi.MassDeliveryOrderPrint kivi.SalesPurchase kivi.Part kivi.CustomerVendor kivi.Validator ckeditor/ckeditor ckeditor/adapters/jquery kivi.io));
468 468

  
469
  my @custom_hidden;
470
  push @custom_hidden, map { "shiptocvar_" . $_->name } @{ SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'ShipTo' ]) };
471

  
472
  $::form->{HIDDENS} = [ map { +{ name => $_, value => $::form->{$_} } } (@custom_hidden) ];
473

  
474 469
  setup_do_action_bar();
475 470

  
476 471
  $form->header();
......
501 496
  $form->{PRINT_OPTIONS}      = setup_sales_purchase_print_options();
502 497
  $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
503 498

  
499
  my $shipto_cvars       = SL::DB::Shipto->new->cvars_by_config;
500
  foreach my $var (@{ $shipto_cvars }) {
501
    my $name = "shiptocvar_" . $var->config->name;
502
    $var->value($form->{$name}) if exists $form->{$name};
503
  }
504

  
504 505
  print $form->parse_html_template('do/form_footer',
505
    {transfer_default         => ($::instance_conf->get_transfer_default)});
506
    {transfer_default => ($::instance_conf->get_transfer_default),
507
     shipto_cvars     => $shipto_cvars});
506 508

  
507 509
  $main::lxdebug->leave_sub();
508 510
}
templates/webpages/do/form_footer.html
67 67

  
68 68
 [%- IF !delivered %]
69 69
  <div id="shipto_inputs" class="hidden">
70
   [%- PROCESS 'common/_ship_to_dialog.html' vc_obj=VC_OBJ %]
70
   [%- PROCESS 'common/_ship_to_dialog.html' vc_obj=VC_OBJ cvars=shipto_cvars %]
71 71
  </div>
72 72
 [%- END %]
73 73

  
templates/webpages/do/form_header.html
120 120
  <input type="hidden" name="type" id="type" value="[% HTML.escape(type) %]">
121 121
  <input type="hidden" name="vc" id="vc" value="[% HTML.escape(vc) %]">
122 122
  <input type="hidden" name="lastmtime" id="lastmtime" value="[% HTML.escape(lastmtime) %]">
123
[%- FOREACH row = HIDDENS %]
124
   [% L.hidden_tag(row.name, row.value) %]
125
[%- END %]
126 123

  
127 124
  <p>
128 125
   <table width="100%">

Auch abrufbar als: Unified diff