lucadeal 0.5.6 → 0.5.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7938104c239ce8cdc4d5ccc3b7545aba808ee13924705df3ace6bc76be83660e
4
- data.tar.gz: 47b8e214254a6b224488dd1c1691e7bc4257b85f4fdd5338591199ecbaecf6be
3
+ metadata.gz: 96b28c4018fd5120422023ea16919abda64e15df3989a0d70973d331660bee99
4
+ data.tar.gz: 1b66a4ebb58367c85469712cad3cc9ff3eb13e135174827373340c13ec787e67
5
5
  SHA512:
6
- metadata.gz: b167651ef30ca197bd82dbdc1b20e56489f608647d70b1c16e1e73f8af0c252d65c1fc60dfff020785588ad09f57f4a67f1d3c74c65e49a78e2053fcd9c6fdb1
7
- data.tar.gz: 6d31167a9c6942798551266b27719a90a798ac7edd9c94e71be37117e830e53e70b04faf5a5a68c74b5c74220c278f898f49fddaed3bae54a8b7a2295755e355
6
+ metadata.gz: 2a6791648183d90bda1de571dd04e1a411236803b38f99fefa760354798c9b1f5ac1c5c48c178da32e32889b44324d8adcce4cf69fdab1d8f214259ad2f2982f
7
+ data.tar.gz: b5aff9c236935584753846132fcc96d345a8dc730d608b0a6385e548a7c821e28ac556e5f569722bc6db71236691934da0dad0ca759a0b7966b3af001704e93f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## LucaDeal 0.5.8
2
+
3
+ * Customer has tax ID
4
+ * `luca-deal report balance` now prints tax ID
5
+
6
+ ## LucaDeal 0.5.7
7
+
8
+ * `luca-deal fee export` now skips no transaction customer.
9
+
1
10
  ## LucaDeal 0.5.6
2
11
 
3
12
  * `luca-deal report balance` now prints customer ID.
data/README.md CHANGED
@@ -99,6 +99,7 @@ Customer consists of label information.
99
99
  | Top level | Second level | | historical | Description |
100
100
  |-----------|--------------|------|------------|--------------------------------|
101
101
  | id | | auto | | uuid |
102
+ | tax_id | | | | taxpayer ID for each contry |
102
103
  | name | | must | x | customer's name |
103
104
  | address | | | x | |
104
105
  | address2 | | | x | |
@@ -170,7 +171,7 @@ Fields for sales fee:
170
171
  Invoice is basically auto generated from Customer and Contract objects.
171
172
 
172
173
  | Top level | Second level | Description |
173
- |------------+--------------+------------------------------------------|
174
+ |------------|--------------|------------------------------------------|
174
175
  | id | | uuid |
175
176
  | issue_date | | |
176
177
  | due_date | | |
data/lib/luca_deal/fee.rb CHANGED
@@ -155,11 +155,14 @@ module LucaDeal
155
155
  labels = export_labels
156
156
  [].tap do |res|
157
157
  self.class.asof(@date.year, @date.month) do |dat|
158
- item = {}
159
- item['date'] = dat['issue_date']
160
- item['debit'] = []
161
- item['credit'] = []
162
158
  sub = dat['sales_fee']
159
+ next if readable(sub['fee']) == 0 and readable(sub['deduction']) == 0
160
+
161
+ item = {
162
+ 'date' => dat['issue_date'],
163
+ 'debit' => [],
164
+ 'credit' => []
165
+ }
163
166
  if readable(sub['fee']) != 0
164
167
  item['debit'] << { 'label' => labels[:debit][:fee], 'amount' => readable(sub['fee']) }
165
168
  item['credit'] << { 'label' => labels[:credit][:fee], 'amount' => readable(sub['fee']) }
@@ -226,7 +229,7 @@ module LucaDeal
226
229
  # TODO: load labels from CONST.config before country defaults
227
230
  #
228
231
  def export_labels
229
- case LucaRecord::CONST.confg['country']
232
+ case LucaRecord::CONST.config['country']
230
233
  when 'jp'
231
234
  {
232
235
  debit: { fee: '支払手数料', tax: '支払手数料', deduction: '未払費用' },
@@ -121,6 +121,7 @@ module LucaDeal
121
121
  row = {
122
122
  'id' => k,
123
123
  'customer' => customers.dig(k, 'name'),
124
+ 'tax_id' => customers.dig(k, 'tax_id'),
124
125
  'unsettled' => LucaSupport::Code.readable(item['unsettled']),
125
126
  }
126
127
  if detail
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaDeal
4
- VERSION = '0.5.6'
4
+ VERSION = '0.5.8'
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.5.6
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-12 00:00:00.000000000 Z
11
+ date: 2025-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord