Приветствую.
Почему-то выходит "обрезанный" чек инкасаций и внесений наличности.
Проверил documents.lua, там всё в порядке
Код:
--Документ по изъятию наличных средств
function print_money_extract(__mo,__print_data)
local printer = ukm.get_printer(ukm.printer_type_master());
if printer then
local text = "";
local width = printer:get_width();
text = text .. ukm.adjustment("ОПР:" .. ukm.left(__mo.moneyophead.login.name,width-21), ukm.ptime2str(__mo.moneyophead.date,"%d/%m/%Y %H:%M"), width, " ") .. "\n";
text = text .. ukm.adjustment("ДОК:" .. tostring(__mo.moneyophead:pos_number()) .. "." .. tostring(__mo.moneyophead.shiftnumber) .. "." .. tostring(__mo.moneyophead.localnumber), " ТРН:" .. ukm.leftpad(tostring(__mo.moneyophead.globalnumber) ,12,"0"), width, " ") .. "\n";
text = text .. ukm.rightpad("-",width,"-") .. "\n";
text = text .. ukm.adjustment(ukm.left(ukm.rightpad( __mo.moneyophead.paymentname,width-28, " "),width-28), ukm.adjustment("(".. __mo:base_nominal_name() ..")", "СУММА",width-18," "), width, " ") .. "\n";
text = text .. ukm.adjustment(" ДО ИЗЪЯТИЯ", tostring(__mo.moneyophead.amount_before), width, " ") .. "\n";
text = text .. ukm.adjustment(" ИЗЪЯТО", tostring(__mo.moneyophead.amount), width, " ") .. "\n";
for i=0,__mo.moneyopnotes:size()-1 do
local note = __mo.moneyopnotes:at(i);
if tonumber(note:count()) ~= 0 then
if (note:note_type() ~= 2) then
text = text .. ukm.adjustment(" " .. note:note_nominal_name() .. " * " .. note:count() .. " шт", tostring(note:amount()), width, " ") .."\n";
else
text = text .. ukm.adjustment(" " .. tostring(note:amount()), tostring(note:amount()), width, " ") .."\n";
end
end
end
text = text .. ukm.adjustment(" ПОСЛЕ ИЗЪЯТИЯ", tostring(__mo.moneyophead.amount_before - __mo.moneyophead.amount), width, " ") .. "\n";
text = text .. ukm.leftpad( " ВСЕГО ИЗЪЯТО", width, "-") .. "\n";
text = text .. ukm.slice(__mo:human_result(),width) .. "\n";
text = text .. " " .. "\n";
text = text .. ukm.adjustment(ukm.rightpad("СДАЛ", width-26, " ") .. ": ",".", width, ".") .. "\n";
text = text .. " " .. "\n";
text = text .. ukm.adjustment(ukm.rightpad("ПРИНЯЛ", width-26, " ") .. ": ",".", width, ".") .. "\n";
__print_data:add(text, ukm.printer_type_master());
end
end
В чеке нет СДАЛ, ПРИНЯЛ, ДО, ПОСЛЕ ...
Подскажите, пожалуйста, почему такой "обрезок" выходит?