Цитата: function print_SP_KKT_item(__item, __print_data)
local printer_type = ukm.printer_type_master();
local printer = ukm.get_printer(printer_type);
if printer then
local text = "";
local width = printer:get_width();
local item_total = __item.total;
local price_with_discount = __item.price;
local discount_count = __item.discounts:size();
if discount_count > 0 then
local discount_total = ukm.currency(0);
for i = 0, discount_count - 1 do
local discount = __item.discounts:at(i);
if discount.increment ~= ukm.currency(0) then
discount_total = discount_total - discount.increment;
end
end
if discount_total:sign() ~= 0 then
item_total = item_total - discount_total;
price_with_discount = ukm.currency((__item.total - discount_total) / __item.totalquantity);
end
end
local itemname = ukm.insert_delimiters(__item.name, "\n", width - 1);
local itemprice = ukm.leftpad(tostring(__item.totalquantity),7," ") .. " " .. ukm.leftpad(tostring(price_with_discount),8," ") .. " " .. ukm.leftpad(tostring(item_total),10," ");
local tax_found = false;
local taxes = ukm.taxes(__item.receipt);
taxes:create(__item);
for i = 0, taxes.itemtaxes:size() - 1 do
local tax = taxes.itemtaxes:at(i);
text = " " .. text .. tax.name .. tax.percent;
tax_found = true;
end
if not tax_found and (__tax_system == 1) then
text = text .. " " .. " БезНДС";
end
if ukm.str_len(itemname .. " " .. itemprice) <= width-7 then
text = ukm.adjustment(itemname, itemprice, width-7, " ") .. text .. "\n";
else
text = " " .. itemprice .. text;
text = ukm.left(itemname, width - 8 - ukm.str_len(itemprice)) .. text .. "\n";
end
__print_data:add(text, printer_type);
end
end
После обновления на версию 83 sp3
В чеке блок
Цитата: if not tax_found and (__tax_system == 1) then
text = text .. " " .. " БезНДС";
end
перестал отрабатывать, так как теперь мапирование налогов зашито автоматом. Как поменять это блок, если налоговая группа "НДС не облагается", то надпись безНДС?