Commit 5f06cfb0 authored by kravtsov's avatar kravtsov

[-] Исправлена ошибка PreLine и PostLine в printRecTotal

parent 36541e78
[Closed Files]
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterTypes.pas',0,1,353,1,376,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,5076,1,5096,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrReceipt.pas',0,1,38,5,43,1,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,1029,47,1039,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrAddHeaderTrailer.pas',0,1,37,27,45,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\OPOSDate.pas',0,1,22,45,27,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrFiscalReports.pas',0,1,81,103,89,1,1
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrDirectIO.pas',0,1,1,1,1,1,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFptrSrv\Units\oleMain.pas',0,124,1,201,11,0,0
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\ReceiptItem.pas',0,1,1,1,1,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\ReceiptTemplate.pas',0,1,1,36,4,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',0,1,853,18,866,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\PrinterParameters.pas',0,1,1,26,30,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\DirectIOAPI.pas',0,1,1,1,1,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FSSalesReceipt.pas',0,1,1,1,1,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterTypes.pas',0,1,353,1,376,0,0
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,5076,1,5096,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrReceipt.pas',0,1,38,5,43,1,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,1029,47,1039,0,0
[Modules]
Module0=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
Module0=C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.dpr
Count=1
EditWindowCount=1
TypeLibWindowCount=3
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.dpr]
ModuleType=SourceModule
FormState=0
FormOnTop=0
......@@ -100,17 +97,15 @@ CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=2
Left=324
Top=138
Width=1302
Height=682
MaxLeft=-8
MaxTop=106
MaxWidth=1936
MaxHeight=952
ClientWidth=1920
ClientHeight=914
State=0
Left=440
Top=317
Width=868
Height=646
MaxLeft=-1
MaxTop=-1
ClientWidth=852
ClientHeight=608
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
......@@ -120,10 +115,10 @@ BottomPanelClients=MessageView@EditWindow0
BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF
[View0]
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
CursorX=86
CursorY=1885
TopLine=1874
Module=C:\projects\OPOSShtrih\Source\SmFptrSrv\SmFptrSrv.dpr
CursorX=59
CursorY=12
TopLine=1
LeftCol=1
[TypeLibEditWindow0]
......@@ -196,14 +191,9 @@ LRDockWidth=320
Dockable=1
[Breakpoints]
Count=7
Count=2
Breakpoint0='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\CustomReceipt.pas',160,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint1='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\MalinaPlugin.pas',194,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint2='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2026,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint3='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2037,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint4='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2052,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint5='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2066,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint6='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2011,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints]
Count=0
......@@ -461,7 +451,7 @@ Create=1
Visible=0
State=0
Left=-128
Top=-6
Top=-13
Width=140
Height=305
MaxLeft=-1
......@@ -477,7 +467,7 @@ Create=1
Visible=0
State=0
Left=-134
Top=-705
Top=-676
Width=443
Height=85
MaxLeft=-1
......
......@@ -4596,18 +4596,19 @@ end;
procedure TReceiptTest20.Execute;
begin
Check(FiscalPrinter.ResetPrinter());
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES;
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_SALE;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PostLine := 'PostLine 1';
FiscalPrinter.PrintRecItem('1:63326 HEINZ 1000', 209, 1000, 1, 209, '');
FiscalPrinter.PostLine := 'PostLine 2';
FiscalPrinter.PrintRecItem('2:3305976 6540', 6.49, 1000, 1, 6.49, '');
FiscalPrinter.PostLine := 'PostLine 3';
FiscalPrinter.PrintRecItem('3:3148276 500', 41.9, 1000, 1, 41.9, '');
FiscalPrinter.PrintRecSubtotal(257.39);
FiscalPrinter.PrintRecSubtotalAdjustment(1, '', 0.39);
FiscalPrinter.PrintRecTotal(0, 300, '0');
FiscalPrinter.PreLine := 'PrintRecItem.PreLine';
FiscalPrinter.PostLine := 'PrintRecItem.PostLine';
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PreLine := 'PrintRecTotal.PreLine';
FiscalPrinter.PostLine := 'PrintRecTotal.PostLine';
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.PreLine := 'EndFiscalReceipt.PreLine';
FiscalPrinter.PostLine := 'EndFiscalReceipt.PostLine';
FiscalPrinter.EndFiscalReceipt(True);
end;
......@@ -4629,24 +4630,32 @@ begin
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_SALE;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PreLine := 'FiscalPrinter.PreLine';
FiscalPrinter.PostLine := 'FiscalPrinter.PostLine';
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_RETSALE;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PreLine := 'FiscalPrinter.PreLine';
FiscalPrinter.PostLine := 'FiscalPrinter.PostLine';
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_BUY;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PreLine := 'FiscalPrinter.PreLine';
FiscalPrinter.PostLine := 'FiscalPrinter.PostLine';
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_RETBUY;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PreLine := 'FiscalPrinter.PreLine';
FiscalPrinter.PostLine := 'FiscalPrinter.PostLine';
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
end;
......
[FiscalPrinter_SHTRIH-M-OPOS-1]
Storage=1
Header=486561646572206C696E6520310D0A486561646572206C696E6520320D0A486561646572206C696E6520330D0A486561646572206C696E6520340D0A486561646572206C696E6520350D0A486561646572206C696E652036
Trailer=547261696C6572206C696E6520310D0A547261696C6572206C696E6520320D0A547261696C6572206C696E6520330D0A547261696C6572206C696E652034
HeaderPrinted=1
LogoSize=0
LogoReloadEnabled=0
LogoCenter=1
IsLogoLoaded=0
LogoFileName=
Department=1
ZeroReceiptNumber=1
ConnectionType=0
RemotePort=7778
RemoteHost=3139322E3136382E3133372E313131
PortNumber=4
BaudRate=115200
SysPassword=30
UsrPassword=1
SubtotalText=535542544F54414C
CloseRecText=
VoidRecText=5245434549505420564F49444544
FontNumber=1
ByteTimeout=1000
MaxRetryCount=3
SearchByPortEnabled=0
SearchByBaudRateEnabled=1
PollIntervalInSeconds=5
DeviceByteTimeout=1000
StatusInterval=100
LogFileEnabled=0
CutType=1
LogoPosition=0
NumHeaderLines=6
NumTrailerLines=4
HeaderFont=1
TrailerFont=1
Encoding=0
BarLinePrintDelay=100
StatusCommand=0
HeaderType=1
CompatLevel=0
ReceiptType=0
ZeroReceiptType=0
CCOType=0
TableEditEnabled=1
XmlZReportEnabled=0
CsvZReportEnabled=0
XmlZReportFileName=C:\projects\OPOSShtrih\bin\ZReport.xml
CsvZReportFileName=C:\projects\OPOSShtrih\bin\ZReport.csv
LogMaxCount=10
VoidReceiptOnMaxItems=0
MaxReceiptItems=100
JournalPrintHeader=1
JournalPrintTrailer=1
CacheReceiptNumber=0
BarLineByteMode=0
PrintRecSubtotal=1
StatusTimeout=60
SetHeaderLineEnabled=1
SetTrailerLineEnabled=1
RFAmountLength=10
RFQuantityLength=10
RFSeparatorLine=1
RFShowTaxLetters=0
MonitoringPort=50000
MonitoringEnabled=0
PropertyUpdateMode=0
ReceiptReportFileName=C:\projects\OPOSShtrih\bin\ZCheckReport.xml
ReceiptReportEnabled=0
ZReceiptBeforeZReport=1
DepartmentInText=0
CenterHeader=0
AmountDecimalPlaces=1
CapRecNearEndSensorMode=0
FPSerial=
LogFilePath=C:\projects\OPOSShtrih\bin\Logs
ReportDateStamp=0
FSBarcodeEnabled=0
FSAddressEnabled=0
FSUpdatePrice=0
BarcodePrefix=BARCODE:
BarcodeHeight=100
BarcodeType=0
BarcodeModuleWidth=2
BarcodeAlignment=0
BarcodeParameter1=0
BarcodeParameter2=0
BarcodeParameter3=0
XReport=0
WrapText=1
WritePaymentNameEnabled=1
TimeUpdateMode=0
ReceiptItemsHeader=2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D
ReceiptItemsTrailer=2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D
ReceiptItemFormat=253363504F5325202532306C5449544C45252025366C53554D25202A2025365155414E25203D253130544F54414C5F54415825
RecPrintType=0
PrintSingleQuantity=1
TableFilePath=C:\projects\OPOSShtrih\bin\Tables
VatCodeEnabled=0
HandleErrorCode=0
FSServiceEnabled=0
PrinterProtocol=0
PrintUnitName=0
OpenReceiptEnabled=0
QuantityDecimalPlaces=0
PingEnabled=0
DocumentBlockSize=50
PrintRecMessageMode=1
EkmServerHost=80.243.2.202
EkmServerPort=2003
EkmServerTimeout=5
EkmServerEnabled=0
FSMarkCheckEnabled=0
[FiscalPrinter_SHTRIH-M-OPOS-1_PaymentTypes]
0=0
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
10=10
11=11
12=12
13=13
14=14
15=15
[FiscalPrinter_SHTRIH-M-OPOS-1_VatCodes]
1=3
2=2
4=1
......@@ -400,8 +400,8 @@ var
begin
CheckPrice(Price);
CheckQuantity(Quantity);
CheckPrice(UnitPrice);
Operation.Quantity := GetDoubleQuantity(Quantity);
if UnitPrice = 0 then
begin
......@@ -726,7 +726,6 @@ begin
if ReceiptItem is TFSSaleItem then
begin
Item := ReceiptItem as TFSSaleItem;
ParsedPreLine := ParsePrice(Item.PreLine, Price, Quantity);
if not ParsedPreLine then
begin
......@@ -760,6 +759,7 @@ begin
CheckAmount(Total);
CheckAmount(Payment);
CheckTotal(Total);
PrintPreLine;
// Check payment code
PayCode := Printer.GetPayCode(Description);
......@@ -805,6 +805,7 @@ begin
State.SetState(FPTR_PS_FISCAL_RECEIPT_TOTAL);
end;
end;
PrintPostLine;
end;
procedure TFSSalesReceipt.CheckRececiptState;
......@@ -1553,13 +1554,9 @@ begin
end;
if Printer.Printer.PreLine <> '' then
AddTextItem(Printer.Printer.PreLine, Station);
PrintPreLine;
AddTextItem(Text, Station);
if Printer.Printer.PostLine <> '' then
AddTextItem(Printer.Printer.PostLine, Station);
Printer.Printer.PreLine := '';
Printer.Printer.PostLine := '';
PrintPostLine;
end;
procedure TFSSalesReceipt.AddTextItem(const Text: WideString; Station: Integer);
......@@ -1579,12 +1576,20 @@ end;
procedure TFSSalesReceipt.PrintPostLine;
begin
Printer.PrintPostLine;
if Printer.Printer.PostLine <> '' then
begin
AddTextItem(Printer.Printer.PostLine, PRINTER_STATION_REC);
Printer.Printer.PostLine := '';
end;
end;
procedure TFSSalesReceipt.PrintPreLine;
begin
Printer.PrintPreLine;
if Printer.Printer.PreLine <> '' then
begin
AddTextItem(Printer.Printer.PreLine, PRINTER_STATION_REC);
Printer.Printer.PreLine := '';
end;
end;
procedure TFSSalesReceipt.SetAdjustmentAmount(Amount: Integer);
......
This diff is collapsed.
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