ActionBar: Verkaufsrechnungen: Lieferadresse via Popup bearbeiten
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 5 Jan 2017 12:57:59 +0000 (13:57 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 28 Feb 2017 09:43:58 +0000 (10:43 +0100)
bin/mozilla/is.pl
templates/webpages/is/form_footer.html
templates/webpages/is/form_header.html

index 21e35c0..208da11 100644 (file)
@@ -461,15 +461,12 @@ sub form_header {
   $TMPL_VAR{dateformat}          = $myconfig{dateformat};
   $TMPL_VAR{numberformat}        = $myconfig{numberformat};
 
-  push @custom_hiddens, map { "shiptocvar_" . $_->name } @{ SL::DB::Manager::CustomVariableConfig->get_all(where => [ module => 'ShipTo' ]) };
-
   # hiddens
   $TMPL_VAR{HIDDENS} = [qw(
     id type media format queued printed emailed title vc discount
     title creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id
     max_dunning_level dunning_amount dunning_description
-    shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax
-    shiptoemail shiptodepartment_1 shiptodepartment_2  shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus
+    message email subject cc bcc taxaccounts cursor_fokus
     convert_from_do_ids convert_from_oe_ids convert_from_ar_ids useasnew
     invoice_id
     show_details
@@ -611,6 +608,7 @@ sub form_footer {
                              ? ($form->current_date(\%myconfig) eq $form->{gldate})
                              : ($::instance_conf->get_is_changeable == 1),
     today               => DateTime->today,
+    vc_obj              => $form->{customer_id} ? SL::DB::Customer->load_cached($form->{customer_id}) : undef,
   });
 ##print $form->parse_html_template('is/_payments'); # parser
 ##print $form->parse_html_template('webdav/_list'); # parser
index f06cc2d..56b3965 100644 (file)
 [% P.hidden_tag('draft_description', draft_description) %]
 <input type="hidden" name="customer_discount" value="[% customer_discount %]">
 <input type="hidden" name="gldate" value="[% gldate %]">
+
+<div id="shipto_inputs" class="hidden">
+ [%- PROCESS 'common/_ship_to_dialog.html' %]
+</div>
 </form>
 <script type='text/javascript'>
  $(kivi.SalesPurchase.init_on_submit_checks);
 </script>
+
+<div id="shipto_dialog" class="hidden"></div>
index 18d6fb5..6eabc1a 100644 (file)
           </td>
         </tr>
 [%- END %]
-[%- IF ALL_SHIPTO.size %]
         <tr>
           <th align="right">[% 'Shipping Address' | $T8 %]</th>
           <td>
+           [%- IF ALL_SHIPTO.size %]
             [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
                L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
-            <input class="submit" type="submit" name="action_ship_to" value="[% 'Ship to' | $T8 %]">
+           [%- END %]
+           [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
           </td>
         </tr>
-[%- END %]
         <tr>
           <td align="right">[% 'Credit Limit' | $T8 %]</td>
           <td>