comee_core 0.3.36 → 0.3.38

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fca034fb60309594217c46bacbd0bfe6e62ed13ee989f07917df122be234e2c4
4
- data.tar.gz: 7573a165ecca8a15b3689dd4c898754768df279034848263c3352fe5c662c708
3
+ metadata.gz: f24bf85150707bf055d33beb60ab6255121975d0287b6dcf0a0f2c5301ee24dc
4
+ data.tar.gz: 59f736afd6f9c4919a9123672d40f3aa2abda42f9ccc4c0ec50279f5e645b72e
5
5
  SHA512:
6
- metadata.gz: 67abeb20f05c27baeaf8a799b69a0a07e25ffb445d5e31e2ea8aea4afd908efea5e431c4c645c9f2f38a5e95c46eeeec5c0bae90e21d958bb98175cca180f03a
7
- data.tar.gz: 6c38ff63dd165b372b55421e82bae12da248432dda5087db07acb9e6d40d7f9306c1f2cae4c70cd8b72c536c2151c8ce5631f0b9ed6c88ab4996d8e5e7aa2647
6
+ metadata.gz: 14f20b4731201268d259c432ed1bf8c1f949f04ea3be5aab30161b3205ecf8c2d5ca934aa35ea2f25f8498304820209b7f4d2059869c0ccc50172ecca2cd4927
7
+ data.tar.gz: f42dbab7b458ff1d8aaeb7f87eea054698e619b4098d459b61c857b6cc30dccc52f010ecc899cff53dadca9a38683da9a939dad5a4b205ae03e3aea2c8781370
@@ -20,8 +20,9 @@ module Comee
20
20
 
21
21
  def fetch_customer_item_alias
22
22
  self.customer_item_alias = "" unless customer_order && product_id
23
+ client_id = customer_order.client.parent_id || customer_order.client_id
23
24
  lookup = ProductLookup.find_by(
24
- itemable_id: customer_order.client_id,
25
+ itemable_id: client_id,
25
26
  itemable_type: "Comee::Core::Client",
26
27
  product_id: product_id
27
28
  )
@@ -1,6 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class PurchaseOrderItem < ApplicationRecord
4
+ default_scope { order(serial_no: :asc) }
5
+
4
6
  before_save :calculate_total_price, :calculate_confirmation_values
5
7
  after_save :update_purchase_order
6
8
  after_destroy :update_purchase_order
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.3.36".freeze
3
+ VERSION = "0.3.38".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.36
4
+ version: 0.3.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-21 00:00:00.000000000 Z
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers