lucadeal 0.2.16 → 0.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ Your monthly fee report is available.
2
+ Please find the document attaced at the bottom of this email.
3
+ --
4
+ <%= @company['name'] %>
5
+ <%= @company['address'] %>
6
+ <%= @company['address2'] %>
@@ -0,0 +1,54 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <style>
5
+ body { size: A4 }
6
+ </style>
7
+ </head>
8
+ <body>
9
+ <div style="text-align: right">Issue date: <%= @issue_date %></div>
10
+ <h1 style="display: block; margin: auto; text-align: center">Fee Report</h1>
11
+ <section><%= @customer["name"] %></section>
12
+ <section>Total amount: <%= delimit_num(@amount) %></section>
13
+
14
+ <table style="width: 100%">
15
+ <thead>
16
+ <th>#</th>
17
+ <th>Customer Name</th>
18
+ <th>Item Name</th>
19
+ <th>qty</th>
20
+ <th>Sales</th>
21
+ <th>Fee</th>
22
+ </thead>
23
+ <tbody>
24
+ <% @items.each.with_index(1) do |item, i| %>
25
+ <tr class="item">
26
+ <td class="unit"><%= i %></td>
27
+ <td><%= item["customer_name"] %></td>
28
+ <td><%= item["name"] %></td>
29
+ <td class="unit"><%= item["qty"] %></td>
30
+ <td class="price"><%= delimit_num( item["price"] * item["qty"] ) %></td>
31
+ <td class="price"><%= delimit_num( item["fee"] ) %></td>
32
+ </tr>
33
+ <% end %>
34
+ <tr>
35
+ <td class="price" colspan="3">Subtotal</td>
36
+ <td class="price"><%= delimit_num( @sales_fee['fee'] ) %></td>
37
+ </tr>
38
+ <tr>
39
+ <td class="price" colspan="3">Tax</td>
40
+ <td class="price"><%= delimit_num( @sales_fee['tax'] ) %></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="price" colspan="3">Total</td>
44
+ <td class="price"><%= delimit_num( @sales_fee['fee'] + @sales_fee['tax'] ) %></td>
45
+ </tr>
46
+ </table>
47
+
48
+ <section>
49
+ <div><%= @company["name"] %></div>
50
+ <div><%= @company["address"] %></div>
51
+ <div><%= @company["address2"] %></div>
52
+ </section>
53
+ </body>
54
+ </html>
@@ -0,0 +1,6 @@
1
+ Your monthly invoice is available.
2
+ Please find the document attaced at the bottom of this email.
3
+ --
4
+ <%= @company['name'] %>
5
+ <%= @company['address'] %>
6
+ <%= @company['address2'] %>
@@ -0,0 +1,52 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <style>
5
+ body { size: A4 }
6
+ </style>
7
+ </head>
8
+ <body>
9
+ <div style="text-align: right">Issue date: <%= @issue_date %></div>
10
+ <h1 style="display: block; margin: auto; text-align: center">Invoice</h1>
11
+ <section><%= @customer["name"] %></section>
12
+ <section>Total amount: <%= delimit_num(@amount) %></section>
13
+
14
+ <table style="width: 100%">
15
+ <thead>
16
+ <th>#</th>
17
+ <th>Item</th>
18
+ <th>qty</th>
19
+ <th>Amount</th>
20
+ </thead>
21
+ <tbody>
22
+ <% @items.each.with_index(1) do |item, i| %>
23
+ <tr class="item">
24
+ <td class="unit"><%= i %></td>
25
+ <td><%= item["name"] %></td>
26
+ <td class="unit"><%= item["qty"] %></td>
27
+ <td class="price"><%= delimit_num( item["price"] * item["qty"] ) %></td>
28
+ </tr>
29
+ <% end %>
30
+ <% @subtotal.each.with_index(1) do |sub, i| %>
31
+ <tr>
32
+ <td class="price" colspan="3">Subtotal</td>
33
+ <td class="price"><%= delimit_num( sub['items'] ) %></td>
34
+ </tr>
35
+ <tr>
36
+ <td class="price" colspan="3">Tax</td>
37
+ <td class="price"><%= delimit_num( sub['tax'] ) %></td>
38
+ </tr>
39
+ <tr>
40
+ <td class="price" colspan="3">Total</td>
41
+ <td class="price"><%= delimit_num( sub['items'] + sub['tax'] ) %></td>
42
+ </tr>
43
+ <% end %>
44
+ </table>
45
+
46
+ <section>
47
+ <div><%= @company["name"] %></div>
48
+ <div><%= @company["address"] %></div>
49
+ <div><%= @company["address2"] %></div>
50
+ </section>
51
+ </body>
52
+ </html>
@@ -0,0 +1,40 @@
1
+ <html>
2
+ <head>
3
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
5
+ <style>
6
+ td { text-align: right; line-height: 2em; min-width: 7em }
7
+ thead th, thead td { text-align: center }
8
+ tr.sub { font-size: .8em; color: #aaa }
9
+ </style>
10
+ </head>
11
+ <body>
12
+ <div style="margin: 1em 0">Issue date: <%= @issue_date %></div>
13
+ <table>
14
+ <thead>
15
+ <tr>
16
+ <th>#</th>
17
+ <th>Customer</th>
18
+ <th>Amount</th><th>Tax</th>
19
+ <th>Amount</th><th>Tax</th>
20
+ </tr>
21
+ <tr class="sub">
22
+ <th></th>
23
+ <th></th>
24
+ <th>This month</th><th>This month</th>
25
+ <th>Last Month</th><th>Last Month</th>
26
+ </tr>
27
+ </thead>
28
+ <tbody>
29
+ <% @invoices.each.with_index(1) do |invoice, i| %>
30
+ <tr>
31
+ <td><%= i %></td>
32
+ <td><%= invoice["customer_name"] %></td>
33
+ <td><%= invoice["amount1"] %></td><td><%= invoice["tax1"] %></td>
34
+ <td><%= invoice["amount2"] %></td><td><%= invoice["tax2"] %></td>
35
+ </tr>
36
+ <% end %>
37
+ </tbody>
38
+ </table>
39
+ </body>
40
+ </html>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaDeal
4
- VERSION = '0.2.16'
4
+ VERSION = '0.2.23'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucadeal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-08 00:00:00.000000000 Z
11
+ date: 2021-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord
@@ -89,6 +89,11 @@ files:
89
89
  - lib/luca_deal/setup.rb
90
90
  - lib/luca_deal/templates/.keep
91
91
  - lib/luca_deal/templates/config.yml
92
+ - lib/luca_deal/templates/fee-report-mail.txt.erb
93
+ - lib/luca_deal/templates/fee-report.html.erb
94
+ - lib/luca_deal/templates/invoice-mail.txt.erb
95
+ - lib/luca_deal/templates/invoice.html.erb
96
+ - lib/luca_deal/templates/monthly-payment-list.html.erb
92
97
  - lib/luca_deal/version.rb
93
98
  homepage: https://github.com/chumaltd/luca/tree/master/lucadeal
94
99
  licenses:
@@ -112,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
117
  - !ruby/object:Gem::Version
113
118
  version: '0'
114
119
  requirements: []
115
- rubygems_version: 3.1.2
120
+ rubygems_version: 3.2.3
116
121
  signing_key:
117
122
  specification_version: 4
118
123
  summary: Deal with contracts