<table class="window">
  <tr>
    <td>
      <div class="frame_center">
        <h1>{{@page_data.title}}</h1>
        <h2>{{@receipt_types[@receipt['type']]}} № {{@receipt['id']}} от {{date('d.m.Y H:i:s', @receipt['time'])}}</h2>
        <form name="receipts_coorect1_form" action="receipts/correct1" method="POST">
          <input type="hidden" name="id" value="{{@receipt['id']}}">
          <input type="hidden" name="fpd" class="fpd" value="{{@receipt['fp']}}">
          <p>
            Шаг 1. Сформируйте {{@reverse_receipt[@receipt['type']]}}
          </p>
          <table width="100%">
            <check if="{{@fr_settings.version!='1.05'}}">
            <tr>
              <td>
                <b>Тип коррекции</b>*
              </td>
              <td align="right">
                <select name="correct_type">
                  <option value="0">Самостоятельно</option>
                  <option value="1">По предписанию</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>
                Дата <span class="correct_type_1 hide">документа основания коррекции</span><span class="correct_type_0">первоначального рассчета</span>
              </td>
              <td align="right">
                <input type="text" name="osn_date" autocomplete="off" value="{{date('d.m.Y', @receipt['time'])}}">
              </td>
            </tr>
            <tr class="correct_type_1 hide">
              <td>
                Номер документа основания коррекции
              </td>
              <td align="right">
                <input type="text" name="osn_number" class="osn_number">
              </td>
            </tr>
            <tr class="correct_type_1 hide">
              <td colspan="2" align="center">
                <div class="virtual_keyboard">
                  <input type="button" class="virtual_key" value='7' for='osn_number'>
                  <input type="button" class="virtual_key" value='8' for='osn_number'>
                  <input type="button" class="virtual_key" value='9' for='osn_number'>
                  <br>
                  <input type="button" class="virtual_key" value='4' for='osn_number'>
                  <input type="button" class="virtual_key" value='5' for='osn_number'>
                  <input type="button" class="virtual_key" value='6' for='osn_number'>
                  <br>
                  <input type="button" class="virtual_key" value='1' for='osn_number'>
                  <input type="button" class="virtual_key" value='2' for='osn_number'>
                  <input type="button" class="virtual_key" value='3' for='osn_number'>
                  <br>
                  <input type="button" class="virtual_key virtual_key_delete" for='osn_number' value="CE">
                  <input type="button" class="virtual_key" value='0' for='osn_number'>
                  <button type="button" class="virtual_key_bks" for='osn_number'>
                    <i class="fas fa-long-arrow-alt-left"></i>
                  </button>
                </div>
              </td>
            </tr>
            </check>
            <tr>
              <td colspan="2" align="center">
                <input type="submit" value="Сформировать" />
              </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="osn_date"]'));
</script>
<script type="text/javascript" src="/ui/scripts/rooms.js?v={{@site_version}}"></script>