Skip to content

Commit

Permalink
[-] Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalyKravtsov2016 committed Nov 28, 2023
1 parent 8c32f1c commit 552eb5e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private int findNextDocument(List<String> lines, int index) {
}

private boolean isDocumentHeader(String line) {
return line.contains(TextDocumentFilter.SINN);
return line.contains(TextDocumentFilter.SINN) && line.contains("№");
}

private List<String> copyLines(List<String> lines, int index1, int index2) {
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 = "704-1-g76ae479d";
public static final String VERSION = "704-4-g8c32f1c0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @author P.Zhirkov
*/
@Ignore

public class TextReportStorageTests {

private File file;
Expand All @@ -24,7 +24,6 @@ public class TextReportStorageTests {
@Before
public void context() throws IOException {
file = File.createTempFile("TextReportStorageTests", ".txt");

storage = new TextReportStorage(file.getAbsolutePath());
}

Expand Down Expand Up @@ -238,6 +237,7 @@ public void should_search_first_and_single_z_report() throws Exception {
assertEqual(expectedReport, storage.searchZReport(1));
}

@Ignore
@Test
public void should_search_z_report_in_the_middle() throws Exception {
writeFile("ККТ 1358 ИНН 770123456789 №0237\n" +
Expand Down Expand Up @@ -338,6 +338,7 @@ public void should_search_z_report_in_the_middle() throws Exception {
assertEqual(expectedReport, storage.searchZReport(19));
}

@Ignore
@Test
public void should_search_z_report_in_the_middle_when_previous_report_has_different_number_then_minus_one() throws Exception {
writeFile("ККТ 1358 ИНН 770123456789 №0237\n" +
Expand Down Expand Up @@ -434,10 +435,12 @@ public void should_search_z_report_in_the_middle_when_previous_report_has_differ
"НЕОБНУЛ.СУММА ПОКУПОК НА НАЧ.СМЕНЫ 0.00\n" +
"ЧЕКОВ ПРОДАЖ 0000\n" +
"0000 0.00\n";

assertEqual(expectedReport, storage.searchZReport(19));
List<String> report = storage.searchZReport(19);
assertEqual(expectedReport, report);
}


@Ignore
@Test
public void should_search_z_report_in_the_middle_with_no_documents() throws Exception {
writeFile("ККТ 1358 ИНН 770123456789 №0237\n" +
Expand Down Expand Up @@ -1051,7 +1054,7 @@ public void should_return_null_when_current_report_was_not_found() throws Except
}

private void writeFile(String text) throws IOException {
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), Charset.forName("utf-8"));
OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file));

try {
writer.write(text);
Expand Down
18 changes: 0 additions & 18 deletions Source/FiscalPrinterTest/Res/PPPConfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion Source/FiscalPrinterTest/Res/jpos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<!-- Combine item adjustments (enabled by default) -->
<prop name="printReceiptItemAsText" type="String" value="0"/>
<!-- Text report enabled -->
<prop name="textReportEnabled" type="String" value="0"/>
<prop name="textReportEnabled" type="String" value="1"/>
<!-- Text report file name -->
<prop name="textReportFileName" type="String" value="archive.txt"/>
<!-- Text report empty lines enabled -->
Expand Down
21 changes: 0 additions & 21 deletions Source/FiscalPrinterTest/Res/test.bat

This file was deleted.

24 changes: 0 additions & 24 deletions Source/FiscalPrinterTest/Res/test.sh

This file was deleted.

4 changes: 4 additions & 0 deletions Source/FiscalPrinterTest/src/PrinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3995,6 +3995,10 @@ public void printFiscalReceipt145_7()
printer.printRecItem("2. Item2", 124, 123400, 0, 124, "");
printer.printRecTotal(10000, 10000, "");
printer.endFiscalReceipt(false);

int docNumber = printer.readLongPrinterStatus().getDocumentNumber();
printer.printJournalDocNumber(docNumber);

} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 552eb5e

Please sign in to comment.