cats_core 1.3.27 → 1.3.28

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: 1076d840160f1faee39901d7f1d9ccf7926c0413739ebed870a740c66f2e2f08
4
- data.tar.gz: cfb54300abc22e4889a0cd75c83c47bf355f089cf84ca7645f743ee65ea4b69a
3
+ metadata.gz: 83f9bfdc22317ca433717055d41463cf8d70aed78994c62a9a924bcead85c561
4
+ data.tar.gz: ffcb5a3122bd29126aa6902388af57a8979b414fa8378f5bd9f4c364aea6029d
5
5
  SHA512:
6
- metadata.gz: 6e68a5e3f35ea31220701ca97df067eb03a16983ff8b32431b7a04c415d1ca1ea09b1943149cd098d52b3c704ca2a5ca0b9ca363e2bc3db5a92d1871e2202a11
7
- data.tar.gz: 5d90ebf4ed67ee13e9a351e7feea4d90429f6299e40a7349d23faf033ec1a41bcf6aed6c7023bb965451378d28242675c6af099a0d67d331ca053466b624f1c7
6
+ metadata.gz: 5b77e70633822f0dcc6db6caedd36c1f7baecd232b466a1bc975c02b29c32e7129fd6d767e800a5dd1c7b17ff9e2da9250f74d136797591a9c19043b07bddd8d
7
+ data.tar.gz: 2d29e1087a864c93d57a050f5fa6df3ff993abd63b060604f88bc7d2df282aa94ca5f48e1183b852a2974c1e5c0b36d5fd94082f3517181f1a2023363fb819bb
@@ -4,9 +4,10 @@ module Cats
4
4
  belongs_to :donation, optional: true
5
5
  belongs_to :commodity_category
6
6
  belongs_to :unit_of_measure
7
+ belongs_to :destination_warehouse, class_name: 'Cats::Core::Location'
7
8
 
8
9
  validates :reference_no, presence: true, uniqueness: true
9
- validates :gift_date, :quantity, presence: true
10
+ validates :gift_date, :quantity, :requested_by, :request_reference, presence: true
10
11
  validates :quantity, numericality: { greater_than: 0 }
11
12
 
12
13
  delegate(:name, to: :commodity_category, prefix: true)
@@ -4,6 +4,7 @@ class CreateCatsCoreDonations < ActiveRecord::Migration[6.1]
4
4
  t.string :reference_no, unique: true
5
5
  t.string :description
6
6
  t.string :donation_type, null: false
7
+ t.string :shipping_reference
7
8
  t.date :donated_on, null: false
8
9
  t.string :agency, null: false
9
10
  t.references :donor,
@@ -24,8 +24,15 @@ class CreateCatsCoreGiftCertificates < ActiveRecord::Migration[6.1]
24
24
  null: false,
25
25
  index: { name: 'uom_on_gc_indx' },
26
26
  foreign_key: { to_table: :cats_core_unit_of_measures }
27
+ t.references :destination_warehouse,
28
+ null: false,
29
+ index: { name: 'dw_on_gc_indx' },
30
+ foreign_key: { to_table: :cats_core_locations }
27
31
  t.float :estimated_price
28
32
  t.float :estimated_tax
33
+ t.string :registration_no
34
+ t.string :requested_by, null: false
35
+ t.string :request_reference, null: false
29
36
 
30
37
  t.timestamps
31
38
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.3.27'.freeze
3
+ VERSION = '1.3.28'.freeze
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ FactoryBot.define do
3
3
  reference_no { FFaker::Name.name }
4
4
  description { FFaker::Name.name }
5
5
  donation_type { Cats::Core::Donation::KIND }
6
+ shipping_reference { FFaker::Name.name }
6
7
  donated_on { Date.today }
7
8
  agency { 'WFP' }
8
9
  donor
@@ -5,6 +5,7 @@ FactoryBot.define do
5
5
  donation
6
6
  commodity_category { donation.commodity_category }
7
7
  unit_of_measure
8
+ destination_warehouse factory: :warehouse
8
9
  vessel { FFaker::Name.name }
9
10
  port { FFaker::Name.name }
10
11
  customs_declaration_no { FFaker::Name.name }
@@ -14,5 +15,8 @@ FactoryBot.define do
14
15
  quantity { 1.5 }
15
16
  estimated_price { 1.5 }
16
17
  estimated_tax { 1.5 }
18
+ registration_no { FFaker::Name.name }
19
+ requested_by { FFaker::Name.name }
20
+ request_reference { FFaker::Name.name }
17
21
  end
18
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.27
4
+ version: 1.3.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.