Skip to content

Commit

Permalink
add fecVencimiento
Browse files Browse the repository at this point in the history
  • Loading branch information
giansalex committed Jan 24, 2018
1 parent e093dfa commit c962a4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
21 changes: 13 additions & 8 deletions src/Report/Templates/invoice2.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,27 @@
{% set cl = doc.client %}
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tbody><tr>
<td width="60%" height="15" align="left"><strong>Razón Social:</strong> {{ cl.rznSocial }}</td>
<td width="40%" height="15" align="left"><strong>{{ cl.tipoDoc|catalog('06') }}:</strong> {{ cl.numDoc }}</td>
<td width="60%" align="left"><strong>Razón Social:</strong> {{ cl.rznSocial }}</td>
<td width="40%" align="left"><strong>{{ cl.tipoDoc|catalog('06') }}:</strong> {{ cl.numDoc }}</td>
</tr>
<tr>
<td width="60%" height="15" align="left"><strong>Fecha Emisión: </strong> {{ doc.fechaEmision|date('d/m/Y') }}</td>
<td width="40%" height="15" align="left"><strong>Dirección: </strong> {% if cl.address %}{{ cl.address.direccion }}{% endif %}</td>
<td width="60%" align="left">
<strong>Fecha Emisión: </strong> {{ doc.fechaEmision|date('d/m/Y') }}
{% if doc.fecVencimiento is defined and doc.fecVencimiento %}
<br><br><strong>Fecha Vencimiento: </strong> {{ doc.fecVencimiento|date('d/m/Y') }}
{% endif %}
</td>
<td width="40%" align="left"><strong>Dirección: </strong> {% if cl.address %}{{ cl.address.direccion }}{% endif %}</td>
</tr>
{% if isNota %}
<tr>
<td width="60%" height="15" align="left"><strong>Tipo Doc. Ref.: </strong> {{ doc.tipDocAfectado|catalog('01') }}</td>
<td width="40%" height="15" align="left"><strong>Documento Ref.: </strong> {{ doc.numDocfectado }}</td>
<td width="60%" align="left"><strong>Tipo Doc. Ref.: </strong> {{ doc.tipDocAfectado|catalog('01') }}</td>
<td width="40%" align="left"><strong>Documento Ref.: </strong> {{ doc.numDocfectado }}</td>
</tr>
{% endif %}
<tr>
<td width="60%" height="15" align="left"><strong>Tipo Moneda: </strong> {{ doc.tipoMoneda|catalog('021') }} </td>
<td width="40%" height="15" align="left">{% if doc.compra is defined and doc.compra %}<strong>O/C: </strong> {{ doc.compra }}{% endif %}</td>
<td width="60%" align="left"><strong>Tipo Moneda: </strong> {{ doc.tipoMoneda|catalog('021') }} </td>
<td width="40%" align="left">{% if doc.compra is defined and doc.compra %}<strong>O/C: </strong> {{ doc.compra }}{% endif %}</td>
</tr>
{% if doc.guias %}
<tr>
Expand Down
3 changes: 2 additions & 1 deletion tests/Report/HtmlReportTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private function getInvoice()
->setTotal(120)
]);
$invoice
->setFecVencimiento(new \DateTime())
->setCompra('0000123232')
->setTotalAnticipos(120.24)
->setMtoOperGratuitas(12)
Expand Down Expand Up @@ -186,7 +187,7 @@ private function getClient()
->setNumDoc('20000000001')
->setRznSocial('EMPRESA 1')
->setAddress((new Address())
->setDireccion('AV ITALIA 231 MZ K LT 4'));
->setDireccion('JR. NIQUEL MZA. F LOTE. 3 URB. INDUSTRIAL INFANTAS - LIMA - LIMA -PERU'));

return $client;
}
Expand Down

0 comments on commit c962a4c

Please sign in to comment.