comee_core 0.3.35 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca034fb60309594217c46bacbd0bfe6e62ed13ee989f07917df122be234e2c4
|
4
|
+
data.tar.gz: 7573a165ecca8a15b3689dd4c898754768df279034848263c3352fe5c662c708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67abeb20f05c27baeaf8a799b69a0a07e25ffb445d5e31e2ea8aea4afd908efea5e431c4c645c9f2f38a5e95c46eeeec5c0bae90e21d958bb98175cca180f03a
|
7
|
+
data.tar.gz: 6c38ff63dd165b372b55421e82bae12da248432dda5087db07acb9e6d40d7f9306c1f2cae4c70cd8b72c536c2151c8ce5631f0b9ed6c88ab4996d8e5e7aa2647
|
@@ -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.36
|
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-21 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
|