comee_core 0.2.39 → 0.2.41

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: 32785200832e8a063912ec5b0e5a52f458b75e5f0e8c8994a322b00f6a41e446
4
- data.tar.gz: 18f14a21b7eab2e0556775fc74963ec11fa8c5aa5cba24d20dd138b77e30e2c2
3
+ metadata.gz: '09414cc0b1fa45cb52e089e2854a51bf135502177ada40425077d7e4b7587a8a'
4
+ data.tar.gz: e65ffb3986a085e460196af5d068319bdf66fc857c0295d24c45d00b8bab51b5
5
5
  SHA512:
6
- metadata.gz: 5abe2032bebc68cd1cf8f1eff81dd4547304b301b42b9e0e2ee0921d42dac0536f5d0d13a3bb0f934c98769d35dd02a1a2fd5b8191af2f1662fc18fa93c93789
7
- data.tar.gz: a45dacdfca9bf88252a371ed90f445e9c2a9b3c7187c4a1465e62e59869702fa718673c89da27ca80da83635c0949a20e806ca51cd0edb21b90a0a81619f07db
6
+ metadata.gz: a07511623828729350a1dd4a4707101b1402ced5f2e9b06978c722249d38a202a905dd8ba4b737ac46dc86782fb4a34c83d37e6ec636a80d0d8f3f37367c8172
7
+ data.tar.gz: c7887f7a54b2be7808d6aefd54e187edf4f47ded2ef873c60ae3d59e7f3afc087bb51752e883c9a083965fff41217a63bc5325c1cc6605dc34978f2fc7f9b08a
@@ -12,7 +12,7 @@ module Comee
12
12
  belongs_to :purchase_requisition
13
13
  belongs_to :purchase_order_item, optional: true
14
14
 
15
- validates :processing_status, presence: true
15
+ validates :processing_status, :delivery_date, presence: true
16
16
  validates :quantity, :price, presence: true, numericality: {greater_than_or_equal_to: 0}
17
17
 
18
18
  def calculate_total_price
data/config/routes.rb CHANGED
@@ -74,10 +74,6 @@ Comee::Core::Engine.routes.draw do
74
74
  end
75
75
  resources :unit_conversions
76
76
  resources :users
77
- post "/purchase_orders/filter", controller: :purchase_orders, action: :filter
78
- resources :purchase_orders
79
- post "/purchase_order_items/filter", controller: :purchase_order_items, action: :filter
80
- resources :purchase_order_items
81
77
  resources :clients do
82
78
  member do
83
79
  get "rfq_products", controller: :quotation_requests, action: :rfq_products_for_client
@@ -3,6 +3,7 @@ class CreateComeeCorePurchaseRequisitions < ActiveRecord::Migration[7.1]
3
3
  create_table :comee_core_purchase_requisitions do |t|
4
4
  t.string :requisition_no, null: false
5
5
  t.date :requisition_date, null: false
6
+ t.date :delivery_date
6
7
  t.string :remark
7
8
  t.integer :status, null: false, default: 0
8
9
  t.float :total_price, null: false, default: 0
@@ -24,6 +24,7 @@ class CreateComeeCorePurchaseRequisitionItems < ActiveRecord::Migration[7.1]
24
24
  t.float :quantity, null: false
25
25
  t.float :price, null: false
26
26
  t.float :total_price, null: false
27
+ t.date :delivery_date, null: false
27
28
  t.integer :processing_status, null: false, default: 0
28
29
 
29
30
  t.timestamps
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.39".freeze
3
+ VERSION = "0.2.41".freeze
4
4
  end
5
5
  end
@@ -7,6 +7,7 @@ FactoryBot.define do
7
7
  purchase_order_item { nil }
8
8
  quantity { 10 }
9
9
  price { 15 }
10
+ delivery_date { purchase_requisition.delivery_date }
10
11
  processing_status { Comee::Core::PurchaseRequisitionItem.processing_statuses[:unprocessed] }
11
12
  end
12
13
  end
@@ -2,6 +2,7 @@ FactoryBot.define do
2
2
  factory :purchase_requisition, class: "Comee::Core::PurchaseRequisition" do
3
3
  requisition_no { Faker::Alphanumeric.alpha(number: 10) }
4
4
  requisition_date { Date.current }
5
+ delivery_date { Date.current.advance(days: 10) }
5
6
  remark { Faker::Lorem.sentence }
6
7
  status { Comee::Core::PurchaseRequisition.statuses[:draft] }
7
8
  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.39
4
+ version: 0.2.41
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-03-23 00:00:00.000000000 Z
11
+ date: 2024-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -365,8 +365,6 @@ files:
365
365
  - app/serializers/comee/core/product_lookup_serializer.rb
366
366
  - app/serializers/comee/core/product_serializer.rb
367
367
  - app/serializers/comee/core/product_type_serializer.rb
368
- - app/serializers/comee/core/purchase_order_item_serializer.rb
369
- - app/serializers/comee/core/purchase_order_serializer.rb
370
368
  - app/serializers/comee/core/quotation_request_item_serializer.rb
371
369
  - app/serializers/comee/core/quotation_request_serializer.rb
372
370
  - app/serializers/comee/core/sales_order_item_serializer.rb
@@ -1,7 +0,0 @@
1
- module Comee
2
- module Core
3
- class PurchaseOrderItemSerializer < ActiveModel::Serializer
4
- attributes :id, :sales_order_item_id, :purchase_order_id, :quantity, :delivery_date, :status
5
- end
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- module Comee
2
- module Core
3
- class PurchaseOrderSerializer < ActiveModel::Serializer
4
- attributes :id, :supplier_id, :order_date, :status, :delivery_address
5
- end
6
- end
7
- end