caboose-cms 0.9.73 → 0.9.74

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9e9e64838a7f575101955f5a8d1f845382f1158
4
- data.tar.gz: 53189bf7780c15285dcce693d12a265d1cc18236
3
+ metadata.gz: d5d538f792c9137c2945007d71f917c9b6de7069
4
+ data.tar.gz: 0c8b0d4826bc3291f1cb981585690183abde002f
5
5
  SHA512:
6
- metadata.gz: b5176348512047678b9678354533c377079a482abec7c173dd8b19ab092de2d0152893a51c8d3c178d14d27446512c1ff38dac1e0d2d08b4bdbe9fe08d017a72
7
- data.tar.gz: 8b2eefcc46638da42f2806afc0304dd3e3a346b377552d0c5b0d1a3834d6eda5b962acc147419dee9e491b20e79f186ea21707b54a3e9c922ac93628eee801b9
6
+ metadata.gz: 82df711cad5b8fcaeffca31a1ccc8fb723d5c31675f6181c8df60af453c010b3dacce98a596aa9ea8b15a0b676fe318a1d4a4311d6c869008efd895e86d50439
7
+ data.tar.gz: b741a2ac1c6220e557fda96490dd83584fa225da01e3ac7dcc5ceb420ccd388bd545046fbaea052e33780656eff2ca1663160f16a401efa47d636fa8c9862ad3
@@ -287,7 +287,7 @@ module Caboose
287
287
  end
288
288
 
289
289
  # @route GET /admin/invoices/:id/send-receipt
290
- def admin_send_for_authorization
290
+ def admin_send_receipt
291
291
  return if !user_is_allowed('invoices', 'edit')
292
292
  invoice = Invoice.find(params[:id])
293
293
  invoice.delay(:queue => 'caboose_store').send_receipt_email
@@ -5,6 +5,92 @@ logo = logo.gsub('//','https://') if !logo.nil?
5
5
 
6
6
  <p><img src='<%= logo %>' /></p>
7
7
 
8
- <h1>Order <%= @invoice.invoice_number %> is ready for payment!</h1>
9
- <p>Please <a href='http://<%= raw @invoice.site.primary_domain.domain %>/my-account/invoices/<%= @invoice.id %>'>review your order</a> and submit payment.</p>
10
- <p>Thank you!</p>
8
+ <h1>Invoice</h1>
9
+
10
+ <p>Your invoice number #<%= @invoice.id %> is ready for payment!</p>
11
+
12
+ <p>Click <a href="https://<%== @invoice.site.primary_domain.domain %>/my-account">here</a> to login to your account to update billing information.</p>
13
+
14
+ <% if !@invoice.site.store_config.download_instructions.blank? %>
15
+ <p><%== @invoice.site.store_config.download_instructions %></p>
16
+ <% end %>
17
+
18
+ <% if defined?(Colonnade::SuiteMenu) %>
19
+ <%
20
+ sm = Colonnade::SuiteMenu.where(:invoice_id => @invoice.id).first
21
+ game = sm.menu.game if sm && sm.menu
22
+ %>
23
+ <% if game %>
24
+ <p>Game: <%= game.opponent %> on <%= game.date.strftime('%B %-d, %Y') %></p>
25
+ <% end %>
26
+ <% end %>
27
+
28
+ <table border='1' style='border-collapse: collapse;'>
29
+ <tr>
30
+ <th>Line Item</th>
31
+ <th>Unit Price</th>
32
+ <th>Quantity</th>
33
+ <th>Subtotal</th>
34
+ </tr>
35
+ <% @invoice.line_items.each do |li| %>
36
+ <% v = li.variant %>
37
+ <% p = v.product %>
38
+ <tr>
39
+ <td>
40
+ <p><%= p.title %></td></p>
41
+ <% if li.is_gift %>
42
+ <p>This item is a gift.</p>
43
+ <ul>
44
+ <li><% if li.gift_wrap %>Gift wrap (<%= number_to_currency(p.gift_wrap_price) %>)<% else %>Do not gift wrap<% end %></li>
45
+ <li><% if li.include_gift_message %>Gift message: <%= li.gift_message %><% else %>No gift message<% end %></li>
46
+ <li><% if li.hide_prices %>Hide all prices<% else %>Show all prices<% end %></li>
47
+ </ul>
48
+ <% end %>
49
+ </td>
50
+ <td align='right'><%= number_to_currency(li.unit_price) %></td>
51
+ <td align='right'><%= li.quantity %></td>
52
+ <td align='right'><%= number_to_currency(li.subtotal) %></td>
53
+ </tr>
54
+ <% end %>
55
+ <tr><td colspan="3" align='right'>Subtotal: </td><td align='right'><%= number_to_currency(@invoice.subtotal) %></td></tr>
56
+ <tr><td colspan="3" align='right'>Tax: </td><td align='right'><%= number_to_currency(@invoice.tax) %></td></tr>
57
+ <tr><td colspan="3" align='right'>Shipping and Handling: </td><td align='right'><%= number_to_currency(@invoice.shipping + @invoice.handling) %></td></tr>
58
+ <% if @invoice.gift_wrap && @invoice.gift_wrap > 0 %>
59
+ <tr><td colspan="3" align='right'>Gift wrap: </td><td align='right'><%= number_to_currency(@invoice.gift_wrap) %></td></tr>
60
+ <% end %>
61
+ <% if @invoice.discounts %>
62
+ <% @invoice.discounts.each do |d| %>
63
+ <tr><td colspan="3" align='right'>"<%= d.gift_card.code %>" gift card: </td><td align='right'><%= number_to_currency(d.amount) %></td></tr>
64
+ <% end %>
65
+ <% end %>
66
+ <% if @invoice.custom_discount %>
67
+ <tr><td colspan="3" align='right'>Discount: </td><td align='right'><%= number_to_currency(@invoice.custom_discount) %></td></tr>
68
+ <% end %>
69
+ <tr><td colspan="3" align='right'>Total: </td><td align='right'><%= number_to_currency(@invoice.total) %></td></tr>
70
+ </table>
71
+
72
+ <% if @invoice.shipping_address %>
73
+ <% sa = @invoice.shipping_address %>
74
+ <% if !sa.address1.blank? %>
75
+ <h2>Shipping Address</h2>
76
+ <p>
77
+ <%= sa.first_name %> <%= sa.last_name %><br />
78
+ <%= sa.address1 %><br />
79
+ <% if sa.address2 && sa.address2.strip.length > 0 %><%= sa.address2 %><br /><% end %>
80
+ <%= sa.city %>, <%= sa.state %> <%= sa.zip %>
81
+ </p>
82
+ <% end %>
83
+ <% end %>
84
+
85
+ <% if @invoice.billing_address %>
86
+ <% ba = @invoice.billing_address %>
87
+ <% if !ba.address1.blank? %>
88
+ <h2>Billing Address</h2>
89
+ <p>
90
+ <%= ba.first_name %> <%= ba.last_name %><br />
91
+ <%= ba.address1 %><br />
92
+ <% if ba.address2 && ba.address2.strip.length > 0 %><%= ba.address2 %><br /><% end %>
93
+ <%= ba.city %>, <%= ba.state %> <%= ba.zip %>
94
+ </p>
95
+ <% end %>
96
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.73'
2
+ VERSION = '0.9.74'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.73
4
+ version: 0.9.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg