Created
July 26, 2019 15:26
-
-
Save dapi/f09b1dfe2a571d0233b41e509c14163d to your computer and use it in GitHub Desktop.
Invoce PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset='utf-8' /> | |
| <style> | |
| body { | |
| font-size: 12px; | |
| } | |
| table { | |
| border-collapse: collapse; | |
| } | |
| table td { | |
| border-collapse: collapse; | |
| padding: 3px 5px; | |
| margin: 0; | |
| } | |
| p{ | |
| padding-bottom: 0; | |
| margin-bottom: 0; | |
| } | |
| .table { | |
| border: 1px black solid; | |
| } | |
| .table td { | |
| border: 1px black solid; | |
| } | |
| .hr{ | |
| border-bottom: 1px black solid; width: 100%; | |
| } | |
| .hr2{ | |
| border-bottom: 2px black solid; width: 100%; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <table width="100%"> | |
| <tr> | |
| <td width="70%" align="left" valign="top"> | |
| <p><%= Settings.invoice_pdf.header.html_safe %></p> | |
| </td> | |
| <td width="30%" align="right" valign="center"> | |
| <%= wicked_pdf_image_tag('/images/logo.png', width: 100)%> | |
| </td> | |
| </tr> | |
| </table> | |
| <br> | |
| <table width="100%" class="table"> | |
| <tr> | |
| <td colspan="4" rowspan="2" width="66%" valign="top"> | |
| <%=Settings.invoice_pdf.bank.name %> | |
| <p>Банк получателя</p> | |
| </td> | |
| <td width="10%" valign="top">БИК</td> | |
| <td width="25%" valign="top"> | |
| <%=Settings.invoice_pdf.bank.bik%> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td valign="top">Кор.Сч. №</td> | |
| <td width="25%" valign="top"> | |
| <%=Settings.invoice_pdf.bank.korschet %> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td width="10%" valign="top">ИНН</td> | |
| <td width="20%" valign="top"><%=Settings.invoice_pdf.bank.inn%></td> | |
| <td width="10%" valign="top">КПП</td> | |
| <td width="20%"></td> | |
| <td rowspan="2" valign="top">Сч. №</td> | |
| <td rowspan="2" valign="top"><%=Settings.invoice_pdf.bank.account_number%></td> | |
| </tr> | |
| <tr> | |
| <td colspan="4" valign="top"> | |
| <%=Settings.invoice_pdf.full_name%> | |
| <p>Получатель</p> | |
| </td> | |
| </tr> | |
| </table> | |
| <center><h2>Счёт на оплату № <%=invoice.number%> от <%= Russian::strftime(invoice.created_at, "%d %B %Y") %></h2></center> | |
| <table width="100%"> | |
| <tr> | |
| <td width="10%">Поставщик:</td> | |
| <td width="90%"><%=Settings.invoice_pdf.full_name%></td> | |
| </tr> | |
| <tr> | |
| <td>Покупатель:</td> | |
| <td><%= invoice.buyer_name %></td> | |
| </tr> | |
| </table> | |
| <br><br> | |
| <table width="100%" class="table"> | |
| <tr> | |
| <td align="center" width="5%">№</td> | |
| <td align="center" width="50%">Товары (работы, услуги)</td> | |
| <td align="center" width="10%">Кол-во</td> | |
| <td align="center" width="10%">Ед.</td> | |
| <td align="center" width="10%">Цена</td> | |
| <td align="center" width="15%">Сумма</td> | |
| </tr> | |
| <tr> | |
| <td align="center">1</td> | |
| <td align="left"><%= invoice.title %></td> | |
| <td align="right"><%= invoice.quantity %></td> | |
| <td></td> | |
| <td align="right"><%= invoice.price %></td> | |
| <td align="right"><%= invoice.amount %></td> | |
| </tr> | |
| </table> | |
| <table align="right" width="100%"> | |
| <tr> | |
| <td width="90%"> </td> | |
| <td> </td> | |
| </tr> | |
| <tr> | |
| <td align="right"><b>Итого к оплате:</b></td> | |
| <td align="right"><b><%= invoice.amount %></b></td> | |
| </tr> | |
| <tr> | |
| <td align="right"></td> | |
| <td align="right">Без НДС</td> | |
| </tr> | |
| </table> | |
| <br><br> | |
| <p> | |
| <div class="hr2"> | |
| Всего к оплате: <%= invoice.amount_in_words %>. | |
| </div> | |
| </p> | |
| <% if invoice.details.present? %> | |
| <p> | |
| <small>Подробное описание товара или услуг: <%= simple_format invoice.details %></small> | |
| </p> | |
| <% end %> | |
| <table width="100%"> | |
| <tr> | |
| <td align="left" width="10%">Поставщик</td> | |
| <td align="center" width="30%"><%= Settings.invoice_pdf.sign_position %></td> | |
| <td width="30%" align="center" valign="bottom"> | |
| <%= wicked_pdf_image_tag('/images/signature.jpg', style: 'width: 150px; display: inline-block;')%> | |
| </td> | |
| <td align="center" width="20%"><%=Settings.invoice_pdf.sign_name%></td> | |
| </tr> | |
| <tr> | |
| <td></td> | |
| <td colspan="2"><div class="hr"></div></td> | |
| <td> | |
| <div class="hr"></div> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td></td> | |
| <td align="center" style="padding-top: 0;">должность</td> | |
| <td align="center" style="padding-top: 0;">подпись</td> | |
| <td align="center" style="padding-top: 0;">расшифровка подписи</td> | |
| </tr> | |
| </table> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment