ecom_core 1.2.19 → 1.2.20
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 57de1b5bb610121618f09d6623d8f83e5c38e4d0f91415264c0c90008c4aca92
|
|
4
|
+
data.tar.gz: 2d1c048ac5692e8675a86a3fd769f5a3200be47d7790fd7df1ac25a7f1e6b045
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d32fb2ceea452a4327a86d3b0521ba719ed45bbf1392c754270686aeca4fb406bba683bb4ce7a60748ddcbd74f7fe1f955701eea507d5077b10ab6dfa23ac0c
|
|
7
|
+
data.tar.gz: 2a89d665d5ca5899193ce27d423ada50b36bf03a5a728c803b7839e0d15bab8a875eebd43152d66fbe7e378fdfd7522ac80cc4763f0903cfc7c1bcc195dbb4ec
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
module Ecom
|
|
2
2
|
module Core
|
|
3
3
|
class Company < ApplicationRecord
|
|
4
|
+
# The settings attribute is a json string containing setting key value
|
|
5
|
+
# pairs. The valid settings are:
|
|
6
|
+
# payroll_periods => a list of payroll period values. Each
|
|
7
|
+
# payroll period has the following entries:
|
|
8
|
+
# order: A numeric value indicating the order of the period.
|
|
9
|
+
# date: A numeric value indicating the date of each month which
|
|
10
|
+
# upto which timesheet data is used for payroll calculation
|
|
11
|
+
# for the specific period.
|
|
12
|
+
# comparison: One of [:exact, :days_before_month_end]. :exact will
|
|
13
|
+
# force calculations to be made upto the exact mentioned date
|
|
14
|
+
# value, whereas :days_before_month_end is often used for last
|
|
15
|
+
# period payroll calculation and we want to specify on which date
|
|
16
|
+
# before the end of the month we have to limit timesheet data to
|
|
17
|
+
# calculate payroll. E.g. 3 days before month end would be 27th
|
|
18
|
+
# for september and 28th for october.
|
|
19
|
+
#
|
|
20
|
+
# period_count - the total number of periods per month for payroll.
|
|
21
|
+
# this value should align with the defined payroll periods.
|
|
22
|
+
#
|
|
4
23
|
has_many :projects
|
|
5
24
|
|
|
6
25
|
validates :code, :name, :address, :telephone, presence: true
|
|
7
26
|
validates :code, :name, uniqueness: true
|
|
27
|
+
|
|
28
|
+
def valid_settings?
|
|
29
|
+
settings['payroll_periods'].count == settings['period_count']
|
|
30
|
+
end
|
|
8
31
|
end
|
|
9
32
|
end
|
|
10
33
|
end
|
data/lib/ecom/core/version.rb
CHANGED
|
@@ -7,5 +7,11 @@ FactoryBot.define do
|
|
|
7
7
|
address { FFaker::Address.street_address }
|
|
8
8
|
telephone { FFaker::PhoneNumber.phone_number }
|
|
9
9
|
email { FFaker::Internet.email }
|
|
10
|
+
settings do
|
|
11
|
+
{
|
|
12
|
+
payroll_periods: [{ order: 1, date: 25, comparison: :exact }],
|
|
13
|
+
period_count: 1
|
|
14
|
+
}
|
|
15
|
+
end
|
|
10
16
|
end
|
|
11
17
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ecom_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henock L.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-07-
|
|
11
|
+
date: 2020-07-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aasm
|