comee_core 0.2.7 → 0.2.9

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: 670586905f9895d6c3487ff94875e86da88ce295d4ad6d6872c2e6444fab879e
4
- data.tar.gz: 7f07f76dc1f4c5bc4b1612377d97cd3060ce87a37e4f816ce2881da2b91dee3d
3
+ metadata.gz: 75cd14e3ed3329b96dc20bf368531adf8815d87203806676981c474c4424ed81
4
+ data.tar.gz: c6acddbca363dded60b68edb8294ef976851ba74a1e8ae1c69345ec6afd4849c
5
5
  SHA512:
6
- metadata.gz: d55b0187ea81f6d91b4ed5a5fc0ca02c35fbf749f54a9f8d0ae08fc90a93118c9f73ba4ac0a75a7ca62e01944deca58ac449f41efbed1f667ae2fa6abd4da8de
7
- data.tar.gz: 92f2a3bf4ff75fd5f9a00b117f1e5fa18cf71f2cd764fff183211076859f999f212ae61cf844ece48aa74a758a09074799be4e85868cfc5832d86f419852963f
6
+ metadata.gz: 31ebedac27bceca15a479cb24855c87587279eb2b356101a86a8216426e20f4b80929977559ccb86a1b3489b0fd4b86caad61f70dc22790673abbff9380e9e71
7
+ data.tar.gz: 6272f45a27fa7124ff0b86a1076113ed525821d3814da39d48f6a3d3bfabdf5bfdb0eb314563d17985bd879b51eca4b57ad43d92d6589d2155b8587baf2feb0b
@@ -1,6 +1,7 @@
1
1
  module Comee
2
2
  module Core
3
3
  class AdditionalItem < ApplicationRecord
4
+ before_save { self.total_price = unit_price * quantity }
4
5
  belongs_to :invoice
5
6
 
6
7
  validates :quantity, :unit_price, presence: true, numericality: {greater_than: 0}
@@ -1,7 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class ClientSerializer < ActiveModel::Serializer
4
- attributes :id, :code, :name, :address, :locale, :user_id, :user_name, :consignees, :shipment_addresses, :currency
4
+ attributes :id, :code, :name, :address, :locale, :user_id, :user_name, :parent_id, :consignees, :shipment_addresses,
5
+ :currency
5
6
  belongs_to :parent
6
7
  has_many :agents
7
8
  has_many :contacts
@@ -1,9 +1,10 @@
1
1
  module Comee
2
2
  module Core
3
3
  class CustomerOrderItemSerializer < ActiveModel::Serializer
4
- attributes :id, :customer_item_no, :quantity, :price, :delivery_date, :canceled, :product, :unit
4
+ attributes :id, :customer_item_no, :quantity, :price, :total_price, :delivery_date, :canceled
5
5
  belongs_to :product
6
6
  belongs_to :unit
7
+ belongs_to :customer_order
7
8
  end
8
9
  end
9
10
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.7".freeze
3
+ VERSION = "0.2.9".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.2.7
4
+ version: 0.2.9
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-01-25 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers