comee_core 0.3.39 → 0.3.40

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: 7c5bd7ecb372cda637b779b831f195910cb1d8e7a6a4a7a9687d58f6e5063f34
4
- data.tar.gz: 2b66ca4edc892cfacdd239973330ea4ac1ea10ed9c0c749ffa8a67f0e2751621
3
+ metadata.gz: 678327a5ca4eac8095260552f753d2e1a7e67bf9f8dc6da4f09647d30dfceb62
4
+ data.tar.gz: 4a3e117d73a6a1be6a7fe9124abfda613940d9e5b68aef3f83e9f14a9664b5c2
5
5
  SHA512:
6
- metadata.gz: 3b23ad79739cf108028d62e244e2cee673f6bca41142c29956eeb903c565ace12997baad341c75c9936f49f44607d28d339a5890dbc976f05fd47203f64a0ca9
7
- data.tar.gz: a4ab86afb792d939cf67d7eb880d1ad5ed1680d7edb9db68e6353de5531fa23fc70405ed22b1bbc2bb53680002805de0b8673cf5b1532747d3d38f610dcf8e31
6
+ metadata.gz: bee75f2697ec18163a2e1f98be4be925c0f6693c3fa4e7a8081d1c614d15c03f433face6a2666f4ae704a6fbed7bec88f6da0ed9e709abac04cd3563402e64b6
7
+ data.tar.gz: 3893670eb9c952b15e3d2aec27d162ae26ba01b4ba527453d305b303e1303e572365c23d99405b63bda719fd6853f6492102e5daa071b1559bdfd03220392081
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.3.39".freeze
3
+ VERSION = "0.3.40".freeze
4
4
  end
5
5
  end
@@ -5,9 +5,5 @@ FactoryBot.define do
5
5
  quantity { 1.5 }
6
6
  unit_price { 1.5 }
7
7
  total_price { quantity * unit_price }
8
-
9
- after(:build) do |item, _|
10
- item.credit_note.invoice.total_price = 100
11
- end
12
8
  end
13
9
  end
@@ -1,17 +1,9 @@
1
1
  FactoryBot.define do
2
2
  factory :credit_note_item, class: "Comee::Core::CreditNoteItem" do
3
- transient do
4
- invoice { create(:invoice) }
5
- end
6
- # association :credit_note, invoice: :invoice
7
- # association :invoice_item, invoice: :invoice
3
+ credit_note
4
+ invoice_item { credit_note.invoice.invoice_items.first }
8
5
  quantity { 10 }
9
6
  unit_price { 2 }
10
7
  total_price { quantity * unit_price }
11
-
12
- after(:build) do |item, evaluator|
13
- item.credit_note ||= create(:credit_note, invoice: evaluator.invoice)
14
- item.invoice_item ||= create(:invoice_item, invoice: evaluator.invoice)
15
- end
16
8
  end
17
9
  end
@@ -1,11 +1,16 @@
1
1
  FactoryBot.define do
2
2
  factory :credit_note, class: "Comee::Core::CreditNote" do
3
3
  credit_note_no { nil }
4
- invoice
5
4
  total_price { 0 }
6
5
  vat { 0 }
7
6
  status { Comee::Core::CreditNote.statuses[:draft] }
8
7
  date_issued { Date.current }
9
8
  remark { Faker::Lorem.sentence }
9
+
10
+ after(:build) do |note, _|
11
+ invoice = create(:invoice)
12
+ create(:invoice_item, invoice: invoice)
13
+ note.invoice ||= invoice
14
+ end
10
15
  end
11
16
  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.3.39
4
+ version: 0.3.40
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-08-01 00:00:00.000000000 Z
11
+ date: 2024-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers