ubl 0.1.2 → 0.1.3

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: 07e7d21d74c69ab965fe5a9968fd7404629079233b2fd6554e7fac2f51aff5e6
4
- data.tar.gz: e13d2459ed88883a5206449565fb665bee8a59a097bbccf489c975be4ace1489
3
+ metadata.gz: 0d3674c799834fc218a997979a36b62a860aff2f08568f4b3e947a54ac693ec5
4
+ data.tar.gz: 827efecf61e25ae097ec832706ec5409e7893a202aac5d485e2e038c7af3caf1
5
5
  SHA512:
6
- metadata.gz: 02d979487d2aafb9c96ab9ce923cb19f1821fd8850f8766a584ff0b5f06f86d5993747c0378c1eff62ef701518fe40876915d2234477f52bcb8e4c41660ef6f1
7
- data.tar.gz: 73a22110aa073edce5165461c9883ec1796d92e5ded7b320de8c0de220d82f6755f2407e74fe9bd43dd95f545ca19390e78e1e3d17d518fdb8db284a1ae9f2c8
6
+ metadata.gz: a2df2c642ae9b96f7ccf9a46264eec67679d9fb70a044e846320aea5036f044d4899c04f49ca335182b3856042d967dce2898b850045f2a2785b4a7ff960c169
7
+ data.tar.gz: d0129370aa18020f080f0c71213ca9e1681a1d2900aa2ce9bb3081460de06a26feaaa8aa9c96c0d4ceca9470980ffa63d77a3ac9245499539acf8001a8598daa
data/lib/ubl/builder.rb CHANGED
@@ -58,12 +58,13 @@ module Ubl
58
58
  }
59
59
  end
60
60
 
61
- def add_line(name:, quantity:, unit_price:, tax_rate: 21.0, unit: "ZZ")
61
+ def add_line(name:, quantity:, unit_price:, description: name, tax_rate: 21.0, unit: "ZZ")
62
62
  line_extension_amount = (quantity * unit_price).round(2)
63
63
  tax_amount = (line_extension_amount * (tax_rate / 100.0)).round(2)
64
64
 
65
65
  @invoice_lines << {
66
66
  id: (@invoice_lines.length + 1).to_s,
67
+ description: description,
67
68
  name: name,
68
69
  quantity: quantity,
69
70
  unit: unit,
@@ -179,6 +180,7 @@ module Ubl
179
180
  end
180
181
 
181
182
  xml["cac"].Item do
183
+ xml["cbc"].Description line[:description]
182
184
  xml["cbc"].Name line[:name]
183
185
  xml["cac"].ClassifiedTaxCategory do
184
186
  xml["cbc"].ID get_tax_category_id(line[:tax_rate])
data/lib/ubl/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ubl
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - roel4d