Commit 49244456 authored by kravtsov's avatar kravtsov

[-] Исправлены некоторые ошибки

parent 14762fad
......@@ -6,8 +6,8 @@
*******************************************************************
OposShtrih_1.13_492.exe
30 мая 2018 16:40
OposShtrih_1.13_493.exe
30 мая 2018 20:40
[-] Исправлены некоторые ошибки
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,492
PRODUCTVERSION 1,13,0,492
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS setup utility\0"
VALUE "FileVersion", "1.13.0.492\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "InternalName", "OPOS setup \0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposConfig.exe\0"
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,492
PRODUCTVERSION 1,13,0,492
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS test utility\0"
VALUE "FileVersion", "1.13.0.492\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "InternalName", "OPOS test\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposTest.exe\0"
......
......@@ -4626,9 +4626,27 @@ end;
procedure TReceiptTest21.Execute;
begin
Check(FiscalPrinter.ResetPrinter());
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES;
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_SALE;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
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.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.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
FiscalPrinter.FiscalReceiptType := FPTR_RT_SALES_RETBUY;
FiscalPrinter.BeginFiscalReceipt(True);
FiscalPrinter.PrintRecItemRefund('-95', 100, 2551, 4, 39.2, '');
FiscalPrinter.PrintRecItem('Item 1', 100, 1000, 1, 100, '');
FiscalPrinter.PrintRecTotal(100, 100, '0');
FiscalPrinter.EndFiscalReceipt(True);
end;
......
......@@ -7,7 +7,7 @@ uses
DeviceService;
const
GenericServiceVersion = deviceVersion113 + 492;
GenericServiceVersion = deviceVersion113 + 493;
implementation
......
[FiscalPrinter_SHTRIH-M-OPOS-1]
Storage=1
Header=486561646572206C696E6520310D0A486561646572206C696E6520320D0A486561646572206C696E6520330D0A486561646572206C696E6520340D0A486561646572206C696E6520350D0A486561646572206C696E652036
Trailer=547261696C6572206C696E6520310D0A547261696C6572206C696E6520320D0A547261696C6572206C696E6520330D0A547261696C6572206C696E652034
HeaderPrinted=0
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=1
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
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,492
PRODUCTVERSION 1,13,0,492
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Fiscal printer service\0"
VALUE "FileVersion", "1.13.0.492\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "InternalName", "Fiscal printer driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmFiscalPrinter.dll\0"
......
......@@ -387,6 +387,16 @@ const
FPTR_RT_CORRECTION2_SALE = 104;
FPTR_RT_CORRECTION2_BUY = 105;
FPTR_RT_CORRECTION2_RETSALE = 106;
FPTR_RT_CORRECTION2_RETBUY = 107;
/////////////////////////////////////////////////////////////////////////////
// FPTR_RT_SALES receipt type
FPTR_RT_SALES_SALE = 108;
FPTR_RT_SALES_RETSALE = 109;
FPTR_RT_SALES_BUY = 110;
FPTR_RT_SALES_RETBUY = 111;
implementation
......
......@@ -976,6 +976,20 @@ begin
end;
procedure TFSSalesReceipt.PrintFSSale(Item: TFSSaleItem);
function RecTypeToOperation(RecType: Integer): Integer;
begin
case RecType of
RecTypeSale : Result := 1;
RecTypeRetSale : Result := 2;
RecTypeBuy : Result := 3;
RecTypeRetBuy : Result := 4;
else
Result := 1;
end;
end;
var
FSSale2: TFSSale2;
FSRegistration: TFSSale;
......@@ -1004,7 +1018,7 @@ begin
begin
if Device.CapFSCloseReceipt2 then
begin
FSSale2.RecType := FRecType + 1;
FSSale2.RecType := REcTypeToOperation(FRecType);
FSSale2.Quantity := Abs(FSRegistration.Quantity);
FSSale2.Price := Item.PriceWithDiscount;
FSSale2.Total := StrToInt64Def(FSRegistration.Parameter1, $FFFFFFFFFF);
......
......@@ -125,8 +125,7 @@ type
function GetDayNumber(const ParamValue, ParamName: WideString): Integer;
function ReadCashRegister(ID: Byte): Int64;
function CreateReceipt(FiscalReceiptType: Integer): TCustomReceipt;
function CreateSalesReceipt: TCustomReceipt;
function CreateRefundReceipt: TCustomReceipt;
function CreateSalesReceipt(RecType: Integer): TCustomReceipt;
function CreateCorrectionReceipt(RecType: Integer): TCustomReceipt;
function CreateCorrectionReceipt2(RecType: Integer): TCustomReceipt;
function GetEventInterface(FDispatch: IDispatch): IOposEvents;
......@@ -2115,10 +2114,10 @@ begin
FPTR_RT_GENERIC,
FPTR_RT_SERVICE,
FPTR_RT_SIMPLE_INVOICE:
Result := CreateSalesReceipt;
Result := CreateSalesReceipt(RecTypeSale);
FPTR_RT_REFUND:
Result := CreateRefundReceipt;
Result := CreateSalesReceipt(RecTypeRetSale);
FPTR_RT_CORRECTION_SALE:
Result := CreateCorrectionReceipt(1);
......@@ -2130,8 +2129,19 @@ begin
Result := CreateCorrectionReceipt2(1);
FPTR_RT_CORRECTION2_BUY:
Result := CreateCorrectionReceipt2(1);
Result := CreateCorrectionReceipt2(3);
FPTR_RT_SALES_SALE:
Result := CreateSalesReceipt(RecTypeSale);
FPTR_RT_SALES_RETSALE:
Result := CreateSalesReceipt(RecTypeRetSale);
FPTR_RT_SALES_BUY:
Result := CreateSalesReceipt(RecTypeBuy);
FPTR_RT_SALES_RETBUY:
Result := CreateSalesReceipt(RecTypeRetBuy);
else
Result := nil;
InvalidPropertyValue('FiscalReceiptType', IntToStr(FiscalReceiptType));
......@@ -2159,7 +2169,7 @@ begin
end;
end;
function TFiscalPrinterImpl.CreateSalesReceipt: TCustomReceipt;
function TFiscalPrinterImpl.CreateSalesReceipt(RecType: Integer): TCustomReceipt;
var
Context: TReceiptContext;
begin
......@@ -2170,55 +2180,26 @@ begin
case Parameters.ReceiptType of
ReceiptTypeNormal:
begin
Result := CreateNormalSalesReceipt(RecTypeSale);
Result := CreateNormalSalesReceipt(RecType);
end;
ReceiptTypeSingleSale:
begin
Result := TTextReceipt.CreateReceipt(Context, RecTypeSale);
Result := TTextReceipt.CreateReceipt(Context, RecType);
end;
ReceiptTypeGlobus:
begin
Result := TGlobusReceipt.CreateReceipt(Context, RecTypeSale);
Result := TGlobusReceipt.CreateReceipt(Context, RecType);
end;
ReceiptTypeGlobus2:
begin
Result := TGlobusTextReceipt.CreateReceipt(Context, RecTypeSale);
Result := TGlobusTextReceipt.CreateReceipt(Context, RecType);
end;
else
Result := CreateNormalSalesReceipt(RecTypeSale);
Result := CreateNormalSalesReceipt(RecType);
end;
end;
function TFiscalPrinterImpl.CreateRefundReceipt: TCustomReceipt;
var
Context: TReceiptContext;
begin
Context.State := FPrinterState;
Context.Printer := FReceiptPrinter;
Context.FiscalReceiptStation := FFiscalReceiptStation;
case Parameters.ReceiptType of
ReceiptTypeNormal:
begin
Result := CreateNormalSalesReceipt(RecTypeRetSale);
end;
ReceiptTypeGlobus:
begin
Result := TGlobusReceipt.CreateReceipt(Context, RecTypeRetSale);
end;
ReceiptTypeSingleSale:
begin
Result := TTextReceipt.CreateReceipt(Context, RecTypeRetSale);
end;
ReceiptTypeGlobus2:
begin
Result := TGlobusTextReceipt.CreateReceipt(Context, RecTypeRetSale);
end;
else
Result := CreateNormalSalesReceipt(RecTypeRetSale);
end;
end;
function TFiscalPrinterImpl.CreateCorrectionReceipt(RecType: Integer): TCustomReceipt;
var
Context: TReceiptContext;
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,492
PRODUCTVERSION 1,13,0,492
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Fiscal printer print server\0"
VALUE "FileVersion", "1.13.0.492\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "InternalName", "Fiscal printer driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmFptrSrv.exe\0"
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,492
PRODUCTVERSION 1,13,0,492
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Scale service\0"
VALUE "FileVersion", "1.13.0.492\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "InternalName", "Scale driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmScale.dll\0"
......
[releases]
current=1.13.0.492
current=1.13.0.493
last_date=2010-02-05
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