Skip to content

Commit

Permalink
[-] Fixed android version
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Kravtsov committed Oct 20, 2021
1 parent 1e7bbbb commit fb9b263
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
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 = "633-2-ga2e40fe";
public static final String VERSION = "634";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.shtrih.barcode.PrinterBarcode;
import com.shtrih.fiscalprinter.GCNGenerator;
import com.shtrih.fiscalprinter.ShtrihFiscalPrinter;
import com.shtrih.fiscalprinter.SmFiscalPrinterException;
import com.shtrih.fiscalprinter.DeviceException;
import com.shtrih.fiscalprinter.TLVWriter;
import com.shtrih.fiscalprinter.command.DeviceMetrics;
import com.shtrih.fiscalprinter.command.FSDocType;
Expand Down Expand Up @@ -44,7 +44,7 @@ public void openShift(ShtrihFiscalPrinter printer, InputParameters inputParamete

if (printerStatus.getPrinterMode().isDayOpened()) {
throw JposExceptionHandler.getJposException(
new SmFiscalPrinterException(2, "Открытая смена, операция невозможна"));
new DeviceException(2, "Открытая смена, операция невозможна"));
}

// 1021, кассир
Expand Down Expand Up @@ -74,7 +74,7 @@ public void closeShift(ShtrihFiscalPrinter printer, InputParameters inputParamet

if (printerStatus.getPrinterMode().isDayClosed()) {
throw JposExceptionHandler.getJposException(
new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна"));
new DeviceException(2, "Закрытая смена, операция невозможна"));
}

// 1021, кассир
Expand Down Expand Up @@ -120,7 +120,7 @@ public void processCorrectionCheck(ShtrihFiscalPrinter printer, CheckCorrectionP

if (printerStatus.getPrinterMode().isDayClosed()) {
throw JposExceptionHandler.getJposException(
new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна"));
new DeviceException(2, "Закрытая смена, операция невозможна"));
}

printer.fsStartCorrectionReceipt();
Expand Down Expand Up @@ -183,7 +183,7 @@ public void processCheck(ShtrihFiscalPrinter printer, CheckPackage params, boole
// в открытие смены не будет передан ИНН кассира
if (printerStatus.getPrinterMode().isDayClosed()) {
throw JposExceptionHandler.getJposException(
new SmFiscalPrinterException(2, "Закрытая смена, операция невозможна"));
new DeviceException(2, "Закрытая смена, операция невозможна"));
}

if (isCashCore(printer)) {
Expand Down Expand Up @@ -492,7 +492,7 @@ private void prepare(ShtrihFiscalPrinter printer) throws JposException {
if (status.getSubmode() == 1 || status.getSubmode() == 2) {
final int errorCodeNoPaper = 107;
throw JposExceptionHandler.getJposException(
new SmFiscalPrinterException(errorCodeNoPaper, "Отсутствует бумага"));
new DeviceException(errorCodeNoPaper, "Отсутствует бумага"));
}

// проверяем, есть ли открытый документ в ФН
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import com.shtrih.barcode.PrinterBarcode;
import com.shtrih.fiscalprinter.FontNumber;
import com.shtrih.fiscalprinter.ShtrihFiscalPrinter;
import com.shtrih.fiscalprinter.SmFiscalPrinterException;
import com.shtrih.fiscalprinter.DeviceException;
import com.shtrih.fiscalprinter.TLVTag;
import com.shtrih.fiscalprinter.TLVItem;
import com.shtrih.fiscalprinter.TLVItems;
Expand Down Expand Up @@ -2376,8 +2376,8 @@ protected String doInBackground(Void... params) {

} catch (JposException e) {
Throwable cause = e.getCause();
if (cause instanceof SmFiscalPrinterException) {
if (((SmFiscalPrinterException) cause).getCode() == SMFP_EFPTR_INVALID_TABLE) {
if (cause instanceof DeviceException) {
if (((DeviceException) cause).getErrorCode() == SMFP_EFPTR_INVALID_TABLE) {
break;
} else {
log.error("Table " + i + " info reading failed", e);
Expand Down

0 comments on commit fb9b263

Please sign in to comment.