Signed-off-by: Adrian Hinz <ahinz@voicetelecom.pl>
This commit is contained in:
parent
59f446271e
commit
414c35b2c6
|
|
@ -1,4 +1,10 @@
|
||||||
class UserFirm < ApplicationRecord
|
class UserFirm < ApplicationRecord
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
has_many :invoices
|
has_many :invoices
|
||||||
|
|
||||||
|
def bank_account_with_spaces
|
||||||
|
ret = self.bank_account.reverse
|
||||||
|
ret = ret.gsub(/(.{4})(?=.)/, '\1 \2')
|
||||||
|
ret.reverse!
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,32 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue