{$restrictive_sensitive_data_access = ConfigHelper::checkConfig('customers.restrictive_sensitive_data_access')} {$unsecure_pin_validity = intval(ConfigHelper::getConfig('customers.unsecure_pin_validity', ConfigHelper::getConfig('phpui.unsecure_pin_validity', 0, true), true))} {$pin_tip = ConfigHelper::getConfig('customers.pin_restriction_description', ConfigHelper::getConfig('phpui.pin_restriction_description'))} {if !empty($unsecure_pin_validity)} {$pin_tip = ConfigHelper::getConfig('customers.unsecure_pin_restriction_description', $pin_tip)} {/if} {if !$pin_tip} {if empty($unsecure_pin_validity)} {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} {else} {if $unsecure_pin_min_size == $unsecure_pin_max_size} {$pin_tip = trans("Enter \$a characters PIN code", $unsecure_pin_min_size)} {else} {$pin_tip = trans("Enter \$a to \$b characters PIN code", $unsecure_pin_min_size, $unsecure_pin_max_size)} {/if} {/if} {/if} {if !empty($unsecure_pin_validity)} {capture assign="pin_tip"}{strip} {$pin_tip}

{trans("If you leave this field empty, then PIN will not change!")} {/strip}{/capture} {/if} {include file="customer/customercompanyselectiondialog.html"}
{hint content="Enter first/lastname of customer"}
{hint content="Enter first name of customer (optional)"}
{hint content="Enter customer identifier in external system (optional)"}
{hint content="Customer Alternative name (brand, shortname, casual name)"}
{block name="customereditbox-leftcolumn"} {if $divisions} {/if} {$addr_counter = 0} {foreach $customerinfo.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=$customerinfo formelemprefix="customerdata"} {/block}
{icon name="origin" class="fa-fw"}
{hint content="Select legal personality type"}
{foreach $customerinfo.addresses as $v} {if $v.location_address_type == $smarty.const.BILLING_ADDRESS} {$v.prefix = "customerdata[addresses]["|cat:$addr_counter|cat:"]"} {$addr_counter = $addr_counter + 1} {$v.hide_name=true} {location_box_expandable data=$v} {/if} {/foreach}
{$postal_addr = 0} {foreach $customerinfo.addresses as $v} {if $v.location_address_type == $smarty.const.POSTAL_ADDRESS} {$v.prefix = "customerdata[addresses]["|cat:$addr_counter|cat:"]"} {$addr_counter = $addr_counter + 1} {$postal_addr = 1} {location_box_expandable data=$v} {/if} {/foreach} {* if postal address is not set *} {if $postal_addr == 0} {$tmp['location_address_type'] = $smarty.const.POSTAL_ADDRESS} {$tmp['prefix'] = "customerdata[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 = "customerdata[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="customerdata"}
{button type="link" icon="next" id="randomize" tip="Generate PIN"} {hint text=$pin_tip}
{icon name="user-id-number"}
{if !ConfigHelper::checkPrivilege('hide_customer_sensitive_data', !$restrictive_sensitive_data_access)} {/if}
{trans("Identity document")}
{trans("SSN")} {if ConfigHelper::checkPrivilege('customer_sensitive_data_view', !$restrictive_sensitive_data_access)} {$ssn = $customerinfo.ssn} {$disabled = false} {else} {$ssn = preg_replace('/[^\s]/', '*', $customerinfo.ssn)} {$disabled = true} {/if} {if $customerinfo.ssnwarning} {/if} {if $customerinfo.ssnexistencewarning} {/if}
{trans("TEN")} {if $customerinfo.tenwarning} {/if} {if $customerinfo.tenexistencewarning} {/if} {button type="link" icon="division" class="gusapi-button" data_type=Utils::GUS_REGON_API_SEARCH_TYPE_TEN tip="Click here to autocomplete company data from GUS REGON database"}
{trans("REGON")} {button type="link" icon="division" class="gusapi-button" data_type=Utils::GUS_REGON_API_SEARCH_TYPE_REGON tip="Click here to autocomplete company data from GUS REGON database"}
{icon name="user-id-number"}
{trans("Business register")}
{trans("Deadline")}
{hint content="Select default deadline in days"}
{trans("Payment type")}
{paytypes elemname="customerdata[paytype]" selected=$customerinfo.paytype trigger="paytype"} {hint content="Select default invoices payment type"}
{trans("Cutoff suspending")}
 
{day_selection elem="#cutoffstop" days="3,7,10,14"}
{hint content="Select date of cutoff suspending (optional)"}
{include file="customer/customerconsents.html" variable_prefix="customerdata" variables=$customerinfo}
{block name="customereditbox-rightcolumn"} {/block}
{hint content="Enter additional information (optional)"}
{hint content="Enter notice contents (optional)"}
{hint content="Enter notes (optional)"}
{hint content="Enter document memo (optional)"}
{trans("Balance")} {if $customerinfo.balance < 0} {moneyf($customerinfo.balance)} {else} {moneyf($customerinfo.balance)} {/if}
{trans("Created")} {$customerinfo.createdby|escape}, {$customerinfo.creationdateh}
{trans("Modified")} {if $customerinfo.moddate}{$customerinfo.modifiedby|escape}, {$customerinfo.moddateh}{else}-{/if}
{button type="submit" id="save-button" icon="save" label="Submit"} {button id="cancel-button" icon="cancel" label="Cancel" onclick="location.href = '{$backurl}';"}
{if !ConfigHelper::checkPrivilege('customer_sensitive_data_view', !$restrictive_sensitive_data_access) && !ConfigHelper::checkPrivilege('hide_customer_sensitive_data', !$restrictive_sensitive_data_access)}
{button icon="sensitive-data" label="Show sensitive data" id="customer-sensitive-data-button"}
{/if}