Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
kravtsov
opos
Commits
f79f75e2
Commit
f79f75e2
authored
Jul 04, 2018
by
kravtsov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[-] Немного поменял чтение номера и ФПД последнего документа
parent
e33db76f
Pipeline
#1326
failed with stage
in 46 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
143 additions
and
24 deletions
+143
-24
Source/OposConfig/OposConfig.dof
Source/OposConfig/OposConfig.dof
+2
-2
Source/OposTest/OposTest.dof
Source/OposTest/OposTest.dof
+2
-2
Source/SmFiscalPrinter/Units/FiscalPrinterDevice.pas
Source/SmFiscalPrinter/Units/FiscalPrinterDevice.pas
+42
-0
Source/SmFiscalPrinter/Units/FiscalPrinterImpl.pas
Source/SmFiscalPrinter/Units/FiscalPrinterImpl.pas
+4
-17
Source/SmFiscalPrinter/Units/FiscalPrinterTypes.pas
Source/SmFiscalPrinter/Units/FiscalPrinterTypes.pas
+4
-0
Source/SmFptrSrv/FptrServerLib_TLB.pas
Source/SmFptrSrv/FptrServerLib_TLB.pas
+1
-1
Source/SmFptrSrv/SmFptrSrv.dof
Source/SmFptrSrv/SmFptrSrv.dof
+2
-2
Test/SmFiscalPrinterTest/Units/MockFiscalPrinterDevice.pas
Test/SmFiscalPrinterTest/Units/MockFiscalPrinterDevice.pas
+24
-0
Test/SmFiscalPrinterTest/Units/TextFiscalPrinterDevice.pas
Test/SmFiscalPrinterTest/Units/TextFiscalPrinterDevice.pas
+24
-0
acceptance_tests.py
acceptance_tests.py
+17
-0
ci_build_windows.sh
ci_build_windows.sh
+6
-0
want.xml
want.xml
+15
-0
No files found.
Source/OposConfig/OposConfig.dof
View file @
f79f75e2
...
...
@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=54
4
Build=54
8
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.54
4
FileVersion=1.13.0.54
8
InternalName=OPOS setup
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
...
...
Source/OposTest/OposTest.dof
View file @
f79f75e2
...
...
@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=53
2
Build=53
6
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.53
2
FileVersion=1.13.0.53
6
InternalName=OPOS test
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
...
...
Source/SmFiscalPrinter/Units/FiscalPrinterDevice.pas
View file @
f79f75e2
...
...
@@ -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
.
Source/SmFiscalPrinter/Units/FiscalPrinterImpl.pas
View file @
f79f75e2
...
...
@@ -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
.
LastDocNum
ber
);
Result
:=
IntToStr
(
Device
.
FSRead
LastDocNum
);
end
;
DIO_FS_PARAMETER_LAST_DOC_MAC
:
begin
Result
:=
IntToStr
(
Device
.
LastMacValue
);
Result
:=
IntToStr
(
Device
.
FSRead
LastMacValue
);
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'
));
...
...
Source/SmFiscalPrinter/Units/FiscalPrinterTypes.pas
View file @
f79f75e2
...
...
@@ -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
;
...
...
Source/SmFptrSrv/FptrServerLib_TLB.pas
View file @
f79f75e2
...
...
@@ -12,7 +12,7 @@ unit FptrServerLib_TLB;
// ************************************************************************ //
// PASTLWTR : 1.2
// File generated on
26
.0
6
.2018
20:42:36
from Type Library described below.
// File generated on
04
.0
7
.2018
19:52:28
from Type Library described below.
// ************************************************************************ //
// Type Lib: C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.tlb (1)
...
...
Source/SmFptrSrv/SmFptrSrv.dof
View file @
f79f75e2
...
...
@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=12
Release=0
Build=41
4
Build=41
5
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.41
4
FileVersion=1.12.0.41
5
InternalName=Fiscal printer driver
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
...
...
Test/SmFiscalPrinterTest/Units/MockFiscalPrinterDevice.pas
View file @
f79f75e2
...
...
@@ -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
.
Test/SmFiscalPrinterTest/Units/TextFiscalPrinterDevice.pas
View file @
f79f75e2
...
...
@@ -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
.
acceptance_tests.py
0 → 100644
View file @
f79f75e2
# 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
()
ci_build_windows.sh
0 → 100644
View file @
f79f75e2
#!/bin/bash
set
-e
set
delphi_version
=
7
want release_norename
setup /verysilent /nocancel
acceptance_tests.py
\ No newline at end of file
want.xml
View file @
f79f75e2
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment