cats_core 1.5.13 → 1.5.14

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: 3ab42e1862e55f7fd4c141b694da468de2c4a6c3c093e6238a9159492edeaf04
4
- data.tar.gz: 2e9e396b186d5389ab6930c61e243f914090a784127e67dda60dc2822801ffd8
3
+ metadata.gz: 6e2ffcd4caf018a81ee3d83fabd7b7e20ddf97c9f6309a66a005805c78c41bc4
4
+ data.tar.gz: 4d139393006f70306d84cbef40f273e1e578cf855783f63dc1ee37ff2d2e979f
5
5
  SHA512:
6
- metadata.gz: b703a292db548f017176d762e143068063ec9121388e7e834d32f4042fe6ba1af438236f30cc9964c86b219d58c8dcb6869294645225de24e10369f3cb231c96
7
- data.tar.gz: b90cea5c544273ad3ae0302b5e444e4041a5deaa4343b64a32a68d4831804a0aae45a3b9ac072c3629bff987a3bd0c2556183131d94f6c9c2c5a58db798c8c8f
6
+ metadata.gz: '0309049d3508085b5cacfb155388fab2de02480a91b7869b9b2f1f5e8a51e6f574a70955e04aaa8b9524fd3f374410a27c864217d524557015eaf08b293ff57c'
7
+ data.tar.gz: 3667ef926f2952820d2b6c73c20fe3515ccdd411f7e8b91605e90f7e3bcaba7507611f74f76a2f389e4236eb96ca63ab4e6ef10da74c146b97b753dc5dec595f
@@ -61,6 +61,7 @@ module Cats
61
61
 
62
62
  def region
63
63
  return nil if dispatchable.instance_of?(RhnRequest)
64
+ return dispatch_plan_items.first.source.parent.name if dispatchable.nil?
64
65
 
65
66
  dispatchable.region.name
66
67
  end
@@ -13,7 +13,7 @@ module Cats
13
13
 
14
14
  validates :reference_no, :request_date, :quantity, presence: true
15
15
  validates :reference_no, uniqueness: true
16
- validates :quantity, numericality: { greater_than: 0 }
16
+ validates :quantity, numericality: { greater_than_or_equal_to: 0 }
17
17
  validates :status, presence: true, inclusion: { in: STATUSES }
18
18
  validate :validate_commodity_status, :validate_quantity
19
19
 
@@ -3,7 +3,7 @@ module Cats
3
3
  class ReceiptAuthorizationSerializer < ActiveModel::Serializer
4
4
  attributes :id, :dispatch_id, :dispatch_reference_no, :store_id, :store_name, :quantity, :received_quantity,
5
5
  :remark, :status, :authorized_by_id, :authorizer_full_name, :auth_details, :plate_no, :driver_name,
6
- :dispatch_status, :unit_id, :unit_abbreviation
6
+ :dispatch_status, :unit_id, :unit_abbreviation, :driver_confirmed
7
7
  end
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.5.13'.freeze
3
+ VERSION = '1.5.14'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.13
4
+ version: 1.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-10 00:00:00.000000000 Z
11
+ date: 2023-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers