From 8f34b649ec4e91e05117477482bb2a3b0aff32b9 Mon Sep 17 00:00:00 2001 From: Dmitry Mashkovtsev Date: Tue, 19 Nov 2024 17:01:57 +0500 Subject: [PATCH 1/2] feat: add new tax --- lib/Correction.js | 8 ++++++++ lib/Order.js | 4 ++++ lib/validation/schemes.js | 14 +++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/Correction.js b/lib/Correction.js index d2b7570..05e1f63 100644 --- a/lib/Correction.js +++ b/lib/Correction.js @@ -29,6 +29,10 @@ class Correction { tax4Sum: order.tax4Sum, tax5Sum: order.tax5Sum, tax6Sum: order.tax6Sum, + tax7Sum: order.tax7Sum, + tax8Sum: order.tax8Sum, + tax9Sum: order.tax9Sum, + tax10Sum: order.tax10Sum, automatNumber: order.automatNumber, settlementAddress: order.settlementAddress, settlementPlace: order.settlementPlace, @@ -46,6 +50,10 @@ class Correction { vat4Sum: order.vat4Sum, vat5Sum: order.vat5Sum, vat6Sum: order.vat6Sum, + vat7Sum: order.vat7Sum, + vat8Sum: order.vat8Sum, + vat9Sum: order.vat9Sum, + vat10Sum: order.vat10Sum, customerInfo: order.customerInfo, operationalAttribute: order.operationalAttribute, industryAttribute: order.industryAttribute, diff --git a/lib/Order.js b/lib/Order.js index dc9eddf..07e1697 100644 --- a/lib/Order.js +++ b/lib/Order.js @@ -32,6 +32,10 @@ class Order { vat4Sum: order.vat4Sum, vat5Sum: order.vat5Sum, vat6Sum: order.vat6Sum, + vat7Sum: order.vat7Sum, + vat8Sum: order.vat8Sum, + vat9Sum: order.vat9Sum, + vat10Sum: order.vat10Sum, customerInfo: order.customerInfo, operationalAttribute: order.operationalAttribute, industryAttribute: order.industryAttribute, diff --git a/lib/validation/schemes.js b/lib/validation/schemes.js index c25c78b..a9ff8d9 100644 --- a/lib/validation/schemes.js +++ b/lib/validation/schemes.js @@ -39,7 +39,7 @@ const serviceOptions = { const position = createValidator({ quantity: [required, decimal(6)], price: [required, decimal(2)], - tax: [required, integer, oneOf([1, 2, 3, 4, 5, 6])], + tax: [required, integer, oneOf([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])], text: [required, maxLength(128)], paymentMethodType: [oneOf([1, 2, 3, 4, 5, 6, 7])], paymentSubjectType: [oneOf( @@ -155,6 +155,10 @@ const order = { vat4Sum: [decimal(2)], vat5Sum: [decimal(2)], vat6Sum: [decimal(2)], + vat7Sum: [decimal(2)], + vat8Sum: [decimal(2)], + vat9Sum: [decimal(2)], + vat10Sum: [decimal(2)], customerInfo: [createValidator({ name: [maxLength(239)], inn: [inn], @@ -202,6 +206,10 @@ const correction = { tax4Sum: [decimal(2)], tax5Sum: [decimal(2)], tax6Sum: [decimal(2)], + tax7Sum: [decimal(2)], + tax8Sum: [decimal(2)], + tax9Sum: [decimal(2)], + tax10Sum: [decimal(2)], automatNumber: [maxLength(20)], settlementAddress: [maxLength(243)], settlementPlace: [maxLength(243)], @@ -244,6 +252,10 @@ const correction12 = { vat4Sum: [decimal(2)], vat5Sum: [decimal(2)], vat6Sum: [decimal(2)], + vat7Sum: [decimal(2)], + vat8Sum: [decimal(2)], + vat9Sum: [decimal(2)], + vat10Sum: [decimal(2)], customerInfo: [createValidator({ name: [maxLength(239)], inn: [inn], From a40d8991067ad3ce98679e5515f572962a50ebe8 Mon Sep 17 00:00:00 2001 From: Dmitry Mashkovtsev Date: Tue, 19 Nov 2024 17:14:27 +0500 Subject: [PATCH 2/2] 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88ac230..76a4cd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-orangedata", - "version": "1.2.8", + "version": "1.3.0", "description": "Node.js integration for OrangeData service", "license": "MIT", "main": "lib",