ecom_core 1.0.14 → 1.0.15
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 +4 -4
- data/app/models/ecom/core/payment.rb +8 -6
- data/app/models/ecom/core/payment_detail.rb +2 -1
- data/db/migrate/20200207035823_add_approved_column_to_payment.rb +5 -0
- data/db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb +5 -0
- data/lib/ecom/core/version.rb +1 -1
- data/spec/factories/ecom/core/payment_details.rb +5 -4
- data/spec/factories/ecom/core/payments.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2346f4c0429ae35add67d619cf42043f3e6ab6deaf6f3e839cdad2b6ca0a7f5b
|
4
|
+
data.tar.gz: 4c80e787d737e72bba5c92c3f7ab75df9959a5db765406438cd8e0af3f6a5424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee58fedfa253906dffc05a15afd4b8ad153db9c9a674ccbeba7df9c0750647ff01e97453e0bb958cfad5a346c75cfc9abb482993a8bcb65efb509c5452192ac4
|
7
|
+
data.tar.gz: 9f4bf29fc4b9f53fbfa35985d1331a9230882de43a3c77d75b0aa468ae7244164d24d22ef1b0570c27c19e5dcf0fd256d3a85361a2e5cea6b623c1bb976e8509
|
@@ -1,7 +1,9 @@
|
|
1
|
-
module Ecom
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module Ecom
|
2
|
+
module Core
|
3
|
+
class Payment < ApplicationRecord
|
4
|
+
belongs_to :payroll
|
5
|
+
has_many :payment_details, class_name: 'Ecom::Core::PaymentDetail', dependent: :destroy
|
6
|
+
validates :from, :to, presence: true
|
7
|
+
end
|
6
8
|
end
|
7
|
-
end
|
9
|
+
end
|
@@ -4,7 +4,8 @@ module Ecom
|
|
4
4
|
belongs_to :crew
|
5
5
|
belongs_to :payment
|
6
6
|
|
7
|
-
validates :hours, :ot_hours, :base_salary, :overtime, :gross_salary, :tax, :pension, :net_salary,
|
7
|
+
validates :hours, :ot_hours, :base_salary, :overtime, :gross_salary, :tax, :pension, :net_salary, :net_pay,
|
8
|
+
presence: true
|
8
9
|
end
|
9
10
|
end
|
10
11
|
end
|
data/lib/ecom/core/version.rb
CHANGED
@@ -4,10 +4,11 @@ FactoryBot.define do
|
|
4
4
|
ot_hours { 1.5 }
|
5
5
|
base_salary { 1.5 }
|
6
6
|
overtime { 1.5 }
|
7
|
-
gross_salary {
|
8
|
-
tax {
|
9
|
-
pension {
|
10
|
-
net_salary {
|
7
|
+
gross_salary { 100 }
|
8
|
+
tax { 15 }
|
9
|
+
pension { 5 }
|
10
|
+
net_salary { 80 }
|
11
|
+
net_pay { 80 }
|
11
12
|
association :crew
|
12
13
|
association :payment
|
13
14
|
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.0.
|
4
|
+
version: 1.0.15
|
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-02-
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aasm
|
@@ -252,6 +252,8 @@ files:
|
|
252
252
|
- db/migrate/20200126081005_create_ecom_core_payrolls.rb
|
253
253
|
- db/migrate/20200126082103_create_ecom_core_payments.rb
|
254
254
|
- db/migrate/20200126183218_create_ecom_core_payment_details.rb
|
255
|
+
- db/migrate/20200207035823_add_approved_column_to_payment.rb
|
256
|
+
- db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb
|
255
257
|
- lib/ecom/core.rb
|
256
258
|
- lib/ecom/core/engine.rb
|
257
259
|
- lib/ecom/core/version.rb
|