comee_core 0.2.98 → 0.3.0

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: 12a907ae7e504f6f0796b7f0777cf89a56e3f6097811794b4d567c7fec3e9214
4
- data.tar.gz: 604542b904e0f817c438c176f11d428546584385db9b7ede50a1b6e90fea9ab6
3
+ metadata.gz: 521259eb0c767a6dddab837b5d613c06cb8acb2fd5ce3ad6db25baab15699d63
4
+ data.tar.gz: a8de0c041aac3c4f9e45edd953d4d88ace6867a7f15e3a9c8b5217f6542387e4
5
5
  SHA512:
6
- metadata.gz: 2ab6844b316c7081b1cffc19679dfcc77d15660bca716a2e58019045e5e3ae5e735ccca1ba058bc4da6af24b91a2ec80ef40a752a206f87d67d3856a0ae32519
7
- data.tar.gz: 608d439996284d86b66c3bf63299426cc96ef1d504b7104ac0699c911fe89109b1635c2c6464ec3aabad01dc935ad438e6ef562b32281ac1a41ebabfa0731c1e
6
+ metadata.gz: 7f3df1fafcd3c7284ea6854b88edb63c3a8c8ae4b6d1ce01059e9c3599c6e76c153eeed696f13450b754e13d3f7d9b2c04b1ac87eed61bd9cefacde55ee0666c
7
+ data.tar.gz: c68b224fc40c934f93c8ae85c84f40de3d71a32d1f7f0b9f89ccb737fbb37576b0df39f51bbfa93e7da705623d224e006fe39061fb5b66af8a7c54deb021a8f8
@@ -21,7 +21,6 @@ module Comee
21
21
  data = CustomerOrderItem.includes(:product, :unit)
22
22
  .ransack(params[:q])
23
23
  .result
24
- .order(:serial_no)
25
24
  render_content(data, {include: ["unit"]})
26
25
  end
27
26
 
@@ -23,7 +23,7 @@ module Comee
23
23
  :source,
24
24
  :product,
25
25
  :unit
26
- ).ransack(params[:q]).result.order(:serial_no)
26
+ ).ransack(params[:q]).result
27
27
  render_content(data)
28
28
  end
29
29
 
@@ -10,7 +10,7 @@ module Comee
10
10
  validates :order_number, :order_date, :delivery_address, :invoice_address, :status, presence: true
11
11
 
12
12
  def self.ransackable_attributes(_auth_object = nil)
13
- %w[id client_id delivery_address invoice_address order_number status]
13
+ %w[id client_id delivery_address invoice_address order_number status final_destination consignee]
14
14
  end
15
15
 
16
16
  def self.ransackable_associations(_auth_object = nil)
@@ -1,6 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class CustomerOrderItem < ApplicationRecord
4
+ default_scope { order(serial_no: :asc) }
5
+
4
6
  before_save :calculate_total_price
5
7
 
6
8
  belongs_to :customer_order
@@ -40,12 +40,14 @@ module Comee
40
40
  order_number
41
41
  status
42
42
  purchase_status
43
+ consignee
44
+ destination
43
45
  customer_order_id
44
46
  ]
45
47
  end
46
48
 
47
49
  def self.ransackable_associations(_auth_object = nil)
48
- ["client"]
50
+ %w[client customer_order]
49
51
  end
50
52
 
51
53
  def files_url
@@ -1,6 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class SalesOrderItem < ApplicationRecord
4
+ default_scope { order(serial_no: :asc) }
5
+
4
6
  before_save :calculate_total_price
5
7
  before_save :calculate_handover_date
6
8
  after_save :update_sales_order_purchase_status, if: proc { |item| item.fully_processed? }
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.98".freeze
3
+ VERSION = "0.3.0".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.98
4
+ version: 0.3.0
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-06-19 00:00:00.000000000 Z
11
+ date: 2024-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers