comee_core 0.2.0 → 0.2.1

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: 57905a1877a1cfdd9fea4c9e066e0f9ee22917dac5b52da002c2c6870f8599da
4
- data.tar.gz: fd73641d6b2535751080b5d582b96e4f8506b192f990b664644afaef4a187b7b
3
+ metadata.gz: 2d7cf157e4f4751fc575616de0c6828c89b2fff51cf7dcd28347feb7f668ad6b
4
+ data.tar.gz: 1dac2167d8e7419c2312ec89cf8e8276f56ed1ca6ef0ac6a71e24ec432cec1bf
5
5
  SHA512:
6
- metadata.gz: 74ed17525f0cad01052f2b1b3f4dbe72dc6c155422e738ca441686402b3fa19ab1c6c616021c211e918b39d05d00cef643b0cbf7e634250bc1a72d4c8a838fed
7
- data.tar.gz: 78ddd02578f0e92d16d75e04399d08d081fd9d00e989c4ea76c6c7ec29b86686010a91032a2e3de26369e817a997b7b1c7e554c0a1301e9ccc6d50a095fba79c
6
+ metadata.gz: 88c434b7eb17e6dba7c24911369d03128f0eaeed66409a5e6c1bce86b1648948ce07d6e4472c12c2bc3ada0aad59c79c8a9644921cb977c873c48b8aaab2bbec
7
+ data.tar.gz: 6307f0083025d5473b9a7bf14a1f43070bf4590e8a2c890070e203cc64842fc8c692dc721ea248aed3c606321962df6bf372269aabbf4e9bb6a7a8adcdca1367
@@ -60,7 +60,7 @@ module Comee
60
60
  def model_params
61
61
  params.require(:payload).permit(:order_number, :customer_order_id, :payment_penalty, :payment_term, :delivery_term, :status,
62
62
  :fulfillment_center_id, :total_price, :amount_paid, :pallete_note, :handover_date, :remark,
63
- :client_id, files: [])
63
+ :consignee, :client_id, files: [])
64
64
  end
65
65
 
66
66
  def back_order_params
@@ -61,7 +61,7 @@ module Comee
61
61
 
62
62
  def model_params
63
63
  params.require(:payload).permit(:sales_order_item_id, :quantity, :shipment_status, :status, :handover_date, :delivery_date,
64
- :pallet_no)
64
+ :pallet_no, :consignee, :order_number)
65
65
  end
66
66
  end
67
67
  end
@@ -2,7 +2,7 @@ module Comee
2
2
  module Core
3
3
  class ItemStatus < ApplicationRecord
4
4
  INITIALIZED = "Initialized".freeze
5
- DELIVERY_NOTE_CREATED = "Delivery note created".freeze
5
+ DELIVERY_NOTE_CREATED = "Delivery Note Created".freeze
6
6
  COMPLETELY_PICKED_AND_PACKED = "Completely Picked & Packed".freeze
7
7
  PARTIALLY_PICKED_AND_PACKED = "Partially Picked & Packed".freeze
8
8
 
@@ -6,7 +6,7 @@ module Comee
6
6
  belongs_to :sales_order_item
7
7
  has_many :item_statuses
8
8
 
9
- validates :handover_date, :delivery_date, :shipment_status, :status, presence: true
9
+ validates :handover_date, :delivery_date, :shipment_status, :status, :order_number, presence: true
10
10
  validates :quantity, presence: true, numericality: {greater_than: 0}
11
11
 
12
12
  def self.ransackable_attributes(_auth_object = nil)
@@ -2,7 +2,7 @@ module Comee
2
2
  module Core
3
3
  class SalesOrderSerializer < ActiveModel::Serializer
4
4
  attributes :id, :order_number, :payment_penalty, :status, :total_price, :payment_term, :delivery_term, :amount_paid,
5
- :pallete_note, :handover_date, :remark, :parent_client_name, :created_by, :files_url, :customs_detail
5
+ :pallete_note, :handover_date, :remark, :parent_client_name, :created_by, :files_url, :customs_detail, :consignee
6
6
  belongs_to :customer_order
7
7
  belongs_to :client
8
8
  belongs_to :fulfillment_center
@@ -1,7 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class ShipmentItemSerializer < ActiveModel::Serializer
4
- attributes :id, :quantity, :shipment_status, :status, :handover_date, :delivery_date, :pallet_no
4
+ attributes :id, :quantity, :shipment_status, :status, :handover_date, :delivery_date, :pallet_no, :consignee,
5
+ :order_number
5
6
  belongs_to :sales_order_item
6
7
  end
7
8
  end
@@ -141,6 +141,7 @@ module Comee
141
141
  customer_order: order,
142
142
  status: SalesOrder.statuses[:draft],
143
143
  client: order.client,
144
+ consignee: order.consignee,
144
145
  created_by: accepted_by || ""
145
146
  )
146
147
  order_items = order.customer_order_items.includes(:product, :unit)
@@ -14,6 +14,7 @@ class CreateComeeCoreSalesOrders < ActiveRecord::Migration[7.0]
14
14
  null: false,
15
15
  index: {name: "client_on_ccso_indx"},
16
16
  foreign_key: {to_table: :comee_core_clients}
17
+ t.string :consignee
17
18
  t.string :parent_client_name
18
19
  t.string :payment_term
19
20
  t.string :delivery_term
@@ -11,6 +11,8 @@ class CreateComeeCoreShipmentItems < ActiveRecord::Migration[7.1]
11
11
  t.date :handover_date, null: false
12
12
  t.date :delivery_date, null: false
13
13
  t.string :pallet_no
14
+ t.string :consignee
15
+ t.string :order_number, null: false
14
16
 
15
17
  t.timestamps
16
18
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.0".freeze
3
+ VERSION = "0.2.1".freeze
4
4
  end
5
5
  end
@@ -11,6 +11,7 @@ FactoryBot.define do
11
11
  amount_paid { 0 }
12
12
  status { Comee::Core::SalesOrder.statuses[:draft] }
13
13
  pallete_note { Faker::Lorem.sentence }
14
+ consignee { Faker::Name.name }
14
15
  remark { Faker::Lorem.sentence }
15
16
  parent_client_name { Faker::Name.name }
16
17
  created_by { Faker::Name.name }
@@ -7,5 +7,7 @@ FactoryBot.define do
7
7
  handover_date { Date.current.advance(days: 3) }
8
8
  delivery_date { Date.current.advance(days: 6) }
9
9
  pallet_no { Faker::Alphanumeric.alpha(number: 10) }
10
+ consignee { Faker::Name.name }
11
+ order_number { sales_order_item.sales_order.order_number }
10
12
  end
11
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.