Commit f79f75e2 authored by kravtsov's avatar kravtsov

[-] Немного поменял чтение номера и ФПД последнего документа

parent e33db76f
Pipeline #1326 failed with stage
in 46 seconds
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=544
Build=548
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS setup utility
FileVersion=1.13.0.544
FileVersion=1.13.0.548
InternalName=OPOS setup
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=532
Build=536
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS test utility
FileVersion=1.13.0.532
FileVersion=1.13.0.536
InternalName=OPOS test
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......
......@@ -448,6 +448,10 @@ type
function ReadCashReg(ID: Integer; var R: TCashRegisterRec): Integer;
function FSWriteTLVOperation(const Data: WideString): Integer;
function FSStartCorrectionReceipt: Integer;
function FSReadLastDocNum: Int64;
function FSReadLastDocNum2: Int64;
function FSReadLastMacValue: Int64;
function FSReadLastMacValue2: Int64;
property IsOnline: Boolean read GetIsOnline;
property Tables: TPrinterTables read FTables;
......@@ -8785,4 +8789,42 @@ begin
Result := FLastMacValue;
end;
function TFiscalPrinterDevice.FSReadLastDocNum2: Int64;
var
FSState: TFSState;
begin
Result := 0;
if CapFiscalStorage then
begin
Check(FSReadState(FSState));
Result := FSState.DocNumber;
end;
end;
function TFiscalPrinterDevice.FSReadLastDocNum: Int64;
begin
if FLastDocNumber = 0 then
FLastDocNumber := FSReadLastDocNum2;
Result := FLastDocNumber;
end;
function TFiscalPrinterDevice.FSReadLastMacValue: Int64;
begin
if FLastMacValue = 0 then
FLastMacValue := FSReadLastMacValue2;
Result := FLastMacValue;
end;
function TFiscalPrinterDevice.FSReadLastMacValue2: Int64;
var
LastMacValue: Int64;
begin
LastMacValue := 0;
if CapFiscalStorage then
begin
Check(FSReadDocMac(LastMacValue));
end;
Result := LastMacValue;
end;
end.
......@@ -4628,8 +4628,6 @@ var
Ticket: TFSTicket;
FSState: TFSState;
OposDate: TOposDate;
LastMacValue: Int64;
LastDocNumber: Int64;
ExpireDate: TPrinterDate;
FSCommStatus: TFSCommStatus;
FSFiscalResult: TFSFiscalResult;
......@@ -4643,12 +4641,12 @@ begin
DIO_FS_PARAMETER_LAST_DOC_NUM:
begin
Result := IntToStr(Device.LastDocNumber);
Result := IntToStr(Device.FSReadLastDocNum);
end;
DIO_FS_PARAMETER_LAST_DOC_MAC:
begin
Result := IntToStr(Device.LastMacValue);
Result := IntToStr(Device.FSReadLastMacValue);
end;
DIO_FS_PARAMETER_QUEUE_SIZE:
......@@ -4706,23 +4704,12 @@ begin
DIO_FS_PARAMETER_LAST_DOC_NUM2:
begin
LastDocNumber := 0;
if Device.CapFiscalStorage then
begin
Device.Check(Device.FSReadState(FSState));
LastDocNumber := FSState.DocNumber;
end;
Result := IntToStr(LastDocNumber);
Result := IntToStr(Device.FSReadLastDocNum2);
end;
DIO_FS_PARAMETER_LAST_DOC_MAC2:
begin
LastMacValue := 0;
if Device.CapFiscalStorage then
begin
Device.Check(Device.FSReadDocMac(LastMacValue));
end;
Result := IntToStr(LastMacValue);
Result := IntToStr(Device.FSReadLastMacValue2);
end;
else
raiseException(_('Invalid pData parameter value'));
......
......@@ -464,6 +464,10 @@ type
function FSStartCorrectionReceipt: Integer;
function GetLastDocNumber: Int64;
function GetLastMacValue: Int64;
function FSReadLastDocNum: Int64;
function FSReadLastDocNum2: Int64;
function FSReadLastMacValue: Int64;
function FSReadLastMacValue2: Int64;
property LastMacValue: Int64 read GetLastMacValue;
property LastDocNumber: Int64 read GetLastDocNumber;
......
......@@ -12,7 +12,7 @@ unit FptrServerLib_TLB;
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on 26.06.2018 20:42:36 from Type Library described below.
// File generated on 04.07.2018 19:52:28 from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.tlb (1)
......
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=12
Release=0
Build=414
Build=415
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=Fiscal printer print server
FileVersion=1.12.0.414
FileVersion=1.12.0.415
InternalName=Fiscal printer driver
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......
......@@ -306,6 +306,10 @@ type
function FSStartCorrectionReceipt: Integer;
function GetLastDocNumber: Int64;
function GetLastMacValue: Int64;
function FSReadLastDocNum: Int64;
function FSReadLastDocNum2: Int64;
function FSReadLastMacValue: Int64;
function FSReadLastMacValue2: Int64;
property Status: TPrinterStatus read FStatus write FStatus;
property Parameters: TPrinterParameters read GetParameters;
......@@ -1783,4 +1787,24 @@ begin
Result := 0;
end;
function TMockFiscalPrinterDevice.FSReadLastDocNum2: Int64;
begin
Result := 0;
end;
function TMockFiscalPrinterDevice.FSReadLastDocNum: Int64;
begin
Result := 0;
end;
function TMockFiscalPrinterDevice.FSReadLastMacValue: Int64;
begin
Result := 0;
end;
function TMockFiscalPrinterDevice.FSReadLastMacValue2: Int64;
begin
Result := 0;
end;
end.
......@@ -306,6 +306,10 @@ type
function FSStartCorrectionReceipt: Integer;
function GetLastDocNumber: Int64;
function GetLastMacValue: Int64;
function FSReadLastDocNum: Int64;
function FSReadLastDocNum2: Int64;
function FSReadLastMacValue: Int64;
function FSReadLastMacValue2: Int64;
property RecStation: TStrings read FRecStation;
property JrnStation: TStrings read FJrnStation;
......@@ -1785,4 +1789,24 @@ begin
Result := 0;
end;
function TTextFiscalPrinterDevice.FSReadLastDocNum2: Int64;
begin
Result := 0;
end;
function TTextFiscalPrinterDevice.FSReadLastDocNum: Int64;
begin
Result := 0;
end;
function TTextFiscalPrinterDevice.FSReadLastMacValue: Int64;
begin
Result := 0;
end;
function TTextFiscalPrinterDevice.FSReadLastMacValue2: Int64;
begin
Result := 0;
end;
end.
# OPOS driver tests
# By Kravtsov Vitaly, 2018
import unittest
# for COM support
import comtypes.client as cc
import comtypes
class AcceptanceTest(unittest.TestCase):
def test_open(self):
cc.
self.assertEqual('foo'.upper(), 'FOO')
if __name__ == '__main__':
unittest.main()
#!/bin/bash
set -e
set delphi_version=7
want release_norename
setup /verysilent /nocancel
acceptance_tests.py
\ No newline at end of file
......@@ -413,6 +413,18 @@ See http://www.suigeneris.org/want/ for details.
<delete file="${basepath}/setup.iss" />
</target>
<target name="makesetup_norename">
<echo input="${setup}/setup_template.iss" file="${basedir}/setup.iss"/>
<exec executable="iscc">
<arg value="Setup.iss" />
<arg value="/Q" />
</exec>
<exec executable="SignShtrih.bat">
<arg value="${basepath}/setup.exe" />
</exec>
<delete file="${basepath}/setup.iss" />
</target>
<target name="makesetupns">
<echo input="${setup}/setup_template.iss" file="${basedir}/setup.iss"/>
<exec executable="iscc">
......@@ -433,6 +445,9 @@ See http://www.suigeneris.org/want/ for details.
</target>
<target name="release" depends="clean,prepare,Test-SmFiscalPrinter,test-smscale,OposConfigTest,OposTestTest,Compile-OposConfig,Compile-OposTest,Compile-SmFptrSrv,compile-smscale,Compile-SmFiscalPrinter,sign,makesetup,finalclean"/>
<target name="release_norename" depends="clean,prepare,Test-SmFiscalPrinter,test-smscale,OposConfigTest,OposTestTest,Compile-OposConfig,Compile-OposTest,Compile-SmFptrSrv,compile-smscale,Compile-SmFiscalPrinter,sign,makesetup_norename,finalclean"/>
<target name="buildns" depends="clean,prepare,Test-SmFiscalPrinter,test-smscale,OposConfigTest,OposTestTest,Compile-OposConfig,Compile-OposTest,Compile-SmFptrSrv,compile-smscale,Compile-SmFiscalPrinter,makesetupns,finalclean"/>
</project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment