Код:
--Отчет по отделам
function print_report_stock(__rep,__print_data)
local printer = ukm.get_printer(ukm.printer_type_master());
if printer then
local text = "";
local width = printer:get_width();
text = report_general_shift_period(__rep,width);
text = text .. report_general_header(__rep,width,"ОТД");
local report_iter = ukm.map.int.report_stock_record.iterator(__rep.stock);
text = text .. ukm.adjustment(ukm.adjustment("ОТДЕЛ",ukm.adjustment("В(ОТД)","П",width-32," "),width-22," "), "ВОЗВРАТ(РУБ)ПРОДАЖА", width, " ") .. "\n";
while report_iter:next() do
local stock = report_iter:second().stock;
if ukm.str_len(stock.name) > 0 then
text = text .. stock.name .. "\n";
end
text = text .. ukm.adjustment(ukm.adjustment(ukm.leftpad(tostring(stock.id),5,"0"),tostring(report_iter:second().amount_return + report_iter:second().disc_amount_return),width-12," "),tostring(report_iter:second().amount_sale + report_iter:second().disc_amount_sale),width," ") .. "\n";
end
text = text .. " \n\n\n\n\n" .. hw_command_cut;
__print_data:add(text, ukm.printer_type_master());
end
end
Строки переносятся, а вот команду на отрезку ФР не ест