update
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Для каз. фискальников с функцией передачи на сервер:
|
||||
*
|
||||
* ---
|
||||
* FPG-1000 = ПОРТ FPG-1000 ФKZ (Бумага с боку)
|
||||
* FPG-350 = ПОРТ FPG-350 ФKZ (Переносной)
|
||||
* FPG-60 = ПОРТ FPG-60 ФKZ
|
||||
@ -969,7 +969,19 @@ MyError DP25::SetFiscalInvParam(int Type, std::string Data)
|
||||
Data = "";
|
||||
}else if (Type == 3){ // '3' INN/BIN number up to 12 digits;
|
||||
msg.append(Data, 0, 12);
|
||||
}else {
|
||||
}else if (Type == 4) { // Parent ticket number up to 16 digits;
|
||||
msg.append(Data, 0, 16);
|
||||
}else if (Type == 5) { // Parent ticket date time in format: "DD-MM-YY hh:mm:ss";
|
||||
msg.append(Data, 0, 17);
|
||||
}else if (Type == 6) { // Parent ticket KgdKkmId up to 12 digits;
|
||||
msg.append(Data, 0, 12);
|
||||
}else if (Type == 7) { // Parent ticket total (0.00...999,999,999,999.99);
|
||||
msg.append(Data, 0, 15);
|
||||
}else if (Type == 8) { // Parent ticket is off line (0..1);
|
||||
msg.append(Data, 0, 1);
|
||||
}
|
||||
else {
|
||||
|
||||
Data = "";
|
||||
}
|
||||
msg += '\t';
|
||||
@ -1140,7 +1152,7 @@ MyError DP25::DiagnosticInfo(std::string& Name,std::string& FwRev,std::string& F
|
||||
if(m_SaveLog)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "DiagnosticInfo(Name="+Name+",FwRev="+FwRev+",FwDate="+FwDate+",FwTime"+FwTime+",Checksum"+Checksum+",Sw="+Sw+",DevNumber="+DevNumber+"); v3.13.0.14";
|
||||
ss << "DiagnosticInfo(Name="+Name+",FwRev="+FwRev+",FwDate="+FwDate+",FwTime"+FwTime+",Checksum"+Checksum+",Sw="+Sw+",DevNumber="+DevNumber+"); v3.15.0.2";
|
||||
if(m_LastErrorCode!=0) ss << " ErrorCode: " << m_LastErrorCode << " ErrorDescription: " << m_LastErrorDescription;
|
||||
Utility::logrotate(m_LogFilePath+sp3()+"log.txt","main","info",ss.str());
|
||||
}
|
||||
@ -1439,9 +1451,27 @@ MyError DP25::OpenFiscalInv(int OpCode,std::string OpPwd,int TillNmb,char Receip
|
||||
///MarkStamp - Mark stamp read with a 2D - code scanner(up to 168 symbols).The sale of a marked item must contain{ MarkStamp }; Note The control of the item being marked or not marked, must be performed by the computer program;
|
||||
///Sum - Sum printed instead of{ Price } *{Quantity} in the receipt(0.00...999, 999, 999, 999.99);
|
||||
///UnitCode - Code of the unit, which will be printed in sales after the sold quantity(1...999).Default: The code of first programmed unit;
|
||||
/// NTIN - До 16 символов NTIN(национальный торговый номер товара) продукта согласно протоколу 203.
|
||||
/// SlipNumber – Текущий номер чека продажи или чека возврата (1...99999999);
|
||||
///DocNumber - Global number of all documents ( 1...99999999 );
|
||||
MyError DP25::RegisterSale(std::string PluName, char TaxCode, double Price, double Quantity, char DiscountType, double DiscountValue, int Department, std::string MarkStamp, double RoundPrice, int UnitCode, std::string ProductID, std::string BarCode, int& SlipNumber, int& DocNumber)
|
||||
/// DocNumber - Global number of all documents ( 1...99999999 );
|
||||
MyError DP25::RegisterSale(
|
||||
std::string PluName,
|
||||
char TaxCode,
|
||||
double Price,
|
||||
double Quantity,
|
||||
char DiscountType,
|
||||
double DiscountValue,
|
||||
int Department,
|
||||
std::string MarkStamp,
|
||||
double RoundPrice,
|
||||
int UnitCode,
|
||||
std::string ProductID,
|
||||
std::string BarCode,
|
||||
int MarkType,
|
||||
std::string NTIN,
|
||||
int& SlipNumber,
|
||||
int& DocNumber
|
||||
)
|
||||
{
|
||||
if (DiscountType == 0) DiscountType = '0';
|
||||
if (DiscountType == 1) DiscountType = '1';
|
||||
@ -1516,6 +1546,11 @@ MyError DP25::RegisterSale(std::string PluName, char TaxCode, double Price, doub
|
||||
msg += ProductID + "\t";
|
||||
msg += BarCode + "\t";
|
||||
|
||||
if (NTIN.length() > 0){
|
||||
if(MarkType==5) msg += "5\t"; else msg += "\t";
|
||||
msg += NTIN + "\t";
|
||||
}
|
||||
|
||||
std::string str="";
|
||||
std::string answer;
|
||||
|
||||
@ -1555,7 +1590,7 @@ MyError DP25::RegisterSale(std::string PluName, char TaxCode, double Price, doub
|
||||
if(m_SaveLog)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "RegisterSale(PluName=\""+PluName+"\", TaxCd='"+ TaxCode +"', Price="+Utility::FloatToStdStr(Price,2,'.')+", Quantity="+Utility::FloatToStdStr(Quantity,3,'.')<<", DiscountType="<< DiscountType << ", DiscountValue=" << Utility::FloatToStdStr(DiscountValue, 2, '.') <<", Department="+Utility::IntToStdStr(Department)+", MarkStamp='"+ MarkStamp +"', RoundPrice="+Utility::FloatToStdStr(RoundPrice,2,'.')+", UnitCode="<< UnitCode << ", ProductID=" << ProductID << ", BarCode=" << BarCode << ", SlipNumber=" << SlipNumber << ", DocNumber=" << DocNumber << ");";
|
||||
ss << "RegisterSale(PluName=\""+PluName+"\", TaxCd='"+ TaxCode +"', Price="+Utility::FloatToStdStr(Price,2,'.')+", Quantity="+Utility::FloatToStdStr(Quantity,3,'.')<<", DiscountType="<< DiscountType << ", DiscountValue=" << Utility::FloatToStdStr(DiscountValue, 2, '.') <<", Department="+Utility::IntToStdStr(Department)+", MarkStamp='"+ MarkStamp +"', RoundPrice="+Utility::FloatToStdStr(RoundPrice,2,'.')+", UnitCode="<< UnitCode << ", ProductID=" << ProductID << ", BarCode=" << BarCode << ", MarkType = "<< MarkType <<", NTIN = "<< NTIN <<", SlipNumber=" << SlipNumber << ", DocNumber=" << DocNumber << ");";
|
||||
if(m_LastErrorCode!=0) ss << " ErrorCode: " << m_LastErrorCode << " ErrorDescription: " << m_LastErrorDescription;
|
||||
Utility::logrotate(m_LogFilePath+sp3()+"log.txt","main","info",ss.str());
|
||||
}
|
||||
@ -3326,7 +3361,7 @@ MyError DP25::PrintBarCode(char Type,std::string Data,int QRcodeSize)
|
||||
return result;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
//Дата последней фискальной записи
|
||||
//Дата последней фискальной записи format "DD-MM-YY hh:mm:ss"
|
||||
MyError DP25::DateOfLastEntryByFiscalMemory(std::string& DateTime)
|
||||
{
|
||||
if(m_SaveLog) Utility::logrotate(m_LogFilePath+sp3()+"log.txt","main","info","Start DateOfLastEntryByFiscalMemory();");
|
||||
|
||||
Reference in New Issue
Block a user