comee_core 0.2.65 → 0.2.67

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: 4944851ea495743b5fe38687517871bfc140ad2044f598b76d3786ed334b6453
4
- data.tar.gz: dad5b71f98974372b49ead6c185fa4d3dd0dfeba43359ecda70447ec18158402
3
+ metadata.gz: 42a4484f045bd64b57ff6277774d9629f31057f41a16c12026c9bfdf8efc4098
4
+ data.tar.gz: ea1ea191cee2d8a56c65923494b5929df440464d183af5f3cb549cb6ff23134d
5
5
  SHA512:
6
- metadata.gz: 572fd16292ba35bebf9467c34221d835ef71e21d3ce4ff8b0782acf9c8bdfa125e8f8e3db2c56c0785d4443bd12c0c91bf3d94aeb2fbd754ef92b77d7adafdd7
7
- data.tar.gz: 61dc25ee6b868f3077ce87183145a5588d78e2f9f7b213abf0ee70ee991cdd1c1847b48ae35948be2c7850f0ffd142fb4f79bbe2058747293e11c38688a7782c
6
+ metadata.gz: 44d299831b095bd8814997d9e51460c114a766754257e78ec9d2cee0577a676cc1a252512a74ff2f38d33eeb6b59fda695cff8b6bedcacc8521f70c9e8844080
7
+ data.tar.gz: b097d47b965827a678d8ba76e0f6162a270d679831ea7f74ff81a5e9903f76738a4313408e97d3652be9b6aa9d64f972d66bc924dc16ebe8caa01e3c340f0654
@@ -39,8 +39,9 @@ module Comee
39
39
  private
40
40
 
41
41
  def model_params
42
- params.required(:payload).permit(:code, :name, :description, :parent_id, :thumbnail_image, :preferred_units, :source_id, :weight,
43
- :weight_unit_id, :dimensions, :hs_code, :hs_description, images: [])
42
+ params.required(:payload).permit(:code, :name, :description, :parent_id, :thumbnail_image, :source_id, :weight,
43
+ :weight_unit_id, :dimensions, :hs_code, :hs_description, images: [],
44
+ preferred_units: %i[id code label])
44
45
  end
45
46
 
46
47
  def price_params
@@ -123,7 +123,7 @@ module Comee
123
123
  params.require(:payload).permit(:order_number, :order_date, :customer_order_id, :fulfillment_center_id, :client_id,
124
124
  :order_terms, :shipment_address, :delivery_address, :invoice_address, :destination,
125
125
  :handover_date, :shipping_date, :delivery_date, :consignee, :payment_term, :delivery_term,
126
- :payment_penalty, :status, :total_price, :amount_paid, :pallete_note, :remark,
126
+ :payment_penalty, :status, :purchase_status, :total_price, :amount_paid, :pallete_note, :remark,
127
127
  files: [])
128
128
  end
129
129
 
@@ -1,8 +1,6 @@
1
1
  module Comee
2
2
  module Core
3
3
  class Client < ApplicationRecord
4
- before_save -> { self.subsidiary = !parent.nil? }
5
-
6
4
  belongs_to :user, optional: true
7
5
  belongs_to :parent, class_name: "Comee::Core::Client", optional: true
8
6
  belongs_to :currency, optional: true
@@ -3,8 +3,8 @@ module Comee
3
3
  class SalesOrderSerializer < ActiveModel::Serializer
4
4
  attributes :id, :order_number, :order_date, :order_terms, :shipment_address, :delivery_address, :invoice_address,
5
5
  :destination, :handover_date, :shipping_date, :delivery_date, :consignee, :parent_client_name, :payment_term,
6
- :delivery_term, :payment_penalty, :status, :total_price, :amount_paid, :pallete_note, :remark, :created_by,
7
- :files_url
6
+ :delivery_term, :payment_penalty, :status, :purchase_status, :total_price, :amount_paid, :pallete_note,
7
+ :remark, :created_by, :files_url
8
8
  belongs_to :customer_order
9
9
  belongs_to :client
10
10
  belongs_to :fulfillment_center
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.65".freeze
3
+ VERSION = "0.2.67".freeze
4
4
  end
5
5
  end
@@ -5,5 +5,6 @@ FactoryBot.define do
5
5
  delivery_date { Date.current.advance(days: 10) }
6
6
  remark { Faker::Lorem.sentence }
7
7
  status { Comee::Core::PurchaseRequisition.statuses[:draft] }
8
+ purchase_status { Comee::Core::PurchaseRequisition.purchase_statuses[:unprocessed] }
8
9
  end
9
10
  end
@@ -19,6 +19,7 @@ FactoryBot.define do
19
19
  delivery_term { Faker::Lorem.sentence }
20
20
  payment_penalty { 0 }
21
21
  status { Comee::Core::SalesOrder.statuses[:draft] }
22
+ purchase_status { Comee::Core::SalesOrder.purchase_statuses[:unprocessed] }
22
23
  total_price { 0 }
23
24
  amount_paid { 0 }
24
25
  pallete_note { Faker::Lorem.sentence }
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.65
4
+ version: 0.2.67
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-04-29 00:00:00.000000000 Z
11
+ date: 2024-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers