<table class="window">
	<tr>
		<td>
			<div class="frame_center" align="center">
				<h1>{{@page_data.title}}</h1>
				<form name="receipt_correction_form" method="POST" action="/receipts/correction">
					<table>
						<tr class="{{count(@fr_settings['sno_types'])<=1?'hide':''}}">
							<td>
								<select name="sno">
									<repeat group="{{@fr_settings['sno_types']}}" value="{{@sno_type}}">
										<check if="{{@sno[@sno_type]}}">
									<option value="{{@sno_type}}" {{@sno_type==@sno_select?'selected="selected"':''}}>{{@sno[@sno_type]}}</option>
										</check>
									</repeat>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<p>Тип операции</p>
								<select name="operation">
									<option value="1">Приход</option>
									<option value="3">Расход</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<select name="psr">
									<option value="cash">Наличные</option>
									<option value="emoney">Безналичные</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<select name="taxNum">
									<option value="5">БЕЗ НДС</option>
									<option value="4">НДС 0%</option>
									<option value="11">НДС 22% (Выделить)</option>
									<option value="0">НДС 20% (Выделить)</option>
									<option value="1">НДС 10% (Выделить)</option>
									<option value="8">НДС 7% (Выделить)</option>
									<option value="7">НДС 5% (Выделить)</option>
									<option value="12">НДС 22% (Начислить)</option>
									<option value="2">НДС 20% (Начислить)</option>
									<option value="3">НДС 10% (Начислить)</option>
									<option value="10">НДС 7% (Начислить)</option>
									<option value="9">НДС 5% (Начислить)</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<input type="text" inputmode="numeric" min="0" step="0.01" name="sum" class="sum mixed_pay mixed_pay_1" pid="1" value="" placeholder="Сумма коррекции" autocomplete="off" pattern="\d+(\.\d{2})?">
							</td>
						</tr>
						<tr>
							<td>
								<p>Тип корреции</p>
								<select name="corrType">
									<option value="1">По предписанию</option>
									<option value="0">Самостоятельно</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>
								<input type="text" inputmode="numeric" min="0" step="1" name="docNum" class="docNum mixed_pay mixed_pay_2" pid="2" value="" placeholder="Номер документа основания" autocomplete="off" pattern="\d+(\.\d{2})?">
							</td>
						</tr>
						<tr>
							<td>
								<input type="text" name="docDate" value="" autocomplete="off" placeholder="Дата документа основания">
							</td>
						</tr>
						<tr class="add_description">
							<td>
								<input type="text" name="description" class="description" placeholder="Основание коррекции" autocomplete="off">
								<check if="{{@base_settings.virtual_keyboard==1}}">
								<div class="virtual_keyboard virtual_keyboard_hide virtual_keyboard_add_description full_keyboard">
									{~@keys='1234567890-+|QWERTYUIOP_|ASDFGHJKL@|ZXCVBNM'~}
									<div class="eng">
									<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
										<check if="{{@keys[@i]=='|'}}">
											<true>
										<br>
											</true>
											<false>
										<input type="button" class="virtual_key" value="{{@keys[@i]}}" for="description">
											</false>
										</check>
									</loop>
										<button type="button" class="virtual_key_bks" for='description'>
											<i class="fas fa-long-arrow-alt-left"></i>
										</button>
										<input type="button" class="virtual_key_delete" for='description' value="CE">
										<br>
										<input type="button" class="virtual_key_ru" value="RU">
										<input type="button" class="virtual_key virtual_key_space" for='description' value=" ">
										<input type="button" class="virtual_key" for='description' value=",">
										<input type="button" class="virtual_key" for='description' value=".">
										<input type="button" class="virtual_key virtual_key_ok" value="OK">
									</div>
									{~@keys='1234567890-+|ЙЦУКЕНГШЩЗХЪ|ФЫВАПРОЛДЖЭ_|ЯЧСМИТЬБЮ@'~}
									<div class="ru">
									<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
										{~@a=mb_substr(@keys, @i, 1)~}
										<check if="{{@a=='|'}}">
											<true>
										<br>
											</true>
											<false>
										<input type="button" class="virtual_key" value="{{@a}}" for="description">
											</false>
										</check>
									</loop>
										<button type="button" class="virtual_key_bks" for='description'>
											<i class="fas fa-long-arrow-alt-left"></i>
										</button>
										<input type="button" class="virtual_key_delete" for='description' value="CE">
										<br>
										<input type="button" class="virtual_key_eng" value="ENG">
										<input type="button" class="virtual_key virtual_key_space" for='description' value=" ">
										<input type="button" class="virtual_key" for='description' value=",">
										<input type="button" class="virtual_key" for='description' value=".">
										<input type="button" class="virtual_key virtual_key_ok" value="OK">
									</div>
								</div>
								</check>
							</td>
						</tr>
						<tr>
							<td align="center">
								<div class="virtual_keyboard">
									<input type="button" class="virtual_key" value='7' for='sum'>
									<input type="button" class="virtual_key" value='8' for='sum'>
									<input type="button" class="virtual_key" value='9' for='sum'>
									<input type="submit" class="virtual_key_total" value="Готово">
									<br>
									<input type="button" class="virtual_key" value='4' for='sum'>
									<input type="button" class="virtual_key" value='5' for='sum'>
									<input type="button" class="virtual_key" value='6' for='sum'>
									<br>
									<input type="button" class="virtual_key" value='1' for='sum'>
									<input type="button" class="virtual_key" value='2' for='sum'>
									<input type="button" class="virtual_key" value='3' for='sum'>
									<br>
									<input type="button" class="virtual_key_delete" for='sum' value="CE">
									<input type="button" class="virtual_key" value='0' for='sum'>
									<input type="button" class="virtual_key" value='.' for='sum'>
									<button type="button" class="virtual_key_bks" for='sum'>
										<i class="fas fa-long-arrow-alt-left"></i>
									</button>
								</div>
							</td>
						</tr>
					</table>
				</form>
			</div>
		</td>
	</tr>
</table>
<script type="text/javascript" src="/ui/scripts/moment.min.js"></script>
<script type="text/javascript" src="/ui/scripts/daterangepicker.min.js"></script>
<link rel="stylesheet" type="text/css" href="/ui/css/daterangepicker.css" />
<script>
select_date($('input[name="docDate"]'));
</script>