Adding payment method
This commit is contained in:
@@ -1,2 +1,14 @@
|
||||
class DeliveryDestination < ActiveRecord::Base
|
||||
class DeliveryDestination < ActiveRecord::Base
|
||||
def get_payment_string
|
||||
case self.payment_method
|
||||
when 'cash_on_delivery'
|
||||
'Pouzecem'
|
||||
when 'paypal'
|
||||
'Paypal'
|
||||
when 'pikpay'
|
||||
'Pikpay'
|
||||
else
|
||||
'Nepoznato'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
.tg td{ }
|
||||
.tg th{ }
|
||||
</style>
|
||||
<%
|
||||
<%
|
||||
dd = @record.delivery_destination
|
||||
c = @record
|
||||
%>
|
||||
<p>
|
||||
<p><strong>Ime:</strong> <%= dd.name %><br /><br /></p>
|
||||
|
||||
<p><strong>Adresa:</strong><br />
|
||||
<p><strong>Adresa:</strong><br />
|
||||
<%= dd.address %><br />
|
||||
<%= dd.place.to_s.strip %> <%= Place.name_from_code(dd.place.to_s) %><br />
|
||||
Bosna i Hercegovina<br /><br />
|
||||
@@ -22,6 +22,8 @@ Bosna i Hercegovina<br /><br />
|
||||
<p><strong>Telefon: </strong> +387 <%= dd.phone %><br /><br />
|
||||
</p>
|
||||
|
||||
<p><strong>Plaćanje: </strong><%= dd.get_payment_string %></p><br />
|
||||
|
||||
<p><strong>Napomena: </strong><br />
|
||||
<%= dd.note %><br /><br />
|
||||
</p>
|
||||
@@ -29,8 +31,8 @@ Bosna i Hercegovina<br /><br />
|
||||
|
||||
<p>
|
||||
<strong>Naručeno:</strong> <%= c.confirmed_at.in_time_zone("Europe/Sarajevo").strftime("%A %d.%m.%Y. %H:%M") %>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</p>
|
||||
<% if dd.instant_delivery %>
|
||||
<p style="font-size: 120%;">
|
||||
@@ -47,7 +49,7 @@ OVO JE NARUDŽBA ZA INSTANT DOSTAVU
|
||||
<th style="text-align: right; ">Total</th>
|
||||
</tr>
|
||||
<% @record.item_in_carts.each do |iic| %>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="tg-031e"><%= iic.item.code %></td>
|
||||
<td class="tg-031e"><%= iic.item.name %></td>
|
||||
<td style="text-align: right; "><%= iic.count %></td>
|
||||
@@ -70,15 +72,6 @@ OVO JE NARUDŽBA ZA INSTANT DOSTAVU
|
||||
<td style="text-align: right; "><%= money(c.total) %></td>
|
||||
</tr>
|
||||
<tr><td><strong> </strong></td></tr>
|
||||
|
||||
|
||||
</table>
|
||||
<br /><br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user