Commit 927aff65 authored by kravtsov's avatar kravtsov

[-] Некоторые изменения

parent e01253f7
[Closed Files]
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,4652,2,4664,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duFSSalesReceipt.pas',0,1,1,1,1,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duBitUtils.pas',0,1,1,1,1,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',0,1,2067,1,2089,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,1171,81,1184,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,6942,33,6950,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\CustomReceipt.pas',0,1,152,28,165,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\Opos\OposFptr.pas',0,1,121,1,137,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\Opos\OposException.pas',0,1,1,1,1,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Fmu\fmuEMail.pas',0,1,1,1,1,1,1
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\oleFiscalPrinter.pas',0,1,349,1,372,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\DIOHandler.pas',0,1,90,59,100,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\MockFiscalPrinterDevice.pas',0,1,1,1,14,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\TextFiscalPrinterDevice.pas',0,1,1,51,36,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterTypes.pas',0,1,458,63,464,0,0
[Modules]
Module0=C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\RegressTests.pas
Module1=C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duFiscalPrinter.pas
Count=2
Module1=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
Module2=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas
Module3=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas
Module4=C:\projects\OPOSShtrih\Source\Shared\DIOHandlers.pas
Count=5
EditWindowCount=1
TypeLibWindowCount=3
......@@ -22,7 +20,22 @@ ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duFiscalPrinter.pas]
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Source\Shared\DIOHandlers.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
......@@ -104,10 +117,13 @@ FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=2
CurrentView=0
ViewCount=5
CurrentView=2
View0=0
View1=1
View2=2
View3=3
View4=4
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
......@@ -119,9 +135,9 @@ Width=912
Height=646
MaxLeft=-8
MaxTop=106
MaxWidth=1932
MaxWidth=1936
MaxHeight=952
ClientWidth=1916
ClientWidth=1920
ClientHeight=914
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
......@@ -132,17 +148,38 @@ BottomPanelClients=MessageView@EditWindow0
BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
[View0]
Module=C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\RegressTests.pas
CursorX=36
CursorY=46
TopLine=38
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
CursorX=21
CursorY=659
TopLine=637
LeftCol=1
[View1]
Module=C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duFiscalPrinter.pas
Module=C:\projects\OPOSShtrih\Source\Shared\DIOHandlers.pas
CursorX=2
CursorY=2229
TopLine=2226
LeftCol=1
[View2]
Module=C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\RegressTests.pas
CursorX=24
CursorY=200
TopLine=192
LeftCol=1
[View3]
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas
CursorX=1
CursorY=19
TopLine=1
CursorY=357
TopLine=332
LeftCol=1
[View4]
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas
CursorX=30
CursorY=7639
TopLine=7631
LeftCol=1
[TypeLibEditWindow0]
......@@ -215,9 +252,11 @@ LRDockWidth=320
Dockable=1
[Breakpoints]
Count=2
Count=4
Breakpoint0='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\CustomReceipt.pas',167,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint1='C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',4661,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint2='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',3645,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint3='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\MalinaPlugin.pas',194,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints]
Count=0
......@@ -228,13 +267,13 @@ Visible=1
State=2
Left=110
Top=9
Width=1584
Width=1810
Height=122
MaxLeft=-8
MaxTop=-8
MaxWidth=1932
MaxLeft=-1
MaxTop=-1
MaxWidth=1936
MaxHeight=122
ClientWidth=1916
ClientWidth=1920
ClientHeight=84
[ProjectManager]
......@@ -243,11 +282,11 @@ Visible=1
State=0
Left=8
Top=124
Width=420
Width=479
Height=589
MaxLeft=-1
MaxTop=-1
ClientWidth=404
ClientWidth=463
ClientHeight=555
TBDockHeight=681
LRDockWidth=445
......@@ -285,7 +324,7 @@ ClientHeight=60
[PropertyInspector]
Create=1
Visible=0
Visible=1
State=0
Left=2
Top=110
......@@ -492,11 +531,11 @@ Visible=1
State=0
Left=12
Top=0
Width=1904
Width=1908
Height=85
MaxLeft=-1
MaxTop=-1
ClientWidth=1904
ClientWidth=1908
ClientHeight=85
TBDockHeight=85
LRDockWidth=443
......@@ -508,7 +547,7 @@ DockHostCount=1
[DockSite0]
DockSiteType=0
Create=1
Visible=1
Visible=0
State=0
Left=202
Top=592
......
......@@ -1590,7 +1590,7 @@ procedure TDIOPrintJournal.DirectIO(var pData: Integer;
var pString: WideString);
begin
Printer.Device.PrintJournal(pData);
Printer.Printer.WaitForPrinting;
Printer.Device.WaitForPrinting;
end;
{ TDIOReadDayNumber }
......@@ -1620,7 +1620,7 @@ end;
procedure TDIOWaitForPrint.DirectIO(var pData: Integer;
var pString: WideString);
begin
Printer.Printer.WaitForPrinting;
Printer.Device.WaitForPrinting;
end;
{ TDIOPrintHeader }
......@@ -2206,7 +2206,7 @@ end;
procedure TDIOReadFSParameter.DirectIO(var pData: Integer;
var pString: WideString);
begin
pString := Device.ReadFSParameter(pData, pString);
pString := FPrinter.ReadFSParameter(pData, pString);
end;
{ TDIOReadFPParameter }
......
......@@ -8,70 +8,69 @@
resources were bound to the produced executable.
*/
#define DBConsts_SCouldNotParseTimeStamp 64704
#define DBConsts_SInvalidSqlTimeStamp 64705
#define PrinterParametersReg_MsgRegistryKeyOpenError 64706
#define PrinterParametersRegIBT_MsgRegistryKeyOpenError 64707
#define EscPrinter_MsgInvalidBarcodeType 64708
#define SharedPrinter_MsgFailedContinuePrint 64709
#define TrainingReceiptPrinter_MsgReceiptNotOpened 64710
#define CustomReceipt_MsgReceiptMethodNotSupported 64711
#define CustomReceipt_MsgNegativePrice 64712
#define CustomReceipt_MsgInvalidPercentsValue 64713
#define CustomReceipt_MsgNegativeQuantity 64714
#define CustomReceipt_MsgNegativeAmount 64715
#define OleConst_SCannotActivate 64716
#define OleConst_SNoWindowHandle 64717
#define OleConst_SInvalidLicense 64718
#define OleConst_SNotLicensed 64719
#define SmResourceStrings_MsgFiscalMemoryBatteryLow 64720
#define SmResourceStrings_MsgLastRecordCorrupted 64721
#define SmResourceStrings_MsgFMFiscalDayOver 64722
#define SmResourceStrings_MsgInternalHCheck 64723
#define SmResourceStrings_MsgTrainingModeNotSupported 64724
#define SmResourceStrings_MsgNotImplemented 64725
#define SmResourceStrings_MsgTotalizerNotSupported 64726
#define SmResourceStrings_MsgReceiptStationNotPresent 64727
#define SmResourceStrings_MsgJournalStationNotPresent 64728
#define SmResourceStrings_MsgParameterNotFound 64729
#define CommandParam_MsgInvalidParameterType 64730
#define ElectronicJournal_MsgDateLineNotFound 64731
#define ElectronicJournal_MsgDateNotFound 64732
#define PrinterProtocol2_IncorrectPacketFormat 64733
#define DBConsts_SBcdOverflow 64734
#define DBConsts_SInvalidBcdValue 64735
#define SmResourceStrings_MsgInvalidAdjustmentTypeParameter 64736
#define SmResourceStrings_MsgLastReceiptItemNotDefined 64737
#define SmResourceStrings_MsgDiscountAmountMoreItemAmount 64738
#define SmResourceStrings_MsgInvalidCommandCode 64739
#define SmResourceStrings_MsgCantChangeState 64740
#define SmResourceStrings_MsgDayEndRequired 64741
#define SmResourceStrings_MsgExternalHCheck 64742
#define SmResourceStrings_MsgCoverOpened 64743
#define SmResourceStrings_MsgNoReceiptPaper 64744
#define SmResourceStrings_MsgReceiptPaperNearEnd 64745
#define SmResourceStrings_MsgReceiptStationLeverUp 64746
#define SmResourceStrings_MsgJournalStationOutOfPaper 64747
#define SmResourceStrings_MsgJournalStationPaperNearEnd 64748
#define SmResourceStrings_MsgJournalStationLeverUp 64749
#define SmResourceStrings_MsgEKLZAlmostFull 64750
#define SmResourceStrings_MsgFiscalMemoryOverflow 64751
#define DBConsts_SInvalidSqlTimeStamp 64704
#define PrinterParametersReg_MsgRegistryKeyOpenError 64705
#define PrinterParametersRegIBT_MsgRegistryKeyOpenError 64706
#define EscPrinter_MsgInvalidBarcodeType 64707
#define TrainingReceiptPrinter_MsgReceiptNotOpened 64708
#define CustomReceipt_MsgReceiptMethodNotSupported 64709
#define CustomReceipt_MsgNegativePrice 64710
#define CustomReceipt_MsgInvalidPercentsValue 64711
#define CustomReceipt_MsgNegativeQuantity 64712
#define CustomReceipt_MsgNegativeAmount 64713
#define FiscalPrinterImpl_MsgInvalidParameterValue 64714
#define OleConst_SCannotActivate 64715
#define OleConst_SNoWindowHandle 64716
#define OleConst_SInvalidLicense 64717
#define OleConst_SNotLicensed 64718
#define SmResourceStrings_MsgLastRecordCorrupted 64720
#define SmResourceStrings_MsgFMFiscalDayOver 64721
#define SmResourceStrings_MsgInternalHCheck 64722
#define SmResourceStrings_MsgTrainingModeNotSupported 64723
#define SmResourceStrings_MsgNotImplemented 64724
#define SmResourceStrings_MsgTotalizerNotSupported 64725
#define SmResourceStrings_MsgReceiptStationNotPresent 64726
#define SmResourceStrings_MsgJournalStationNotPresent 64727
#define SmResourceStrings_MsgParameterNotFound 64728
#define CommandParam_MsgInvalidParameterType 64729
#define ElectronicJournal_MsgDateLineNotFound 64730
#define ElectronicJournal_MsgDateNotFound 64731
#define PrinterProtocol2_IncorrectPacketFormat 64732
#define DBConsts_SBcdOverflow 64733
#define DBConsts_SInvalidBcdValue 64734
#define DBConsts_SCouldNotParseTimeStamp 64735
#define SmResourceStrings_MsgLastReceiptItemNotDefined 64736
#define SmResourceStrings_MsgDiscountAmountMoreItemAmount 64737
#define SmResourceStrings_MsgInvalidCommandCode 64738
#define SmResourceStrings_MsgCantChangeState 64739
#define SmResourceStrings_MsgDayEndRequired 64740
#define SmResourceStrings_MsgExternalHCheck 64741
#define SmResourceStrings_MsgCoverOpened 64742
#define SmResourceStrings_MsgNoReceiptPaper 64743
#define SmResourceStrings_MsgReceiptPaperNearEnd 64744
#define SmResourceStrings_MsgReceiptStationLeverUp 64745
#define SmResourceStrings_MsgJournalStationOutOfPaper 64746
#define SmResourceStrings_MsgJournalStationPaperNearEnd 64747
#define SmResourceStrings_MsgJournalStationLeverUp 64748
#define SmResourceStrings_MsgEKLZAlmostFull 64749
#define SmResourceStrings_MsgFiscalMemoryOverflow 64750
#define SmResourceStrings_MsgFiscalMemoryBatteryLow 64751
#define FiscalPrinterDevice_MsgInvalidParameterIDValue 64752
#define FiscalPrinterDevice_MsgBitmapWidthMoreThanMaximum 64753
#define FiscalPrinterDevice_MsgBitmapHeightMoreThanMaximum 64754
#define FiscalPrinterDevice_MsgImageWidthZero 64755
#define FiscalPrinterDevice_MsgImageHeightZero 64756
#define FiscalPrinterDevice_MsgFailedContinuePrint 64757
#define FiscalPrinterDevice_MsgInvalidParameterValue 64758
#define FiscalPrinterDevice_SSaleNotEnabled 64759
#define DIOHandler_MsgInvalidDirectIOCommandCode 64760
#define xmlParser_MsgFileReadingError 64761
#define xmlParser_MsgXmlDocumentReadingError 64762
#define xmlParser_MsgElementNotFound 64763
#define SmResourceStrings_MsgFMFirmware 64764
#define SmResourceStrings_MsgPrinterFirmware 64765
#define SmResourceStrings_MsgInvalidPaymentCode 64766
#define SmResourceStrings_MsgNegativeReceiptTotal 64767
#define FiscalPrinterDevice_SSaleNotEnabled 64758
#define DIOHandler_MsgInvalidDirectIOCommandCode 64759
#define xmlParser_MsgFileReadingError 64760
#define xmlParser_MsgXmlDocumentReadingError 64761
#define xmlParser_MsgElementNotFound 64762
#define SmResourceStrings_MsgFMFirmware 64763
#define SmResourceStrings_MsgPrinterFirmware 64764
#define SmResourceStrings_MsgInvalidPaymentCode 64765
#define SmResourceStrings_MsgNegativeReceiptTotal 64766
#define SmResourceStrings_MsgInvalidAdjustmentTypeParameter 64767
#define IdResourceStringsCore_RSICMPSecBadSPI 64768
#define IdResourceStringsCore_RSICMPSecAuthenticationFailed 64769
#define IdResourceStringsCore_RSICMPSecDecompressionFailed 64770
......@@ -842,23 +841,21 @@
#define SysConst_SDiskFull 65535
STRINGTABLE
BEGIN
DBConsts_SCouldNotParseTimeStamp, "Could not parse SQL TimeStamp string"
DBConsts_SInvalidSqlTimeStamp, "Invalid SQL date/time values"
PrinterParametersReg_MsgRegistryKeyOpenError, "Registry key open error"
PrinterParametersRegIBT_MsgRegistryKeyOpenError, "Registry key open error"
EscPrinter_MsgInvalidBarcodeType, "Invalid barcode type"
SharedPrinter_MsgFailedContinuePrint, "Failed to continue print"
TrainingReceiptPrinter_MsgReceiptNotOpened, "Receipt is not opened"
CustomReceipt_MsgReceiptMethodNotSupported, "Receipt method is not supported"
CustomReceipt_MsgNegativePrice, "Negative price"
CustomReceipt_MsgInvalidPercentsValue, "Invalid percents value"
CustomReceipt_MsgNegativeQuantity, "Negative quantity"
CustomReceipt_MsgNegativeAmount, "Negative amount"
FiscalPrinterImpl_MsgInvalidParameterValue, "Invalid pData parameter value"
OleConst_SCannotActivate, "OLE control activation failed"
OleConst_SNoWindowHandle, "Could not obtain OLE control window handle"
OleConst_SInvalidLicense, "License information for %s is invalid"
OleConst_SNotLicensed, "License information for %s not found. You cannot use this control in design mode"
SmResourceStrings_MsgFiscalMemoryBatteryLow, " "
SmResourceStrings_MsgLastRecordCorrupted, " "
SmResourceStrings_MsgFMFiscalDayOver, " 24 "
SmResourceStrings_MsgInternalHCheck, "Internal HCheck: "
......@@ -874,7 +871,7 @@ BEGIN
PrinterProtocol2_IncorrectPacketFormat, " "
DBConsts_SBcdOverflow, "BCD overflow"
DBConsts_SInvalidBcdValue, "%s is not a valid BCD value"
SmResourceStrings_MsgInvalidAdjustmentTypeParameter, " AdjustmentType"
DBConsts_SCouldNotParseTimeStamp, "Could not parse SQL TimeStamp string"
SmResourceStrings_MsgLastReceiptItemNotDefined, " "
SmResourceStrings_MsgDiscountAmountMoreItemAmount, " "
SmResourceStrings_MsgInvalidCommandCode, " "
......@@ -890,13 +887,13 @@ BEGIN
SmResourceStrings_MsgJournalStationLeverUp, " "
SmResourceStrings_MsgEKLZAlmostFull, " "
SmResourceStrings_MsgFiscalMemoryOverflow, " "
SmResourceStrings_MsgFiscalMemoryBatteryLow, " "
FiscalPrinterDevice_MsgInvalidParameterIDValue, "Invalid parameter ID value"
FiscalPrinterDevice_MsgBitmapWidthMoreThanMaximum, "Bitmap width more than maximum"
FiscalPrinterDevice_MsgBitmapHeightMoreThanMaximum, "Bitmap height more than maximum"
FiscalPrinterDevice_MsgImageWidthZero, "Image width is zero, must be > 0"
FiscalPrinterDevice_MsgImageHeightZero, "Image height is zero, must be > 0"
FiscalPrinterDevice_MsgFailedContinuePrint, "Failed to continue print"
FiscalPrinterDevice_MsgInvalidParameterValue, "Invalid pData parameter value"
FiscalPrinterDevice_SSaleNotEnabled, " "
DIOHandler_MsgInvalidDirectIOCommandCode, "Invalid DirectIO command code"
xmlParser_MsgFileReadingError, "File reading error"
......@@ -906,6 +903,7 @@ BEGIN
SmResourceStrings_MsgPrinterFirmware, " "
SmResourceStrings_MsgInvalidPaymentCode, " "
SmResourceStrings_MsgNegativeReceiptTotal, " "
SmResourceStrings_MsgInvalidAdjustmentTypeParameter, " AdjustmentType"
IdResourceStringsCore_RSICMPSecBadSPI, "Bad SPI"
IdResourceStringsCore_RSICMPSecAuthenticationFailed, "Authentication Failed"
IdResourceStringsCore_RSICMPSecDecompressionFailed, "Decompression Failed"
......
......@@ -78,8 +78,7 @@ type
FCapFooterFlag: Boolean;
FFooterFlag: Boolean;
FCapEnablePrint: Boolean;
FFSDocNum: Int64;
FFSDocMac: Int64;
FFSCloseReceiptResult2: TFSCloseReceiptResult2;
procedure PrintLineFont(const Data: TTextRec);
procedure SetPrinterStatus(Value: TPrinterStatus);
......@@ -192,6 +191,7 @@ type
function LoadBarcodeData(const Barcode: string): Integer;
function SendItemBarcode(const Barcode: string;
MarkType: Integer): Integer;
function GetFSCloseReceiptResult2: TFSCloseReceiptResult2;
protected
function GetMaxGraphicsWidthInBytes: Integer;
public
......@@ -422,7 +422,6 @@ type
function GetTaxInfo(Tax: Integer): TTaxInfo;
function ReadDiscountMode: Integer;
function ReadFPParameter(ParamId: Integer): string;
function ReadFSParameter(ParamID: Integer; const pString: string): string;
function FSReadTotals(var R: TFMTotals): Integer;
function ReadFPDayTotals(Flags: Integer): TFMTotals;
function ReadTotalsByReceiptType(Index: Integer): Int64;
......@@ -463,6 +462,7 @@ type
property CapDiscount: Boolean read GetCapDiscount;
property CapSubtotalRound: Boolean read GetCapSubtotalRound;
property CapFSCloseReceipt2: Boolean read GetCapFSCloseReceipt2;
property FSCloseReceiptResult2: TFSCloseReceiptResult2 read GetFSCloseReceiptResult2;
end;
{ EDisabledException }
......@@ -735,8 +735,10 @@ begin
FFilter := TFiscalPrinterFilter.Create(Parameters.Logger);
FAmountDecimalPlaces := 2;
FCapReceiptDiscount2 := True;
FFSDocNum := 0;
FFSDocMac := 0;
FFSCloseReceiptResult2.Change := 0;
FFSCloseReceiptResult2.DocNumber := 0;
FFSCloseReceiptResult2.MacValue := 0;
LoadModels;
end;
......@@ -7702,104 +7704,6 @@ begin
end;
end;
function TFiscalPrinterDevice.ReadFSParameter(ParamID: Integer;
const pString: string): string;
(*
7.1.8 ,
------------------------------------------------
------------------------------------------------
DATE_TIME 5
DATA 18
Uint32, LE 4
------------------------------------------------
*)
var
Ticket: TFSTicket;
FSState: TFSState;
OposDate: TOposDate;
ExpireDate: TPrinterDate;
FSCommStatus: TFSCommStatus;
FSFiscalResult: TFSFiscalResult;
resourcestring
MsgInvalidParameterValue = 'Invalid pData parameter value';
begin
case ParamID of
DIO_FS_PARAMETER_SERIAL:
begin
Check(FSReadState(FSState));
Result := String(FSState.FSNumber);
end;
DIO_FS_PARAMETER_LAST_DOC_NUM:
begin
Result := IntToStr(FFSDocNum);
end;
DIO_FS_PARAMETER_LAST_DOC_MAC:
begin
Result := IntToStr(FFSDocMac);
end;
DIO_FS_PARAMETER_QUEUE_SIZE:
begin
Check(FSReadCommStatus(FSCommStatus));
Result := IntToStr(FSCommStatus.DocumentCount);
end;
DIO_FS_PARAMETER_EXPIRE_DATE:
begin
Check(FSReadExpireDate(ExpireDate));
OposDate := PrinterDateToOposDate(ExpireDate);
Result := EncodeOposDate(OposDate);
end;
DIO_FS_PARAMETER_FIRST_DOC_NUM:
begin
Check(FSReadCommStatus(FSCommStatus));
Result := IntToStr(FSCommStatus.DocumentNumber);
end;
DIO_FS_PARAMETER_FIRST_DOC_DATE:
begin
Check(FSReadCommStatus(FSCommStatus));
OposDate := PrinterDateTimeToOposDate(FSCommStatus.DocumentDate);
Result := EncodeOposDate(OposDate);
end;
DIO_FS_PARAMETER_FISCAL_DATE:
begin
Check(FSReadFiscalResult(FSFiscalResult));
OposDate := PrinterDateTimeToOposDate(FSFiscalResult.Date);
Result := EncodeOposDate(OposDate);
end;
DIO_FS_PARAMETER_OFD_ONLINE:
begin
Check(FSReadCommStatus(FSCommStatus));
Result := BoolToStr(FSCommStatus.FSWriteStatus.IsConnected);
end;
DIO_FS_PARAMETER_TICKET_HEX:
begin
Ticket.Number := StrToInt(pString);
Check(FSReadTicket(Ticket));
Result := StrToHexText(Ticket.Data);
end;
DIO_FS_PARAMETER_TICKET_STR:
begin
Ticket.Number := StrToInt(pString);
Check(FSReadTicket(Ticket));
Result := TicketToStr(Ticket);
end;
else
raise Exception.Create(MsgInvalidParameterValue);
end;
end;
procedure TFiscalPrinterDevice.WriteFPParameter(ParamId: Integer;
const Value: string);
begin
......@@ -8257,9 +8161,7 @@ begin
R.Change := BinToInt(Answer, 1, 5);
R.DocNumber := BinToInt(Answer, 6, 4);
R.MacValue := BinToInt(Answer, 10, 4);
FFSDocNum := R.DocNumber;
FFSDocMac := R.MacValue;
FFSCloseReceiptResult2 := R;
end;
end;
......@@ -8762,4 +8664,9 @@ end;
function TFiscalPrinterDevice.GetFSCloseReceiptResult2: TFSCloseReceiptResult2;
begin
Result := FFSCloseReceiptResult2;
end;
end.
......@@ -150,6 +150,7 @@ type
property Receipt: TCustomReceipt read GetReceipt;
function GetAppAmountDecimalPlaces: Integer;
function GetCapRecNearEnd(Value: Boolean): Boolean;
function ReadFSParameter(ParamID: Integer; const pString: string): string;
private
// boolean
FDayOpened: Boolean;
......@@ -4151,7 +4152,7 @@ end;
function TFiscalPrinterImpl.WaitForPrinting: TPrinterStatus;
begin
Result := Printer.WaitForPrinting;
Result := Device.WaitForPrinting;
FDayOpened := Device.IsDayOpened(Result.Mode);
end;
......@@ -4590,5 +4591,104 @@ begin
end;
end;
function TFiscalPrinterImpl.ReadFSParameter(ParamID: Integer;
const pString: string): string;
(*
7.1.8 ,
------------------------------------------------
------------------------------------------------
DATE_TIME 5
DATA 18
Uint32, LE 4
------------------------------------------------
*)
var
Ticket: TFSTicket;
FSState: TFSState;
OposDate: TOposDate;
ExpireDate: TPrinterDate;
FSCommStatus: TFSCommStatus;
FSFiscalResult: TFSFiscalResult;
resourcestring
MsgInvalidParameterValue = 'Invalid pData parameter value';
begin
case ParamID of
DIO_FS_PARAMETER_SERIAL:
begin
Device.Check(Device.FSReadState(FSState));
Result := String(FSState.FSNumber);
end;