{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content} {$pin_tip = ConfigHelper::getConfig('phpui.pin_restriction_description')} {if !$pin_tip} {if $pin_min_size == $pin_max_size} {$pin_tip=trans("Enter \$a characters PIN code", $pin_min_size)} {else} {$pin_tip=trans("Enter \$a to \$b characters PIN code", $pin_min_size, $pin_max_size)} {/if} {/if}

{$layout.pagetitle}

{block name="customeradd-leftcolumn"} {if $divisions} {/if} {if $groups} {/if} {$addr_counter = 0} {foreach $customeradd.addresses as $v} {if $v.location_address_type != $smarty.const.BILLING_ADDRESS && $v.location_address_type != $smarty.const.POSTAL_ADDRESS } {/if} {/foreach} {include file="customer/customercontacts.html" customerinfo=$customeradd formelemprefix="customeradd"} {/block}
{$addr_found = 0} {foreach $customeradd.addresses as $v} {if $v.location_address_type == $smarty.const.BILLING_ADDRESS} {$v.prefix = "customeradd[addresses]["|cat:$addr_counter|cat:"]"} {$addr_counter = $addr_counter + 1} {$addr_found = 1} {$v.hide_name=true} {location_box_expandable data=$v} {/if} {/foreach} {* if billing address is not set *} {if $addr_found == 0} {$tmp['location_address_type'] = $smarty.const.BILLING_ADDRESS} {$tmp['prefix'] = "customeradd[addresses]["|cat:$addr_counter|cat:"]"} {$tmp['location_zip'] = ConfigHelper::getConfig('phpui.default_zip')} {$tmp['location_city_name'] = ConfigHelper::getConfig('phpui.default_city')} {$tmp['location_state'] = ConfigHelper::getConfig('phpui.default_stateid')} {$tmp['location_country_id'] = ConfigHelper::getConfig('phpui.default_countryid')} {$tmp['show'] = true} {$addr_counter = $addr_counter + 1} {$tmp.hide_name=true} {location_box_expandable data=$tmp} {$tmp = array()} {/if}
{$addr_found = 0} {foreach $customeradd.addresses as $v} {if $v.location_address_type == $smarty.const.POSTAL_ADDRESS} {$v.prefix = "customeradd[addresses]["|cat:$addr_counter|cat:"]"} {$addr_counter = $addr_counter + 1} {$addr_found = 1} {location_box_expandable data=$v} {/if} {/foreach} {* if postal address is not set*} {if $addr_found == 0} {$tmp['location_address_type'] = $smarty.const.POSTAL_ADDRESS} {$tmp['prefix'] = "customeradd[addresses]["|cat:$addr_counter|cat:"]"} {$addr_counter = $addr_counter + 1} {location_box_expandable data=$tmp} {/if}
{if $v.location_address_type == $smarty.const.DEFAULT_LOCATION_ADDRESS} {else} {/if} {$v.prefix = "customeradd[addresses]["|cat:$addr_counter|cat:"]"} {$address_idx = $addr_counter} {$v.default_type = 1} {$v.delete_button = 1} {$v.billing_address_button = 1} {$v.post_address_button = 1} {$addr_counter = $addr_counter + 1} {location_box_expandable data=$v}
{button class="lms-ui-location-add-button" icon="add" label="Add address" data_prefix="customeradd"}
  »»»
{trans("ICN")}: {if $customeradd.icnwarning} {/if}
{trans("SSN")}: {if $customeradd.ssnwarning} {/if} {if $customeradd.ssnexistencewarning} {/if}
{trans("TEN")}: {if $customeradd.tenwarning} {/if} {if $customeradd.tenexistencewarning} {/if} »»»
{trans("REGON")}: »»»
{trans("RBE Name:")}
{trans("RBE")}: »»»
{trans("Deadline:")}
{trans("Payment type:")}
{trans("Cutoff suspending:")}  
{block name="customeradd-options"} {foreach $_CCONSENTS as $type => $consent} {/foreach} {/block}
{trans("Consents:")}
{block name="customeradd-rightcolumn"} {/block}
{button type="submit" id="save-button" icon="save" label="Submit"} {button id="cancel-button" icon="cancel" label="Cancel" onclick="location.href = '?m=customerlist';"}
{/block}