<div class="content2">
<h1>{{@page_data.title}}</h1>
<form name="ttnact" action="/egais/ttnact" method="POST">
	<table width="100%">
		<tr>
			<td>
				Рег. номер ТТН*
			</td>
			<td align="right">
				<input type="text" name="WBRegId" value="{{@ttn['regid']}}" required="true">
				<check if="{{!@ttn['regid']}}">
				<br><small class="false">Не удалось узнать регистрационный номер ТТН</small>
				</check>
			</td>
		</tr>
		<tr>
			<td>
				Действие
			</td>
			<td align="right">
				<select name="IsAccept">
					<option value="Accepted" {{@GET.accept=='accepted'?'selected="selected"':''}}>Принять полностью</option>
					<option value="Differences" {{@GET.accept=='differences'?'selected="selected"':''}}>Принять с разногласиями</option>
					<option value="Rejected" {{@GET.accept=='rejected'?'selected="selected"':''}}>Отказать</option>
				</select>
			</td>
		</tr>
		<repeat group="{{@ttn['products']}}" value="{{@product}}">
		<tr class="ttn_position ttn_position_Differences" style="display: {{@GET.accept=='differences'?'table-row':'none'}}">
			<td colspan="2" align="center">
				<b>{{@product['FullName']}}</b>
			</td>
		</tr>
		<tr class="ttn_position ttn_position_Differences" style="display: {{@GET.accept=='differences'?'table-row':'none'}}">
			<td>
				Кол-во по факту*
			</td>
			<td align="right">
				<input type="hidden" name="position[{{@product['Identity']}}][Quantity]" value="{{@product['Quantity']}}">
				<input type="text" name="position[{{@product['Identity']}}][RealQuantity]" value="{{@product['Quantity']}}" required="true">
			</td>
		</tr>
		<tr class="ttn_position ttn_position_Differences" style="display: {{@GET.accept=='differences'?'table-row':'none'}}">
			<td>
				Рег. номер справки 2*
			</td>
			<td align="right">
				<input type="text" name="position[{{@product['Identity']}}][InformF2RegId]" value="{{@product['InformF2RegId']}}" required="true">
			</td>
		</tr>
			<check if="{{@product['MarkInfo']['amc'] && !empty(@product['MarkInfo']['amc'])}}">
		<tr class="ttn_position ttn_position_Differences" style="display: {{@GET.accept=='differences'?'table-row':'none'}}">
			<td colspan="2">
				<p>Укажите марки отсутствующей продукции. Каждая марка указывается с новой строки.</p>
				<textarea name="position[{{@product['Identity']}}][MarkCodeInfo]" class="">{{implode("\n", @product['MarkInfo']['amc'])}}</textarea>
			</td>
		</tr>
			</check>
		</repeat>
		<tr>
			<td colspan="2" align="center">
				* обязательное поле
			</td>
		</tr>
		<tr>
			<td align="center" colspan="2">
				<input type="submit" value="Отправить">
			</td>
		</tr>
	</table>
</form>
</div>