Драйверы торгового оборудования v.9
fptrexample.cpp
1 #include <ctime>
2 #include <exception>
3 #include <QLibrary>
4 #include <QDebug>
5 #include <QDir>
6 #include <cmath>
7 
8 // Заголовочные файлы ДТО9
9 #include "ifptr.h"
10 #include "dto_errors.h"
11 #include "dto_const.h"
12 
13 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
14 # include <QTextCodec>
15 
16 static class TrInit
17 {
18 public:
19  TrInit()
20  {
21  QTextCodec::setCodecForTr(QTextCodec::codecForName("utf-8"));
22  QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf-8"));
23  QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8"));
24  }
25 } g_TrInit;
26 #endif
27 
28 class Exception : public std::exception {
29 public:
30  Exception(const QString &msg)
31  : m_message(msg)
32  {
33  }
34 
35  virtual ~Exception() throw()
36  {
37  }
38 
39  virtual const char* what() const throw()
40  {
41  static QByteArray rawMessage = m_message.toUtf8();
42  return rawMessage.data();
43  }
44 
45 private:
46  QString m_message;
47 };
48 
49 void checkError(TED::IDTOBase *iface)
50 {
51  if(!iface)
52  throw Exception("Invalid interface");
53 
54  int rc = EC_OK;
55  iface->get_ResultCode(&rc);
56  if(rc < 0)
57  {
58  QString resultDescription, badParamDescription;
59  QVector<wchar_t> v(256);
60  int size = iface->get_ResultDescription(&v[0], v.size());
61  if (size <= 0)
62  throw Exception("get_ResultDescription error");
63  if (size > v.size())
64  {
65  v.clear();
66  v.resize(size + 1);
67  iface->get_ResultDescription(&v[0], v.size());
68  }
69  resultDescription = QString::fromWCharArray(&v[0]);
70  if(rc == EC_INVALID_PARAM) {
71  QVector<wchar_t> v(256);
72  int size = iface->get_BadParamDescription(&v[0], v.size());
73  if (size <= 0)
74  throw Exception("get_BadParamDescription error");
75  if (size > v.size())
76  {
77  v.clear();
78  v.resize(size + 1);
79  iface->get_ResultDescription(&v[0], v.size());
80  }
81  badParamDescription = QString::fromWCharArray(&v[0]);
82  }
83 
84  if(badParamDescription.isEmpty())
85  throw Exception(QObject::trUtf8("[%1] %2")
86  .arg(rc)
87  .arg(resultDescription));
88  else
89  throw Exception(QObject::trUtf8("[%1] %2 (%3)")
90  .arg(rc)
91  .arg(resultDescription)
92  .arg(badParamDescription));
93  }
94 }
95 
96 void printText(TED::Fptr::IFptr *ifptr, const wchar_t *text, TED::Fptr::Alignment alignment = TED::Fptr::AlignmentLeft,
98 {
99  if(!ifptr)
100  throw Exception("Invalid interface");
101 
102  if(ifptr->put_Caption(text) < 0)
103  checkError(ifptr);
104  if(ifptr->put_TextWrap(wrap) < 0)
105  checkError(ifptr);
106  if(ifptr->put_Alignment(alignment) < 0)
107  checkError(ifptr);
108  if(ifptr->PrintString() < 0)
109  checkError(ifptr);
110 }
111 
112 void openCheck(TED::Fptr::IFptr *ifptr, TED::Fptr::ChequeType type)
113 {
114  if(ifptr->put_Mode(TED::Fptr::ModeRegistration) < 0)
115  checkError(ifptr);
116  if(ifptr->SetMode() < 0)
117  checkError(ifptr);
118  if(ifptr->put_CheckType(type) < 0)
119  checkError(ifptr);
120  if(ifptr->OpenCheck() < 0)
121  checkError(ifptr);
122 }
123 
124 void closeCheck(TED::Fptr::IFptr *ifptr, int typeClose)
125 {
126  if(ifptr->put_TypeClose(typeClose) < 0)
127  checkError(ifptr);
128  if(ifptr->CloseCheck() < 0)
129  checkError(ifptr);
130 }
131 
132 void registration(TED::Fptr::IFptr *ifptr, const wchar_t *name, double price, double quantity)
133 {
134  if(ifptr->put_Quantity(quantity) < 0)
135  checkError(ifptr);
136  if(ifptr->put_Price(price) < 0)
137  checkError(ifptr);
138  if(ifptr->put_TextWrap(TED::Fptr::TextWrapWord) < 0)
139  checkError(ifptr);
140  if(ifptr->put_Name(name) < 0)
141  checkError(ifptr);
142  if(ifptr->Registration() < 0)
143  checkError(ifptr);
144 }
145 
146 void registrationFZ54(TED::Fptr::IFptr *ifptr, const wchar_t *name, double price,
147  double quantity, double positionSum, int taxNumber)
148 {
149  if(ifptr->put_PositionSum(positionSum) < 0)
150  checkError(ifptr);
151  if(ifptr->put_Quantity(quantity) < 0)
152  checkError(ifptr);
153  if(ifptr->put_Price(price) < 0)
154  checkError(ifptr);
155  if(ifptr->put_TaxNumber(taxNumber) < 0)
156  checkError(ifptr);
157  if(ifptr->put_TextWrap(TED::Fptr::TextWrapWord) < 0)
158  checkError(ifptr);
159  if(ifptr->put_Name(name) < 0)
160  checkError(ifptr);
161  if(ifptr->Registration() < 0)
162  checkError(ifptr);
163 }
164 
165 void payment(TED::Fptr::IFptr *ifptr, double sum, int type)
166 {
167  if(ifptr->put_Summ(sum) < 0)
168  checkError(ifptr);
169  if(ifptr->put_TypeClose(type) < 0)
170  checkError(ifptr);
171  if(ifptr->Payment() < 0)
172  checkError(ifptr);
173  double remainder, change;
174  ifptr->get_Remainder(&remainder);
175  ifptr->get_Change(&change);
176  qDebug() << qPrintable(QObject::trUtf8("Remainder: %1, Change: %2")
177  .arg(remainder)
178  .arg(change));
179 }
180 
181 void reportZ(TED::Fptr::IFptr *ifptr)
182 {
183  if(ifptr->put_Mode(TED::Fptr::ModeReportClear) < 0)
184  checkError(ifptr);
185  if(ifptr->SetMode() < 0)
186  checkError(ifptr);
188  checkError(ifptr);
189  if(ifptr->Report() < 0)
190  checkError(ifptr);
191 }
192 
193 void printFooter(TED::Fptr::IFptr *ifptr)
194 {
195  if(ifptr->put_Mode(TED::Fptr::ModeReportNoClear) < 0)
196  checkError(ifptr);
197  if(ifptr->SetMode() < 0)
198  checkError(ifptr);
199  if(ifptr->PrintFooter() < 0)
200  checkError(ifptr);
201 }
202 
203 void printBarcode(TED::Fptr::IFptr *ifptr, TED::Fptr::BarcodeType type,
204  const wchar_t *barcode, double scale = 100)
205 {
207  checkError(ifptr);
208  if(ifptr->put_BarcodeType(type) < 0)
209  checkError(ifptr);
210  if(ifptr->put_Barcode(barcode) < 0)
211  checkError(ifptr);
212  if(ifptr->put_Height(0))
213  checkError(ifptr);
214  if(ifptr->put_BarcodeVersion(0))
215  checkError(ifptr);
217  checkError(ifptr);
218  if(ifptr->put_PrintBarcodeText(0) < 0)
219  checkError(ifptr);
220  if(ifptr->put_BarcodeControlCode(1) < 0)
221  checkError(ifptr);
222  if(ifptr->put_Scale(scale) < 0)
223  checkError(ifptr);
224  if(ifptr->put_BarcodeCorrection(0) < 0)
225  checkError(ifptr);
226  if(ifptr->put_BarcodeColumns(3) < 0)
227  checkError(ifptr);
228  if(ifptr->put_BarcodeRows(1) < 0)
229  checkError(ifptr);
230  if(ifptr->put_BarcodeProportions(50) < 0)
231  checkError(ifptr);
232  if(ifptr->put_BarcodeUseProportions(1) < 0)
233  checkError(ifptr);
235  checkError(ifptr);
236  if(ifptr->put_BarcodePixelProportions(300) < 0)
237  checkError(ifptr);
238  if(ifptr->PrintBarcode() < 0)
239  checkError(ifptr);
240 }
241 
242 void discount(TED::Fptr::IFptr *ifptr, double sum, TED::Fptr::DiscountType type,
243  TED::Fptr::DestinationType destination)
244 {
245  if(ifptr->put_Summ(sum) < 0)
246  checkError(ifptr);
247  if(ifptr->put_DiscountType(type) < 0)
248  checkError(ifptr);
249  if(ifptr->put_Destination(destination) < 0)
250  checkError(ifptr);
251  if(ifptr->Discount() < 0)
252  checkError(ifptr);
253 }
254 
255 void charge(TED::Fptr::IFptr *ifptr, double sum, TED::Fptr::DiscountType type,
256  TED::Fptr::DestinationType destination)
257 {
258  if(ifptr->put_Summ(sum) < 0)
259  checkError(ifptr);
260  if(ifptr->put_DiscountType(type) < 0)
261  checkError(ifptr);
262  if(ifptr->put_Destination(destination) < 0)
263  checkError(ifptr);
264  if(ifptr->Charge() < 0)
265  checkError(ifptr);
266 }
267 
268 int main()
269 {
270  const bool UseShowProperties = false;
271  const bool PrintFiscalCheck = true;
272  const bool PrintNonfiscalCheck = true;
273  const bool UseFZ54 = true;
274 
275  srand(time(0));
276 
277 #if defined(Q_OS_LINUX)
278  QLibrary lib("../bins/linux-x64/libfptr.so");
279  if(!lib.load())
280  {
281  lib.setFileName("../bins/linux-x86/libfptr.so");
282  lib.load();
283  }
284 #elif defined(Q_OS_WIN32)
285  QLibrary lib("../bins/nt-x86-mingw/fptr.dll");
286  lib.load();
287 #else
288 # error "Unknown OS"
289 #endif
290 
291  if(!lib.isLoaded())
292  {
293  qDebug() << qPrintable(QObject::trUtf8("Не удалось загрузить библиотеку fptr - [%1]")
294  .arg(lib.errorString()));
295  return 1;
296  }
297 
298  CreateFptrInterfacePtr create = (CreateFptrInterfacePtr) lib.resolve("CreateFptrInterface");
299  ReleaseFptrInterfacePtr release = (ReleaseFptrInterfacePtr) lib.resolve("ReleaseFptrInterface");
300 
301  TED::Fptr::IFptr *ifptr = create(DTO_IFPTR_VER1);
302  if(!ifptr)
303  {
304  qDebug() << qPrintable("Cannot create Fptr object");
305  return 1;
306  }
307 
308  try
309  {
310  // Выставляем рабочий каталог. В нем дККМ будет искать требуемые ему библиотеки.
311  QFileInfo finfo(lib.fileName());
312  if(ifptr->put_DeviceSingleSetting(S_SEARCHDIR, finfo.absolutePath().toStdWString().c_str()) < 0)
313  checkError(ifptr);
314  if(ifptr->ApplySingleSettings() < 0)
315  checkError(ifptr);
316 
317  // Для настройки драйвера можно вызвать графическое окно настроек
318  if(UseShowProperties)
319  {
320  if(ifptr->ShowProperties() < 0)
321  checkError(ifptr);
322  }
323  // Или настроить без него
324  else
325  {
326  // COM17
327  //if(ifptr->put_DeviceSingleSetting(S_PORT, 17) < 0)
328  //checkError(ifptr);
329  // USB. Можно указать положение на шине (USB$1-1.3, например), но тогда не нужно указывать Vid и Pid
330  // Работа напрямую с USB - Linux Only!
332  checkError(ifptr);
333  if(ifptr->put_DeviceSingleSetting(S_VID, 0x2912) < 0)
334  checkError(ifptr);
335  if(ifptr->put_DeviceSingleSetting(S_PID, 0x0005) < 0)
336  checkError(ifptr);
338  checkError(ifptr);
339  if(UseFZ54)
340  {
342  checkError(ifptr);
343  }
344  else
345  {
347  checkError(ifptr);
348  }
349  if(ifptr->put_DeviceSingleSetting(S_BAUDRATE, 115200) < 0)
350  checkError(ifptr);
351  if(ifptr->ApplySingleSettings() < 0)
352  checkError(ifptr);
353  }
354 
355  // Процедура сохранения актуальных настроек дККМ. Если пользуетесь ShowProperties(),
356  // то ей можно вытащить актуальные настройки, чтобы потом передать из в драйвер через put_DeviceSettings(),
357  // а не настраивать заново
358  if(true)
359  {
360  QVector<wchar_t> v(256);
361  int size = ifptr->get_DeviceSettings(&v[0], v.size());
362  if (size <= 0)
363  throw Exception("get_DeviceSettings error");
364  if (size > v.size())
365  {
366  v.clear();
367  v.resize(size + 1);
368  ifptr->get_DeviceSettings(&v[0], v.size());
369  }
370  QString settings = QString::fromWCharArray(&v[0], v.size());
371  // settings - строка с настройками
372  qDebug() << qPrintable(settings);
373  }
374 
375  // Активируем дККМ
376  if (ifptr->put_DeviceEnabled(1) < 0)
377  checkError(ifptr);
378 
379  // Проверка связи
380  if(ifptr->GetStatus() < 0)
381  checkError(ifptr);
382 
383  // Отменяем чек, если уже открыт. Ошибки "Неверный режим" и "Чек уже закрыт"
384  // не являются ошибками, если мы хотим просто отменить чек
385  try
386  {
387  if(ifptr->CancelCheck() < 0)
388  checkError(ifptr);
389  }
390  catch(const Exception&)
391  {
392  int rc = EC_OK;
393  ifptr->get_ResultCode(&rc);
394  if(rc != EC_INVALID_MODE && rc != EC_3801)
395  throw;
396  }
397 
398  if(PrintFiscalCheck)
399  {
400  // Открываем чек продажи, попутно обработав превышение смены
401  try
402  {
403  openCheck(ifptr, TED::Fptr::ChequeSell);
404  }
405  catch(const Exception&)
406  {
407  int rc = EC_OK;
408  ifptr->get_ResultCode(&rc);
409  // Проверка на превышение смены
410  if(rc == EC_3822)
411  {
412  reportZ(ifptr);
413  openCheck(ifptr, TED::Fptr::ChequeSell);
414  }
415  else
416  {
417  throw;
418  }
419  }
420 
421  // Пробиваем позиции
422  double sum = 0;
423  for(int i = -2; i < 5; ++i)
424  {
425  if(UseFZ54)
426  {
427  double price = 1 * pow(10, i), quantity = 1;
428  registrationFZ54(ifptr, QObject::trUtf8("Позиция %1").arg(i + 3).toStdWString().c_str(),
429  price, quantity, price*quantity, TED::Fptr::TaxVAT18);
430  sum += price * quantity;
431  }
432  else
433  {
434  double price = 1 * pow(10, i), quantity = 1;
435  registration(ifptr, QObject::trUtf8("Позиция %1").arg(i + 3).toStdWString().c_str(),
436  price, quantity);
437  sum += price * quantity;
438  // Скидка на позицию
439  if(i % 2)
440  discount(ifptr, 1, TED::Fptr::DiscountSumm, TED::Fptr::OnPosition);
441  else
443  }
444  }
445  // Скидка на чек
446  if(UseFZ54)
447  {
448  // Можно сбрасывать в пределах копеек. При подаче 0 копейки отбрасываются полностью
449  discount(ifptr, 0, TED::Fptr::DiscountSumm, TED::Fptr::OnCheck);
450  }
451  else
452  {
453  discount(ifptr, 1, TED::Fptr::DiscountPercent, TED::Fptr::OnCheck);
454  }
455  // Оплачиваем
456  payment(ifptr, sum / 4, 1);
457  payment(ifptr, sum / 4, 2);
458  payment(ifptr, sum / 4, 3);
459  payment(ifptr, sum, 0);
460  // Закрываем чек
461  closeCheck(ifptr, 0);
462  }
463 
464 
465  // Нефискальный чек
466  // Его можно не открывать, а сразу начинать печатать
467  if(PrintNonfiscalCheck)
468  {
469  printText(ifptr,
470  L"Я сразу смазал карту будня, плеснувши краску из стакана;\n"
471  L"Я показал на блюде студня косые скулы океана.\n"
472  L"На чешуе жестяной рыбы прочел я зовы новых губ.",
475  printText(ifptr, L"А вы",
478  printText(ifptr, L"ноктюрн сыграть",
481  printText(ifptr, L"могли бы",
484  printText(ifptr, L"на флейте водосточных труб?",
487 
488  printText(ifptr, L"\nEAN8", TED::Fptr::AlignmentCenter);
489  printBarcode(ifptr, TED::Fptr::BarcodeEAN8, L"40182735");
490  printText(ifptr, L"");
491  printText(ifptr, L"\nEAN13", TED::Fptr::AlignmentCenter);
492  printBarcode(ifptr, TED::Fptr::BarcodeEAN13, L"4007630000116", 200);
493  printText(ifptr, L"");
494  printText(ifptr, L"\nUPCA", TED::Fptr::AlignmentCenter);
495  printBarcode(ifptr, TED::Fptr::BarcodeUPCA, L"697929110035");
496  printText(ifptr, L"");
497  printText(ifptr, L"\nCODE39", TED::Fptr::AlignmentCenter);
498  printBarcode(ifptr, TED::Fptr::BarcodeCode39, L"ATOL.RU");
499  printText(ifptr, L"");
500  printText(ifptr, L"\nPDF417", TED::Fptr::AlignmentCenter);
501  printBarcode(ifptr, TED::Fptr::BarcodePDF417, L"1234567", 100);
502  printText(ifptr, L"");
503  printText(ifptr, L"\nQR", TED::Fptr::AlignmentCenter);
504  printBarcode(ifptr, TED::Fptr::BarcodeQR, L"АТОЛ.РУ", 500);
505  printText(ifptr, L"");
506  printText(ifptr, L"\nITF-14", TED::Fptr::AlignmentCenter);
507  printBarcode(ifptr, TED::Fptr::BarcodeITF14, L"00012345600012");
508  printText(ifptr, L"");
509  printText(ifptr, L"\nInterleaved 2 of 5", TED::Fptr::AlignmentCenter);
510  printBarcode(ifptr, TED::Fptr::BarcodeInterleaved2of5, L"04062300106659");
511  printText(ifptr, L"");
512  printFooter(ifptr);
513  }
514  }
515  catch(const std::exception &ex)
516  {
517  qDebug() << qPrintable(ex.what());
518  release(&ifptr);
519  return 1;
520  }
521 
522  release(&ifptr);
523  return 0;
524 }
virtual int DTOSHARED_CCA put_Scale(double value)=0
Устанавливает масштаб.
TextWrap
Перенос текста
Definition: ifptr.h:94
virtual int DTOSHARED_CCA put_BarcodeColumns(int value)=0
Устанавливает количество колонок ШК.
virtual int DTOSHARED_CCA ShowProperties()=0
Выводит диалог настройки драйвера
virtual int DTOSHARED_CCA put_BarcodeCorrection(int value)=0
Устанавливает уровень коррекции ШК.
#define EC_INVALID_MODE
Не поддерживается в данном режиме устройства
Definition: dto_errors.h:57
virtual int DTOSHARED_CCA put_Price(double value)=0
Устанавливает цену.
virtual int DTOSHARED_CCA put_BarcodeRows(int value)=0
Устанавливает количество строк ШК.
virtual int DTOSHARED_CCA get_Remainder(double *value)=0
Возвращает значение остатка.
virtual int DTOSHARED_CCA Charge()=0
Регистрирует надбавку.
virtual int DTOSHARED_CCA Discount()=0
Регистрирует скидку.
virtual int DTOSHARED_CCA put_Mode(int value)=0
Устанаваливает значение режима работы.
#define S_PID
Definition: dto_const.h:62
#define SV_PORT_USB
Definition: dto_const.h:78
virtual int DTOSHARED_CCA put_BarcodeControlCode(int value)=0
Устанавливает флаг наличия контрольных символов ШК.
virtual int DTOSHARED_CCA get_ResultCode(int *value)=0
Возвращает результат последней операции
#define EC_3801
Чек закрыт - операция невозможна
Definition: dto_errors.h:147
Alignment
Выравнивание
Definition: ifptr.h:86
#define S_SEARCHDIR
Definition: dto_const.h:36
virtual int DTOSHARED_CCA Report()=0
Печатает указанный отчет.
virtual int DTOSHARED_CCA put_PositionSum(double value)=0
Устанавливает сумму позиции.
Базовый интерфейс для работы с драйверами
Definition: idtobase.h:28
BarcodeType
Тип штрихкода
Definition: ifptr.h:102
virtual int DTOSHARED_CCA Registration()=0
Производит регистрацию продажи / прихода.
virtual int DTOSHARED_CCA put_DeviceSingleSetting(const wchar_t *name, const wchar_t *value)=0
Устанавливает значение настроки
virtual int DTOSHARED_CCA put_PrintBarcodeText(int value)=0
Устанавливает флаг печати данных штрихкода.
TED::Fptr::IFptr *(* CreateFptrInterfacePtr)(int ver)
Тип функции CreateFptrInterface().
Definition: ifptr.h:545
virtual int DTOSHARED_CCA get_DeviceSettings(wchar_t *bfr, int bfrSize)=0
Возвращает строку с текущими настройками драйвера
virtual int DTOSHARED_CCA put_BarcodeType(int value)=0
Устанавливает тип штрихкода.
virtual int DTOSHARED_CCA put_Barcode(const wchar_t *value)=0
Устанавливает данные штрихкода.
virtual int DTOSHARED_CCA get_ResultDescription(wchar_t *bfr, int bfrSize)=0
Возвращает текстовое описание результата последней операции
virtual int DTOSHARED_CCA put_BarcodePixelProportions(int value)=0
Устанавливает пропорции пикселя ШК.
#define EC_3822
Смена превысила 24 часа
Definition: dto_errors.h:185
virtual int DTOSHARED_CCA put_BarcodeProportions(int value)=0
Устанавливает пропорции ШК.
virtual int DTOSHARED_CCA put_TaxNumber(int value)=0
Устанавливает номер налога.
virtual int DTOSHARED_CCA put_Quantity(double value)=0
Устанавливает количество.
virtual int DTOSHARED_CCA put_BarcodePrintType(int value)=0
Устанавливает способ печати ШК.
#define S_VID
Definition: dto_const.h:63
virtual int DTOSHARED_CCA put_BarcodeVersion(int value)=0
Устанавливает версию ШК.
virtual int DTOSHARED_CCA PrintString()=0
Печатает строку.
virtual int DTOSHARED_CCA put_DiscountType(int value)=0
Устанавливает тип скидки.
virtual int DTOSHARED_CCA put_DeviceEnabled(int value)=0
Устанавливает логическое состояние драйвера
virtual int DTOSHARED_CCA put_TextWrap(int value)=0
Устанавливает перенос.
virtual int DTOSHARED_CCA CancelCheck()=0
Аннулирует чек.
virtual int DTOSHARED_CCA put_Height(int value)=0
Устанавливает высоту.
virtual int DTOSHARED_CCA ApplySingleSettings()=0
Применяет установленные настройки
#define EC_OK
Нет ошибки
Definition: dto_errors.h:27
virtual int DTOSHARED_CCA put_Destination(int value)=0
Устанавливает область действия налога / скидки.
virtual int DTOSHARED_CCA CloseCheck()=0
Закрывает чек в ККТ.
virtual int DTOSHARED_CCA put_Name(const wchar_t *value)=0
Устанавливает название.
#define S_PORT
Definition: dto_const.h:29
virtual int DTOSHARED_CCA get_Change(double *value)=0
Возвращает значение сдачи.
virtual int DTOSHARED_CCA OpenCheck()=0
Открывает чек в ККТ.
DiscountType
Типы скидок
Definition: ifptr.h:272
virtual int DTOSHARED_CCA get_BadParamDescription(wchar_t *bfr, int bfrSize)=0
Возвращает текстовое описание неверного параметра
virtual int DTOSHARED_CCA put_Alignment(int value)=0
Устанавливает выравнивание.
#define S_BAUDRATE
Definition: dto_const.h:30
virtual int DTOSHARED_CCA PrintBarcode()=0
Печатает штрихкод.
virtual int DTOSHARED_CCA put_BarcodeUseProportions(int value)=0
Устанавливает флаг использования пропорций ШК.
virtual int DTOSHARED_CCA put_BarcodePackingMode(int value)=0
Устанавливает режим упаковки ШК.
virtual int DTOSHARED_CCA Payment()=0
Производит регистрацию оплаты.
ChequeType
Типы / состояния чека
Definition: ifptr.h:192
virtual int DTOSHARED_CCA put_CheckType(int value)=0
Устанавливает тип чека.
#define S_MODEL
Definition: dto_const.h:27
#define S_PROTOCOL
Definition: dto_const.h:28
virtual int DTOSHARED_CCA GetStatus()=0
Заполняет свойства драйвера текущим состоянием ККТ.
virtual int DTOSHARED_CCA SetMode()=0
Устанавливает режим ККТ.
virtual int DTOSHARED_CCA put_Summ(double value)=0
Устанавливает сумму.
DestinationType
Цель налога / скидки
Definition: ifptr.h:374
virtual int DTOSHARED_CCA PrintFooter()=0
Печатает блок атрибутов чека.
Интерфейс драйвера контрольно кассовых машин (дККТ)
Definition: ifptr.h:557
virtual int DTOSHARED_CCA put_Caption(const wchar_t *value)=0
Устанавливает строку.
#define EC_INVALID_PARAM
Недопустимое значение
Definition: dto_errors.h:37
virtual int DTOSHARED_CCA put_TypeClose(int value)=0
Устанавливает тип платежа.
void(* ReleaseFptrInterfacePtr)(TED::Fptr::IFptr **iface)
Тип функции ReleaseFptrInterface().
Definition: ifptr.h:547
virtual int DTOSHARED_CCA put_ReportType(int value)=0
Устанавливает тип отчета.