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

{literal}
<script type="text/javascript">

function confirm_delete(quot_id)
{
if (window.confirm('{/literal}{t}Are you sure you want to delete this quotation?{/t} {$quotInfo.quot_number}/{$quotInfo.quot_date}  ({$quotInfo.quot_endsum|phpaga_formatamount} {$quotInfo.curr_name}){literal}')) {
location.href = 'quotation.php?id='+quot_id+'&action={/literal}{$smarty.const.ACTION_DELETE}{literal}';
}

}
</script>
{/literal}

{include file="quotation_print.tpl.html"}

<table class="stdtable" cellspacing="0">
  <tr>
    <td class="header" colspan="3"> {t}Quotation{/t} {$quotInfo.quot_number|wash}/{$quotInfo.quot_date|wash} </td>
    <td class="headeraction">
      {if $perm_quotations}
      [ <a class="ptr" onclick="confirm_delete({$quotInfo.quot_id});">{t}Delete{/t}</a> |
      <a href="add_quotation.php?id={$quotInfo.quot_id}&amp;action={$smarty.const.ACTION_CLONE}">{t}Clone{/t}</a> |
      <a href="add_bill.php?id={$quotInfo.quot_id}&amp;action={$smarty.const.ACTION_FROMQUOTATION}">{t}Create invoice{/t}</a> |
      <a href="add_project.php?id={$quotInfo.quot_id}&amp;action={$smarty.const.ACTION_FROMQUOTATION}">{t}Create project{/t}</a> |
      {/if}
      <a class="ptr" onclick="showElement('printbill');">{t}Export PDF{/t}</a> ]
    </td>
  </tr>
  <tr>
    <td class="label">{t}Quotation nr.{/t}: </td>
    <td class="data"> {$quotInfo.quot_number|wash} </td>
    <td class="label"> {t}Quotation date{/t}: </td>
    <td class="data"> {$quotInfo.quot_date|wash|date_format:$smarty.const.PHPAGA_DATEFORMAT_SHORT} </td>
  </tr>
  <tr>
    <td class="label"> {t}Quotation type{/t}: </td>
    <td class="data"> {$quotInfo.bmt_description|wash} </td>
    <td class="label"> {t}Term of payment{/t}: </td>
    <td class="data"> {$quotInfo.quot_payterm|wash|default:"&nbsp;"} </td>
  </tr>
  <tr>
    <td class="label">{t}Company{/t}: </td>
    <td colspan="3" class="data">{$quotInfo.cpn_name|wash}</td>
  </tr>
  <tr>
    <td class="label last">{t}Details{/t}: </td>
    <td colspan="3">
      <table class="billdetailstable" cellspacing="0">
	{section name=details loop=$quotInfo.quot_details}
	<tr>
	  {if $quotInfo.quot_details[details].text eq ""}
	  <td nowrap class="btext">&nbsp;</td>
	  {else}
	  <td class="bdesc"> {$quotInfo.quot_details[details].text|wash} </td>
	  {/if}
	  {if $quotInfo.quot_details[details].amount eq ""}
	  <td nowrap class="bamount">&nbsp;</td>
	  {else}
	  <td class="bnumber"> {$quotInfo.quot_details[details].amount} </td>
	  {/if}
	</tr>
	{/section}
      </table>
    </td>
  </tr>
  <tr>
    <td colspan="4" class="section">{t}Line items{/t} </td>
  </tr>
  <tr>
    <td colspan="4">
      <table class="substdtable" cellspacing="0" width="100%">
        <tr>
          <th> {t}Product code{/t} </th>
          <th> {t}Description{/t} </th>
          <th class="time"> {t}Qty./Hours{/t} </th>
          <th class="number"> {t}Net price{/t} </th>
        </tr>
        {section name=lit loop=$quotInfo.lineitems}
        <tr class="{cycle values="odd,even"}">
          <td> {$quotInfo.lineitems[lit].lit_prodcode|default:"&nbsp;"} </td>
          <td class="datawrap"> {$quotInfo.lineitems[lit].lit_desc|wash|nl2br|default:"&nbsp;"} </td>
          <td class="time"> {$quotInfo.lineitems[lit].lit_qty|wash|default:"&nbsp;"} </td>
          <td class="number lr"> {$quotInfo.lineitems[lit].lit_netprice|wash|phpaga_formatamount|default:"&nbsp;"} </td>
        </tr>
      {/section}
      </table>
    </td>
  </tr>
</table>

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