<!-- BEGIN {$smarty.template} -->

<form action="{$FORM_ACTION}" method="post">

  <fieldset class="search">
    <legend>{t}Search quotations{/t}</legend>

    <label for="quot_number">{t}Quotation nr.{/t}:</label>
    <input type="text" class="tinput" id="quot_number" name="quot_number" value="{$quotInfo.quot_number|wash}" size="10" maxlength="10">
    <br>

    <label for="cpn_id">{t}Recipient (company){/t}:</label>
      <select id="cpn_id" name="cpn_id">
        {html_options options=$select_cpn selected=$quotInfo.cpn_id}
      </select>
    <br>

    <label for="quot_datefrom">{t}Between{/t}:</label>
    <input type="text" class="tinput format-y-m-d divider-dash no-transparency" id="quot_datefrom" name="quot_datefrom" value="{$quotInfo.quot_datefrom|wash}" size="10" maxlength="10" title="yyyy-mm-dd">
    <br>

    <label for="quot_dateto">{t}And{/t}:</label>
    <input type="text" class="tinput format-y-m-d divider-dash no-transparency" id="quot_dateto" name="quot_dateto" value="{$quotInfo.quot_dateto|wash}" size="10" maxlength="10" title="yyyy-mm-dd">
    <br>

    <input type="submit" name="submit" value="{t}Search{/t}">
  </fieldset>
</form>

<table class="stdtable" cellspacing="0">
<caption><em>{t}Quotations{/t}</em>
  {if $perm_quotations}[ <a href="add_quotation.php">{t}Create quotation{/t}</a> ]{else}&nbsp;{/if}
  </caption>
  {if (count($rows) > 0)}
  <tr>
    <th class="number"> {t}Quotation nr.{/t} </th>
    <th class="time"> {t}Quotation date{/t} </th>
    <th> {t}Recipient (company){/t} </th>
    <th> {t}Actions{/t} </th>
  </tr>
  {section name=quotations loop=$rows}
  <tr class="{cycle values="odd,even"}">
    <td class="number"> <a href="quotation.php?id={$rows[quotations].quot_id}">{$rows[quotations].quot_number|wash}</a> </td>
    <td class="time"> <a href="quotation.php?id={$rows[quotations].quot_id}">{$rows[quotations].quot_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT}</a> </td>
    <td class="last"> <a href="company.php?id={$rows[quotations].cpn_id}">{$rows[quotations].cpn_name|wash}</a> </td>
    <td class="actions"><a href="quotation.php?id={$rows[quotations].quot_id}"><img src="img/phpaga/view.png" height="16" width="16" border="0" alt="{t}View{/t}" title="{t}View{/t}"></a></td>
  </tr>
  {/section}
  {else}
  <tr>
    <td class="last" colspan="4"> {t}No quotations matching your search criteria were found.{/t} </td>
  </tr>
  {/if}
  {if strlen($BROWSE)}
  <tr>
    <td class="browse" colspan="4"> {$BROWSE} </td>
  </tr>
  {/if}
</table>

<!-- END {$smarty.template} -->
