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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2a2d3b649cc7d706426630befadcda681cb80e886fb1347a9621c2c2db38a6c
|
|
4
|
+
data.tar.gz: fb61fef9d7d60138b51e833009f467389ce76323c72cbe32d96b5016ca93f26f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/cats/core/version.rb
CHANGED