lucadeal 0.3.0 → 0.3.1

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: 060bcea890091dbe70e03718d1a8871bccf4873db86922d505e0e2c3ffefd94a
4
- data.tar.gz: 3d202e5711a7e1d28cadb5a4debbda18900b7ab7ea4d6e5e413d52980c1cb84f
3
+ metadata.gz: 599780f0a61b27bcea93724823c02bdfdd52b7b04a028265c00bc2fe1e0e865c
4
+ data.tar.gz: 7b3a09097cb6543b3b07718c7ecb35fd21bcdafbe851eb6240a33707a2e7ddf3
5
5
  SHA512:
6
- metadata.gz: 7a61af30d3b434edf10ab8553b3f878646354dd6e838a93405483b476ab3d8456713a745c0eb2a99eefdbc233ed662a87d4645c7a94b375924e2d8f347208c00
7
- data.tar.gz: ca88eff9ed7c7c8dd815089ccdb34bd8dcd0813ae58dbb3b026db4833373a4cb33cb2b91eea27fce67b599a9a43b6e27796ed14ef1c2da6c60cf7308e389ea7f
6
+ metadata.gz: 2a8c83638b3ee0d8d9afb02bb555ee4bc679b89873b677a5f75751a9d75412479e6900be700f06dc6d44473d9a3149a11d173e5bb0b39ca45aa8055da22da120
7
+ data.tar.gz: 4012470b9d9a1e671f1d0d4bcfd7144b4c4e097f282f099c518396706e946f313d22b35955c0999acf40753e284a0c9b48d7fec6d514492e477ee082e5623785
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## LucaDeal 0.3.1
2
+
3
+ * add `luca-deal invoices settle --search-terms` for late payment case.
4
+
1
5
  ## LucaDeal 0.3.0
2
6
 
3
7
  * implement `luca-deal reports balance` for unsettled balance by customer
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # LucaDeal
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/lucadeal.svg)](https://badge.fury.io/rb/lucadeal)
4
+ [![doc](https://img.shields.io/badge/doc-rubydoc-green.svg)](https://www.rubydoc.info/gems/lucadeal/index)
5
+ ![license](https://img.shields.io/github/license/chumaltd/luca)
4
6
 
5
7
  LucaDeal is Sales contract management application.
6
8
 
@@ -10,6 +12,7 @@ Add this line to your application's Gemfile:
10
12
 
11
13
  ```ruby
12
14
  gem 'lucadeal'
15
+ gem 'mail' # If you don't use mail functionality, you can remove this line.
13
16
  ```
14
17
 
15
18
  And then execute:
data/exe/luca-deal CHANGED
@@ -201,9 +201,9 @@ class LucaCmd
201
201
  end
202
202
  end
203
203
 
204
- def self.settle(args = nil, _params = nil)
204
+ def self.settle(args = nil, params = nil)
205
205
  str = args[0].nil? ? STDIN.read : File.read(args[0])
206
- LucaDeal::Invoice.settle(str)
206
+ LucaDeal::Invoice.settle(str, params[:term])
207
207
  end
208
208
  end
209
209
 
@@ -390,11 +390,13 @@ when /invoices?/, 'i'
390
390
  LucaCmd::Invoice.mail(args, params)
391
391
  end
392
392
  when 'settle'
393
+ params[:term] = 1
393
394
  OptionParser.new do |opt|
394
395
  opt.banner = 'Usage: luca-deal invoices settle [filepath]'
396
+ opt.on('--search-term VAL', 'search invoice N months before payment date. default: 1') { |v| params[:term] = v.to_i }
395
397
  args = opt.parse(ARGV)
398
+ LucaCmd::Invoice.settle(args, params)
396
399
  end
397
- LucaCmd::Invoice.settle(ARGV)
398
400
  else
399
401
  puts 'Proper subcommand needed.'
400
402
  puts
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucaDeal
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuma Takahiro
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lucarecord
@@ -103,7 +103,7 @@ metadata:
103
103
  homepage_uri: https://github.com/chumaltd/luca/tree/master/lucadeal
104
104
  source_code_uri: https://github.com/chumaltd/luca/tree/master/lucadeal
105
105
  changelog_uri: https://github.com/chumaltd/luca/tree/master/lucadeal/CHANGELOG.md
106
- post_install_message:
106
+ post_install_message:
107
107
  rdoc_options: []
108
108
  require_paths:
109
109
  - lib
@@ -118,8 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.2.5
122
- signing_key:
121
+ rubygems_version: 3.3.5
122
+ signing_key:
123
123
  specification_version: 4
124
124
  summary: Deal with contracts
125
125
  test_files: []