cats_core 1.4.12 → 1.4.13

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: 3724badb244476dc73d7c35fac9971114160be9781ba3a386f2d35ef70226324
4
- data.tar.gz: 9f29cd5757d75472e03f8baa3bd4421fc78109d50612955ebdd666a354c17ca6
3
+ metadata.gz: c2a2d3b649cc7d706426630befadcda681cb80e886fb1347a9621c2c2db38a6c
4
+ data.tar.gz: fb61fef9d7d60138b51e833009f467389ce76323c72cbe32d96b5016ca93f26f
5
5
  SHA512:
6
- metadata.gz: e5a859815e6420692ab833b54372ae47c0fbf835b8384c8d18421eadb79125deb3a2c91ae740dfb9abe1817bf7e01e45cc14312e94d95aaadaade3e767a64dfe
7
- data.tar.gz: a85113ab315551f8684accc9d21345b684d9762c73bfc44538bf6d8ac30a4d8e1f2aea24620fc0ebdee000f97de0ae18745b72a28a68cb6f44f6e3b9b184b209
6
+ metadata.gz: '090040e502dd0cca57b485ec9fd17deed37c9fec16d3ac39ee28e274b82ebacc2e9a77e38942e5cfdbc864c843de3c820ea0b4e469422694351a15754a7c3e9d'
7
+ data.tar.gz: b98de5aa7d98ce805bf738c3250268f2746fcf212233b9e3bbd30d87b072e98e54e03a53f490d90762182ad2b3387667fd460ef6aeb480a8c14fcb6c46b2d052
@@ -9,10 +9,16 @@ module Cats
9
9
  belongs_to :prepared_by, class_name: 'Cats::Core::User'
10
10
  belongs_to :approved_by, class_name: 'Cats::Core::User', optional: true
11
11
 
12
+ has_many :transport_order_items
13
+
12
14
  validates :status, presence: true, inclusion: { in: STATUSES }
13
15
  validates :order_date, presence: true
14
16
  validate :validate_against_requisition
15
17
 
18
+ delegate(:full_name, to: :prepared_by, prefix: true)
19
+ delegate(:full_name, to: :approved_by, prefix: true, allow_nil: true)
20
+ delegate(:reference_no, to: :transport_requisition, prefix: 'requisition')
21
+
16
22
  def validate_against_requisition
17
23
  return unless transport_requisition
18
24
 
@@ -11,6 +11,9 @@ module Cats
11
11
  validates :transport_requisition_item_id, uniqueness: true
12
12
  validate :validate_requisition
13
13
 
14
+ delegate(:name, to: :transporter, prefix: true)
15
+ delegate(:contract_no, to: :transport_contract, prefix: false)
16
+
14
17
  def validate_requisition
15
18
  return unless transport_requisition_item
16
19
 
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.4.12'.freeze
3
+ VERSION = '1.4.13'.freeze
4
4
  end
5
5
  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.4.12
4
+ version: 1.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.