WO2019019631A1 - Blank invoice invalidation processing method, readable storage medium, server, and device - Google Patents

Blank invoice invalidation processing method, readable storage medium, server, and device Download PDF

Info

Publication number
WO2019019631A1
WO2019019631A1 PCT/CN2018/077245 CN2018077245W WO2019019631A1 WO 2019019631 A1 WO2019019631 A1 WO 2019019631A1 CN 2018077245 W CN2018077245 W CN 2018077245W WO 2019019631 A1 WO2019019631 A1 WO 2019019631A1
Authority
WO
WIPO (PCT)
Prior art keywords
invoice
blank
tax control
target
invalidation
Prior art date
Application number
PCT/CN2018/077245
Other languages
French (fr)
Chinese (zh)
Inventor
熊俊超
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019019631A1 publication Critical patent/WO2019019631A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • G06Q40/123Tax preparation or submission

Definitions

  • the present application relates to the field of financial technology, and in particular, to a blank processing method for blank invoice processing, a computer readable storage medium, a server, and a device.
  • the flow of blank invoices is: purchase blank invoices from the tax bureau ⁇ tax filing tray ⁇ core board ⁇ billing terminal.
  • the invoicing terminal After the blank invoice is distributed to the invoicing terminal, if the paper invoice corresponding to the blank invoice is damaged or the like, the user who needs the invoicing terminal actively applies for the blanking of the damaged blank invoice.
  • the enterprise's invoice management system needs to call the invalidation interface of the special tax control server (such as the tax control server of Baiwang) (the tax control invalidation interface), which is provided by the browser plug-in. Javascript interface to achieve.
  • the invoice management system often calls the browser to respond slowly or even jam when calling the tax control invalidation interface.
  • the browser is stuck, the user closes the browser, the client computer is powered off, etc.
  • the local invoice management system cannot obtain the return result of the tax control invalidation interface in time and accurately, so it is difficult to determine whether the result of the blank blank invoice is successful or not, which leads to the inventory of the blank invoice stored in the invoice management system and the tax control system. Inconsistent issues.
  • the embodiment of the invention provides a blank invoice processing method, a storage medium and a server, which are used in the inventory and tax control system of the blank invoice which is easily stored in the invoice management system when the return result of the tax control invalid interface is not known. Inconsistent issues.
  • a blank blank invoice processing method including:
  • the target invoice number segment to be invalidated is determined in the blank invoice available on the target invoicing terminal;
  • the invoice information table on the tax control system is queried to determine whether the current blank invoice is invalid.
  • the current blank invoice refers to the tax control invalidation interface.
  • a blank invoice to be voided the invoice information table records information on the success or failure of each blank invoice on the tax control system;
  • the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the next blank invoice of the current blank invoice is started, and the execution is performed in turn.
  • the blank invoice in the target invoice number segment invokes the step of the tax control invalidation interface provided by the tax control system;
  • a computer readable storage medium is stored, the computer readable storage medium storing computer readable instructions, the step of implementing the blanking invoice processing method of the blank invoice when executed by a processor .
  • a server comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the computer readable instructions The steps of the above blank blank invoice processing method.
  • a blank processing device for blank invoice including:
  • a rule judging module configured to determine whether a blank invoice available on the target invoicing terminal meets a preset invalidation rule of the tax control system after determining the target invoicing terminal that needs to invalidate the blank invoice;
  • a discarding segment determining module configured to determine, in the blank invoice available on the target invoicing terminal, a target invoice number segment to be invalidated if the judgment result of the rule judging module is yes;
  • the invalid query judging module is configured to: if the judgment result of the sequentially calling and judging module is no, determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system, wherein the current blank invoice refers to the current invoice Invoking a blank invoice to be voided by the tax control invalidation interface, the invoice information table recording information on the success or failure of each blank invoice on the tax control system;
  • An inventory update module configured to: if the judgment result of the invalid query determination module is yes, update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and from the current blank invoice The next blank invoice begins, returning to trigger the sequential call and judgment module;
  • the invoice information table can be inquired to know whether the current blank invoice is invalid, and then the corresponding processing is performed, which can ensure that the blank invoice of the target invoice number segment can be completed and invalidated, and the invoice management system is ensured to be stored. Blank invoice inventory is consistent with this tax control system.
  • FIG. 1 is a flow chart of an embodiment of a blank invoice processing method in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of step 101 of a blank invoice processing method in an application scenario according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of steps 104 and 105 of a blank invoice processing method in an application scenario according to an embodiment of the present application;
  • FIG. 4 is a flow chart of another embodiment of a method for processing a blank invoice in the embodiment of the present application.
  • FIG. 5 is a structural diagram of an embodiment of a blank invoice processing apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a server according to an embodiment of the present application.
  • an embodiment of a method for processing a blank invoice in an embodiment of the present application includes:
  • the user may log in to the invoice management system first.
  • the user needs to verify the user's account number, password, and the like. If the verification is passed, the user is successfully logged into the invoice management system.
  • the invoice management system can automatically load which invoicing terminals are under the user's administrative authority. After loading, the user can select one invoicing terminal as the target invoicing terminal as needed.
  • the invoice management system needs to determine whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system.
  • the tax control system strictly limits the invalidation of blank invoices, and the limitation is achieved by prescribing the invalidation rules.
  • the above-mentioned default invalidation rule may include: a blank blank invoice must be under the target invoicing terminal, that is, one invoicing terminal cannot invalidate a blank invoice on another invoicing terminal; the blank blank invoice must be the target invoicing The first available blank invoice for the terminal; and so on. Since the invoicing terminal needs to invoice in strict accordance with the invoice order, the “first available blank invoice” referred to here refers to the blank invoice with the current invoicing order.
  • the blank invoice No. 1 is the first available blank invoice for the invoicing terminal; when the blank invoice No. 1 ⁇ 10 has been invoiced, the blank invoice No. 11 is The first available blank invoice for the invoicing terminal.
  • step 101 may specifically include:
  • step 204 Determine whether the first segment includes the second segment, and the first blank invoice in the second segment is the same as the first invoice, and if yes, perform step 205, if no Go to step 206;
  • the invoice management system may invoke the “Query Current Unbilled Number” interface of the tax control system to query the first blank invoice currently available to the target invoicing terminal, and specifically query the invoice code of the blank invoice and/or Information such as the invoice number. Record this blank invoice as the first invoice C.
  • the invoice management system may invoke the "purchase information inquiry" interface of the tax control system to query the invoice number segment of all the blank invoices on the target invoicing terminal, and record the invoice number segment of the inquiry as the first segment.
  • step 203 it can be understood that in the invoice management system, all available blank invoices and the invoice number segments in which the blank invoices are located can be recorded in the invoice database. Therefore, the invoice number segment in which the first invoice is located in the invoice management system can be queried, that is, the second segment A.
  • the second paragraph can be understood as a collection of blank invoices, recorded as the set A[A1, An].
  • step 204 it is determined whether B contains A and A1 is the same as C.
  • B contains A means that the blank invoice number segment A where C is located is included in all the blank invoice number segments of the billing terminal, and "A1 and C are the same” means that the current first unissued (available) The invoice C is in the first position of the A section. This condition is due to the mandatory provisions of the tax control system. When the tax control system is called to invalidate the blank invoice, only the blank unfilled blank invoice is allowed to be invalidated.
  • the invoicing terminal has a blank invoice of 1-100, where 1 is the first unfilled blank invoice, and the invoicing terminal can only start from 1 when invoicing, after 1 invoicing is completed (blue ticket or red ticket), Blank invoice 2 is used for the next invoicing, and so on.
  • Blank invoice 2 is used for the next invoicing, and so on.
  • the paper invoice corresponding to the blank invoice 50 is damaged, for example, if it is bitten by the insect, the blank invoice (electronic invoice) of No. 50 needs to be invalidated in the invoicing terminal, but since only the blank invoice 2 is currently used, this If the interface of the tax control system is called to invalidate the blank invoice 50, it will not be allowed, and a failure or error message will be returned. Therefore, the invoicing terminal can only wait for the blank invoice of No. 2-49 to be used, and it is the turn of the current unopened blank invoice to be 50, in order to successfully call the interface of the tax control system to invalidate the blank invoice 50.
  • step 204 when the determination result in step 204 is YES, it indicates that the blank invoice available on the target invoicing terminal satisfies the preset invalidation rule of the tax control system, and step 205 is performed; otherwise, when the determination result in step 204 is no.
  • step 206 is performed.
  • the invoice management system can prompt the user to invoice the invoice number segment of the target invoicing terminal and the blank invoice number of the tax control system. The segments do not match and cannot be invalidated.
  • the invoice management system may require the user to input the number m of blank invoices to be voided, where m ⁇ n. After the user inputs m and clicks the "OK Obsolete" button, the invoice management system can determine the blank invoice set [A1, Am] on the target invoicing terminal as the above-mentioned target invoice number segment to be voided.
  • step 106 each time the tax control invalidation interface is invoked, it is determined whether the return result of the tax control invalidation interface is received, and if so, the normal flow step is performed, and if not, step 106 is performed;
  • the above-mentioned tax control key is a security component pre-allocated to the user for tax control operation
  • the tax control key may be specifically a hardware module similar to an electronic cipher, and the hardware module is required when calling the tax control invalidation interface.
  • the legal verification of the tax control invalidation interface can be made after legal verification.
  • the tax control invalidation interface is required to input the tax control key each time, the operation process becomes very cumbersome and inefficient, so in this embodiment, the tax is continuously called for the blank invoice in the target invoice number segment.
  • the control is used as the waste interface, in general, the user only needs to input the tax control key once.
  • the continuous call of the tax control invalidation interface can be interrupted. After the continuous call is interrupted, if you want to continue to call the tax control invalid interface for the blank invoice that has not been invalidated, you need to enter or confirm the tax control key again.
  • the embodiment is not specifically limited.
  • the success rate of calling the tax control invalidation interface is higher. Therefore, when the tax control invalidation interface is continuously called for the blank invoice in the target invoice number segment, all blank invoices can often be called through consecutive interfaces. Successfully invalidated.
  • the invoice management system determines whether the return result of the tax control invalidation interface is received, and if a return result is received, Follow the normal process steps; otherwise, if no return results are received, then step 106 is performed.
  • the foregoing steps 104 and 105 may specifically include:
  • step 302 it is determined whether the return result of the tax control invalidation interface is received, if yes, step 303 is performed, and if not, step 106 is performed;
  • step 303 determining whether the received result is invalid or invalid, if the result of the return is invalid, starting from the current blank invoice, returning to step 301, if the result of the return is invalid, proceed to step 304;
  • step 305 determining whether all the blank invoices in the target invoice number segment are invalidated, if not, returning to step 301, and if so, executing step 306;
  • first unfilled blank invoice refers to the blank invoice currently invalidated in the target invoice number segment.
  • target invoice number segment is A1 ⁇ Am
  • first unfilled blank invoice refers to the blank invoice A1 when the tax invoice is invalidated.
  • Invoice A2 becomes the “first unfilled blank invoice”; and so on, assuming that k(k ⁇ m) blank invoice has been invalidated in A1 ⁇ Am, the blank invoice A(k+1) becomes the “ The first unfilled blank invoice.”
  • step 303 is executed to further determine whether the returned result is invalid or invalid.
  • step 303 if the returned result is invalid, the current blank invoice is not completed.
  • the current blank invoice refers to the blank invoice to be invalidated when the tax control invalidation interface is called.
  • the success rate can be as high as 99.99%. Therefore, it is basically ensured that the current blank invoice is completed.
  • step 304 can be performed to update the blank invoice inventory on the invoice management system.
  • step 304 when a blank invoice is invalidated, it indicates that the blank invoice is no longer available, so it needs to be deleted from the blank invoice inventory of the invoice management system, or in the blank invoice inventory of the invoice management system. Blank invoices are marked as obsolete.
  • step 305 after each blank invoice is successfully invalidated, it is determined whether all blank invoices in the target invoice number segment are invalidated. If not, proceed to step 301 to invalidate the remaining blank invoices that are not invalidated. Otherwise, the end of the invalidation process, the blank processing method for blank invoice provided by the embodiment is completed.
  • step 106 by querying the invoice information table on the tax control system to determine whether the current blank invoice is invalid, if yes, proceed to step 107, and if not, proceed to step 108;
  • the current blank invoice refers to a blank invoice to be invalidated when the tax control invalidation interface is invoked, and the invoice information table records information about the success or failure of each blank invoice on the tax control system.
  • the invoice management system may not receive the return result of the tax control invalidation interface due to various accident reasons, for the tax control system, the invoice information table records the success or failure of each blank invoice. Therefore, the invoice management system can query the invoice information table to know whether the current blank invoice is invalid. If the invalidation is successful, step 107 is performed; otherwise, if it is not invalid, step 108 is performed.
  • the current blank invoice has been invalidated information updated to the blank invoice inventory of the invoice management system, and from the next blank invoice of the current blank invoice, return to step 104;
  • the information that the current blank invoice has been invalidated may be updated to the blank invoice inventory of the invoice management system, that is, it is deleted from the blank invoice inventory of the invoice management system. Then, the invalidation operation is continued from the next blank invoice of the current blank invoice.
  • step 108 Starting from the current blank invoice, return to step 104.
  • the tax control invalidation interface needs to be called again for the current blank invoice to ensure that the current blank invoice is invalidated. Therefore, the invalidation operation can be continued from the current blank invoice.
  • the invoice information table can be inquired to know whether the current blank invoice is invalid, and then the corresponding processing is performed, which can ensure that the blank invoice of the target invoice number segment can be invalidated, and the blank of the invoice management system is ensured.
  • the invoice inventory is consistent with that in the tax control system.
  • step 407 it is determined whether the return result of the tax control invalidation interface is received, if yes, step 410 is performed, and if not, step 408 is performed;
  • step 408. Determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system. If yes, execute step 409. If no, proceed from the current blank invoice to return to step 404.
  • Step 410 determining whether the received result is invalid or invalid, if the result of the return is invalid, then steps 411 and 412 are performed, if the result of the return is invalid, step 413 is performed;
  • step 415 determining whether all the blank invoices in the target invoice number segment are invalidated, if not, returning to step 404, and if so, executing step 416;
  • the embodiment may also add a relevant identifier in the process of performing the invalidation operation on the blank invoice.
  • a relevant identifier in the process of performing the invalidation operation on the blank invoice. It can be understood that, by setting the identification information of the current blank invoice, and calling the tax control to invalidate the interface, the identification information is set to "abnormal", for example, set to 0, after the tax control is invalidated, if the tax control is If the result of the invalid interface is a failure, the current blank invoice always has an abnormal condition in the invalidation operation, so the relevant information can be fed back to the designated administrator to remind the designated administrator to perform related maintenance.
  • the designated administrator can quickly locate the blank invoice location where the exception occurs by using the preset flag information of the blank invoice, thereby helping the designated administrator to check and handle the abnormal situation.
  • the preset flag information is modified to be normal, for example, set to "1", and the blank blank invoice which is normally invalidated can be distinguished from the blank invoice which is invalid.
  • the invoice management system may further insert the invoice related information of the first unfilled blank invoice into the invoice database of the invoice management system. If the return result of the tax control invalidation interface is received and the return result is invalidation, the invoice related information of the current blank invoice is invalidated from the invoice database.
  • the above-mentioned invoice related information refers to basic information and/or detailed information related to the current blank invoice.
  • the basic information may include the applicant of the invoice, the application department, the application date, the purchaser, the purchase date, the warehousing personnel, the warehousing time and the like; the detailed information may include the invoice type of the invoice, the invoice denomination, the invoice score, the invoice code, and the like.
  • Two different forms can be used in the invoice database to store the basic information and detailed information. If the return result of this tax control invalidation interface is invalid, it is not necessary to delete the invalid invoice related information, which will help the manager to query the invoice related information of each blank invoice that has been invalidated through these two forms, and Check it against the blank invoice inventory to verify that the data in the blank invoice inventory is accurate. If the return result of the tax control invalidation interface is invalidation, the invalidation cannot be considered to be valid, and thus the invoice related information of the current invalidation needs to be deleted from the invoice database.
  • step 412 if the return result received after the tax control invalidation interface is invoked is invalid, the information about the invalidation of the current blank invoice may be fed back to the designated administrator, and the current blank invoice is started. Go back to step 404.
  • the blank invoice inventory stored in the invoice management system and the tax control system may be periodically (e.g., executed once an hour).
  • the blank invoice inventory is synchronized, which is based on the blank invoice inventory in the tax control system.
  • the invoice management system can also find invoice data with deviations between the two blank invoices, and report the inconsistent invoice data to the designated administrator for subsequent maintenance and processing.
  • FIG. 5 is a structural diagram showing an embodiment of a blank processing apparatus for blank invoice in the embodiment of the present application.
  • a blank processing device for blank invoice includes:
  • the rule judging module 501 is configured to determine, after determining the target invoicing terminal that needs to invalidate the blank invoice, whether the blank invoice available on the target invoicing terminal meets the preset invalidation rule of the tax control system;
  • the invalid number segment determining module 502 is configured to: if the determination result of the rule determining module 501 is yes, determine a target invoice number segment to be invalidated in a blank invoice available on the target invoicing terminal;
  • the call and judgment module 503 is sequentially used to sequentially call the tax control invalidation interface provided by the tax control system to the blank invoice in the target invoice number segment until all blank invoices in the target invoice number segment are invalidated. And each time the tax control invalidation interface is invoked, it is determined whether the return result of the tax control invalidation interface is received;
  • the invalid query determination module 504 is configured to: if the judgment result of the sequential call and judgment module 503 is negative, determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system, where the current blank invoice refers to The blank invoice to be invalidated by the tax control invalidation interface is called, and the invoice information table records information about the success or failure of each blank invoice on the tax control system;
  • the inventory update module 505 is configured to: if the judgment result of the invalid query determination module 504 is yes, update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and from the current The next blank invoice of the blank invoice starts, and returns to trigger the sequential call and judgment module 503;
  • the return triggering module 506 is configured to: if the determination result of the invalid query determining module 504 is negative, start from the current blank invoice, and return to trigger the sequential calling and determining module 503.
  • sequential calling and determining module may include:
  • An interface calling unit configured to invoke a tax control invalidation interface provided by the tax control system for the first blank invoice in the target invoice number segment;
  • a result receiving determining unit configured to determine whether a return result of the tax control invalidation interface is received
  • a first return triggering unit configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, starting from the current blank invoice, returning to trigger the interface calling unit;
  • the invalidation information updating unit is configured to update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, if the result of the determination by the result receiving judging unit is yes and the return result is invalid, And determining whether all blank invoices in the target invoice number segment are invalidated;
  • a second return triggering unit configured to: if the judgment result of the invalidation information updating unit is negative, return to trigger the interface calling unit;
  • the invalidation end unit is configured to end the invalidation operation of the target invoice number segment if the determination result of the invalidation information update unit is YES.
  • blank processing device for blank invoice further includes:
  • a first flag information modification module configured to: before the interface calling unit invokes the tax control invalidation interface provided by the tax control system on the first unfilled blank invoice in the target invoice number segment, in the invoice management In the system, the preset flag information corresponding to the first blank invoice that is not invalidated is modified to be abnormal;
  • the information feedback module is configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, returning information about the failure of the current blank invoice to the designated administrator;
  • the second flag information modification module is configured to modify the preset flag information corresponding to the current blank invoice to be normal if the result of the determination by the result receiving determination unit is YES and the return result is invalid.
  • blank processing device for blank invoice further includes:
  • a related information insertion module configured to: before the interface calling unit calls the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment, to the invoice management system Invoicing related information of the first unfilled blank invoice is invalidated in the invoice database;
  • the related information deleting module is configured to delete the invoice related information that the current blank invoice is invalidated from the invoice database if the result of the result receiving determination unit is YES and the return result is invalid.
  • rule determining module may include:
  • a first query unit configured to query a blank invoice currently available on the target invoicing terminal recorded on the tax control system, and record the first invoice;
  • a second query unit configured to query an invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and record the first number segment;
  • a third query unit configured to query an invoice number segment where the first invoice is located in the invoice management system, and record it as a second number segment;
  • a segment determining unit configured to determine whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
  • the determining unit is configured to determine that the blank invoice available on the target invoicing terminal meets the preset invalidation rule of the tax control system if the determination result of the number segment determining unit is YES.
  • FIG. 6 is a schematic diagram of a server according to an embodiment of the present application.
  • the server 6 of this embodiment includes a processor 60, a memory 61, and computer readable instructions 62 stored in the memory 61 and executable on the processor 60, such as performing the blank.
  • the procedure for the invalidation of invoices The processor 60 executes the computer readable instructions 62 to implement the steps in the embodiment of the blank processing method for each blank invoice, such as steps 101 to 108 shown in FIG.
  • the processor 60 when executing the computer readable instructions 62, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 501 through 506 shown in FIG.
  • the computer readable instructions 62 may be partitioned into one or more modules/units, which are stored in a computer readable storage medium, such as the memory 61, and Executed by the processor 60 to complete the application.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Technology Law (AREA)
  • User Interface Of Digital Computer (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Disclosed in the present application is a blank invoice invalidation processing method, used for solving the problem of inconsistencies arising between the inventory of blank invoices stored in an invoice management system and that of a tax control system when a return result of a tax control invalidation interface cannot be obtained. The method provided in the present application comprises: determining a target invoicing terminal, and determining whether an available blank invoice on the target invoicing terminal meets a preset invalidation rule of the tax control system; if yes, determining a target invoice number segment to be invalidated, and calling tax control invalidation interfaces successively for blank invoices in the target invoice number segment until all blank invoices are successfully invalidated; each time a tax control invalidation interface is called, determining whether a return result of the tax control invalidation interface is received; if not received, determining whether a current blank invoice is successfully invalidated; if successfully invalidated, updating the blank invoice inventory of an invoice management system, and continuing the invalidation operation; and if not successfully invalidated, continuing the invalidation operation by starting from the current blank invoice.

Description

空白发票的作废处理方法、可读存储介质、服务器及装置Blank processing method for blank invoice, readable storage medium, server and device
本申请要求于2017年7月24日提交中国专利局、申请号为CN 201710605487.X、发明名称为“一种空白发票的作废处理方法、存储介质和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application is required to be submitted to the China Patent Office on July 24, 2017, and the application number is CN. 201710605487.X, the title of the invention is the priority of the disclosure of the disclosure of the disclosure of the entire disclosure of the disclosure of the disclosure of the disclosure of the entire disclosure of
技术领域Technical field
本申请涉及金融技术领域,尤其涉及一种空白发票的作废处理方法、计算机可读存储介质、服务器及装置。The present application relates to the field of financial technology, and in particular, to a blank processing method for blank invoice processing, a computer readable storage medium, a server, and a device.
背景技术Background technique
目前,空白发票的流转过程为:从税局购买空白发票→报税盘→核心板→开票终端。在空白发票分发给开票终端之后,若因为空白发票对应的纸质发票损毁等原因,需要开票终端的用户主动申请对损毁的空白发票进行作废操作。在这个作废过程中,企业的发票管理系统需要调用专用的税控服务器(例如百望的税控服务器)的作废接口(简称税控作废接口),该税控作废接口通过浏览器插件对外提供的Javascript接口来实现。At present, the flow of blank invoices is: purchase blank invoices from the tax bureau → tax filing tray → core board → billing terminal. After the blank invoice is distributed to the invoicing terminal, if the paper invoice corresponding to the blank invoice is damaged or the like, the user who needs the invoicing terminal actively applies for the blanking of the damaged blank invoice. In this process of invalidation, the enterprise's invoice management system needs to call the invalidation interface of the special tax control server (such as the tax control server of Baiwang) (the tax control invalidation interface), which is provided by the browser plug-in. Javascript interface to achieve.
然而,在作废空白发票过程中,发票管理系统调用该税控作废接口时常常导致浏览器响应缓慢甚至卡死,当出现浏览器卡死、用户关闭浏览器、客户电脑断电等意外情况时容易导致企业本地的发票管理系统无法及时准确地获知税控作废接口的返回结果,从而难以确定作废空白发票的结果是成功还是失败,进而导致发票管理系统存储的空白发票的库存与税控系统中的不一致的问题。However, in the process of invalidating the blank invoice, the invoice management system often calls the browser to respond slowly or even jam when calling the tax control invalidation interface. When the browser is stuck, the user closes the browser, the client computer is powered off, etc. As a result, the local invoice management system cannot obtain the return result of the tax control invalidation interface in time and accurately, so it is difficult to determine whether the result of the blank blank invoice is successful or not, which leads to the inventory of the blank invoice stored in the invoice management system and the tax control system. Inconsistent issues.
技术问题technical problem
本发明实施例提供了一种空白发票的作废处理方法、存储介质和服务器,用于解决无法获知税控作废接口的返回结果时,容易导致发票管理系统存储的空白发票的库存与税控系统中的不一致的问题。The embodiment of the invention provides a blank invoice processing method, a storage medium and a server, which are used in the inventory and tax control system of the blank invoice which is easily stored in the invoice management system when the return result of the tax control invalid interface is not known. Inconsistent issues.
技术解决方案Technical solution
第一方面,提供了一种空白发票的作废处理方法,包括:In the first aspect, a blank blank invoice processing method is provided, including:
在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;After determining the target invoicing terminal that needs to invalidate the blank invoice, determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system;
若所述目标开票终端上可用的空白发票满足税控系统的预设作废规则,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;If the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, the target invoice number segment to be invalidated is determined in the blank invoice available on the target invoicing terminal;
依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking the tax control invalidation interface provided by the tax control system in the blank invoice in the target invoice number segment until all the blank invoices in the target invoice number segment are invalidated, and each time the tax control is invoked When the interface is invalidated, it is determined whether the return result of the tax control invalid interface is received;
若未接收到所述税控作废接口的返回结果,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;If the return result of the tax control invalidation interface is not received, the invoice information table on the tax control system is queried to determine whether the current blank invoice is invalid. The current blank invoice refers to the tax control invalidation interface. a blank invoice to be voided, the invoice information table records information on the success or failure of each blank invoice on the tax control system;
若当前空白发票作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤;If the current blank invoice is invalidated, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the next blank invoice of the current blank invoice is started, and the execution is performed in turn. The blank invoice in the target invoice number segment invokes the step of the tax control invalidation interface provided by the tax control system;
若当前空白发票未作废成功,则从所述当前空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤。If the current blank invoice is not invalidated, starting from the current blank invoice, returning to the step of invoking the tax control invalidation interface provided by the tax control system for the blank invoice in the target invoice number segment.
第二方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述的空白发票的作废处理方法的步骤。In a second aspect, a computer readable storage medium is stored, the computer readable storage medium storing computer readable instructions, the step of implementing the blanking invoice processing method of the blank invoice when executed by a processor .
第三方面,提供了一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述的空白发票的作废处理方法的步骤。In a third aspect, a server is provided, comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the computer readable instructions The steps of the above blank blank invoice processing method.
第四方面,提供了一种空白发票的作废处理装置,包括:In a fourth aspect, a blank processing device for blank invoice is provided, including:
规则判断模块,用于在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;a rule judging module, configured to determine whether a blank invoice available on the target invoicing terminal meets a preset invalidation rule of the tax control system after determining the target invoicing terminal that needs to invalidate the blank invoice;
作废号段确定模块,用于若所述规则判断模块的判断结果为是,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;a discarding segment determining module, configured to determine, in the blank invoice available on the target invoicing terminal, a target invoice number segment to be invalidated if the judgment result of the rule judging module is yes;
依次调用和判断模块,用于依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking and judging a module for sequentially invoking a tax control invalidation interface provided by the tax control system to the blank invoice in the target invoice number segment until all blank invoices in the target invoice number segment are invalidated, and Determining whether the return result of the tax control invalidation interface is received every time the tax control invalidation interface is invoked;
作废查询判断模块,用于若所述依次调用和判断模块的判断结果为否,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;The invalid query judging module is configured to: if the judgment result of the sequentially calling and judging module is no, determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system, wherein the current blank invoice refers to the current invoice Invoking a blank invoice to be voided by the tax control invalidation interface, the invoice information table recording information on the success or failure of each blank invoice on the tax control system;
库存更新模块,用于若所述作废查询判断模块的判断结果为是,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回触发所述依次调用和判断模块;An inventory update module, configured to: if the judgment result of the invalid query determination module is yes, update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and from the current blank invoice The next blank invoice begins, returning to trigger the sequential call and judgment module;
返回触发模块,用于若所述作废查询判断模块的判断结果为否,则从所述当前空白发票开始,返回触发所述依次调用和判断模块。Returning to the triggering module, if the judgment result of the invalidation query judging module is no, starting from the current blank invoice, returning to trigger the sequential calling and judging module.
有益效果Beneficial effect
本申请实施例中,可以查询发票信息表来得知当前空白发票是否作废成功,进而做出相应的处理,既能保证目标发票号段的空白发票均能完成作废,且确保了发票管理系统存储的空白发票库存与该税控系统中的一致。In the embodiment of the present application, the invoice information table can be inquired to know whether the current blank invoice is invalid, and then the corresponding processing is performed, which can ensure that the blank invoice of the target invoice number segment can be completed and invalidated, and the invoice management system is ensured to be stored. Blank invoice inventory is consistent with this tax control system.
附图说明DRAWINGS
图1为本申请实施例中一种空白发票的作废处理方法一个实施例流程图;1 is a flow chart of an embodiment of a blank invoice processing method in an embodiment of the present application;
图2为本申请实施例中一种空白发票的作废处理方法步骤101在一个应用场景下的流程示意图;2 is a schematic flowchart of step 101 of a blank invoice processing method in an application scenario according to an embodiment of the present application;
图3为本申请实施例中一种空白发票的作废处理方法步骤104和105在一个应用场景下的流程示意图;FIG. 3 is a schematic flowchart of steps 104 and 105 of a blank invoice processing method in an application scenario according to an embodiment of the present application;
图4为本申请实施例中一种空白发票的作废处理方法另一个实施例流程图;4 is a flow chart of another embodiment of a method for processing a blank invoice in the embodiment of the present application;
图5为本申请实施例中一种空白发票的作废处理装置一个实施例结构图;FIG. 5 is a structural diagram of an embodiment of a blank invoice processing apparatus according to an embodiment of the present application; FIG.
图6为本申请一实施例提供的服务器的示意图。FIG. 6 is a schematic diagram of a server according to an embodiment of the present application.
本发明的实施方式Embodiments of the invention
请参阅图1,本申请实施例中一种空白发票的作废处理方法一个实施例包括:Referring to FIG. 1 , an embodiment of a method for processing a blank invoice in an embodiment of the present application includes:
101、在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则,若是,则执行步骤103,若否,则执行步骤102;After determining the target invoicing terminal that needs to invalidate the blank invoice, determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, and if yes, executing step 103; if not, executing step 102 ;
本实施例中,用户可以先登录该发票管理系统,登录时,需要验证用户的账号、密码等身份信息,若验证通过,则成功登录该发票管理系统。此时,发票管理系统可以自动加载用户的管理权限下有哪些开票终端。加载后,用户可以根据需要从中选择一台开票终端作为上述的目标开票终端。In this embodiment, the user may log in to the invoice management system first. When logging in, the user needs to verify the user's account number, password, and the like. If the verification is passed, the user is successfully logged into the invoice management system. At this point, the invoice management system can automatically load which invoicing terminals are under the user's administrative authority. After loading, the user can select one invoicing terminal as the target invoicing terminal as needed.
在目标开票终端确定之后,发票管理系统需要判断该目标开票终端上可用的空白发票是否满足税控系统的预设作废规则。当前,税控系统会对空白发票的作废进行严格的限定,通过预设作废规则来实现该限定。比如,上述的预设作废规则可以包括:作废的空白发票必须在该目标开票终端下,也即一台开票终端不能作废另一台开票终端上的空白发票;作废的空白发票必须是该目标开票终端的第一张可用的空白发票;等等。由于开票终端需要严格按照发票顺序进行开票,因此这里说的“第一张可用的空白发票”是指当前开票顺序排行第一的空白发票。比如,开票终端上有1~100号的空白发票,其开票时,需要严格按照1~100的顺序进行开票,即先开1号发票,再开2号发票,以此类推。因此,当1~100号空白发票均未开票时,则1号空白发票为该开票终端的第一张可用的空白发票;当1~10号空白发票已开票时,则11号空白发票为该开票终端的第一张可用的空白发票。After the target billing terminal is determined, the invoice management system needs to determine whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system. At present, the tax control system strictly limits the invalidation of blank invoices, and the limitation is achieved by prescribing the invalidation rules. For example, the above-mentioned default invalidation rule may include: a blank blank invoice must be under the target invoicing terminal, that is, one invoicing terminal cannot invalidate a blank invoice on another invoicing terminal; the blank blank invoice must be the target invoicing The first available blank invoice for the terminal; and so on. Since the invoicing terminal needs to invoice in strict accordance with the invoice order, the “first available blank invoice” referred to here refers to the blank invoice with the current invoicing order. For example, there are blank invoices from 1 to 100 on the invoicing terminal. When invoicing, you need to invoice in strict accordance with the order of 1~100, that is, first open the invoice No. 1, then open the invoice No. 2, and so on. Therefore, when the blank invoices No. 1~100 are not invoiced, the blank invoice No. 1 is the first available blank invoice for the invoicing terminal; when the blank invoice No. 1~10 has been invoiced, the blank invoice No. 11 is The first available blank invoice for the invoicing terminal.
因此,进一步地,如图2所示,上述的步骤101具体可以包括:Therefore, further, as shown in FIG. 2, the foregoing step 101 may specifically include:
201、查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;201. Query the first blank invoice currently available on the target invoicing terminal recorded on the tax control system, and record it as the first invoice;
202、查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;202. Query the invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and record it as the first segment;
203、查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;203. Query the invoice number segment where the first invoice is located in the invoice management system, and record it as the second segment;
204、判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同,若是,则执行步骤205,若否,则执行步骤206;204. Determine whether the first segment includes the second segment, and the first blank invoice in the second segment is the same as the first invoice, and if yes, perform step 205, if no Go to step 206;
205、判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则;205. Determine that a blank invoice available on the target invoicing terminal meets a preset invalidation rule of the tax control system;
206、判定所述目标开票终端上可用的空白发票不满足税控系统的预设作废规则。206. Determine that the blank invoice available on the target invoicing terminal does not meet the preset invalidation rule of the tax control system.
对于上述步骤201,发票管理系统可以调用税控系统的“查询当前未开票号”接口来查询该目标开票终端当前第一张可用的空白发票,具体可以查询这张空白发票的发票代码和/或发票号码的等信息。将这张空白发票记为第一发票C。For the above step 201, the invoice management system may invoke the “Query Current Unbilled Number” interface of the tax control system to query the first blank invoice currently available to the target invoicing terminal, and specifically query the invoice code of the blank invoice and/or Information such as the invoice number. Record this blank invoice as the first invoice C.
对于上述步骤202,发票管理系统可以调用税控系统的“领购信息查询”接口来查询该目标开票终端上所有空白发票的发票号段,并将查询到的发票号段记为第一号段B。For the above step 202, the invoice management system may invoke the "purchase information inquiry" interface of the tax control system to query the invoice number segment of all the blank invoices on the target invoicing terminal, and record the invoice number segment of the inquiry as the first segment. B.
对于上述步骤203,可以理解的是,在发票管理系统中,可以在发票数据库中记录所有可用的空白发票以及这些空白发票所在的发票号段。因此,可以查询在所述发票管理系统中该第一发票所在的发票号段,即为第二号段A。其中第二号段可以理解为一个空白发票的集合,记为集合A[A1,An]。For the above step 203, it can be understood that in the invoice management system, all available blank invoices and the invoice number segments in which the blank invoices are located can be recorded in the invoice database. Therefore, the invoice number segment in which the first invoice is located in the invoice management system can be queried, that is, the second segment A. The second paragraph can be understood as a collection of blank invoices, recorded as the set A[A1, An].
对于步骤204,即判断是否B包含A,且A1与C相同。其中,“B包含A”表示的是:C所在的空白发票号段A均包含在开票终端的所有空白发票号段中,“A1与C相同”表示的是当前第一张未开具(可用)的发票C正好处于A号段的第一位置,这个条件是因为税控系统的强制规定,在调用税控系统进行空白发票作废时,只允许从当前第一张未开具的空白发票开始作废,例如,开票终端有1-100的空白发票,其中1为第一张未开具的空白发票,该开票终端进行开票时,只能从1开始,在1开票完成之后(蓝票或红票),下一次开票则使用空白发票2,如此类推。此时,假设空白发票50对应的纸质发票有损毁,例如被虫子咬坏了,则在开票终端中需要作废50号的空白发票(电子发票),但是由于当前只使用到空白发票2,此时如果调用税控系统的接口作废空白发票50,不会被允许,返回失败或者错误信息。因此,开票终端只能等待2-49号的空白发票使用之后,轮到当前第一张未开具的空白发票为50号时,才能成功调用税控系统的接口作废空白发票50。For step 204, it is determined whether B contains A and A1 is the same as C. Among them, "B contains A" means that the blank invoice number segment A where C is located is included in all the blank invoice number segments of the billing terminal, and "A1 and C are the same" means that the current first unissued (available) The invoice C is in the first position of the A section. This condition is due to the mandatory provisions of the tax control system. When the tax control system is called to invalidate the blank invoice, only the blank unfilled blank invoice is allowed to be invalidated. For example, the invoicing terminal has a blank invoice of 1-100, where 1 is the first unfilled blank invoice, and the invoicing terminal can only start from 1 when invoicing, after 1 invoicing is completed (blue ticket or red ticket), Blank invoice 2 is used for the next invoicing, and so on. At this time, it is assumed that the paper invoice corresponding to the blank invoice 50 is damaged, for example, if it is bitten by the insect, the blank invoice (electronic invoice) of No. 50 needs to be invalidated in the invoicing terminal, but since only the blank invoice 2 is currently used, this If the interface of the tax control system is called to invalidate the blank invoice 50, it will not be allowed, and a failure or error message will be returned. Therefore, the invoicing terminal can only wait for the blank invoice of No. 2-49 to be used, and it is the turn of the current unopened blank invoice to be 50, in order to successfully call the interface of the tax control system to invalidate the blank invoice 50.
由此可知,当步骤204的判断结果为是时,则表示所述目标开票终端上可用的空白发票满足税控系统的预设作废规则,执行步骤205;反之,当步骤204的判断结果为否时,则表示所述目标开票终端上可用的空白发票不满足税控系统的预设作废规则,执行步骤206。It can be seen that when the determination result in step 204 is YES, it indicates that the blank invoice available on the target invoicing terminal satisfies the preset invalidation rule of the tax control system, and step 205 is performed; otherwise, when the determination result in step 204 is no. When it is indicated that the blank invoice available on the target invoicing terminal does not satisfy the default invalidation rule of the tax control system, step 206 is performed.
102、发出关于不满足预设作废规则的提示;102. Issue a prompt regarding not meeting the rule of default invalidation;
可以理解的是,当所述目标开票终端上可用的空白发票不满足税控系统的预设作废规则时,发票管理系统可以提示用户该目标开票终端的发票号段与税控系统的空白发票号段不匹配,无法作废等信息。It can be understood that when the blank invoice available on the target invoicing terminal does not satisfy the preset invalidation rule of the tax control system, the invoice management system can prompt the user to invoice the invoice number segment of the target invoicing terminal and the blank invoice number of the tax control system. The segments do not match and cannot be invalidated.
103、在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;103. Determine a target invoice number segment to be invalidated in a blank invoice available on the target invoicing terminal;
具体地,在判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则之后,发票管理系统可以要求用户输入想要作废的空白发票的份数m,其中m≤n。在用户输入m并点击“确定作废”按钮之后,发票管理系统可以将该目标开票终端上的空白发票集合[A1,Am]确定为上述的待作废的目标发票号段。Specifically, after determining that the blank invoice available on the target invoicing terminal satisfies the default invalidation rule of the tax control system, the invoice management system may require the user to input the number m of blank invoices to be voided, where m≤n. After the user inputs m and clicks the "OK Obsolete" button, the invoice management system can determine the blank invoice set [A1, Am] on the target invoicing terminal as the above-mentioned target invoice number segment to be voided.
104、依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功;104. Invoke the tax control invalidation interface provided by the tax control system to the blank invoice in the target invoice number segment, until all the blank invoices in the target invoice number segment are invalidated;
105、在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果,若是,则按照正常流程步骤执行,若否,则执行步骤106;105, each time the tax control invalidation interface is invoked, it is determined whether the return result of the tax control invalidation interface is received, and if so, the normal flow step is performed, and if not, step 106 is performed;
对于上述步骤104和105,需要说明的是,在调用税控作废接口作废空白发票时,当前,每次调用只能对一张空白发票进行作废处理。也即针对1~m张空白发票,只能一张一张地调用税控作废接口进行作废,且前一张空白发票作废成功后,才能继续作废下一张空白发票。特别地,为了提高作废发票操作的安全性,本实施例中,刚开始调用税控作废接口时,需要用户进行税控密钥的输入或确认。其中,上述税控密钥是预先分配给用户进行税控操作的安全部件,该税控密钥可以具体为一个类似电子密码器的硬件模块,在调用税控作废接口时,需要在该硬件模块上进行合法验证后才能对税控作废接口进行合法调用。另外,若每次调用税控作废接口均需要用户输入税控密钥,则该操作过程会变得非常繁琐且低效,因此本实施例中,对目标发票号段中的空白发票连续调用税控作废接口时,一般情况下只需用户输入一次税控密钥即可。若某次调用税控作废接口时,无法接收到税控作废接口的返回结果,或者接收到返回结果但返回结果为作废失败时,则可以中断税控作废接口的连续调用。连续调用中断后,若要继续对未完成作废的空白发票调用税控作废接口,则需要用户再次输入或确认税控密钥。对此,本实施例不作具体限定。For the above steps 104 and 105, it should be noted that when the tax control invalidation interface is used to invalidate the blank invoice, at present, only one blank invoice can be invalidated for each call. That is to say, for 1~m blank invoices, only the tax control invalidation interface can be called one by one to be invalidated, and the previous blank invoice can be invalidated before the next blank invoice can be invalidated. In particular, in order to improve the security of the invalidated invoice operation, in this embodiment, when the tax control invalidation interface is first called, the user is required to input or confirm the tax control key. Wherein, the above-mentioned tax control key is a security component pre-allocated to the user for tax control operation, and the tax control key may be specifically a hardware module similar to an electronic cipher, and the hardware module is required when calling the tax control invalidation interface. The legal verification of the tax control invalidation interface can be made after legal verification. In addition, if the tax control invalidation interface is required to input the tax control key each time, the operation process becomes very cumbersome and inefficient, so in this embodiment, the tax is continuously called for the blank invoice in the target invoice number segment. When the control is used as the waste interface, in general, the user only needs to input the tax control key once. If a tax control invalidation interface is invoked, the return result of the tax control invalidation interface cannot be received, or the return result is received but the return result is invalid, the continuous call of the tax control invalidation interface can be interrupted. After the continuous call is interrupted, if you want to continue to call the tax control invalid interface for the blank invoice that has not been invalidated, you need to enter or confirm the tax control key again. In this regard, the embodiment is not specifically limited.
可以理解的是,在一般情况下,调用税控作废接口的成功率较高,因此对目标发票号段中的空白发票连续调用税控作废接口时,往往可以通过连续的接口调用把所有空白发票作废成功。但为了避免出现背景技术中提到的情况,本实施例中在每次调用税控作废接口时,发票管理系统判断是否接收到所述税控作废接口的返回结果,如果接收到返回结果,则按照正常流程步骤执行;反之,如果没有接收到返回结果,则执行步骤106。Understandably, in general, the success rate of calling the tax control invalidation interface is higher. Therefore, when the tax control invalidation interface is continuously called for the blank invoice in the target invoice number segment, all blank invoices can often be called through consecutive interfaces. Successfully invalidated. However, in order to avoid the situation mentioned in the background art, in this embodiment, each time the tax control invalidation interface is invoked, the invoice management system determines whether the return result of the tax control invalidation interface is received, and if a return result is received, Follow the normal process steps; otherwise, if no return results are received, then step 106 is performed.
进一步地,如图3所示,上述步骤104和105具体可以包括:Further, as shown in FIG. 3, the foregoing steps 104 and 105 may specifically include:
301、对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;301, invoking a blank invoice in the target invoice number segment that is not invalidated, calling the tax control invalidation interface provided by the tax control system;
302、判断是否接收到所述税控作废接口的返回结果,若是,则执行步骤303,若否,则执行步骤106;302, it is determined whether the return result of the tax control invalidation interface is received, if yes, step 303 is performed, and if not, step 106 is performed;
303、判断接收到的返回结果是作废失败还是作废成功,若返回结果为作废失败,则从所述当前空白发票开始,返回执行步骤301,若返回结果为作废成功,则执行步骤304;303, determining whether the received result is invalid or invalid, if the result of the return is invalid, starting from the current blank invoice, returning to step 301, if the result of the return is invalid, proceed to step 304;
304、将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中;304. Update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system;
305、判断所述目标发票号段中的所有空白发票是否均作废成功,若否,则返回执行步骤301,若是,则执行步骤306;305, determining whether all the blank invoices in the target invoice number segment are invalidated, if not, returning to step 301, and if so, executing step 306;
306、结束对所述目标发票号段的作废操作。306. End the invalidation operation of the target invoice number segment.
对于上述步骤301,上述的“第一张未作废的空白发票”是指目标发票号段中当前轮到作废的空白发票。比如目标发票号段为A1~Am,刚开始连续调用税控作废接口时,上述的“第一张未作废的空白发票”是指空白发票A1;当空白发票A1作废完成后,则紧接着空白发票A2成为该“第一张未作废的空白发票”;以此类推,假设A1~Am中已有k(k<m)张空白发票完成作废,则空白发票A(k+1)成为该“第一张未作废的空白发票”。For the above step 301, the above-mentioned "first unfilled blank invoice" refers to the blank invoice currently invalidated in the target invoice number segment. For example, if the target invoice number segment is A1~Am, the above-mentioned “first unfilled blank invoice” refers to the blank invoice A1 when the tax invoice is invalidated. When the blank invoice A1 is invalidated, it is followed by blank. Invoice A2 becomes the “first unfilled blank invoice”; and so on, assuming that k(k<m) blank invoice has been invalidated in A1~Am, the blank invoice A(k+1) becomes the “ The first unfilled blank invoice."
对于上述步骤302,若发票管理系统接收到所述税控作废接口的返回结果,则执行步骤303,进一步判断该返回结果为作废成功还是作废失败。For the above step 302, if the invoice management system receives the return result of the tax control invalidation interface, step 303 is executed to further determine whether the returned result is invalid or invalid.
对于步骤303,若返回结果为作废失败,即表示当前空白发票未完成作废。其中,当前空白发票是指本次调用所述税控作废接口所要作废的空白发票。为了确保当前空白发票完成作废操作,可以对其再次调用税控作废接口。一般来说,对同一张空白发票调用两次以上的税控作废接口,作废成功率可以高达99.99%。因此基本上可以确保当前空白发票完成作废。另一方面,若返回结果为作废成功,则此时可以执行步骤304更新发票管理系统上的空白发票库存。For step 303, if the returned result is invalid, the current blank invoice is not completed. Among them, the current blank invoice refers to the blank invoice to be invalidated when the tax control invalidation interface is called. In order to ensure that the current blank invoice is voided, you can call the tax control obsolete interface again. In general, more than two tax control invalidation interfaces are called for the same blank invoice, and the success rate can be as high as 99.99%. Therefore, it is basically ensured that the current blank invoice is completed. On the other hand, if the returned result is invalid, then step 304 can be performed to update the blank invoice inventory on the invoice management system.
对于步骤304,当一张空白发票作废后,则表示这张空白发票不再可用,因此需要将其从发票管理系统的空白发票库存中删除,或者在发票管理系统的空白发票库存中将该张空白发票标记为已作废。For step 304, when a blank invoice is invalidated, it indicates that the blank invoice is no longer available, so it needs to be deleted from the blank invoice inventory of the invoice management system, or in the blank invoice inventory of the invoice management system. Blank invoices are marked as obsolete.
对于步骤305,每次成功作废一张空白发票之后,需要判断目标发票号段中的所有空白发票是否均作废成功,若否,则继续执行步骤301对剩下的未作废的空白发票进行作废处理,反之,则结束作废流程,本实施例提供的空白发票的作废处理方法执行完毕。For step 305, after each blank invoice is successfully invalidated, it is determined whether all blank invoices in the target invoice number segment are invalidated. If not, proceed to step 301 to invalidate the remaining blank invoices that are not invalidated. Otherwise, the end of the invalidation process, the blank processing method for blank invoice provided by the embodiment is completed.
106、通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,若是,则执行步骤107,若否,则执行步骤108;106, by querying the invoice information table on the tax control system to determine whether the current blank invoice is invalid, if yes, proceed to step 107, and if not, proceed to step 108;
其中,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息。The current blank invoice refers to a blank invoice to be invalidated when the tax control invalidation interface is invoked, and the invoice information table records information about the success or failure of each blank invoice on the tax control system.
可以理解的是,虽然因各种意外原因可能导致发票管理系统没有接收到税控作废接口的返回结果,但是对于税控系统来说,其发票信息表记录有各个空白发票作废成功与否的信息,因此发票管理系统可以查询该发票信息表得知当前空白发票是否作废成功,如果作废成功,则执行步骤107,反之,如果未作废成功,则执行步骤108。It can be understood that although the invoice management system may not receive the return result of the tax control invalidation interface due to various accident reasons, for the tax control system, the invoice information table records the success or failure of each blank invoice. Therefore, the invoice management system can query the invoice information table to know whether the current blank invoice is invalid. If the invalidation is successful, step 107 is performed; otherwise, if it is not invalid, step 108 is performed.
107、将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行步骤104;107, the current blank invoice has been invalidated information updated to the blank invoice inventory of the invoice management system, and from the next blank invoice of the current blank invoice, return to step 104;
如果当前空白发票作废成功,则可以将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,也即将其从发票管理系统的空白发票库存中删除。然后,从所述当前空白发票的下一张空白发票开始继续执行作废操作。If the current blank invoice is invalidated, the information that the current blank invoice has been invalidated may be updated to the blank invoice inventory of the invoice management system, that is, it is deleted from the blank invoice inventory of the invoice management system. Then, the invalidation operation is continued from the next blank invoice of the current blank invoice.
108、从所述当前空白发票开始,返回执行步骤104。108. Starting from the current blank invoice, return to step 104.
若当前空白发票未作废成功,则需要对该当前空白发票再一次调用税控作废接口,以确保该当前空白发票作废成功。因此,可以从所述当前空白发票开始继续执行作废操作。If the current blank invoice is not invalidated, the tax control invalidation interface needs to be called again for the current blank invoice to ensure that the current blank invoice is invalidated. Therefore, the invalidation operation can be continued from the current blank invoice.
本实施例中,可以查询发票信息表来得知当前空白发票是否作废成功,进而做出相应的处理,既能保证目标发票号段的空白发票均能完成作废,且确保了发票管理系统存储的空白发票库存与该税控系统中的一致。In this embodiment, the invoice information table can be inquired to know whether the current blank invoice is invalid, and then the corresponding processing is performed, which can ensure that the blank invoice of the target invoice number segment can be invalidated, and the blank of the invoice management system is ensured. The invoice inventory is consistent with that in the tax control system.
为便于理解,参阅图4,下面将通过另一个实施例对本申请的一种空白发票的作废处理方法进行更详细的描述:For ease of understanding, referring to FIG. 4, a blank processing method for blank invoices of the present application will be described in more detail below by another embodiment:
401、在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则,若是,则执行步骤403,若否,则执行步骤402;401. After determining the target invoicing terminal that needs to invalidate the blank invoice, determine whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, and if yes, execute step 403, if no, execute step 402. ;
402、发出关于不满足预设作废规则的提示;402. Issue a prompt regarding not meeting the preset invalidation rule;
403、在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;403. Determine a target invoice number segment to be invalidated in a blank invoice available on the target invoicing terminal;
404、在所述发票管理系统中将所述目标发票号段中第一张未作废的空白发票对应的预设标志信息修改为异常;404. Modify, in the invoice management system, the preset flag information corresponding to the first blank invoice in the target invoice number segment to be abnormal;
405、向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;405. Insert, into the invoice database of the invoice management system, the invoice related information that the first unfilled blank invoice is invalidated this time;
406、对所述第一张未作废的空白发票调用所述税控系统提供的税控作废接口;406. Call the tax control invalidation interface provided by the tax control system for the first blank invoice that is not invalidated;
407、判断是否接收到所述税控作废接口的返回结果,若是,则执行步骤410,若否,则执行步骤408;407, it is determined whether the return result of the tax control invalidation interface is received, if yes, step 410 is performed, and if not, step 408 is performed;
408、通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,若是,则执行步骤409,若否,则从所述当前空白发票开始,返回执行步骤404。408. Determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system. If yes, execute step 409. If no, proceed from the current blank invoice to return to step 404.
409、将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行步骤404;409, the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and starting from the next blank invoice of the current blank invoice, returning to step 404;
410、判断接收到的返回结果是作废失败还是作废成功,若返回结果为作废失败,则执行步骤411和412,若返回结果为作废成功,则执行步骤413;Step 410, determining whether the received result is invalid or invalid, if the result of the return is invalid, then steps 411 and 412 are performed, if the result of the return is invalid, step 413 is performed;
411、从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息;411. Delete, from the invoice database, invoice related information that the current blank invoice is invalidated this time;
412、反馈关于所述当前空白发票作废失败的信息至指定管理员,并从所述当前空白发票开始,返回执行步骤404;412, feedback information about the failure of the current blank invoice to the designated administrator, and starting from the current blank invoice, return to step 404;
413、将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中;413. Update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system;
414、将所述当前空白发票对应的预设标志信息修改为正常;414. Modify the preset flag information corresponding to the current blank invoice to be normal;
415、判断所述目标发票号段中的所有空白发票是否均作废成功,若否,则返回执行步骤404,若是,则执行步骤416;415, determining whether all the blank invoices in the target invoice number segment are invalidated, if not, returning to step 404, and if so, executing step 416;
416、结束对所述目标发票号段的作废操作。416. End the invalidation operation of the target invoice number segment.
本实施例中,上述步骤401~403、406~410、413、415和416的内容与上一实施例中描述的内容类似,此处不再赘述。In this embodiment, the contents of the foregoing steps 401 to 403, 406 to 410, 413, 415, and 416 are similar to those described in the previous embodiment, and details are not described herein again.
对于上述步骤404和414,为了便于发票管理系统的管理员维护系统和检查相关异常错误,本实施例还可以在对空白发票执行作废操作的过程中加入相关标识。可以理解的是,通过对当前空白发票的标识信息进行设置,调用税控作废接口前,将标识信息置为“异常”,比如置为0,在调用税控作废接口以后,若本次税控作废接口的返回结果为失败,则该当前空白发票在作废操作上总是存在异常状况的,因此可以反馈相关信息给指定管理员,以提醒指定管理员进行相关维护。当指定管理员进行维护处理时,指定管理员可以通过空白发票的预设标志信息快速定位到发生异常的空白发票位置,从而有助于指定管理员对异常情况的检查和处理。而当本次税控作废接口的返回结果为成功时,则将该预设标志信息修改为正常,比如置为“1”,可以将正常作废的空白发票与作废异常的空白发票区分开来。For the above steps 404 and 414, in order to facilitate the administrator of the invoice management system to maintain the system and check related abnormal errors, the embodiment may also add a relevant identifier in the process of performing the invalidation operation on the blank invoice. It can be understood that, by setting the identification information of the current blank invoice, and calling the tax control to invalidate the interface, the identification information is set to "abnormal", for example, set to 0, after the tax control is invalidated, if the tax control is If the result of the invalid interface is a failure, the current blank invoice always has an abnormal condition in the invalidation operation, so the relevant information can be fed back to the designated administrator to remind the designated administrator to perform related maintenance. When the administrator is designated for maintenance processing, the designated administrator can quickly locate the blank invoice location where the exception occurs by using the preset flag information of the blank invoice, thereby helping the designated administrator to check and handle the abnormal situation. When the return result of the tax control invalidation interface is successful, the preset flag information is modified to be normal, for example, set to "1", and the blank blank invoice which is normally invalidated can be distinguished from the blank invoice which is invalid.
对于上述步骤405和411,发票管理系统还可以向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息。若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。其中,可以理解的是,上述的发票相关信息是指该当前空白发票相关的基础信息和/或详细信息。基础信息可以包括发票的申请人员、申请部门、申请日期、购买人员、购买日期、入库人员、入库时间等信息;详细信息可以包括发票的发票类型、发票面额、发票分数、发票代码等信息。该发票数据库中可以采用两张不同的表格分别存放所述基础信息和详细信息。若本次税控作废接口的返回结果为作废成功,则无需删除本次作废的发票相关信息,这将有利于管理人员通过这两张表格查询各个已作废成功的空白发票的发票相关信息,并将其与空白发票库存进行核对,以核查空白发票库存中的数据是否准确无误。而若本次税控作废接口的返回结果为作废失败,则不能认为本次作废是有效的,因而需要从所述发票数据库中删除所述本次作废的发票相关信息。For the above steps 405 and 411, the invoice management system may further insert the invoice related information of the first unfilled blank invoice into the invoice database of the invoice management system. If the return result of the tax control invalidation interface is received and the return result is invalidation, the invoice related information of the current blank invoice is invalidated from the invoice database. It can be understood that the above-mentioned invoice related information refers to basic information and/or detailed information related to the current blank invoice. The basic information may include the applicant of the invoice, the application department, the application date, the purchaser, the purchase date, the warehousing personnel, the warehousing time and the like; the detailed information may include the invoice type of the invoice, the invoice denomination, the invoice score, the invoice code, and the like. . Two different forms can be used in the invoice database to store the basic information and detailed information. If the return result of this tax control invalidation interface is invalid, it is not necessary to delete the invalid invoice related information, which will help the manager to query the invoice related information of each blank invoice that has been invalidated through these two forms, and Check it against the blank invoice inventory to verify that the data in the blank invoice inventory is accurate. If the return result of the tax control invalidation interface is invalidation, the invalidation cannot be considered to be valid, and thus the invoice related information of the current invalidation needs to be deleted from the invoice database.
对于上述步骤412,如果本次调用税控作废接口后接收到的返回结果为作废失败,则可以反馈关于所述当前空白发票作废失败的信息至指定管理员,并从所述当前空白发票开始,返回执行步骤404。For the above step 412, if the return result received after the tax control invalidation interface is invoked is invalid, the information about the invalidation of the current blank invoice may be fed back to the designated administrator, and the current blank invoice is started. Go back to step 404.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence of the steps in the above embodiments does not mean that the order of execution is performed. The order of execution of each process should be determined by its function and internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
另外,本申请中,为了进一步确保发票管理系统存储的空白发票库存与该税控系统中的一致,还可以定期(如每小时执行一次)将发票管理系统存储的空白发票库存与税控系统中的空白发票库存进行同步,以税控系统中的空白发票库存为准。在同步更新过程中,发票管理系统还可以找出空白发票库存中两者存在偏差的发票数据,将这些存在偏差的发票数据报告给指定的管理员,以便于后续的维护和处理。In addition, in the present application, in order to further ensure that the blank invoice inventory stored by the invoice management system is consistent with the tax control system, the blank invoice inventory stored in the invoice management system and the tax control system may be periodically (e.g., executed once an hour). The blank invoice inventory is synchronized, which is based on the blank invoice inventory in the tax control system. During the synchronous update process, the invoice management system can also find invoice data with deviations between the two blank invoices, and report the inconsistent invoice data to the designated administrator for subsequent maintenance and processing.
上面主要描述了一种空白发票的作废处理方法,下面将对一种空白发票的作废处理装置进行详细描述。The above mainly describes a blank blank invoice processing method, and a blank blank invoice processing device will be described in detail below.
图5示出了本申请实施例中一种空白发票的作废处理装置一个实施例结构图。FIG. 5 is a structural diagram showing an embodiment of a blank processing apparatus for blank invoice in the embodiment of the present application.
本实施例中,一种空白发票的作废处理装置包括:In this embodiment, a blank processing device for blank invoice includes:
规则判断模块501,用于在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;The rule judging module 501 is configured to determine, after determining the target invoicing terminal that needs to invalidate the blank invoice, whether the blank invoice available on the target invoicing terminal meets the preset invalidation rule of the tax control system;
作废号段确定模块502,用于若所述规则判断模块501的判断结果为是,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;The invalid number segment determining module 502 is configured to: if the determination result of the rule determining module 501 is yes, determine a target invoice number segment to be invalidated in a blank invoice available on the target invoicing terminal;
依次调用和判断模块503,用于依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;The call and judgment module 503 is sequentially used to sequentially call the tax control invalidation interface provided by the tax control system to the blank invoice in the target invoice number segment until all blank invoices in the target invoice number segment are invalidated. And each time the tax control invalidation interface is invoked, it is determined whether the return result of the tax control invalidation interface is received;
作废查询判断模块504,用于若所述依次调用和判断模块503的判断结果为否,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;The invalid query determination module 504 is configured to: if the judgment result of the sequential call and judgment module 503 is negative, determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system, where the current blank invoice refers to The blank invoice to be invalidated by the tax control invalidation interface is called, and the invoice information table records information about the success or failure of each blank invoice on the tax control system;
库存更新模块505,用于若所述作废查询判断模块504的判断结果为是,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回触发所述依次调用和判断模块503;The inventory update module 505 is configured to: if the judgment result of the invalid query determination module 504 is yes, update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and from the current The next blank invoice of the blank invoice starts, and returns to trigger the sequential call and judgment module 503;
返回触发模块506,用于若所述作废查询判断模块504的判断结果为否,则从所述当前空白发票开始,返回触发所述依次调用和判断模块503。The return triggering module 506 is configured to: if the determination result of the invalid query determining module 504 is negative, start from the current blank invoice, and return to trigger the sequential calling and determining module 503.
进一步地,所述依次调用和判断模块可以包括:Further, the sequential calling and determining module may include:
接口调用单元,用于对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;An interface calling unit, configured to invoke a tax control invalidation interface provided by the tax control system for the first blank invoice in the target invoice number segment;
结果接收判断单元,用于判断是否接收到所述税控作废接口的返回结果;a result receiving determining unit, configured to determine whether a return result of the tax control invalidation interface is received;
第一返回触发单元,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则从所述当前空白发票开始,返回触发所述接口调用单元;a first return triggering unit, configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, starting from the current blank invoice, returning to trigger the interface calling unit;
作废信息更新单元,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并判断所述目标发票号段中的所有空白发票是否均作废成功;The invalidation information updating unit is configured to update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, if the result of the determination by the result receiving judging unit is yes and the return result is invalid, And determining whether all blank invoices in the target invoice number segment are invalidated;
第二返回触发单元,用于若所述作废信息更新单元的判断结果为否,则返回触发所述接口调用单元;a second return triggering unit, configured to: if the judgment result of the invalidation information updating unit is negative, return to trigger the interface calling unit;
作废结束单元,用于若所述作废信息更新单元的判断结果为是,则结束对所述目标发票号段的作废操作。The invalidation end unit is configured to end the invalidation operation of the target invoice number segment if the determination result of the invalidation information update unit is YES.
进一步地,所述空白发票的作废处理装置还包括:Further, the blank processing device for blank invoice further includes:
第一标志信息修改模块,用于在所述接口调用单元对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,在所述发票管理系统中将所述第一张未作废的空白发票对应的预设标志信息修改为异常;a first flag information modification module, configured to: before the interface calling unit invokes the tax control invalidation interface provided by the tax control system on the first unfilled blank invoice in the target invoice number segment, in the invoice management In the system, the preset flag information corresponding to the first blank invoice that is not invalidated is modified to be abnormal;
信息反馈模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则反馈关于所述当前空白发票作废失败的信息至指定管理员;The information feedback module is configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, returning information about the failure of the current blank invoice to the designated administrator;
第二标志信息修改模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废成功,则将所述当前空白发票对应的预设标志信息修改为正常。The second flag information modification module is configured to modify the preset flag information corresponding to the current blank invoice to be normal if the result of the determination by the result receiving determination unit is YES and the return result is invalid.
进一步地,所述空白发票的作废处理装置还包括:Further, the blank processing device for blank invoice further includes:
相关信息插入模块,用于在所述接口调用单元对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;a related information insertion module, configured to: before the interface calling unit calls the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment, to the invoice management system Invoicing related information of the first unfilled blank invoice is invalidated in the invoice database;
相关信息删除模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。The related information deleting module is configured to delete the invoice related information that the current blank invoice is invalidated from the invoice database if the result of the result receiving determination unit is YES and the return result is invalid.
进一步地,所述规则判断模块可以包括:Further, the rule determining module may include:
第一查询单元,用于查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;a first query unit, configured to query a blank invoice currently available on the target invoicing terminal recorded on the tax control system, and record the first invoice;
第二查询单元,用于查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;a second query unit, configured to query an invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and record the first number segment;
第三查询单元,用于查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;a third query unit, configured to query an invoice number segment where the first invoice is located in the invoice management system, and record it as a second number segment;
号段判断单元,用于判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同;a segment determining unit, configured to determine whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
判定单元,用于若所述号段判断单元的判断结果为是,则判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则。The determining unit is configured to determine that the blank invoice available on the target invoicing terminal meets the preset invalidation rule of the tax control system if the determination result of the number segment determining unit is YES.
图6是本申请一实施例提供的服务器的示意图。如图6所示,该实施例的服务器6包括:处理器60、存储器61以及存储在所述存储器61中并可在所述处理器60上运行的计算机可读指令62,例如执行所述空白发票的作废处理方法的程序。所述处理器60执行所述计算机可读指令62时实现上述各个空白发票的作废处理方法实施例中的步骤,例如图1所示的步骤101至108。或者,所述处理器60执行所述计算机可读指令62时实现上述各装置实施例中各模块/单元的功能,例如图5所示模块501至506的功能。FIG. 6 is a schematic diagram of a server according to an embodiment of the present application. As shown in FIG. 6, the server 6 of this embodiment includes a processor 60, a memory 61, and computer readable instructions 62 stored in the memory 61 and executable on the processor 60, such as performing the blank. The procedure for the invalidation of invoices. The processor 60 executes the computer readable instructions 62 to implement the steps in the embodiment of the blank processing method for each blank invoice, such as steps 101 to 108 shown in FIG. Alternatively, the processor 60, when executing the computer readable instructions 62, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the modules 501 through 506 shown in FIG.
示例性的,所述计算机可读指令62可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在计算机可读存储介质中,例如所述存储器61中,并由所述处理器60执行,以完成本申请。Illustratively, the computer readable instructions 62 may be partitioned into one or more modules/units, which are stored in a computer readable storage medium, such as the memory 61, and Executed by the processor 60 to complete the application.

Claims (20)

  1. 一种空白发票的作废处理方法,其特征在于,包括:A blank processing method for blank invoices, characterized in that it comprises:
    在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;After determining the target invoicing terminal that needs to invalidate the blank invoice, determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system;
    若所述目标开票终端上可用的空白发票满足税控系统的预设作废规则,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;If the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, the target invoice number segment to be invalidated is determined in the blank invoice available on the target invoicing terminal;
    依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking the tax control invalidation interface provided by the tax control system in the blank invoice in the target invoice number segment until all the blank invoices in the target invoice number segment are invalidated, and each time the tax control is invoked When the interface is invalidated, it is determined whether the return result of the tax control invalid interface is received;
    若未接收到所述税控作废接口的返回结果,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;If the return result of the tax control invalidation interface is not received, the invoice information table on the tax control system is queried to determine whether the current blank invoice is invalid. The current blank invoice refers to the tax control invalidation interface. a blank invoice to be voided, the invoice information table records information on the success or failure of each blank invoice on the tax control system;
    若当前空白发票作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤;If the current blank invoice is invalidated, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the next blank invoice of the current blank invoice is started, and the execution is performed in turn. The blank invoice in the target invoice number segment invokes the step of the tax control invalidation interface provided by the tax control system;
    若当前空白发票未作废成功,则从所述当前空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤。If the current blank invoice is not invalidated, starting from the current blank invoice, returning to the step of invoking the tax control invalidation interface provided by the tax control system for the blank invoice in the target invoice number segment.
  2. 根据权利要求1所述的空白发票的作废处理方法,其特征在于,所述依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果的步骤包括:The method for processing a blank invoice according to claim 1, wherein the invoking the tax control invalidation interface provided by the tax control system is sequentially performed on the blank invoice in the target invoice number segment until the target invoice is All blank invoices in the segment are invalidated, and each time the tax control invalidation interface is invoked, the steps of determining whether to receive the return result of the tax control invalidation interface include:
    对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;Invoking the first unopened blank invoice in the target invoice number segment to invoke the tax control invalidation interface provided by the tax control system;
    判断是否接收到所述税控作废接口的返回结果;Determining whether the return result of the tax control invalidation interface is received;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述当前空白发票开始,返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If the return result of the tax control invalidation interface is received and the return result is invalidation failure, returning from the current blank invoice, returning to executing the first unfilled blank invoice in the target invoice number segment The step of calling the tax control interface provided by the tax control system;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并判断所述目标发票号段中的所有空白发票是否均作废成功;If the return result of the tax control invalidation interface is received and the return result is invalid, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the target is determined. Whether all blank invoices in the invoice number segment are invalidated;
    若所述目标发票号段中的所有空白发票未均作废成功,则返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If all the blank invoices in the target invoice number segment are not invalidated, returning to execute the blank unfilled blank invoice in the target invoice number segment, calling the tax control invalidation interface provided by the tax control system A step of;
    若所述目标发票号段中的所有空白发票均作废成功,则结束对所述目标发票号段的作废操作。If all the blank invoices in the target invoice number segment are invalidated, the end of the invalidation of the target invoice number segment is ended.
  3. 根据权利要求2所述的空白发票的作废处理方法,其特征在于,所述空白发票的作废处理方法还包括:The method for processing the blank invoice according to claim 2, wherein the method for processing the blank invoice further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,在所述发票管理系统中将所述第一张未作废的空白发票对应的预设标志信息修改为异常;Before the first unfilled blank invoice in the target invoice number segment calls the tax control invalidation interface provided by the tax control system, the first unfilled blank invoice is corresponding to the invoice management system The preset flag information is modified to be abnormal;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则反馈关于所述当前空白发票作废失败的信息至指定管理员;If the return result of the tax control invalidation interface is received and the return result is invalid, the information about the failure of the current blank invoice is invalidated to the designated administrator;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票对应的预设标志信息修改为正常。If the return result of the tax control invalidation interface is received and the return result is invalid, the preset flag information corresponding to the current blank invoice is modified to be normal.
  4. 根据权利要求3所述的空白发票的作废处理方法,其特征在于,所述空白发票的作废处理方法还包括:The method for processing the blank invoice according to claim 3, wherein the method for processing the blank invoice further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;Inserting the first unvacued into the invoice database of the invoice management system before calling the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment Invoice related information of blank invoice this time;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。If the return result of the tax control invalidation interface is received and the return result is invalidation, the invoice related information of the current blank invoice is invalidated from the invoice database.
  5. 根据权利要求1至4中任一项所述的空白发票的作废处理方法,其特征在于,所述判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则包括:The blank processing method for blank invoice according to any one of claims 1 to 4, wherein the determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system comprises:
    查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;Querying the first blank invoice currently available on the target invoicing terminal recorded on the tax control system, and recording it as the first invoice;
    查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;Querying the invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and recording it as the first segment;
    查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;Querying the invoice number segment where the first invoice is located in the invoice management system, and recording it as the second paragraph;
    判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同;Determining whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
    若所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同,则判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则。Determining a blank invoice available on the target invoicing terminal if the first segment includes the second segment and the first blank invoice available in the second segment is the same as the first invoice Meet the default invalidation rules of the tax control system.
  6. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the following steps:
    在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;After determining the target invoicing terminal that needs to invalidate the blank invoice, determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system;
    若所述目标开票终端上可用的空白发票满足税控系统的预设作废规则,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;If the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, the target invoice number segment to be invalidated is determined in the blank invoice available on the target invoicing terminal;
    依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking the tax control invalidation interface provided by the tax control system in the blank invoice in the target invoice number segment until all the blank invoices in the target invoice number segment are invalidated, and each time the tax control is invoked When the interface is invalidated, it is determined whether the return result of the tax control invalid interface is received;
    若未接收到所述税控作废接口的返回结果,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;If the return result of the tax control invalidation interface is not received, the invoice information table on the tax control system is queried to determine whether the current blank invoice is invalid. The current blank invoice refers to the tax control invalidation interface. a blank invoice to be voided, the invoice information table records information on the success or failure of each blank invoice on the tax control system;
    若当前空白发票作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤;If the current blank invoice is invalidated, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the next blank invoice of the current blank invoice is started, and the execution is performed in turn. The blank invoice in the target invoice number segment invokes the step of the tax control invalidation interface provided by the tax control system;
    若当前空白发票未作废成功,则从所述当前空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤。If the current blank invoice is not invalidated, starting from the current blank invoice, returning to the step of invoking the tax control invalidation interface provided by the tax control system for the blank invoice in the target invoice number segment.
  7. 根据权利要求6所述的计算机可读存储介质,其特征在于,所述依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果的步骤包括:The computer readable storage medium according to claim 6, wherein said invoking a tax control invalidation interface provided by said tax control system in turn for a blank invoice in said target invoice number segment until said target invoice number All blank invoices in the segment are invalidated, and each time the tax control invalidation interface is invoked, the steps of determining whether to receive the return result of the tax control invalidation interface include:
    对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;Invoking the first unopened blank invoice in the target invoice number segment to invoke the tax control invalidation interface provided by the tax control system;
    判断是否接收到所述税控作废接口的返回结果;Determining whether the return result of the tax control invalidation interface is received;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述当前空白发票开始,返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If the return result of the tax control invalidation interface is received and the return result is invalidation failure, returning from the current blank invoice, returning to executing the first unfilled blank invoice in the target invoice number segment The step of calling the tax control interface provided by the tax control system;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并判断所述目标发票号段中的所有空白发票是否均作废成功;If the return result of the tax control invalidation interface is received and the return result is invalid, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the target is determined. Whether all blank invoices in the invoice number segment are invalidated;
    若所述目标发票号段中的所有空白发票未均作废成功,则返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If all the blank invoices in the target invoice number segment are not invalidated, returning to execute the blank unfilled blank invoice in the target invoice number segment, calling the tax control invalidation interface provided by the tax control system A step of;
    若所述目标发票号段中的所有空白发票均作废成功,则结束对所述目标发票号段的作废操作。If all the blank invoices in the target invoice number segment are invalidated, the end of the invalidation of the target invoice number segment is ended.
  8. 根据权利要求7所述的计算机可读存储介质,其特征在于,所述计算机可读存储介质还包括:The computer readable storage medium according to claim 7, wherein the computer readable storage medium further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,在所述发票管理系统中将所述第一张未作废的空白发票对应的预设标志信息修改为异常;Before the first unfilled blank invoice in the target invoice number segment calls the tax control invalidation interface provided by the tax control system, the first unfilled blank invoice is corresponding to the invoice management system The preset flag information is modified to be abnormal;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则反馈关于所述当前空白发票作废失败的信息至指定管理员;If the return result of the tax control invalidation interface is received and the return result is invalid, the information about the failure of the current blank invoice is invalidated to the designated administrator;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票对应的预设标志信息修改为正常。If the return result of the tax control invalidation interface is received and the return result is invalid, the preset flag information corresponding to the current blank invoice is modified to be normal.
  9. 根据权利要求8所述的计算机可读存储介质,其特征在于,所述计算机可读存储介质还包括:The computer readable storage medium according to claim 8, wherein the computer readable storage medium further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;Inserting the first unvacued into the invoice database of the invoice management system before calling the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment Invoice related information of blank invoice this time;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。If the return result of the tax control invalidation interface is received and the return result is invalidation, the invoice related information of the current blank invoice is invalidated from the invoice database.
  10. 根据权利要求6至9中任一项所述的计算机可读存储介质,其特征在于,所述判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则包括:The computer readable storage medium according to any one of claims 6 to 9, wherein the determining whether the blank invoice available on the target invoicing terminal meets a preset invalidation rule of the tax control system comprises:
    查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;Querying the first blank invoice currently available on the target invoicing terminal recorded on the tax control system, and recording it as the first invoice;
    查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;Querying the invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and recording it as the first segment;
    查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;Querying the invoice number segment where the first invoice is located in the invoice management system, and recording it as the second paragraph;
    判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同;Determining whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
    若所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同,则判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则。Determining a blank invoice available on the target invoicing terminal if the first segment includes the second segment and the first blank invoice available in the second segment is the same as the first invoice Meet the default invalidation rules of the tax control system.
  11. 一种服务器,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:A server comprising a memory, a processor, and computer readable instructions stored in the memory and operative on the processor, wherein the processor implements the following steps when the computer readable instructions are executed :
    在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;After determining the target invoicing terminal that needs to invalidate the blank invoice, determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system;
    若所述目标开票终端上可用的空白发票满足税控系统的预设作废规则,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;If the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system, the target invoice number segment to be invalidated is determined in the blank invoice available on the target invoicing terminal;
    依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking the tax control invalidation interface provided by the tax control system in the blank invoice in the target invoice number segment until all the blank invoices in the target invoice number segment are invalidated, and each time the tax control is invoked When the interface is invalidated, it is determined whether the return result of the tax control invalid interface is received;
    若未接收到所述税控作废接口的返回结果,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;If the return result of the tax control invalidation interface is not received, the invoice information table on the tax control system is queried to determine whether the current blank invoice is invalid. The current blank invoice refers to the tax control invalidation interface. a blank invoice to be voided, the invoice information table records information on the success or failure of each blank invoice on the tax control system;
    若当前空白发票作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤;If the current blank invoice is invalidated, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the next blank invoice of the current blank invoice is started, and the execution is performed in turn. The blank invoice in the target invoice number segment invokes the step of the tax control invalidation interface provided by the tax control system;
    若当前空白发票未作废成功,则从所述当前空白发票开始,返回执行依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口的步骤。If the current blank invoice is not invalidated, starting from the current blank invoice, returning to the step of invoking the tax control invalidation interface provided by the tax control system for the blank invoice in the target invoice number segment.
  12. 根据权利要求11所述的服务器,其特征在于,所述依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果的步骤包括:The server according to claim 11, wherein said invoking a tax control invalidation interface provided by said tax control system for a blank invoice in said target invoice number segment until all of said target invoice number segments The blank invoices are all invalidated, and each time the tax control invalidation interface is invoked, the steps of determining whether to receive the return result of the tax control invalidation interface include:
    对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;Invoking the first unopened blank invoice in the target invoice number segment to invoke the tax control invalidation interface provided by the tax control system;
    判断是否接收到所述税控作废接口的返回结果;Determining whether the return result of the tax control invalidation interface is received;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述当前空白发票开始,返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If the return result of the tax control invalidation interface is received and the return result is invalidation failure, returning from the current blank invoice, returning to executing the first unfilled blank invoice in the target invoice number segment The step of calling the tax control interface provided by the tax control system;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并判断所述目标发票号段中的所有空白发票是否均作废成功;If the return result of the tax control invalidation interface is received and the return result is invalid, the information that the current blank invoice has been invalidated is updated to the blank invoice inventory of the invoice management system, and the target is determined. Whether all blank invoices in the invoice number segment are invalidated;
    若所述目标发票号段中的所有空白发票未均作废成功,则返回执行所述对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口的步骤;If all the blank invoices in the target invoice number segment are not invalidated, returning to execute the blank unfilled blank invoice in the target invoice number segment, calling the tax control invalidation interface provided by the tax control system A step of;
    若所述目标发票号段中的所有空白发票均作废成功,则结束对所述目标发票号段的作废操作;If all the blank invoices in the target invoice number segment are invalidated, the end of the invalidation of the target invoice number segment is ended;
  13. 根据权利要求12所述的服务器,其特征在于,所述处理器执行所述计算机可读指令时还包括:The server according to claim 12, wherein when the processor executes the computer readable instructions, the method further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,在所述发票管理系统中将所述第一张未作废的空白发票对应的预设标志信息修改为异常;Before the first unfilled blank invoice in the target invoice number segment calls the tax control invalidation interface provided by the tax control system, the first unfilled blank invoice is corresponding to the invoice management system The preset flag information is modified to be abnormal;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则反馈关于所述当前空白发票作废失败的信息至指定管理员;If the return result of the tax control invalidation interface is received and the return result is invalid, the information about the failure of the current blank invoice is invalidated to the designated administrator;
    若接收到所述税控作废接口的返回结果且所述返回结果为作废成功,则将所述当前空白发票对应的预设标志信息修改为正常。If the return result of the tax control invalidation interface is received and the return result is invalid, the preset flag information corresponding to the current blank invoice is modified to be normal.
  14. 根据权利要求13所述的服务器,其特征在于,所述处理器执行所述计算机可读指令时还包括:The server according to claim 13, wherein the processor further comprises:
    在对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;Inserting the first unvacued into the invoice database of the invoice management system before calling the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment Invoice related information of blank invoice this time;
    在所述判断是否接收到所述税控作废接口的返回结果的步骤之后,还包括:After the step of determining whether the return result of the tax control invalidation interface is received, the method further includes:
    若接收到所述税控作废接口的返回结果且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。If the return result of the tax control invalidation interface is received and the return result is invalidation, the invoice related information of the current blank invoice is invalidated from the invoice database.
  15. 根据权利要求11至14中任一项所述的服务器,其特征在于,所述判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则包括:The server according to any one of claims 11 to 14, wherein the determining whether the blank invoice available on the target invoicing terminal meets the default invalidation rule of the tax control system comprises:
    查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;Querying the first blank invoice currently available on the target invoicing terminal recorded on the tax control system, and recording it as the first invoice;
    查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;Querying the invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and recording it as the first segment;
    查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;Querying the invoice number segment where the first invoice is located in the invoice management system, and recording it as the second paragraph;
    判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同;Determining whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
    若所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同,则判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则。Determining a blank invoice available on the target invoicing terminal if the first segment includes the second segment and the first blank invoice available in the second segment is the same as the first invoice Meet the default invalidation rules of the tax control system.
  16. 一种空白发票的作废处理装置,其特征在于,包括:A blank processing device for blanking invoices, comprising:
    规则判断模块,用于在确定需作废空白发票的目标开票终端之后,判断所述目标开票终端上可用的空白发票是否满足税控系统的预设作废规则;a rule judging module, configured to determine whether a blank invoice available on the target invoicing terminal meets a preset invalidation rule of the tax control system after determining the target invoicing terminal that needs to invalidate the blank invoice;
    作废号段确定模块,用于若所述规则判断模块的判断结果为是,在所述目标开票终端上可用的空白发票中确定待作废的目标发票号段;a discarding segment determining module, configured to determine, in the blank invoice available on the target invoicing terminal, a target invoice number segment to be invalidated if the judgment result of the rule judging module is yes;
    依次调用和判断模块,用于依次对所述目标发票号段中的空白发票调用所述税控系统提供的税控作废接口,直到所述目标发票号段中的所有空白发票均作废成功,并在每次调用所述税控作废接口时,判断是否接收到所述税控作废接口的返回结果;Invoking and judging a module for sequentially invoking a tax control invalidation interface provided by the tax control system to the blank invoice in the target invoice number segment until all blank invoices in the target invoice number segment are invalidated, and Determining whether the return result of the tax control invalidation interface is received every time the tax control invalidation interface is invoked;
    作废查询判断模块,用于若所述依次调用和判断模块的判断结果为否,则通过查询所述税控系统上发票信息表判断当前空白发票是否作废成功,所述当前空白发票是指本次调用所述税控作废接口所要作废的空白发票,所述发票信息表记录有税控系统上关于各个空白发票作废成功与否的信息;The invalid query judging module is configured to: if the judgment result of the sequentially calling and judging module is no, determine whether the current blank invoice is invalid by querying the invoice information table on the tax control system, wherein the current blank invoice refers to the current invoice Invoking a blank invoice to be voided by the tax control invalidation interface, the invoice information table recording information on the success or failure of each blank invoice on the tax control system;
    库存更新模块,用于若所述作废查询判断模块的判断结果为是,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并从所述当前空白发票的下一张空白发票开始,返回触发所述依次调用和判断模块;An inventory update module, configured to: if the judgment result of the invalid query determination module is yes, update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, and from the current blank invoice The next blank invoice begins, returning to trigger the sequential call and judgment module;
    返回触发模块,用于若所述作废查询判断模块的判断结果为否,则从所述当前空白发票开始,返回触发所述依次调用和判断模块。Returning to the triggering module, if the judgment result of the invalidation query judging module is no, starting from the current blank invoice, returning to trigger the sequential calling and judging module.
  17. 根据权利要求16所述的空白发票的作废处理装置,其特征在于,所述依次调用和判断模块包括:The apparatus for processing a blank invoice according to claim 16, wherein the sequential calling and determining module comprises:
    接口调用单元,用于对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口;An interface calling unit, configured to invoke a tax control invalidation interface provided by the tax control system for the first blank invoice in the target invoice number segment;
    结果接收判断单元,用于判断是否接收到所述税控作废接口的返回结果;a result receiving determining unit, configured to determine whether a return result of the tax control invalidation interface is received;
    第一返回触发单元,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则从所述当前空白发票开始,返回触发所述接口调用单元;a first return triggering unit, configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, starting from the current blank invoice, returning to trigger the interface calling unit;
    作废信息更新单元,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废成功,则将所述当前空白发票已作废的信息更新至所述发票管理系统的空白发票库存中,并判断所述目标发票号段中的所有空白发票是否均作废成功;The invalidation information updating unit is configured to update the information that the current blank invoice has been invalidated to the blank invoice inventory of the invoice management system, if the result of the determination by the result receiving judging unit is yes and the return result is invalid, And determining whether all blank invoices in the target invoice number segment are invalidated;
    第二返回触发单元,用于若所述作废信息更新单元的判断结果为否,则返回触发所述接口调用单元;a second return triggering unit, configured to: if the judgment result of the invalidation information updating unit is negative, return to trigger the interface calling unit;
    作废结束单元,用于若所述作废信息更新单元的判断结果为是,则结束对所述目标发票号段的作废操作。The invalidation end unit is configured to end the invalidation operation of the target invoice number segment if the determination result of the invalidation information update unit is YES.
  18. 根据权利要求17所述的空白发票的作废处理装置,其特征在于,还包括:The apparatus for processing a blank invoice according to claim 17, further comprising:
    第一标志信息修改模块,用于在所述接口调用单元对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,在所述发票管理系统中将所述第一张未作废的空白发票对应的预设标志信息修改为异常;a first flag information modification module, configured to: before the interface calling unit invokes the tax control invalidation interface provided by the tax control system on the first unfilled blank invoice in the target invoice number segment, in the invoice management In the system, the preset flag information corresponding to the first blank invoice that is not invalidated is modified to be abnormal;
    信息反馈模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则反馈关于所述当前空白发票作废失败的信息至指定管理员;The information feedback module is configured to: if the result of the determination by the result receiving determining unit is YES and the returning result is invalid, returning information about the failure of the current blank invoice to the designated administrator;
    第二标志信息修改模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废成功,则将所述当前空白发票对应的预设标志信息修改为正常。The second flag information modification module is configured to modify the preset flag information corresponding to the current blank invoice to be normal if the result of the determination by the result receiving determination unit is YES and the return result is invalid.
  19. 根据权利要求18所述的空白发票的作废处理装置,其特征在于,还包括:The apparatus for processing a blank invoice according to claim 18, further comprising:
    相关信息插入模块,用于在所述接口调用单元对所述目标发票号段中第一张未作废的空白发票调用所述税控系统提供的税控作废接口之前,向所述发票管理系统的发票数据库中插入所述第一张未作废的空白发票本次作废的发票相关信息;a related information insertion module, configured to: before the interface calling unit calls the tax control invalidation interface provided by the tax control system for the first unfilled blank invoice in the target invoice number segment, to the invoice management system Invoicing related information of the first unfilled blank invoice is invalidated in the invoice database;
    相关信息删除模块,用于若所述结果接收判断单元的判断结果为是且所述返回结果为作废失败,则从所述发票数据库中删除所述当前空白发票本次作废的发票相关信息。The related information deleting module is configured to delete the invoice related information that the current blank invoice is invalidated from the invoice database if the result of the result receiving determination unit is YES and the return result is invalid.
  20. 根据权利要求16至19中任一项所述的空白发票的作废处理装置,其特征在于,所述规则判断模块包括:The apparatus for processing a blank invoice according to any one of claims 16 to 19, wherein the rule judging module comprises:
    第一查询单元,用于查询所述税控系统上记录的所述目标开票终端上当前第一张可用的空白发票,记为第一发票;a first query unit, configured to query a blank invoice currently available on the target invoicing terminal recorded on the tax control system, and record the first invoice;
    第二查询单元,用于查询所述税控系统上记录的所述目标开票终端上所有空白发票的发票号段,记为第一号段;a second query unit, configured to query an invoice number segment of all blank invoices on the target invoicing terminal recorded on the tax control system, and record the first number segment;
    第三查询单元,用于查询在所述发票管理系统中所述第一发票所在的发票号段,记为第二号段;a third query unit, configured to query an invoice number segment where the first invoice is located in the invoice management system, and record it as a second number segment;
    号段判断单元,用于判断是否所述第一号段包含所述第二号段,且所述第二号段中第一张可用的空白发票与所述第一发票相同;a segment determining unit, configured to determine whether the first segment includes the second segment, and the first blank invoice available in the second segment is the same as the first invoice;
    判定单元,用于若所述号段判断单元的判断结果为是,则判定所述目标开票终端上可用的空白发票满足税控系统的预设作废规则。The determining unit is configured to determine that the blank invoice available on the target invoicing terminal meets the preset invalidation rule of the tax control system if the determination result of the number segment determining unit is YES.
PCT/CN2018/077245 2017-07-24 2018-02-26 Blank invoice invalidation processing method, readable storage medium, server, and device WO2019019631A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710605487.XA CN107784530A (en) 2017-07-24 2017-07-24 Calcellation processing method, storage medium and the server of a kind of blank invoice
CN201710605487.X 2017-07-24

Publications (1)

Publication Number Publication Date
WO2019019631A1 true WO2019019631A1 (en) 2019-01-31

Family

ID=61437499

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/077245 WO2019019631A1 (en) 2017-07-24 2018-02-26 Blank invoice invalidation processing method, readable storage medium, server, and device

Country Status (2)

Country Link
CN (1) CN107784530A (en)
WO (1) WO2019019631A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110599265B (en) * 2019-05-05 2021-05-14 腾讯科技(深圳)有限公司 Electronic bill processing method, electronic bill processing device, computer equipment and computer storage medium
CN114118881B (en) * 2022-01-26 2022-05-06 中国民航信息网络股份有限公司 Method, device, storage medium and equipment for processing civil aviation blank ticket

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320444A (en) * 2007-06-07 2008-12-10 华为技术有限公司 Method, system and device for implementing electronic bill
CN106530024A (en) * 2016-11-09 2017-03-22 百望金赋科技有限公司 Invoicing method, invoicing system and tax control server thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106920135A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 A kind of realization method and system of POS billing servers off-line trading
CN106530022A (en) * 2016-11-09 2017-03-22 百望金赋科技有限公司 Tax control core board, use method and tax control server
CN106504044A (en) * 2016-11-09 2017-03-15 百望金赋科技有限公司 A kind of billing method and system
CN106779988A (en) * 2016-11-15 2017-05-31 百望金赋科技有限公司 A kind of tax control server management system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101320444A (en) * 2007-06-07 2008-12-10 华为技术有限公司 Method, system and device for implementing electronic bill
CN106530024A (en) * 2016-11-09 2017-03-22 百望金赋科技有限公司 Invoicing method, invoicing system and tax control server thereof

Also Published As

Publication number Publication date
CN107784530A (en) 2018-03-09

Similar Documents

Publication Publication Date Title
US10158479B2 (en) Systems and methods for generating, uploading and executing code blocks within distributed network nodes
US11321681B2 (en) Systems and methods for issuing and tracking digital tokens within distributed network nodes
EP3568824B1 (en) Systems and methods for issuing and tracking digital tokens within distributed network nodes
US10146947B1 (en) Systems and methods for generating and maintaining immutable digital meeting records within distributed network nodes
US11764946B2 (en) Audit chain for private blockchain
US11240028B2 (en) Trust service engine for external blockchain verification
US8898774B2 (en) Method and system for scanning a computer system for sensitive content
WO2019136812A1 (en) Electronic device, data calling log generation and query method, and storage medium
US20200145221A1 (en) Atomic transactional processing
WO2019019631A1 (en) Blank invoice invalidation processing method, readable storage medium, server, and device
WO2022206439A1 (en) Method and apparatus for providing cross-chain message
WO2019019701A1 (en) Processing method for blank invoices recycling, storage medium and server
WO2019019712A1 (en) Blank invoice distribution processing method, storage medium and server
US11949774B2 (en) Securing hash chains via hybrid consensus
AU2022215281B2 (en) Securing hash chains via hybrid consensus
US11818259B2 (en) Query and projection processing for events
EP4002180A1 (en) Secure multi distributed ledger system
EP4136539A1 (en) Storing and processing longitudinal data sets

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18838674

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18838674

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 10/08/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18838674

Country of ref document: EP

Kind code of ref document: A1