comee_core 0.1.34 → 0.1.36
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0073a3f0100eb17a82500a1ae15c6cc118262be70542bfc516b662990da3de40
|
4
|
+
data.tar.gz: 70e6fc9c160b2f499c039e9697832980666ac5746493dab5f604d6e1ee6e51e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4232e5d33dd769a1021f9e607d4016ed77f75bb1e6a60ed408be97a3b7b03ef7e077906f067b65c77e2689f52d3a1a7bded880661fd9166e9d319c87ac5d95b0
|
7
|
+
data.tar.gz: 9dc773b6faeec9c77ac2b8f35d76e576ca614ce8bd5159a45f55cc30aa01a11a8591d041239de98199cae732153911ea71c266f1a7ee3fea8adff7b2fcd7c137
|
@@ -18,7 +18,7 @@ module Comee
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def model_params
|
21
|
-
params.require(:payload).permit(:valid_from, :valid_to, :price, :
|
21
|
+
params.require(:payload).permit(:valid_from, :valid_to, :price, :product_id, :discount, :client_id, :previous_price,
|
22
22
|
:unit_id)
|
23
23
|
end
|
24
24
|
end
|
@@ -15,8 +15,8 @@ module Comee
|
|
15
15
|
def validate_primary_price
|
16
16
|
return unless product && primary
|
17
17
|
|
18
|
-
|
19
|
-
return unless
|
18
|
+
price = MasterPrice.find_by(product: product, primary: true, status: Price.statuses[:current])
|
19
|
+
return unless price && primary && price.id != id
|
20
20
|
|
21
21
|
errors.add(:base, "There is already a primary price entry for item '#{product.code}'")
|
22
22
|
end
|
data/lib/comee/core/version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.36
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|