comee_core 0.3.23 → 0.3.25

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: 1555e4a26a902509533422b46943bf5a6532fe9204c22f8b9f9e8e9576ba9414
4
- data.tar.gz: d89f51d3c5385c1a709446455e542575dcc0466963f6ec51342d4a21af9549e0
3
+ metadata.gz: '044489f1d3935fee022755dd378d80632122340169deb3ca44d2d5551372e936'
4
+ data.tar.gz: 10d6f6000331d28ae3395e9d48cd9fd26ad653a439670ac003a3729ec40d8310
5
5
  SHA512:
6
- metadata.gz: 81928ddaec6a3bb0a3b44ec4f1243d9ec9dec84272764ba2c5ef0c0c52aa82b9b1bd26583370a4a7bf7503c103bdb66bfb5aee1d89f99680a93e181d45c86904
7
- data.tar.gz: 0d0ba19b1ee9825b8756e5e2a2d9157b6410600f8a68a176dcdcb15c179f54a205527d3f9e5896a0721a110d789b9fc05bc8634d3773b7a711e18e258de428c8
6
+ metadata.gz: 7cefb01b5c8706c79fa580a7d8ae5e8107fa00ea622c0f7cc81ffd07b6e88798c7285ee13f85fa4bfa1e5b562343884af5610976a415ccbc85bd1580d5b9a8ae
7
+ data.tar.gz: 1bec632932e6884141d502201457defbb7df40ea315cdcb11b3314d9fa5c4d292e1f5e2405f8c7f4bdcd565083cfbde1f2d35d30701af6140f29d4eac90a0bd8
@@ -194,6 +194,7 @@ module Comee
194
194
  raise(StandardError, "No primary supplier found for product #{item.customer_item_no}") unless master_price
195
195
 
196
196
  product_lookup = master_price.product_lookup
197
+ order_price = convert_price(item.price, item.unit_id, unit_id)
197
198
  price = if client_price
198
199
  convert_price(client_price.price, client_price.unit_id, unit_id)
199
200
  else
@@ -210,6 +211,7 @@ module Comee
210
211
  customer_item_description: item.customer_item_description,
211
212
  quantity: quantity,
212
213
  price: price,
214
+ price_diff: price - order_price,
213
215
  total_price: quantity * price,
214
216
  delivery_date: item.delivery_date,
215
217
  handover_date: order.handover_date,
@@ -217,8 +219,8 @@ module Comee
217
219
  additional_details: {
218
220
  supplier_id: master_price.supplier_id,
219
221
  supplier_name: master_price.supplier.name,
220
- supplier_item_no: product_lookup.code,
221
- supplier_description: product_lookup.item_description,
222
+ supplier_item_no: product_lookup&.code,
223
+ supplier_description: product_lookup&.item_description,
222
224
  country_of_origin: master_price&.country_of_origin&.name
223
225
  }
224
226
  }
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.3.23".freeze
3
+ VERSION = "0.3.25".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.23
4
+ version: 0.3.25
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-06 00:00:00.000000000 Z
11
+ date: 2024-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers