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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 678327a5ca4eac8095260552f753d2e1a7e67bf9f8dc6da4f09647d30dfceb62
|
4
|
+
data.tar.gz: 4a3e117d73a6a1be6a7fe9124abfda613940d9e5b68aef3f83e9f14a9664b5c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee75f2697ec18163a2e1f98be4be925c0f6693c3fa4e7a8081d1c614d15c03f433face6a2666f4ae704a6fbed7bec88f6da0ed9e709abac04cd3563402e64b6
|
7
|
+
data.tar.gz: 3893670eb9c952b15e3d2aec27d162ae26ba01b4ba527453d305b303e1303e572365c23d99405b63bda719fd6853f6492102e5daa071b1559bdfd03220392081
|
data/lib/comee/core/version.rb
CHANGED
@@ -1,17 +1,9 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :credit_note_item, class: "Comee::Core::CreditNoteItem" do
|
3
|
-
|
4
|
-
|
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.
|
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-
|
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
|