BDVs für abweichende Lieferadresse auch in Verkaufsrechnungen anzeigen
authorJan Büren <jan@kivitendo.de>
Thu, 18 Oct 2018 07:44:06 +0000 (09:44 +0200)
committerJan Büren <jan@kivitendo.de>
Thu, 18 Oct 2018 07:50:06 +0000 (09:50 +0200)
bin/mozilla/is.pl
templates/webpages/is/form_footer.html

index 15105d3..a9e2963 100644 (file)
@@ -615,6 +615,12 @@ sub form_footer {
 
   $form->{ALL_DELIVERY_TERMS} = SL::DB::Manager::DeliveryTerm->get_all_sorted();
 
+  my $shipto_cvars       = SL::DB::Shipto->new->cvars_by_config;
+  foreach my $var (@{ $shipto_cvars }) {
+    my $name = "shiptocvar_" . $var->config->name;
+    $var->value($form->{$name}) if exists $form->{$name};
+  }
+
   print $form->parse_html_template('is/form_footer', {
     is_type_credit_note => ($form->{type} eq "credit_note"),
     totalpaid           => $totalpaid,
@@ -626,6 +632,7 @@ sub form_footer {
                              : ($::instance_conf->get_is_changeable == 1),
     today               => DateTime->today,
     vc_obj              => $form->{customer_id} ? SL::DB::Customer->load_cached($form->{customer_id}) : undef,
+    shipto_cvars        => $shipto_cvars,
   });
 ##print $form->parse_html_template('is/_payments'); # parser
 ##print $form->parse_html_template('webdav/_list'); # parser
index 23646f1..c5bb70c 100644 (file)
 <input type="hidden" name="gldate" value="[% gldate %]">
 
 <div id="shipto_inputs" class="hidden">
- [%- PROCESS 'common/_ship_to_dialog.html' %]
+ [%- PROCESS 'common/_ship_to_dialog.html' cvars=shipto_cvars %]
 </div>
 
 <div id="email_inputs" style="display: none"></div>