Browse Source

refs #795 Syncronizing with release commit:4e139dda253b7936da4f9cf25a005908c0766421 build:201802150148.

git-svn-id: https://help.cyberplat.com/svn@704 03a3ef96-f0a9-4432-b0b0-a3692ed642c1
tags/3.11.0
svn 3 years ago
parent
commit
35ccf5ae3c
9 changed files with 28 additions and 21 deletions
  1. +1
    -1
      3.0/src/apps/PaymentProcessor/src/Services/PrintingService.cpp
  2. +0
    -2
      3.0/src/includes/Hardware/Common/DeviceDataConstants.h
  3. +1
    -1
      3.0/src/interface/modern/scene_with_context/operators/11611/widgets/kzd_station_editor.qml
  4. +1
    -1
      3.0/src/modules/Hardware/FR/src/Atol/Online/AtolOnlineFRBase.cpp
  5. +3
    -3
      3.0/src/modules/Hardware/FR/src/Base/FRBase.cpp
  6. +2
    -2
      3.0/src/modules/Hardware/FR/src/Kasbi/KasbiFRBase.cpp
  7. +1
    -1
      3.0/src/modules/Hardware/FR/src/Kasbi/KasbiFRConstants.h
  8. +3
    -2
      3.0/src/modules/Hardware/FR/src/Prim/Online/PrimOnlineFRBase.cpp
  9. +16
    -8
      3.0/src/modules/Hardware/FR/src/Shtrih/Online/ShtrihOnlineFRBase.cpp

+ 1
- 1
3.0/src/apps/PaymentProcessor/src/Services/PrintingService.cpp View File

@@ -1166,7 +1166,7 @@ void PrintingService::expandTags(QStringList & aReceipt, const QVariantMap & aPa
}
else
{
toLog(LogLevel::Debug, QString("Evaluate condition nothing.").arg(l.last()));
toLog(LogLevel::Debug, QString("Evaluate condition nothing for %1").arg(l.last()));
}

continue;


+ 0
- 2
3.0/src/includes/Hardware/Common/DeviceDataConstants.h View File

@@ -156,9 +156,7 @@ namespace CDeviceData
const char SerialNumber[] = "fs_serial_number";
const char ValidityData[] = "fs_validity_data";
const char DifferenceDT[] = "fs_difference_date_time";
const char Type[] = "fs_type";
const char Version[] = "fs_version";
const char Firmware[] = "fs_firmware";
}

/// Сторожевые таймеры.


+ 1
- 1
3.0/src/interface/modern/scene_with_context/operators/11611/widgets/kzd_station_editor.qml View File

@@ -30,7 +30,7 @@ FocusScope {
visible: text.text

width: 404
height: 100
height: 120

source: "image://ui/button.secondary.normal"
border { left: 21; top: 84; right: 84; bottom: 21 }


+ 1
- 1
3.0/src/modules/Hardware/FR/src/Atol/Online/AtolOnlineFRBase.cpp View File

@@ -137,7 +137,7 @@ void AtolOnlineFRBase::processDeviceData()

if (processCommand(CAtolOnlineFR::Commands::FS::GetVersion, &data) && (data.size() > 18))
{
setDeviceParameter(CDeviceData::FS::Version, data.mid(2, 16));
setDeviceParameter(CDeviceData::FS::Version, QString("%1, type %2").arg(clean(data.mid(2, 16)).data()).arg(data[18] ? "serial" : "debug"));
}

if (processCommand(CAtolOnlineFR::Commands::FS::GetFiscalizationResume, &data))


+ 3
- 3
3.0/src/modules/Hardware/FR/src/Base/FRBase.cpp View File

@@ -469,7 +469,7 @@ bool FRBase<T>::checkAgentFlags(char aData)
ERequired::Enum required = (mAgentFlags.size() > 1) ? ERequired::Yes : ERequired::No;
mFiscalFieldData.data()[FiscalFields::AgentFlagsRegistered].required = required;

if (mAgentFlags.size() > 1)
if (mAgentFlags.size() >= 1)
{
mOFDFiscalParameters.insert(FiscalFields::AgentFlagsRegistered);

@@ -936,7 +936,7 @@ bool FRBase<T>::printFiscal(const QStringList & aReceipt, const SPaymentData & a
{
setConfigParameter(CHardware::FiscalFields::TaxSystem, char(paymentData.taxSystem));
}
/*
if (mAgentFlags.size() > 1)
{
foreach (const SAmountData & amountData, aPaymentData.amountDataList)
@@ -957,7 +957,7 @@ bool FRBase<T>::printFiscal(const QStringList & aReceipt, const SPaymentData & a
}
}
}
*/
char agentFlag = char(paymentData.agentFlag);
char agentFlagData = char(getConfigParameter(CHardwareSDK::FR::DealerAgentFlag).toInt());
EAgentFlags::Enum dealerAgentFlag = EAgentFlags::Enum(agentFlagData);


+ 2
- 2
3.0/src/modules/Hardware/FR/src/Kasbi/KasbiFRBase.cpp View File

@@ -208,9 +208,9 @@ void KasbiFRBase::processDeviceData(const QByteArray & aRegistrationData)
mFSSerialNumber = CFR::FSSerialToString(data);
}

if (processCommand(CKasbiFR::Commands::GetFSFirmware, &data))
if (processCommand(CKasbiFR::Commands::GetFSVersion, &data))
{
setDeviceParameter(CDeviceData::FS::Firmware, data);
setDeviceParameter(CDeviceData::FS::Version, clean(data));
}

if (processCommand(CKasbiFR::Commands::GetFSData, &data) && (data.size() >= 5))


+ 1
- 1
3.0/src/modules/Hardware/FR/src/Kasbi/KasbiFRConstants.h View File

@@ -103,7 +103,7 @@ namespace CKasbiFR
const char GetFirmware = '\x03'; /// Получить инфо о ПО девайса
const char GetModelInfo = '\x04'; /// Модель ККТ
const char GetFSSerial = '\x05'; /// Серийный номер ФН
const char GetFSFirmware = '\x06'; /// Версия ПО ФН
const char GetFSVersion = '\x06'; /// Версия ПО ФН
const char GetFSData = '\x07'; /// Данные ФН
const char GetFSStatus = '\x08'; /// Статус ФН
const char GetRegistrationData = '\x0A'; /// Получить параметры регистрации ККТ


+ 3
- 2
3.0/src/modules/Hardware/FR/src/Prim/Online/PrimOnlineFRBase.cpp View File

@@ -10,6 +10,7 @@
#include "PrimOnlineFRConstants.h"

using namespace SDK::Driver;
using namespace ProtocolUtils;

//--------------------------------------------------------------------------------
PrimOnlineFRBase::PrimOnlineFRBase()
@@ -141,7 +142,7 @@ void PrimOnlineFRBase::processDeviceData()
setDeviceParameter(CDeviceData::FS::ValidityData, date.toString(CFR::DateLogFormat));
}

setDeviceParameter(CDeviceData::FS::Version, data[14]);
setDeviceParameter(CDeviceData::FS::Version, QString("%1, type %2").arg(clean(data[14]).data()).arg(data[15].toUInt() ? "serial" : "debug"));

uint sessionCount = qToBigEndian(data[16].toUInt(&OK, 16));

@@ -154,7 +155,7 @@ void PrimOnlineFRBase::processDeviceData()
checkDateTime();

mOFDDataError = !processCommand(CPrimOnlineFR::Commands::GetOFDData, &data) || (data.size() < 9) ||
!checkOFDData(data[9], ProtocolUtils::getBufferFromString(data[5].right(2) + data[5].left(2)));
!checkOFDData(data[9], getBufferFromString(data[5].right(2) + data[5].left(2)));
}

//--------------------------------------------------------------------------------


+ 16
- 8
3.0/src/modules/Hardware/FR/src/Shtrih/Online/ShtrihOnlineFRBase.cpp View File

@@ -1,4 +1,4 @@
/* @file Онлайн ФР семейства Штрих. */
/* @file Онлайн ФР семейства Штрих. */

#include "ShtrihOnlineFRBase.h"

@@ -107,8 +107,11 @@ bool ShtrihOnlineFRBase<T>::updateParameters()
}

bool result = true;
bool FSError = mFSError;

if (processCommand(CShtrihOnlineFR::Commands::FS::StartFiscalTLVData, data.mid(43, 4)))
TResult commandResult = processCommand(CShtrihOnlineFR::Commands::FS::StartFiscalTLVData, data.mid(43, 4));

if (commandResult)
{
CFR::STLV TLV;

@@ -123,6 +126,11 @@ bool ShtrihOnlineFRBase<T>::updateParameters()
}
}
}
else if ((commandResult == CommandResult::Device) && (mLastError == CShtrihOnlineFR::Errors::NoRequiedDataInFS))
{
mFSError = FSError;
mProcessingErrors.pop_back();
}

return result;
}
@@ -217,7 +225,7 @@ void ShtrihOnlineFRBase<T>::processDeviceData()
if (processCommand(CShtrihOnlineFR::Commands::FS::GetStatus, &data))
{
mFSSerialNumber = CFR::FSSerialToString(data.mid(13, 16));
int FDCount = ProtocolUtils::revert(data.right(4)).toHex().toUInt(0, 16);
int FDCount = revert(data.right(4)).toHex().toUInt(0, 16);

setDeviceParameter(CDeviceData::FR::FiscalDocuments, FDCount);
}
@@ -237,7 +245,7 @@ void ShtrihOnlineFRBase<T>::processDeviceData()

if (processCommand(CShtrihOnlineFR::Commands::FS::GetVersion, &data) && (data.size() > 19))
{
setDeviceParameter(CDeviceData::FS::Type, data[19] ? "serial" : "debug");
setDeviceParameter(CDeviceData::FS::Version, QString("%1, type %2").arg(clean(data.mid(3, 16)).data()).arg(data[19] ? "serial" : "debug"));
}

using namespace CShtrihOnlineFR::FRParameters;
@@ -293,7 +301,7 @@ void ShtrihOnlineFRBase<T>::processDeviceData()
else
{
auto getSDData = [&] (const CShtrihFR::FRParameters::SData & aData) -> uint { if (!getFRParameter(aData, data)) return 0;
return ProtocolUtils::revert(data).toHex().toUInt(0, 16); };
return revert(data).toHex().toUInt(0, 16); };

QString SDCardData = QString("cluster %1 KB, space %2 MB (%3 MB free), io errors %4, retry count %5")
.arg(getSDData(SD::ClusterSize) / 1024)
@@ -321,7 +329,7 @@ bool ShtrihOnlineFRBase<T>::checkFirmwareUpdatingData(const CShtrihFR::FRParamet
return false;
}

int value = ProtocolUtils::revert(data).toHex().toUShort(0, 16);
int value = revert(data).toHex().toUShort(0, 16);

if (value != aValue)
{
@@ -486,7 +494,7 @@ bool ShtrihOnlineFRBase<T>::performFiscal(const QStringList & aReceipt, const SP

if ((taxSystem != ETaxSystems::None) && (mTaxSystems.size() != 1) && !setFRParameter(CShtrihOnlineFR::FRParameters::TaxSystem, taxSystem))
{
toLog(LogLevel::Error, QString("%1: Failed to set taxation system %2 (%3)").arg(mDeviceName).arg(ProtocolUtils::toHexLog(taxSystem)).arg(CFR::TaxSystems[taxSystem]));
toLog(LogLevel::Error, QString("%1: Failed to set taxation system %2 (%3)").arg(mDeviceName).arg(toHexLog(taxSystem)).arg(CFR::TaxSystems[taxSystem]));
return false;
}
}
@@ -499,7 +507,7 @@ bool ShtrihOnlineFRBase<T>::performFiscal(const QStringList & aReceipt, const SP

if (processCommand(CShtrihOnlineFR::Commands::FS::GetStatus, &data) && (data.size() >= 33))
{
uint FDNumber = ProtocolUtils::revert(data.mid(29, 4)).toHex().toUInt(0, 16);
uint FDNumber = revert(data.mid(29, 4)).toHex().toUInt(0, 16);
aFPData.insert(FiscalFields::FDNumber, FDNumber);

if (processCommand(CShtrihOnlineFR::Commands::FS::StartFiscalTLVData, getHexReverted(FDNumber, 4)))


Loading…
Cancel
Save