SaleOrder_print.pt 6.05 KB
Newer Older
Jean-Paul Smets's avatar
Jean-Paul Smets committed
1 2 3 4 5
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
6
		<meta http-equiv="content-type" content="text/html;charset=UTF-8">
Jean-Paul Smets's avatar
Jean-Paul Smets committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
		<title tal:content="here/getTitle">Nexedi</title>

	</head>

	<body bgcolor="#ffffff"
                tal:define="from_organisation python:here.restrictedTraverse('/nexedi/organisation/nexedi');
                client_invoice python:here.getDefaultValue('destination',spec=['Organisation', 'Person']);
                client_delivery python:here.getDefaultValue('destination',spec=['Organisation', 'Person']);
                order_line_list python:here.contentValues(filter={'portal_type':'Sale Order Line'});
                total_price python:here.getDefaultTotalPrice()">


  <table width=100%>
    <tr>
      <td colspan=3><img src="logo.png"></td>
    </tr>
    <tr>
      <td align=left tal:content="python: from_organisation.getCorporateName()" colspan="2" />
      <td align=right tal:content="python: 'Shipping Date: %s' % here.getStartDate()"/>
    </tr>
    <tr>
      <td align=left tal:content="python: 'Tel: %s' % from_organisation.getDefaultTelephone().asText()" colspan="2"/>
      <td align=right tal:content="python: 'Delivery Date: %s' % here.getStopDate()"/>
    </tr>
    <tr>
      <td tal:content="python: from_organisation.getDefaultAddress().getStreetAddress()" colspan="2"/>
      <td align=right tal:content="python: 'Proforma No: ERP5/%s' % here.getId()"/>
    </tr>
    <tr>
      <td tal:content="python: '%s %s' %
                              (from_organisation.getDefaultAddress().getZipCode(),
                              from_organisation.getDefaultAddress().getCity())" colspan="3"/>
    </tr>
    <tr>
      <td tal:content="python: from_organisation.getDefaultAddress().getRegionTitle()" colspan="3"/>
    </tr>

    <tr>
      <th colspan=3>
        <h2>PROFORMA</h2>
      </th>
    </tr>

    </table>

    <br/>

      <table width=100%>
      <tr bgcolor=000000>
        <th align=left><font color=ffffff>PROFORMA ADDRESS</font></th>
        <th align=left><font color=ffffff>DELIVERY ADDRESS</font></th>
      </tr>

      <tr>
        <td align=left tal:content="client_invoice/getCorporateName | client_invoice/getTitle"/>
        <td align=left tal:content="client_delivery/getCorporateName | client_delivery/getTitle"/>
      </tr>
      <tr>
        <td align=left tal:content="python: client_invoice.getDefaultAddress().getStreetAddress()" tal:on-error="nothing"/>
        <td align=left tal:content="python: client_delivery.getDefaultAddress().getStreetAddress()" tal:on-error="nothing"/>
      </tr>
      <tr>
        <td align=left>
          <tal:block tal:replace="python: client_invoice.getDefaultAddress().getZipCode()" tal:on-error="nothing"/>
          <tal:block tal:replace="python: client_invoice.getDefaultAddress().getCity()" tal:on-error="nothing"/>
        </td>
        <td align=left>
          <tal:block tal:replace="python: client_delivery.getDefaultAddress().getZipCode()" tal:on-error="nothing"/>
          <tal:block tal:replace="python: client_delivery.getDefaultAddress().getCity()" tal:on-error="nothing"/>
        </td>
      </tr>
      <tr>
        <td align=left tal:content="python: client_invoice.getDefaultAddress().getRegionTitle()" tal:on-error="nothing"/>
        <td align=left tal:content="python: client_delivery.getDefaultAddress().getRegionTitle()" tal:on-error="nothing"/>
      </tr>
      </table>

    <br/>

      <table width=100%>
        <tr bgcolor=000000>
          <th align=left nowrap><font color=ffffff>Number</font></th>
          <th align=left nowrap><font color=ffffff>Description</font></th>
          <th nowrap><font color=ffffff>Quantity</th>
          <th nowrap><font color=ffffff>Unit</font></th>
          <th nowrap><font color=ffffff>Unit Price</font></th>
          <th nowrap><font color=ffffff>Total Price</font></th>
        </tr>
        <tal:block tal:repeat="line order_line_list">
          <tr valign=top tal:condition="python:line.getQuantity()>0">

            <td align=left tal:content="python:line.getId()"></td>
      <!--      <td> </td> -->
            <td tal:content="python: line.getResourceTitle()"></td>
            <td align=right tal:content="python: '%.0f' % line.getQuantity()"></td>
            <td align=right tal:content="python: line.getQuantityUnit()"></td>
            <td align=right tal:content="python: '%.02f' % line.getPrice()"></td>
            <td align=right tal:content="python: '%.02f' % line.getTotalPrice()"></td>
          </tr>
        </tal:block>
        <tr>
          <td colspan=6><hr noshade></td>
        </tr>
        <tr>
          <th colspan=4 align=right>Total
            (<span tal:replace="here/income/getResourceId | nothing"/>)</th>
          <td colspan=2 align=right tal:content="python: '%.02f' % round(here.Invoice_zGetTotal()[0].total_price, 2)" tal:on-error="nothing"></td>
        </tr>
        <tr>
          <td colspan=1 align=left tal:content="python:here.getDescription()"></td>
          <th colspan=3 align=right>VAT <tal:block tal:replace="python: ( 0.0) * 100.0"/> % (<span tal:replace="here/income/getResourceId | nothing"/>)</th>
          <td colspan=2 align=right tal:content="python: '%.02f' % round(here.Invoice_zGetTotalVat(), 2)" tal:on-error="nothing"></td>
        </tr>
        <tr>
          <td colspan=3>&nbsp;</td>
          <td colspan=3><hr noshade></td>
        </tr>
        <tr>
          <td colspan=3></td>

          <th colspan=1 align=right nowrap>Amount Paid
            (<span tal:replace="here/income/getResourceId | nothing"/>)</th>
          <th colspan=2 align=right tal:content="python: '%.02f' % (round(here.Invoice_zGetTotalVat(), 2) + round(here.Invoice_zGetTotalNetPrice(), 2))" tal:on-error="nothing"></th>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>

  <table width="100%">
  <tr>
        <td><center><h6>RCS Roubaix Tourcoing 440 047 504<br>
  Banque:&nbsp;30027&nbsp;Guichet:&nbsp;00039&nbsp;Compte:&nbsp;00000013323&nbsp;RIB:&nbsp;36<br>IBAN: FR76 3002 7175 3900 0410 2760 135<br>
  VAT FR72440047504</h6></center></td>
    </tr>
  </table>



</body>

</html>