comee_core 0.2.5 → 0.2.7
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/application_controller.rb +4 -0
- data/app/models/comee/core/delivery_note.rb +10 -0
- data/app/models/comee/core/invoice.rb +1 -1
- data/app/models/comee/core/payment.rb +11 -0
- data/app/models/comee/core/shipment_instruction_item.rb +1 -0
- data/db/migrate/20240104124247_create_comee_core_delivery_notes.rb +13 -0
- data/db/migrate/{20240104143246_create_comee_core_shipment_instruction_items.rb → 20240104133246_create_comee_core_shipment_instruction_items.rb} +4 -0
- data/db/migrate/20240125044630_create_comee_core_payments.rb +20 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/delivery_notes.rb +6 -0
- data/spec/factories/comee/core/invoices.rb +4 -0
- data/spec/factories/comee/core/payments.rb +10 -0
- data/spec/factories/comee/core/shipment_instruction_items.rb +1 -0
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 670586905f9895d6c3487ff94875e86da88ce295d4ad6d6872c2e6444fab879e
|
4
|
+
data.tar.gz: 7f07f76dc1f4c5bc4b1612377d97cd3060ce87a37e4f816ce2881da2b91dee3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55b0187ea81f6d91b4ed5a5fc0ca02c35fbf749f54a9f8d0ae08fc90a93118c9f73ba4ac0a75a7ca62e01944deca58ac449f41efbed1f667ae2fa6abd4da8de
|
7
|
+
data.tar.gz: 92f2a3bf4ff75fd5f9a00b117f1e5fa18cf71f2cd764fff183211076859f999f212ae61cf844ece48aa74a758a09074799be4e85868cfc5832d86f419852963f
|
@@ -8,7 +8,7 @@ module Comee
|
|
8
8
|
|
9
9
|
has_noticed_notifications model_name: "Comee::Core::Notification"
|
10
10
|
|
11
|
-
enum :status, {draft: 0, approved: 1}
|
11
|
+
enum :status, {draft: 0, approved: 1, issued: 2}
|
12
12
|
enum :payment_status, {not_paid: 0, partially_paid: 1, fully_paid: 2, overpaid: 3}
|
13
13
|
|
14
14
|
validates :invoice_no, presence: true, uniqueness: true
|
@@ -5,6 +5,7 @@ module Comee
|
|
5
5
|
belongs_to :shipment_item
|
6
6
|
belongs_to :unit
|
7
7
|
belongs_to :pod, optional: true
|
8
|
+
belongs_to :delivery_note, optional: true
|
8
9
|
|
9
10
|
validates :delivery_note_no, :pallet_no, :goods_issue_date, presence: true
|
10
11
|
validates :length, :width, :height, :weight, :quantity, :price, presence: true, numericality: {greater_than: 0}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateComeeCoreDeliveryNotes < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :comee_core_delivery_notes do |t|
|
4
|
+
t.references :pod,
|
5
|
+
null: false,
|
6
|
+
index: {name: "pod_on_ccdn_indx"},
|
7
|
+
foreign_key: {to_table: :comee_core_pods}
|
8
|
+
t.string :reference_no, null: false
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -26,6 +26,10 @@ class CreateComeeCoreShipmentInstructionItems < ActiveRecord::Migration[7.1]
|
|
26
26
|
null: true,
|
27
27
|
index: {name: "pod_on_ccsii_indx"},
|
28
28
|
foreign_key: {to_table: :comee_core_pods}
|
29
|
+
t.references :delivery_note,
|
30
|
+
null: true,
|
31
|
+
index: {name: "dn_on_ccsii_indx"},
|
32
|
+
foreign_key: {to_table: :comee_core_delivery_notes}
|
29
33
|
|
30
34
|
t.timestamps
|
31
35
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class CreateComeeCorePayments < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :comee_core_payments do |t|
|
4
|
+
t.string :reference_no, null: false
|
5
|
+
t.references :invoice,
|
6
|
+
null: false,
|
7
|
+
index: {name: "invoice_on_ccp_indx"},
|
8
|
+
foreign_key: {to_table: :comee_core_invoices}
|
9
|
+
t.date :payment_date, null: false
|
10
|
+
t.float :amount, null: false
|
11
|
+
t.references :currency,
|
12
|
+
null: false,
|
13
|
+
index: {name: "currency_on_ccp_indx"},
|
14
|
+
foreign_key: {to_table: :comee_core_currencies}
|
15
|
+
t.string :bank_reference
|
16
|
+
|
17
|
+
t.timestamps
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/comee/core/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :payment, class: "Comee::Core::Payment" do
|
3
|
+
reference_no { Faker::Alphanumeric.alpha(number: 10) }
|
4
|
+
invoice
|
5
|
+
payment_date { Date.current }
|
6
|
+
amount { 100 }
|
7
|
+
currency
|
8
|
+
bank_reference { Faker::Alphanumeric.alpha(number: 10) }
|
9
|
+
end
|
10
|
+
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.
|
4
|
+
version: 0.2.7
|
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-01-
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -313,6 +313,7 @@ files:
|
|
313
313
|
- app/models/comee/core/customer_order.rb
|
314
314
|
- app/models/comee/core/customer_order_item.rb
|
315
315
|
- app/models/comee/core/customs_detail.rb
|
316
|
+
- app/models/comee/core/delivery_note.rb
|
316
317
|
- app/models/comee/core/edi_order.rb
|
317
318
|
- app/models/comee/core/external_rfq.rb
|
318
319
|
- app/models/comee/core/fulfillment_center.rb
|
@@ -324,6 +325,7 @@ files:
|
|
324
325
|
- app/models/comee/core/master_price.rb
|
325
326
|
- app/models/comee/core/notification.rb
|
326
327
|
- app/models/comee/core/order_source.rb
|
328
|
+
- app/models/comee/core/payment.rb
|
327
329
|
- app/models/comee/core/pickup_schedule.rb
|
328
330
|
- app/models/comee/core/pod.rb
|
329
331
|
- app/models/comee/core/price.rb
|
@@ -422,8 +424,9 @@ files:
|
|
422
424
|
- db/migrate/20231207153420_create_comee_core_shipment_items.rb
|
423
425
|
- db/migrate/20231207235542_create_comee_core_item_statuses.rb
|
424
426
|
- db/migrate/20240104074619_create_comee_core_pods.rb
|
427
|
+
- db/migrate/20240104124247_create_comee_core_delivery_notes.rb
|
425
428
|
- db/migrate/20240104131607_create_comee_core_shipment_instructions.rb
|
426
|
-
- db/migrate/
|
429
|
+
- db/migrate/20240104133246_create_comee_core_shipment_instruction_items.rb
|
427
430
|
- db/migrate/20240105205522_create_comee_core_invoices.rb
|
428
431
|
- db/migrate/20240105205648_create_comee_core_invoice_items.rb
|
429
432
|
- db/migrate/20240109185749_create_comee_core_transport_availability.rb
|
@@ -431,6 +434,7 @@ files:
|
|
431
434
|
- db/migrate/20240111112140_create_comee_core_pickup_schedules.rb
|
432
435
|
- db/migrate/20240119100125_create_comee_core_client_warehouses.rb
|
433
436
|
- db/migrate/20240124161320_create_comee_core_additional_items.rb
|
437
|
+
- db/migrate/20240125044630_create_comee_core_payments.rb
|
434
438
|
- lib/comee/core.rb
|
435
439
|
- lib/comee/core/engine.rb
|
436
440
|
- lib/comee/core/version.rb
|
@@ -449,6 +453,7 @@ files:
|
|
449
453
|
- spec/factories/comee/core/customer_order_items.rb
|
450
454
|
- spec/factories/comee/core/customer_orders.rb
|
451
455
|
- spec/factories/comee/core/customs_details.rb
|
456
|
+
- spec/factories/comee/core/delivery_notes.rb
|
452
457
|
- spec/factories/comee/core/edi_orders.rb
|
453
458
|
- spec/factories/comee/core/external_rfqs.rb
|
454
459
|
- spec/factories/comee/core/fulfillment_centers.rb
|
@@ -460,6 +465,7 @@ files:
|
|
460
465
|
- spec/factories/comee/core/master_prices.rb
|
461
466
|
- spec/factories/comee/core/notifications.rb
|
462
467
|
- spec/factories/comee/core/order_sources.rb
|
468
|
+
- spec/factories/comee/core/payments.rb
|
463
469
|
- spec/factories/comee/core/pickup_schedules.rb
|
464
470
|
- spec/factories/comee/core/pods.rb
|
465
471
|
- spec/factories/comee/core/product_lookups.rb
|