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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bd257f6678b4a6d2d47ef80cd2748716388301e49b71af403d2822171486e12
4
- data.tar.gz: 2a59d7ff332a8cad20eb48dab49ed92f7209f7211bd0fc2b0ce26fa565fe42b2
3
+ metadata.gz: 2346f4c0429ae35add67d619cf42043f3e6ab6deaf6f3e839cdad2b6ca0a7f5b
4
+ data.tar.gz: 4c80e787d737e72bba5c92c3f7ab75df9959a5db765406438cd8e0af3f6a5424
5
5
  SHA512:
6
- metadata.gz: b13fc4b2805f9d1b6459606bc672d2277ec41c8dc111269b29a89847383e845ecd7b22d265a7da697b7401c01d309898e655dd4fde2cab01b249fea6b9a4f61c
7
- data.tar.gz: bb82c30965b9e6d2b81acc10c86c1171082fee2e3d8fdae3a9894caf4c180c4477edf5bdf53dfc0ff678ebecc615092f9548b87119b3e09e32531a3cf388889d
6
+ metadata.gz: ee58fedfa253906dffc05a15afd4b8ad153db9c9a674ccbeba7df9c0750647ff01e97453e0bb958cfad5a346c75cfc9abb482993a8bcb65efb509c5452192ac4
7
+ data.tar.gz: 9f4bf29fc4b9f53fbfa35985d1331a9230882de43a3c77d75b0aa468ae7244164d24d22ef1b0570c27c19e5dcf0fd256d3a85361a2e5cea6b623c1bb976e8509
@@ -1,7 +1,9 @@
1
- module Ecom::Core
2
- class Payment < ApplicationRecord
3
- belongs_to :payroll
4
- has_many :payment_details, class_name: 'Ecom::Core::PaymentDetail'
5
- validates :from, :to, presence: true
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, presence: true
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
@@ -0,0 +1,5 @@
1
+ class AddApprovedColumnToPayment < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :ecom_core_payments, :approved, :boolean, null: false, default: false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddNetPayColumnToPaymentDetails < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :ecom_core_payment_details, :net_pay, :float, null: false, default: 0
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module Ecom
2
2
  module Core
3
- VERSION = '1.0.14'.freeze
3
+ VERSION = '1.0.15'.freeze
4
4
  end
5
5
  end
@@ -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 { 1.5 }
8
- tax { 1.5 }
9
- pension { 1.5 }
10
- net_salary { 1.5 }
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
@@ -2,6 +2,7 @@ FactoryBot.define do
2
2
  factory :payment, class: 'Ecom::Core::Payment' do
3
3
  from { Date.parse('2000-01-01') }
4
4
  to { Date.parse('2000-01-15') }
5
+ approved { false }
5
6
  association :payroll
6
7
  end
7
8
  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.14
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-04 00:00:00.000000000 Z
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