Имя: Пароль:
IT
 
Печать чека на Пост терминале
0 r-d-v2008
 
23.01.12
19:31
Добрый день!!!! Кто нибудь подскажите пожалуйста, сделал шаблон для печати чека. Этот шаблон чека раздел на три группы товара. Все печатает все нормально, но мне надо еще чтобы в каждой группе товара которая в чек выходит печаталась итоговая сумма. Подскажи как сделать? Пытался в цикле прогнать не получилось ругался на скрипт.
Вот сам код чека:

//#ИНФОРМАЦИЯ В ЭТОЙ И СЛЕДУЮЩЕЙ СТРОКЕ НЕОБХОДИМА ДЛЯ КОРРЕКТНОЙ РАБОТЫ МАСТЕРА#
//dsc03=1¦dsc05=1¦dsc50=1¦dsc60=1¦dsc61=1¦dsc63=1¦bar03=50¦bar04=100¦scr10=4¦scr43=0¦scr17=1¦scr32=1¦scr33=1¦mac01==¦mac02=-¦mac03=_¦

function PrintHeader(PO, RO)
{
 //PO.PrintString(RO.ReceiptNo);
 PO.PrintCenterString("Кафе КОТОФЕЙ"," ");
 PO.PrintStringWordWrap("СЧЕТ №"+PO.AddCharLeft(RO.ReceiptNo,0,8));
 PO.PrintLRStringLF(RO.DateOpen + " " + "Зал: " + RO.HallName, "Т.О.: " + RO.HallPlaceName," ");
 PO.PrintLRStringLF(RO.TimeOpen, RO.UserName," ");
 PO.PrintCenterString("Кухня", " ");
 for (RO.Pos.Index = 1;RO.Pos.Index <= RO.Pos.Count;RO.Pos.Index++)
  for (RO.Pos.Parent.Index = 1; RO.Pos.Parent.Index <= RO.Pos.Parent.Count; RO.Pos.Parent.Index++)
   if (RO.Pos.Parent.Name == "Кухня")
      //PO.PrintString(RO.Pos.WareText);
      // PO.PrintString(RO.Pos.Index+". "+RO.Pos.WareName);
      //Кол-во,цена и стоимоть товара
      //PO.PrintLRStringLF(Sp+PO.FormatCurrency(RO.Pos.Quantity) +"*"+
      //                 PO.FormatCurrency(RO.Pos.Price),
      //                 PO.FormatCurrency(RO.Pos.SummForD),CharPos);
      PO.PrintLRStringLF(RO.Pos.Number+". "+RO.Pos.WareText+" "+(RO.Pos.FracSale?PO.FormatQuantity(RO.Pos.Quantity):RO.Pos.Quantity)+" * "+PO.FormatCurrency(RO.Pos.Price),PO.FormatCurrency(RO.Pos.SummForD),"_");
 PO.PrintCenterString("Бар", " ");
 for (RO.Pos.Index = 1;RO.Pos.Index <= RO.Pos.Count;RO.Pos.Index++)
  for (RO.Pos.Parent.Index = 1; RO.Pos.Parent.Index <= RO.Pos.Parent.Count; RO.Pos.Parent.Index++)
   if (RO.Pos.Parent.Name == "Бар")
      //PO.PrintString(RO.Pos.WareText);
      //PO.PrintString(RO.Pos.Index+". "+RO.Pos.WareName);
      //Кол-во,цена и стоимоть товара
      //PO.PrintLRStringLF(Sp+PO.FormatQuantity(RO.Pos.Quantity)+"*"+
      //                 PO.FormatCurrency(RO.Pos.Price),
      //                 PO.FormatCurrency(RO.Pos.SummForD),CharPos);
      PO.PrintLRStringLF(RO.Pos.Number+". "+RO.Pos.WareText+" "+(RO.Pos.FracSale?PO.FormatQuantity(RO.Pos.Quantity):RO.Pos.Quantity)+" * "+PO.FormatCurrency(RO.Pos.Price),PO.FormatCurrency(RO.Pos.SummForD),"_");
 PO.PrintCenterString("Бар алкогольный", " ");
 for (RO.Pos.Index = 1;RO.Pos.Index <= RO.Pos.Count;RO.Pos.Index++)
  for (RO.Pos.Parent.Index = 1; RO.Pos.Parent.Index <= RO.Pos.Parent.Count; RO.Pos.Parent.Index++)
   if (RO.Pos.Parent.Name == "Бар алкогольный")
    //PO.PrintString(RO.Pos.WareText);
      //PO.PrintString(RO.Pos.Index+". "+RO.Pos.WareName);
      //Кол-во,цена и стоимоть товара
      //PO.PrintLRStringLF(Sp+PO.FormatQuantity(RO.Pos.Quantity)+"*"+
      //                 PO.FormatCurrency(RO.Pos.Price),
      //                 PO.FormatCurrency(RO.Pos.SummForD),CharPos);
      PO.PrintLRStringLF(RO.Pos.Number+". "+RO.Pos.WareText+" "+(RO.Pos.FracSale?PO.FormatQuantity(RO.Pos.Quantity):RO.Pos.Quantity)+" * "+PO.FormatCurrency(RO.Pos.Price),PO.FormatCurrency(RO.Pos.SummForD),"_");
}

function PrintPosition(PO, RO)
{
// if (RO.Pos.Storno == 1)
//   PO.PrintCenterString("СТОРНО"," ");
// PO.PrintLRStringLF(RO.Pos.Number+". "+RO.Pos.WareText+" "+(RO.Pos.FracSale?PO.FormatQuantity(RO.Pos.Quantity):RO.Pos.Quantity)+" * "+PO.FormatCurrency(RO.Pos.Price),PO.FormatCurrency(RO.Pos.SummForD),"_");
// if (RO.Pos.Storno == 0)
// {
//  if (RO.Pos.AspectStr != "")
//     for (RO.Pos.Aspect.Index = 1;
//         RO.Pos.Aspect.Index <=
//          RO.Pos.Aspect.Count;
//          RO.Pos.Aspect.Index++)
//     {
//       if (RO.Pos.Aspect.Code != 0)
//         PO.PrintStringWordWrap("    "+RO.Pos.Aspect.AspectText+": "+
//                               RO.Pos.Aspect.Text);
//     }

// }
}

function PrintFooter(PO, RO)
{

 PO.PrintLRStringLF("Итог",PO.FormatCurrency(RO.SummForD),"_");
 PO.PrintLRStringLF("-","-","-");


}
1 filh
 
23.01.12
19:36
А сразу репеждать сумму как параметр?
2 r-d-v2008
 
23.01.12
19:38
1) не совсем понял ответа
3 r-d-v2008
 
23.01.12
19:56
Все ответов больше нема?
4 r-d-v2008
 
24.01.12
04:48
Люди, что никто не знает? Или просто не хочет отвечать?
5 big
 
24.01.12
06:33
лучше на Атол-е спроси. Твой скрипт чтобы проверить, надо мозх включать ))

А вообще - почему как минимум не накапилвать в переменной суммы продаж, а потом выводить. Как я понял ты просто печатаешь строки с товаром, количеством и суммой
6 r-d-v2008
 
24.01.12
06:42
Да в данный момент я печатаю строки с товаром, я пробовал заносить в переменную сумму продаж, а потом в цикле суммировать, скрипт ругается на что то, пишет данный скрипт не поддерживается что то типа того..... досканально не помню, что пишет. Для общей суммы документа есть специальная переменная, а вот как с группами выхитрится, что то у меня мозг тупит
7 r-d-v2008
 
24.01.12
06:43
(5)Значит лучше на Атоле вопрос этот задать, Ясно Спасибо большое