Gift info added to trello
This commit is contained in:
@@ -5,7 +5,9 @@ class Cart < ActiveRecord::Base
|
||||
belongs_to :delivery_destination
|
||||
|
||||
def delivery_cost
|
||||
place = Place.by_code_or_default(delivery_destination.place)
|
||||
place = delivery_destination.gift ? Place.by_code_or_default(delivery_destination.recipient_place)
|
||||
: Place.by_code_or_default(delivery_destination.place)
|
||||
|
||||
if delivery_destination.instant_delivery
|
||||
place.instant_delivery_price
|
||||
else
|
||||
@@ -21,5 +23,4 @@ class Cart < ActiveRecord::Base
|
||||
def confirmed_at
|
||||
delivery_destination.updated_at.in_time_zone('Europe/Sarajevo')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -22,6 +22,18 @@ Bosna i Hercegovina
|
||||
**Napomena: **
|
||||
<%= dd.note %>
|
||||
|
||||
<% if dd.gift %>
|
||||
**Poklon **
|
||||
|
||||
**Name: **<%= dd.recipient_name %>
|
||||
**Postal code: **<%= dd.recipient_postal_code %>
|
||||
**Place: **<%= dd.recipient_place %>
|
||||
**Address: **<%= dd.recipient_address %>
|
||||
**Phone: **<%= dd.recipient_phone %>
|
||||
**Email: **<%= dd.recipient_email %>
|
||||
<% end %>
|
||||
|
||||
<% if dd.instant_delivery %>
|
||||
|
||||
**Naručeno:** <%= @cart.updated_at.in_time_zone("Europe/Sarajevo").strftime("%A %d.%m.%Y. %H:%M") %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user