$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
? ($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
[% 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>
</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>