{extends "../window.tpl"}

{block tabs}
	{windowTab id='flapVat'}
{/block}

{block tabsContent}
   <div id="flapVat" class="tab-pane fade active in boxStatic">
           <div class="form-group">
               <div class=" col-md-2 control-label"><label>{'description'|translate}</label></div>
               <div class="col-md-10">
                   <input type="text" class="form-control input-sm" name="data[descr]" size="30" maxlength="50" value="{$body.data.descr}" />
               </div>
           </div>
            <div class="form-group">
               <div class="col-md-2 control-label"><label>{'tax'|translate}</label></div>
               <div class="col-md-2 control-label text-left">
                  {if $body.acn == 'add'}
                     <div class="input-group">
                      <input type="text" class="form-control input-sm" name="data[vat]" size="3" maxlength="10" value="{$body.data.vat}"
                             onKeyPress="checkInputData('float');" /><span class="input-group-addon">%</span>
                     </div>
                  {else}
                     <label><strong>{$body.data.vat} %</strong></label>
                      <input type="hidden" name="data[vat]" value="{$body.data.vat}">
                  {/if}
               </div>
           </div>
            {block tax}

            {/block}
            <div class="form-group">
               <div class="col-md-2 control-label"><label>{'priority'|translate}</label></div>
                <div class="col-md-3">
                  <div class="radio">
                   <input type="radio" name="data[is_default]" id="d1" class="check" value="Y" {if $body.data.is_default =="Y"}checked{/if}/>
                   <label for="d1">{'priorityMain'|translate}</label>
                   </div>
                   <div class="radio">
                   <input type="radio" name="data[is_default]" id="d2" class="check" value="N" {if $body.data.is_default =="N"}checked{/if}/>
                   <label for="d2">{'priorityOther'|translate}</label>
                   </div>
               </div>
           </div>
      {ifmodule OSS_VATS}
      {get_contexts country=1 assign="contexts"}
      {$allCountries = $contexts.country->getAll()}
         <div class="form-group">
            <div class=" col-md-2 control-label"><label>{'country'|translate:'orders'}</label></div>
            <div class="col-md-4">
               <select name="data[id_country]" class="selecter" data-placeholder="{'selectCountry'|translate:'orders'}">
                  <option value="">-</option>
                  {foreach $allCountries as $country}
                     <option
                           value="{$country->getId()}" {if $country->getId() == $body.data.id_country} selected{/if}>{$country->getName()}</option>
                  {/foreach}
               </select>
            </div>
         </div>
      {/ifmodule}
         <div class="form-group">
            <div class=" col-md-2 control-label"><label>{'level'|translate}</label></div>
            <div class="col-md-4">
               <select name="data[data][level]" class="selecter" data-default-level="{$body.data.data.defaultLevel}">
                  <option value="">-</option>
                  <option value="high" {if 'high' == $body.data.data.level} selected{/if}>{'level_high'|translate}</option>
                  <option value="low" {if 'low' == $body.data.data.level} selected{/if}>{'level_low'|translate}</option>
                  <option value="low2" {if 'low2' == $body.data.data.level} selected{/if}>{'level_low2'|translate}</option>
                  <option value="none" {if 'none' == $body.data.data.level} selected{/if}>{'level_none'|translate}</option>
               </select>
            </div>
         </div>
   </div>
{/block}
