comee_core 0.3.35 → 0.3.37
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b282b997b88b2c2237d81f624916d1bd02a8c212389fe07b25444ccb447e9bcc
|
4
|
+
data.tar.gz: 3bbca82dcf254a73866b3254e6380b727d92d0460f79ec38a0d7c7d01158e7c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c893967f70b7a11dd2399531aefe9d98ea8b007bd51742963ec6f9cef1513ae81da0272e344225e6dd408034ea0f7243b6557f359ef1315fb92e53a5d39ead5
|
7
|
+
data.tar.gz: 839c94449544e313bbfa7f710afd734e77ef9ee128c015b306f51e0d008e9ca87a53ed77be3677493763abd25108706fdccc67fdf6ac0f694cc9f3501a415acc
|
@@ -6,6 +6,9 @@ module Comee
|
|
6
6
|
|
7
7
|
belongs_to :sales_order
|
8
8
|
belongs_to :pod
|
9
|
+
belongs_to :invoice_address,
|
10
|
+
-> { where(address_type: ClientAddress::INVOICING_ADDRESS) },
|
11
|
+
class_name: "Comee::Core::ClientAddress"
|
9
12
|
has_many :invoice_items
|
10
13
|
has_many :additional_items
|
11
14
|
has_many :payments
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class AddInvoiceAddressToInvoice < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
add_column :comee_core_invoices, :invoice_address_id, :bigint
|
4
|
+
|
5
|
+
reversible do |dir|
|
6
|
+
sql = <<-SQL
|
7
|
+
UPDATE comee_core_invoices
|
8
|
+
SET invoice_address_id = comee_core_sales_orders.invoice_address_id
|
9
|
+
FROM comee_core_sales_orders
|
10
|
+
WHERE comee_core_invoices.sales_order_id = comee_core_sales_orders.id
|
11
|
+
SQL
|
12
|
+
dir.up do
|
13
|
+
execute sql
|
14
|
+
end
|
15
|
+
end
|
16
|
+
change_column_null :comee_core_invoices, :invoice_address_id, false
|
17
|
+
add_foreign_key :comee_core_invoices, :comee_core_client_addresses, column: :invoice_address_id
|
18
|
+
add_index :comee_core_invoices, :invoice_address_id, name: "ia_on_cci_indx"
|
19
|
+
end
|
20
|
+
end
|
data/lib/comee/core/version.rb
CHANGED
@@ -11,6 +11,7 @@ FactoryBot.define do
|
|
11
11
|
notifications_sent { 0 }
|
12
12
|
status { Comee::Core::Invoice.statuses[:draft] }
|
13
13
|
payment_status { Comee::Core::Invoice.payment_statuses[:not_paid] }
|
14
|
+
association :invoice_address, factory: :client_address, address_type: Comee::Core::ClientAddress::INVOICING_ADDRESS
|
14
15
|
|
15
16
|
trait :approved do
|
16
17
|
status { Comee::Core::Invoice.statuses[:approved] }
|
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.3.
|
4
|
+
version: 0.3.37
|
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-07-
|
11
|
+
date: 2024-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -527,6 +527,7 @@ files:
|
|
527
527
|
- db/migrate/20240716143922_add_customer_item_alias_to_customer_and_sales_order.rb
|
528
528
|
- db/migrate/20240718103456_make_delivery_note_no_and_goods_issue_date_optional.rb
|
529
529
|
- db/migrate/20240720091730_add_use_alias_field_to_line_items.rb
|
530
|
+
- db/migrate/20240721035647_add_invoice_address_to_invoice.rb
|
530
531
|
- lib/comee/core.rb
|
531
532
|
- lib/comee/core/engine.rb
|
532
533
|
- lib/comee/core/version.rb
|