From 1195a320a86d0f716f728e54b41eb314b24a6e5e Mon Sep 17 00:00:00 2001 From: Mikhail Chechnev Date: Tue, 8 Jan 2019 18:27:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D1=83=20=D0=9D?= =?UTF-8?q?=D0=94=D0=A1=2020%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/parus_atol_v4_ffd1.05.js | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/modules/parus_atol_v4_ffd1.05.js b/modules/parus_atol_v4_ffd1.05.js index 5b885b9..1da8fc8 100644 --- a/modules/parus_atol_v4_ffd1.05.js +++ b/modules/parus_atol_v4_ffd1.05.js @@ -165,6 +165,19 @@ const paymensOperation = { } }; +//Словарь - ставка НДС позиции чека +const receiptItemVat = { + sName: "Ставка НДС позиции чека", + vals: { + "1": "vat20", + "2": "vat10", + "3": "vat120", + "4": "vat110", + "5": "vat0", + "6": "none" + } +}; + //------------ // Тело модуля //------------ @@ -327,14 +340,14 @@ const beforeRegBillSIR = async prms => { external_id: doc.NRN, receipt: { client: { - email: "mim_@mail.ru", //getPropValueByCode(docProps, "1008"), + email: getPropValueByCode(docProps, "1008"), phone: "" }, company: { - email: "mim_@mail.ru", //getPropValueByCode(docProps, "1117"), - sno: "osn", //getPropValueByCode(docProps, "1055"), + email: getPropValueByCode(docProps, "1117"), + sno: getPropValueByCode(docProps, "1055"), inn: getPropValueByCode(docProps, "1018"), - payment_address: "г. Казань" //getPropValueByCode(docProps, "1187") + payment_address: getPropValueByCode(docProps, "1187") }, items: [ { @@ -343,12 +356,10 @@ const beforeRegBillSIR = async prms => { quantity: getPropValueByCode(docProps, "1023", "NUM"), sum: getPropValueByCode(docProps, "1043", "NUM"), measurement_unit: getPropValueByCode(docProps, "1197"), - //payment_method: "full_prepayment", - //payment_object: "service", payment_method: mapDictionary(paymentMethod, getPropValueByCode(docProps, "1214")), payment_object: mapDictionary(paymentObject, getPropValueByCode(docProps, "1212")), vat: { - type: "none", //getPropValueByCode(docProps, "1199") + type: mapDictionary(receiptItemVat, getPropValueByCode(docProps, "1199")), sum: getPropValueByCode(docProps, "1200", "NUM") } } @@ -411,10 +422,10 @@ const beforeRegBillSIR = async prms => { sum: getPropValueByCode(docProps, "1103", "NUM") }); } - //Сумма НДС чека по ставке 18%; + //Сумма НДС чека по ставке 20%; if (getPropValueByCode(docProps, "1102", "NUM") !== null) { vats.push({ - type: "vat18", + type: "vat20", sum: getPropValueByCode(docProps, "1102", "NUM") }); } @@ -425,10 +436,10 @@ const beforeRegBillSIR = async prms => { sum: getPropValueByCode(docProps, "1107", "NUM") }); } - //Сумма НДС чека по расч. ставке 18/118 + //Сумма НДС чека по расч. ставке 20/120 if (getPropValueByCode(docProps, "1106", "NUM") !== null) { vats.push({ - type: "vat118", + type: "vat120", sum: getPropValueByCode(docProps, "1106", "NUM") }); }