Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl>

This commit is contained in:
Adrian Hinz 2016-10-06 12:38:11 +02:00
parent 59f446271e
commit 414c35b2c6
2 changed files with 32 additions and 0 deletions

View File

@ -1,4 +1,10 @@
class UserFirm < ApplicationRecord
belongs_to :user
has_many :invoices
def bank_account_with_spaces
ret = self.bank_account.reverse
ret = ret.gsub(/(.{4})(?=.)/, '\1 \2')
ret.reverse!
end
end

View File

@ -155,6 +155,32 @@
</table>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table>
<tr>
<td valign="bottom">Kwota do zapłaty: </td><td><span style="font-size:18px"><b>36 900,00 PLN</b></span></td>
</tr>
<tr>
<td>Słownie do zapłaty: </td><td><b><%= decimal_to_word(36900.0) %></b></td>
</tr>
<tr>
<td>Forma płatności: </td><td><b>Przelew</b></td>
</tr>
<tr>
<td>Termin płatności: </td><td><b><%= @invoice.date_of_payment %> (<%= (@invoice.date_of_payment - @invoice.date).to_i %> dni)</b></td>
</tr>
<tr>
<td>Bank: </td><td><b><%= @invoice.user_firm.bank_name %></b></td>
</tr>
<tr>
<td style="padding-right:20px">Nr rachunku bankowego: </td><td><span style="font-size:16px"><b><%= @invoice.user_firm.bank_account_with_spaces %></b></span></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>