Skip to content

Commit

Permalink
[-] Fixed error with writing TLV when processTag1256 = false
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyKravtsov2016 committed Aug 29, 2023
1 parent 2cdac14 commit c25648f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
Company : SHTRIH-M www.shtrih-m.ru (495) 787-6090
Url : https://github.com/shtrih-m/javapos_shtrih

********************************************************************************

29.08.2023
deviceServiceVersion = 1013701

[-] Fixed error with writing TLV when processTag1256 = false

********************************************************************************

16.08.2023
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3610,6 +3610,8 @@ public void filterTLV(TLVItems src, TLVItems dst, int ffd) throws Exception {
src.removeEmptySTLV();
if (params.processTag1256) {
TLVFilter.filter(src, dst, ffd);
} else{
dst.add(src);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,8 @@ public void fsWriteTLV(byte[] data, boolean print) throws Exception {
}

public void fsWriteOperationTLV(byte[] data, boolean print) throws Exception {
FSTLVItem item = new FSTLVItem(data, getParams().getFont(), print);
FSTLVItem item = new FSTLVItem(
data, getParams().getFont(), print);
if (getParams().tagsBeforeItem) {
itemTags.add(item);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.shtrih.util;

public class ServiceVersion {
public static final String VERSION = "699-1-gdc1a9a7";
public static final String VERSION = "700";
}
5 changes: 5 additions & 0 deletions Source/FiscalPrinterTest/src/PrinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3983,6 +3983,11 @@ public void printFiscalReceipt145_7()
printer.beginFiscalReceipt(false);
printer.fsWriteTag(1008, "foo@example.com");

TLVWriter tlvWriter = new TLVWriter();
tlvWriter.add(1227, "БЕТА ООО");
tlvWriter.add(1228, "9705069985");
printer.fsWriteTag(1256, tlvWriter.getBytes());

printer.setItemCode(QRCodeData, true);
printer.printRecItem("1. Item1", 124, 123000, 0, 124, "");
printer.addItemCode(data, true);
Expand Down

0 comments on commit c25648f

Please sign in to comment.