<div class="content2">
<h1>{{@page_data.title}}</h1>
<check if="{{@data['GetDayState']==1}}">
<p class="false">Регистрация / перерегистрация невозможна. Необходимо закрыть смену.</p>
</check>
<check if="{{@data['fn_status']==7}}">
<p class="false">Регистрация / перерегистрация невозможна. Архив ФН закрыт.</p>
</check>
<check if="{{!@ofd_data['GetOfdName']}}">
<p class="false">Регистрация невозможна. Настройте ОФД.</p>
</check>
<form name="settings_kkm_registration_form" action="/settings/kkm_registration" method="POST">
	<table>
		<tr>
			<td>
				Версия ФФД
			</td>
			<td>
				<select name="ffd" data-ffd="{{@ffd_version[@data['GetCurrentFfdVersion']]}}">
					<repeat group="{{@ffd_version}}" key="{{@n}}" value="{{@ffd}}">
					<option value="{{@ffd}}" {{@data['GetCurrentFfdVersion']==@n?'selected="selected"':''}}>{{@ffd}}</option>
					</repeat>
				</select>
			</td>
		</tr>
		<tr>
			<td>
				Наименование организации
			</td>
			<td>
				<input type="text" name="orgname" value="{{@data['GetOrgName']}}">
			</td>
		</tr>
		<tr>
			<td>
				ИНН организации
			</td>
			<td>
				<input type="text" name="taxid" value="{{@data['GetTaxId']}}">
			</td>
		</tr>
		<tr>
			<td>
				Адрес расчетов
			</td>
			<td>
				<input type="text" name="orgaddress" value="{{@data['GetOrgAddress']}}">
			</td>
		</tr>
		<tr>
			<td>
				Место расчетов
			</td>
			<td>
				<input type="text" name="physicaladdress" value="{{@data['GetPhysicalAddress']}}">
			</td>
		</tr>
		<tr>
			<td>
				Рег-ный номер ККТ
			</td>
			<td>
				<input type="text" name="regnum" value="{{@data['GetRegNum']}}">
			</td>
		</tr>

		<tr>
			<td>
				Номер автомата
			</td>
			<td>
				<input type="text" name="vendingserial" value="{{@data['GetVendingSerial']}}">
			</td>
		</tr>

		<tr>
			<td>
				Email отправителя чеков
			</td>
			<td>
				<input type="text" name="senderemail" value="{{@data['GetSenderEmail']}}">
			</td>
		</tr>
		<tr>
			<td>
				Сайт налогоого органа
			</td>
			<td>
				<input type="text" name="fnsserver" value="{{@data['GetFNSServerAddress']}}">
			</td>
		</tr>

		<tr>
			<th align="center" colspan="2">
				Система налогообложения
			</th>
		</tr>
		<repeat group="{{@sno}}" key="{{@n}}" value="{{@s}}">
		<tr>
			<td>
				{{@s}}
			</td>
			<td>
				<div class="switch right">
		  			<input type="checkbox" name="sno[{{@n}}]" value="1" {{@data['Taxation'][@n]==1?'checked="checked"':''}}>
				</div>
			</td>
		</tr>
		</repeat>
		<tr>
			<th align="center" colspan="2">
				Режим работы
			</th>
		</tr>
		<repeat group="{{@op_mode}}" key="{{@n}}" value="{{@mode}}">
		<tr>
			<td>
				{{@mode}}
			</td>
			<td>
				<div class="switch right">
		  			<input type="checkbox" name="op_mode[{{@n}}]" value="1" {{@data['OpMode'][@n]==1?'checked="checked"':''}}>
				</div>
			</td>
		</tr>
		</repeat>
		<repeat group="{{@reg_data}}" key="{{@n}}" value="{{@d}}">
		<tr class="why why_{{str_replace('.', '_', implode(' why_', @d['ffd']))}}">
			<td>
				{{@d['title']}}
			</td>
			<td>
				<div class="switch right">
		  			<input type="checkbox" name="reg_data[{{@n}}]" value="1" {{@data['RegData'][@n]==1?'checked="checked"':''}}>
				</div>
			</td>
		</tr>
		</repeat>
		<tr class="why why_1_05 why_1_1">
			<th align="center" colspan="2">
				Признак агента
			</th>
		</tr>
		<repeat group="{{@agent_tag}}" key="{{@n}}" value="{{@tag}}">
		<tr class="why why_1_05 why_1_1">
			<td>
				{{@tag}}
			</td>
			<td>
				<div class="switch right">
		  			<input type="checkbox" name="agent_tag[{{@n}}]" value="1" {{@data['AgentTag'][@n]==1?'checked="checked"':''}}>
				</div>
			</td>
		</tr>
		</repeat>

		<tr>
			<td>
				Имя и номер кассира
			</td>
			<td>
				<input type="text" name="username" value="{{@data['GetUserName']}}">
			</td>
		</tr>
		<tr>
			<td>
				ИНН кассира
			</td>
			<td>
				<input type="text" name="cashiertaxid" value="{{@data['GetCashierTaxId']}}">
			</td>
		</tr>

		<check if="{{@data['fn_status']!=1}}">
		<tr>
			<th align="center" colspan="2">
				Причины регистрации / перерегистрации
			</th>
		</tr>
		<tr class="why why_1_05">
			<td colspan="2">
				<select name="why[1.05]" style="width: 100%;">
			<repeat group="{{@why_105}}" key="{{@n}}" value="{{@value}}">
					<option value="{{@n}}">{{@value}}</option>
			</repeat>
				</select>
			</td>
		</tr>
			<repeat group="{{@why_12}}" key="{{@n}}" value="{{@value}}">
		<tr class="why why_1_1 why_1_2">
			<td>
				{{@value}}
			</td>
			<td>
				<div class="switch right">
		  			<input type="checkbox" name="why[1.2][{{@n}}]" value="1" {{isset(@because_12[@n])?' data-because="'.@because_12[@n].'" disabled':''}}>
				</div>
			</td>
		</tr>
			</repeat>
		</check>

		<tr>
			<td align="center" colspan="2">
				<input type="submit" value="Сохранить" {{@data['GetDayState']==1 || @data['fn_status']==7 || !@ofd_data['GetOfdName']?'disabled="true"':''}}>
			</td>
		</tr>
	</table>
</form>
</div>