@@ -57,7 +57,7 @@ func TestDesgloseConversion(t *testing.T) {
5757 t .Run ("should distinguish goods from services when customer from other country" ,
5858 func (t * testing.T ) {
5959 goblInvoice := invoiceFromCountry ("GB" )
60- goblInvoice .Lines [0 ].Item .Key = "goods"
60+ goblInvoice .Lines [0 ].Item .Key = org . ItemKeyGoods
6161 _ = goblInvoice .Calculate ()
6262
6363 invoice , _ := convert .NewTicketBAI (goblInvoice , ts , role , convert .ZoneBI )
@@ -93,8 +93,8 @@ func TestDesgloseConversion(t *testing.T) {
9393 },
9494 Taxes : tax.Set {
9595 & tax.Combo {
96- Category : "VAT" ,
97- Rate : "standard" ,
96+ Category : tax . CategoryVAT ,
97+ Rate : rateStandard ,
9898 },
9999 },
100100 },
@@ -108,8 +108,8 @@ func TestDesgloseConversion(t *testing.T) {
108108 },
109109 Taxes : tax.Set {
110110 & tax.Combo {
111- Category : "VAT" ,
112- Rate : "standard" ,
111+ Category : tax . CategoryVAT ,
112+ Rate : rateStandard ,
113113 },
114114 },
115115 },
@@ -123,7 +123,7 @@ func TestDesgloseConversion(t *testing.T) {
123123 },
124124 Taxes : tax.Set {
125125 & tax.Combo {
126- Category : "VAT" ,
126+ Category : tax . CategoryVAT ,
127127 Rate : "reduced" ,
128128 },
129129 },
@@ -152,7 +152,7 @@ func TestDesgloseConversion(t *testing.T) {
152152 Index : 1 ,
153153 Quantity : num .MakeAmount (1 , 0 ),
154154 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
155- Taxes : tax.Set {& tax.Combo {Category : "VAT" , Rate : "standard" }},
155+ Taxes : tax.Set {& tax.Combo {Category : tax . CategoryVAT , Rate : rateStandard }},
156156 },
157157 {
158158 Index : 2 ,
@@ -164,8 +164,8 @@ func TestDesgloseConversion(t *testing.T) {
164164 },
165165 Taxes : tax.Set {
166166 & tax.Combo {
167- Category : "VAT" ,
168- Rate : "standard" ,
167+ Category : tax . CategoryVAT ,
168+ Rate : rateStandard ,
169169 },
170170 },
171171 },
@@ -192,9 +192,9 @@ func TestDesgloseConversion(t *testing.T) {
192192 },
193193 Discounts : []* bill.LineDiscount {DiscountOf (100 )},
194194 Taxes : tax.Set {
195- & tax.Combo {Category : "IRPF" , Rate : "pro" },
195+ & tax.Combo {Category : es . TaxCategoryIRPF , Rate : rateIRPFPro },
196196 & tax.Combo {
197- Category : "VAT" ,
197+ Category : tax . CategoryVAT ,
198198 Ext : tax.Extensions {
199199 tbai .ExtKeyExempt : "OT" ,
200200 },
@@ -218,7 +218,7 @@ func TestDesgloseConversion(t *testing.T) {
218218 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
219219 Taxes : tax.Set {
220220 & tax.Combo {
221- Category : "VAT" ,
221+ Category : tax . CategoryVAT ,
222222 Ext : tax.Extensions {tbai .ExtKeyExempt : "RL" },
223223 },
224224 },
@@ -240,7 +240,7 @@ func TestDesgloseConversion(t *testing.T) {
240240 Discounts : []* bill.LineDiscount {DiscountOf (100 )},
241241 Taxes : tax.Set {
242242 & tax.Combo {
243- Category : "VAT" ,
243+ Category : tax . CategoryVAT ,
244244 Ext : tax.Extensions {tbai .ExtKeyExempt : "RL" },
245245 },
246246 },
@@ -260,8 +260,8 @@ func TestDesgloseConversion(t *testing.T) {
260260 Quantity : num .MakeAmount (100 , 0 ),
261261 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
262262 Taxes : tax.Set {
263- & tax.Combo {Category : "VAT" , Rate : "standard" },
264- & tax.Combo {Category : "VAT" , Rate : "reduced" },
263+ & tax.Combo {Category : tax . CategoryVAT , Rate : rateStandard },
264+ & tax.Combo {Category : tax . CategoryVAT , Rate : "reduced" },
265265 },
266266 }}
267267 _ = goblInvoice .Calculate ()
@@ -306,7 +306,7 @@ func TestDesgloseConversion(t *testing.T) {
306306 Quantity : num .MakeAmount (100 , 0 ),
307307 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
308308 Taxes : tax.Set {
309- & tax.Combo {Category : "VAT" , Rate : "standard+eqs" },
309+ & tax.Combo {Category : tax . CategoryVAT , Rate : "standard+eqs" },
310310 },
311311 }}
312312 _ = goblInvoice .Calculate ()
@@ -326,28 +326,28 @@ func TestDesgloseConversion(t *testing.T) {
326326 Index : 1 ,
327327 Quantity : num .MakeAmount (1 , 0 ),
328328 Item : & org.Item {
329- Key : "services" ,
329+ Key : org . ItemKeyServices ,
330330 Name : "A" ,
331331 Price : num .NewAmount (10 , 0 ),
332332 },
333333 Taxes : tax.Set {
334334 & tax.Combo {
335- Category : "VAT" ,
336- Rate : "standard" ,
335+ Category : tax . CategoryVAT ,
336+ Rate : rateStandard ,
337337 },
338338 },
339339 },
340340 {
341341 Index : 2 ,
342342 Quantity : num .MakeAmount (100 , 0 ),
343343 Item : & org.Item {
344- Key : "goods" ,
344+ Key : org . ItemKeyGoods ,
345345 Name : "A" ,
346346 Price : num .NewAmount (10 , 0 ),
347347 },
348348 Taxes : tax.Set {
349349 & tax.Combo {
350- Category : "VAT" ,
350+ Category : tax . CategoryVAT ,
351351 Rate : "general" ,
352352 Ext : tax.Extensions {tbai .ExtKeyProduct : "resale" },
353353 },
@@ -440,7 +440,7 @@ func TestDesgloseConversion(t *testing.T) {
440440 Index : 1 ,
441441 Quantity : num .MakeAmount (100 , 0 ),
442442 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
443- Taxes : tax.Set {& tax.Combo {Category : "VAT" , Rate : "standard" }},
443+ Taxes : tax.Set {& tax.Combo {Category : tax . CategoryVAT , Rate : rateStandard }},
444444 }}
445445 _ = goblInvoice .Calculate ()
446446
@@ -458,7 +458,7 @@ func TestDesgloseConversion(t *testing.T) {
458458 Index : 1 ,
459459 Quantity : num .MakeAmount (100 , 0 ),
460460 Item : & org.Item {Name : "A" , Price : num .NewAmount (10 , 0 )},
461- Taxes : tax.Set {& tax.Combo {Category : "VAT" , Rate : "standard" }},
461+ Taxes : tax.Set {& tax.Combo {Category : tax . CategoryVAT , Rate : rateStandard }},
462462 }}
463463 _ = goblInvoice .Calculate ()
464464
0 commit comments