comee_core 0.2.36 → 0.2.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/comee/core/purchase_order_item.rb +3 -3
- data/db/migrate/20230728123039_create_comee_core_clients.rb +1 -0
- data/db/migrate/20230728123827_create_comee_core_purchase_order_items.rb +0 -1
- data/db/migrate/20240105205522_create_comee_core_invoices.rb +1 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/purchase_order_items.rb +0 -1
- metadata +1 -3
- data/db/migrate/20240303191625_add_amount_paid_field_to_invoice.rb +0 -5
- data/db/migrate/20240315163900_add_subsidiary_to_client.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 033e75a2d4507949ad9f3363a5346d3dde0c682e96eb901e5d6095e94d462f92
|
4
|
+
data.tar.gz: a7829b047ad6f4850365acde44bb33019a33bc24268adb3865a48f399d587548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47f62c4a336b48237fefe3ccdb2a2f5993eda913864c566c09b07ea284f34f51672c653620b385785b7c3b2911550adf3a3b21a3e991811f7f3592967dee578
|
7
|
+
data.tar.gz: 65f6674ddac2c67d125ced475c93a23846326b5458b40cb35aba5138635a12086017e14dddb81a2642d8c75a675958b6b4a40f84bb774ba6677dd13fc59c75df
|
@@ -7,11 +7,10 @@ module Comee
|
|
7
7
|
|
8
8
|
belongs_to :purchase_order
|
9
9
|
belongs_to :unit
|
10
|
-
belongs_to :source, polymorphic: true
|
11
10
|
|
12
11
|
validates :quantity, presence: true, numericality: {greater_than: 0}
|
13
12
|
validates :price, presence: true, numericality: {greater_than_or_equal_to: 0}
|
14
|
-
validates :status, :delivery_date,
|
13
|
+
validates :status, :delivery_date, presence: true
|
15
14
|
|
16
15
|
def calculate_total_price
|
17
16
|
self.total_price = price * quantity
|
@@ -22,6 +21,8 @@ module Comee
|
|
22
21
|
|
23
22
|
self.confirmed_quantity = quantity unless confirmed_quantity
|
24
23
|
|
24
|
+
self.confirmed_delivery_date = delivery_date unless confirmed_delivery_date
|
25
|
+
|
25
26
|
self.confirmed_total_price = confirmed_price * confirmed_quantity
|
26
27
|
end
|
27
28
|
|
@@ -43,7 +44,6 @@ module Comee
|
|
43
44
|
def self.ransackable_associations(_auth_object = nil)
|
44
45
|
%w[
|
45
46
|
purchase_order
|
46
|
-
source
|
47
47
|
unit
|
48
48
|
]
|
49
49
|
end
|
@@ -20,6 +20,7 @@ class CreateComeeCoreClients < ActiveRecord::Migration[7.0]
|
|
20
20
|
index: {name: "currency_on_ccc_indx"},
|
21
21
|
foreign_key: {to_table: :comee_core_currencies}
|
22
22
|
|
23
|
+
t.boolean :subsidiary, default: false
|
23
24
|
t.timestamps
|
24
25
|
end
|
25
26
|
add_index :comee_core_clients, :code, unique: true
|
@@ -6,7 +6,6 @@ class CreateComeeCorePurchaseOrderItems < ActiveRecord::Migration[7.1]
|
|
6
6
|
index: {name: "pos_on_ccpoitm_indx"},
|
7
7
|
foreign_key: {to_table: :comee_core_purchase_orders}
|
8
8
|
|
9
|
-
t.references :source, polymorphic: true, null: false
|
10
9
|
t.float :quantity, null: false
|
11
10
|
t.float :confirmed_quantity, null: false
|
12
11
|
t.references :unit,
|
@@ -13,6 +13,7 @@ class CreateComeeCoreInvoices < ActiveRecord::Migration[7.0]
|
|
13
13
|
t.date :date_issued
|
14
14
|
t.date :due_date
|
15
15
|
t.float :total_price
|
16
|
+
t.float :amount_paid, default: 0
|
16
17
|
t.string :payment_term
|
17
18
|
t.integer :notifications_sent
|
18
19
|
t.integer :status, null: false, default: 0
|
data/lib/comee/core/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
@@ -437,10 +437,8 @@ files:
|
|
437
437
|
- db/migrate/20240124161320_create_comee_core_additional_items.rb
|
438
438
|
- db/migrate/20240125003634_create_comee_core_payment_deposits.rb
|
439
439
|
- db/migrate/20240125044630_create_comee_core_payments.rb
|
440
|
-
- db/migrate/20240303191625_add_amount_paid_field_to_invoice.rb
|
441
440
|
- db/migrate/20240314111117_create_comee_core_purchase_requisitions.rb
|
442
441
|
- db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb
|
443
|
-
- db/migrate/20240315163900_add_subsidiary_to_client.rb
|
444
442
|
- lib/comee/core.rb
|
445
443
|
- lib/comee/core/engine.rb
|
446
444
|
- lib/comee/core/version.rb
|