comee_core 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/comee/core/customer_orders_controller.rb +10 -1
- data/app/controllers/comee/core/sales_order_items_controller.rb +6 -0
- data/app/controllers/comee/core/sales_orders_controller.rb +1 -1
- data/app/models/comee/core/customer_order_item.rb +1 -1
- data/app/serializers/comee/core/sales_order_item_serializer.rb +1 -1
- data/config/routes.rb +1 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/sales_order_items.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a4ecd52efb335b2688fb0fd381163d594b81de592ed48dcd5701ee28c00d10f
|
4
|
+
data.tar.gz: 53ef139383420c858b4ce5afcb52974af1051cdb2086a83bcd28256311724a76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aea590ef7c2567f4f8014bd7d18f4e77e81b735afb9fb64444d680b419d0548d20edbf62308d7f3bd5904fa4a225cabaf5b47649955934976183e6ffcb9a63e2
|
7
|
+
data.tar.gz: 1a44e91626c5e3c1b3d5d37574bea1ab19fbf10c2993a31436bede678660d96862f6029735b70988eebbb39107039fb843b0a1c58f29045b983a733eee4c4386
|
@@ -8,7 +8,16 @@ module Comee
|
|
8
8
|
def index
|
9
9
|
super do
|
10
10
|
[
|
11
|
-
CustomerOrder.includes(:client, :
|
11
|
+
CustomerOrder.includes(:client, customer_order_items: :unit).order(:created_at),
|
12
|
+
fields: ["client", "customer_order_items.unit"]
|
13
|
+
]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def show
|
18
|
+
super do
|
19
|
+
[
|
20
|
+
CustomerOrder.includes(:client, customer_order_items: :unit).find(params[:id]),
|
12
21
|
fields: ["client", "customer_order_items.unit"]
|
13
22
|
]
|
14
23
|
end
|
@@ -20,6 +20,12 @@ module Comee
|
|
20
20
|
render json: {success: true, data: result}
|
21
21
|
end
|
22
22
|
|
23
|
+
def cancel
|
24
|
+
item = set_object
|
25
|
+
item.update(canceled: true)
|
26
|
+
render_content(item)
|
27
|
+
end
|
28
|
+
|
23
29
|
def destroy
|
24
30
|
Comee::Core::SalesOrderItem.destroy(params[:id])
|
25
31
|
render json: {success: true}
|
@@ -60,7 +60,7 @@ module Comee
|
|
60
60
|
def model_params
|
61
61
|
params.require(:payload).permit(:order_number, :order_date, :customer_order_id, :fulfillment_center_id, :client_id,
|
62
62
|
:order_terms, :shipment_address, :delivery_address, :invoice_address, :destination,
|
63
|
-
:handover_date, :shipping_date, :delivery_date, :consignee, :payment_term, :
|
63
|
+
:handover_date, :shipping_date, :delivery_date, :consignee, :payment_term, :delivery_term,
|
64
64
|
:payment_penalty, :status, :total_price, :amount_paid, :pallete_note, :remark,
|
65
65
|
files: [])
|
66
66
|
end
|
@@ -2,7 +2,7 @@ module Comee
|
|
2
2
|
module Core
|
3
3
|
class SalesOrderItemSerializer < ActiveModel::Serializer
|
4
4
|
attributes :id, :customer_item_no, :customer_item_description, :quantity, :quantity_delivered, :price, :handover_date,
|
5
|
-
:delivery_date, :eb_number, :lead_time, :comment, :action_note, :po_reference, :total_price
|
5
|
+
:delivery_date, :eb_number, :lead_time, :comment, :action_note, :po_reference, :total_price, :canceled
|
6
6
|
|
7
7
|
belongs_to :sales_order
|
8
8
|
belongs_to :customer_order_item
|
data/config/routes.rb
CHANGED
data/lib/comee/core/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.13
|
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-02-
|
11
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|