Форум OlegON > Программы и оборудование для автоматизации торговли > Кассовые программы > УКМ-4

Как убрать общую информацию о скидке в чеке? : УКМ-4

10.05.2024 11:10


06.11.2014 12:10
Helpsysone
 
Код:
        if compresed_print == false then
           for i=0,__item.discounts:size()-1 do
             local discount = __item.discounts:at(i);
               if discount.increment:sign() ~= 0 then
                 if discount.increment:sign() == 1 then
                    text = text .. ukm.adjustment("Скидка" .. discount.receiptdiscount.name, tostring(discount.increment) .. " ", width, " ") .. "\n";
                 else
                    text = text .. ukm.adjustment("Скидка" .. discount.receiptdiscount.name, tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                 end
               end
           end
        else
           for key, discount in pairs(__item.discounts) do
                if discount.increment:sign() ~= 0 then
                   if discount.increment:sign() == 1 then
                      text = text .. ukm.adjustment("Скидка" .. discount.name, tostring(discount.increment) .. " ", width, " ") .. "\n";
                   else
                      text = text .. ukm.adjustment("Скидка" .. discount.name, tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                   end
                end
           end
        end
Во все ковычки?
06.11.2014 12:11
Mtirt
 
Во всех четырех:
Код:
        if compresed_print == false then
           for i=0,__item.discounts:size()-1 do
             local discount = __item.discounts:at(i);
               if discount.increment:sign() ~= 0 then
                 if discount.increment:sign() == 1 then
                    text = text .. ukm.adjustment("Скидка " .. discount.receiptdiscount.name, tostring(discount.increment) .. " ", width, " ") .. "\n";
                 else
                    text = text .. ukm.adjustment("Скидка " .. discount.receiptdiscount.name, tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                 end
               end
           end
        else
           for key, discount in pairs(__item.discounts) do
                if discount.increment:sign() ~= 0 then
                   if discount.increment:sign() == 1 then
                      text = text .. ukm.adjustment("Скидка " .. discount.name, tostring(discount.increment) .. " ", width, " ") .. "\n";
                   else
                      text = text .. ukm.adjustment("Скидка " .. discount.name, tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                   end
                end
           end
        end
06.11.2014 12:17
Helpsysone
 
Спасибо, сейчас проверю.. отпишусь=)
06.11.2014 12:27
Helpsysone
 
получилось, а скидку " минусом не реально обозначить"?=)
06.11.2014 12:33
akonev
 
реально.
Код:
        if compresed_print == false then
           for i=0,__item.discounts:size()-1 do
             local discount = __item.discounts:at(i);
               if discount.increment:sign() ~= 0 then
                 if discount.increment:sign() == 1 then
                    text = text .. ukm.adjustment("Скидка " .. discount.receiptdiscount.name, "-" ..  tostring(discount.increment) .. " ", width, " ") .. "\n";
                 else
                    text = text .. ukm.adjustment("Скидка " .. discount.receiptdiscount.name, "-" ..  tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                 end
               end
           end
        else
           for key, discount in pairs(__item.discounts) do
                if discount.increment:sign() ~= 0 then
                   if discount.increment:sign() == 1 then
                      text = text .. ukm.adjustment("Скидка " .. discount.name, "-" .. tostring(discount.increment) .. " ", width, " ") .. "\n";
                   else
                      text = text .. ukm.adjustment("Скидка " .. discount.name, "-" ..  tostring(discount.increment*ukm.currency(-1)) .. " ", width, " ") .. "\n";
                   end
                end
           end
        end
06.11.2014 12:50
Helpsysone
 
вопрос не по теме. а где можно взять мануал по lua?
06.11.2014 13:12
Mtirt
 
В Хранилище есть вот этот документ:
Хранилище

Он слегка устарел, но другого нет.
Часовой пояс GMT +3, время: 11:10.

Форум на базе vBulletin®
Copyright © Jelsoft Enterprises Ltd.
В случае заимствования информации гипертекстовая индексируемая ссылка на Форум обязательна.