fixed bug with server not listening messages on first export and added a button to stop the server
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
# Maintainer: Leca <leca@foxarmy.org>
 | 
			
		||||
pkgname=checks-parser-git
 | 
			
		||||
pkgver=alpha_0.0.2
 | 
			
		||||
pkgver=alpha_0.0.4
 | 
			
		||||
pkgrel=1
 | 
			
		||||
epoch=
 | 
			
		||||
pkgdesc="Utility for parsing checks(receipts) to csv"
 | 
			
		||||
@@ -8,7 +8,7 @@ arch=('x86_64')
 | 
			
		||||
url="https://git.foxarmy.org/leca/checks-parser"
 | 
			
		||||
license=('GPL-3.0-or-later')
 | 
			
		||||
groups=()
 | 
			
		||||
depends=('qt5-base' 'opencv' 'zbar' 'nlohmann-json' 'tesseract')
 | 
			
		||||
depends=('qt5-base' 'opencv' 'zbar' 'nlohmann-json' 'tesseract' 'qrencode')
 | 
			
		||||
makedepends=('cmake' 'make' 'gcc' 'git' 'qt5-tools')
 | 
			
		||||
checkdepends=()
 | 
			
		||||
optdepends=('tesseract-data-rus: scan russian checks with OCR')
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								ofdscene.cpp
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								ofdscene.cpp
									
									
									
									
									
								
							@@ -21,6 +21,7 @@ OFDScene::OFDScene(QWidget *parent)
 | 
			
		||||
    : QWidget(parent)
 | 
			
		||||
    , ui(new Ui::OFDScene) {
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
    ui->stop_server_button->hide();
 | 
			
		||||
 | 
			
		||||
    QObject::connect(this, &OFDScene::httpErrorOccured, this, &OFDScene::notifyHttpServerFailure);
 | 
			
		||||
}
 | 
			
		||||
@@ -51,6 +52,7 @@ void OFDScene::startHttpServer() {
 | 
			
		||||
        std::string connectionString = "binaryeye://scan/?ret=http://"+ localIp +":"+ std::to_string(port) +"/?result={RESULT}";
 | 
			
		||||
 | 
			
		||||
        server.Get("/", [&](const httplib::Request &req, httplib::Response &res){
 | 
			
		||||
            std::cout << "New http connection" <<std::endl;
 | 
			
		||||
            std::map<std::string, std::string> paramsMap;
 | 
			
		||||
            if (req.params.size() < 1) {
 | 
			
		||||
                res.set_redirect(connectionString, 301);
 | 
			
		||||
@@ -69,11 +71,13 @@ void OFDScene::startHttpServer() {
 | 
			
		||||
            res.set_redirect(connectionString, 301);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        std::cerr << "Listening on port: " << this->port << std::endl;
 | 
			
		||||
        std::cout << "Listening on port: " << this->port << std::endl;
 | 
			
		||||
        if (!server.listen("0.0.0.0", this->port)) {
 | 
			
		||||
            std::cerr << "Random port seems to be occupied. Trying to generate another one" << std::endl;
 | 
			
		||||
            number_of_retries ++;
 | 
			
		||||
            continue;
 | 
			
		||||
        } else {
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    } while(true);
 | 
			
		||||
}
 | 
			
		||||
@@ -173,14 +177,17 @@ void OFDScene::on_parse_button_clicked() {
 | 
			
		||||
    } while (!is_captcha_solved);
 | 
			
		||||
 | 
			
		||||
    if (success) {
 | 
			
		||||
        OutputDialog d = OutputDialog(this, check);
 | 
			
		||||
        d.exec();
 | 
			
		||||
        OutputDialog *d = new OutputDialog(this, check);
 | 
			
		||||
        d->exec();
 | 
			
		||||
 | 
			
		||||
        delete d;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void OFDScene::on_binary_eye_button_clicked() {
 | 
			
		||||
    http_thread = new std::thread(&OFDScene::startHttpServer, this);
 | 
			
		||||
    ui->binary_eye_button->setEnabled(false);
 | 
			
		||||
    ui->stop_server_button->show();
 | 
			
		||||
 | 
			
		||||
    while (!server.is_running());
 | 
			
		||||
    std::string localIp;
 | 
			
		||||
@@ -214,3 +221,11 @@ unsigned int OFDScene::getPort() {
 | 
			
		||||
    return port;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void OFDScene::on_stop_server_button_clicked() {
 | 
			
		||||
    server.stop();
 | 
			
		||||
    http_thread->join();
 | 
			
		||||
    ui->stop_server_button->hide();
 | 
			
		||||
    ui->binary_eye_button->setEnabled(true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,6 +28,8 @@ private slots:
 | 
			
		||||
    void on_binary_eye_button_clicked();
 | 
			
		||||
    void notifyHttpServerFailure();
 | 
			
		||||
 | 
			
		||||
    void on_stop_server_button_clicked();
 | 
			
		||||
 | 
			
		||||
signals:
 | 
			
		||||
 | 
			
		||||
    void httpErrorOccured();
 | 
			
		||||
 
 | 
			
		||||
@@ -91,7 +91,7 @@ std::vector<Goods> Parser::parse(std::wstring check_plaintext) {
 | 
			
		||||
        goods_names.size() != goods_quantities.size() ||
 | 
			
		||||
        goods_prices.size() != goods_quantities.size()) {
 | 
			
		||||
 | 
			
		||||
        dumpVectorsToStdErr(goods_names, goods_prices, goods_quantities);
 | 
			
		||||
        // dumpVectorsToStdErr(goods_names, goods_prices, goods_quantities);
 | 
			
		||||
 | 
			
		||||
        //Error. Amount of names, prices or quantities are not equal. That means, that some regex(es) has mismatched.
 | 
			
		||||
        return {};
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,10 @@
 | 
			
		||||
   <property name="sizeConstraint">
 | 
			
		||||
    <enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <item row="8" column="0">
 | 
			
		||||
    <widget class="QLabel" name="total_label">
 | 
			
		||||
   <item row="5" column="0">
 | 
			
		||||
    <widget class="QLabel" name="fi_label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Total</string>
 | 
			
		||||
      <string>FI (Fiscal Identifier)</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
@@ -37,6 +37,20 @@
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="6" column="0">
 | 
			
		||||
    <widget class="QLabel" name="datetime_label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Date and time of purchase</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="1" column="2">
 | 
			
		||||
    <widget class="QPushButton" name="binary_eye_button">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Use your phone as a QR code scanner</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="1" column="1">
 | 
			
		||||
    <widget class="QLabel" name="or_label">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
@@ -50,12 +64,8 @@
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="8" column="2">
 | 
			
		||||
    <widget class="QDoubleSpinBox" name="total_spin_box">
 | 
			
		||||
     <property name="maximum">
 | 
			
		||||
      <double>4294967296.000000000000000</double>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   <item row="4" column="2">
 | 
			
		||||
    <widget class="QLineEdit" name="fd_line_edit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="4" column="0">
 | 
			
		||||
    <widget class="QLabel" name="fd_label">
 | 
			
		||||
@@ -70,10 +80,23 @@
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="6" column="0">
 | 
			
		||||
    <widget class="QLabel" name="datetime_label">
 | 
			
		||||
   <item row="9" column="0" colspan="3">
 | 
			
		||||
    <widget class="QPushButton" name="parse_button">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
			
		||||
       <horstretch>0</horstretch>
 | 
			
		||||
       <verstretch>0</verstretch>
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Date and time of purchase</string>
 | 
			
		||||
      <string>Parse</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="7" column="0">
 | 
			
		||||
    <widget class="QLabel" name="operation_type_label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Operation type</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
@@ -101,22 +124,6 @@
 | 
			
		||||
     </item>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="4" column="2">
 | 
			
		||||
    <widget class="QLineEdit" name="fd_line_edit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="2" column="0" colspan="3">
 | 
			
		||||
    <widget class="QLabel" name="info_label">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
      <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
 | 
			
		||||
       <horstretch>0</horstretch>
 | 
			
		||||
       <verstretch>0</verstretch>
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string/>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="3" column="2">
 | 
			
		||||
    <widget class="QLineEdit" name="fn_line_edit">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
@@ -130,13 +137,6 @@
 | 
			
		||||
   <item row="5" column="2">
 | 
			
		||||
    <widget class="QLineEdit" name="fi_line_edit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="1" column="2">
 | 
			
		||||
    <widget class="QPushButton" name="binary_eye_button">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Use your phone as a QR code scanner</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="3" column="0">
 | 
			
		||||
    <widget class="QLabel" name="fn_label">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
@@ -150,16 +150,29 @@
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="5" column="0">
 | 
			
		||||
    <widget class="QLabel" name="fi_label">
 | 
			
		||||
   <item row="8" column="0">
 | 
			
		||||
    <widget class="QLabel" name="total_label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>FI (Fiscal Identifier)</string>
 | 
			
		||||
      <string>Total</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="6" column="2">
 | 
			
		||||
    <widget class="QDateTimeEdit" name="purchase_datetime_edit"/>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="2" column="0" colspan="3">
 | 
			
		||||
    <widget class="QLabel" name="info_label">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
      <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
 | 
			
		||||
       <horstretch>0</horstretch>
 | 
			
		||||
       <verstretch>0</verstretch>
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string/>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="1" column="0">
 | 
			
		||||
    <widget class="QPushButton" name="choose_image_button">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
@@ -167,23 +180,23 @@
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="7" column="0">
 | 
			
		||||
    <widget class="QLabel" name="operation_type_label">
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Operation type</string>
 | 
			
		||||
   <item row="8" column="2">
 | 
			
		||||
    <widget class="QDoubleSpinBox" name="total_spin_box">
 | 
			
		||||
     <property name="maximum">
 | 
			
		||||
      <double>4294967296.000000000000000</double>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
   <item row="9" column="0" colspan="3">
 | 
			
		||||
    <widget class="QPushButton" name="parse_button">
 | 
			
		||||
   <item row="0" column="2" alignment="Qt::AlignmentFlag::AlignRight">
 | 
			
		||||
    <widget class="QPushButton" name="stop_server_button">
 | 
			
		||||
     <property name="sizePolicy">
 | 
			
		||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
			
		||||
      <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 | 
			
		||||
       <horstretch>0</horstretch>
 | 
			
		||||
       <verstretch>0</verstretch>
 | 
			
		||||
      </sizepolicy>
 | 
			
		||||
     </property>
 | 
			
		||||
     <property name="text">
 | 
			
		||||
      <string>Parse</string>
 | 
			
		||||
      <string>Stop server</string>
 | 
			
		||||
     </property>
 | 
			
		||||
    </widget>
 | 
			
		||||
   </item>
 | 
			
		||||
 
 | 
			
		||||
@@ -292,7 +292,7 @@
 | 
			
		||||
        <translation>Form</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
			
		||||
        <source>Total</source>
 | 
			
		||||
        <translation>Total</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -302,42 +302,47 @@
 | 
			
		||||
        <translation>Back</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="49"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="63"/>
 | 
			
		||||
        <source>or</source>
 | 
			
		||||
        <translation>or</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="69"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="79"/>
 | 
			
		||||
        <source>FD (Fiscal Document)</source>
 | 
			
		||||
        <translation>FD (Fiscal Document)</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="76"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="43"/>
 | 
			
		||||
        <source>Date and time of purchase</source>
 | 
			
		||||
        <translation>Date and time of purchase</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="84"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="199"/>
 | 
			
		||||
        <source>Stop server</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="107"/>
 | 
			
		||||
        <source>Funds income</source>
 | 
			
		||||
        <translation>Funds income</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="89"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="112"/>
 | 
			
		||||
        <source>Funds return</source>
 | 
			
		||||
        <translation>Funds return</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="94"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="117"/>
 | 
			
		||||
        <source>Funds spend</source>
 | 
			
		||||
        <translation>Funds spend</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="122"/>
 | 
			
		||||
        <source>Spends return</source>
 | 
			
		||||
        <translation>Spends return</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="136"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="50"/>
 | 
			
		||||
        <source>Use your phone as a QR code scanner</source>
 | 
			
		||||
        <translation>Use your phone as a QR code scanner</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -347,87 +352,87 @@
 | 
			
		||||
        <translation>FN (Fiscal Number)</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
			
		||||
        <source>FI (Fiscal Identifier)</source>
 | 
			
		||||
        <translation>FI (Fiscal Identifier)</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="166"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="179"/>
 | 
			
		||||
        <source>Choose image on your PC</source>
 | 
			
		||||
        <translation>Choose image on your PC</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="173"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
			
		||||
        <source>Operation type</source>
 | 
			
		||||
        <translation>Operation type</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="186"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="92"/>
 | 
			
		||||
        <source>Parse</source>
 | 
			
		||||
        <translation>Parse</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="205"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="214"/>
 | 
			
		||||
        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="216"/>
 | 
			
		||||
        <source>Could not start http server.</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="84"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="90"/>
 | 
			
		||||
        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
			
		||||
        <translation>Please, select a picture where QR code that contains info about check is present</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="86"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="92"/>
 | 
			
		||||
        <source>Picture was not selected</source>
 | 
			
		||||
        <translation>Picture was not selected</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="91"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="97"/>
 | 
			
		||||
        <source>Selected image: </source>
 | 
			
		||||
        <translation>Selected image: </translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="150"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="156"/>
 | 
			
		||||
        <source>Captcha was not solved correctly!</source>
 | 
			
		||||
        <translation>Captcha was not solved correctly!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="152"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="158"/>
 | 
			
		||||
        <source>Captcha is incorrect</source>
 | 
			
		||||
        <translation>Captcha is incorrect</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="157"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="163"/>
 | 
			
		||||
        <source>Internal server error. Please, try again later.</source>
 | 
			
		||||
        <translation>Internal server error. Please, try again later.</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="159"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="165"/>
 | 
			
		||||
        <source>Internal server error</source>
 | 
			
		||||
        <translation>Internal server error</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="164"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="170"/>
 | 
			
		||||
        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
			
		||||
        <translation>Check not found. Please, ensure correctness of entered data.</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="166"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="172"/>
 | 
			
		||||
        <source>Check was not found</source>
 | 
			
		||||
        <translation>Check was not found</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="198"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
			
		||||
        <source>QR code for binaryeye to connect</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="199"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="208"/>
 | 
			
		||||
        <source>I've scanned</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
 
 | 
			
		||||
@@ -292,7 +292,7 @@
 | 
			
		||||
        <translation>Форма</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
			
		||||
        <source>Total</source>
 | 
			
		||||
        <translation>Итого</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -302,42 +302,47 @@
 | 
			
		||||
        <translation>Назад</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="49"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="63"/>
 | 
			
		||||
        <source>or</source>
 | 
			
		||||
        <translation>или</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="69"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="79"/>
 | 
			
		||||
        <source>FD (Fiscal Document)</source>
 | 
			
		||||
        <translation>ФД</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="76"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="43"/>
 | 
			
		||||
        <source>Date and time of purchase</source>
 | 
			
		||||
        <translation>Дата и время покупки</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="84"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="199"/>
 | 
			
		||||
        <source>Stop server</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="107"/>
 | 
			
		||||
        <source>Funds income</source>
 | 
			
		||||
        <translation>Приход средств</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="89"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="112"/>
 | 
			
		||||
        <source>Funds return</source>
 | 
			
		||||
        <translation>Возврат средств</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="94"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="117"/>
 | 
			
		||||
        <source>Funds spend</source>
 | 
			
		||||
        <translation>Расход средств</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="122"/>
 | 
			
		||||
        <source>Spends return</source>
 | 
			
		||||
        <translation>Возврат расхода</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="136"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="50"/>
 | 
			
		||||
        <source>Use your phone as a QR code scanner</source>
 | 
			
		||||
        <translation>Использовать телефон как сканнер QR</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
@@ -347,87 +352,87 @@
 | 
			
		||||
        <translation>ФН</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
			
		||||
        <source>FI (Fiscal Identifier)</source>
 | 
			
		||||
        <translation>ФП</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="166"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="179"/>
 | 
			
		||||
        <source>Choose image on your PC</source>
 | 
			
		||||
        <translation>Выбрать изображение на компьютере</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="173"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
			
		||||
        <source>Operation type</source>
 | 
			
		||||
        <translation>Тип операции</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="186"/>
 | 
			
		||||
        <location filename="../scenes/ofdscene.ui" line="92"/>
 | 
			
		||||
        <source>Parse</source>
 | 
			
		||||
        <translation>Парсить</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="205"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="214"/>
 | 
			
		||||
        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="216"/>
 | 
			
		||||
        <source>Could not start http server.</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="84"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="90"/>
 | 
			
		||||
        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
			
		||||
        <translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="86"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="92"/>
 | 
			
		||||
        <source>Picture was not selected</source>
 | 
			
		||||
        <translation>Изображение не было выбрано</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="91"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="97"/>
 | 
			
		||||
        <source>Selected image: </source>
 | 
			
		||||
        <translation>Выбранное изображение: </translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="150"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="156"/>
 | 
			
		||||
        <source>Captcha was not solved correctly!</source>
 | 
			
		||||
        <translation>Капча была решена неверно!</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="152"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="158"/>
 | 
			
		||||
        <source>Captcha is incorrect</source>
 | 
			
		||||
        <translation>Капча введена неверно</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="157"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="163"/>
 | 
			
		||||
        <source>Internal server error. Please, try again later.</source>
 | 
			
		||||
        <translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="159"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="165"/>
 | 
			
		||||
        <source>Internal server error</source>
 | 
			
		||||
        <translation>Внутренняя ошибка сервера</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="164"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="170"/>
 | 
			
		||||
        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
			
		||||
        <translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="166"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="172"/>
 | 
			
		||||
        <source>Check was not found</source>
 | 
			
		||||
        <translation>Чек не найден</translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="198"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
			
		||||
        <source>QR code for binaryeye to connect</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
    <message>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="199"/>
 | 
			
		||||
        <location filename="../ofdscene.cpp" line="208"/>
 | 
			
		||||
        <source>I've scanned</source>
 | 
			
		||||
        <translation type="unfinished"></translation>
 | 
			
		||||
    </message>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user