Invoice verification methods, devices, readable media and electronic equipment

By verifying the invoice data with special characters, tax numbers, data item length, data item format, notes, amount error, tax amount error and overall error, the traditional invoice data verification is difficult to meet the compliance requirements under complex conditions. , realizes centralized verification of multiple ticket types and improves portability of verification.

CN112581196BActive Publication Date: 2024-11-08AISINO CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011446042.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-08
Publication Date
2024-11-08
Estimated Expiration
2040-12-08

AI Technical Summary

Technical Problem

Traditional invoice data verification is difficult to meet the compliance verification requirements of invoicing data under complex conditions, and the verification is not centralized enough and has poor portability.

Method used

Provide a common invoice verification method for multiple types of tickets. By calling preset special character library, tax number rules, data item length rules, data item format rules and remark verification rules, the overall verification of invoices are carried out, including Verification of special characters, tax number, data item length, data item format, notes, amount error, tax amount error and overall invoice error.

Benefits of technology

It realizes overall verification of invoices, meets the requirements for invoice data verification under complex conditions, improves the centralization and portability of verification, and can call the same template for each ticket type to complete compliance verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112581196B_ABST
    Figure CN112581196B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an invoice verification method, device, readable medium and electronic device. The technical solution provided by the present disclosure includes: verifying special characters, tax numbers, data item lengths, data item formats, remarks, amount errors, tax amount errors and overall errors of invoices to be issued, completing the overall verification of invoices to be issued, and meeting the requirements for invoice data verification under current complex conditions. In addition, the present solution can perform compliance verification for each type of invoice, which is to verify each type of invoice at each step of the verification, that is, the present solution calls the same template to complete compliance verification for each type of invoice. Therefore, compared with the traditional invoice data verification, which is to call different verification templates or different interfaces to complete compliance verification according to different types of invoices when the invoice is issued, the verification of the present solution is more centralized and more portable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electronic invoices, and in particular, to an invoice verification method, device, readable medium and electronic device. Background Art

[0002] With the development of society, the significance and role of invoices in my country's social and economic activities have become increasingly obvious, and they have attracted more and more attention from taxpayers, and the number of invoices has increased exponentially. At the same time, the face data of the invoice is extremely important. Only when the invoice data format complies with the tax policy rules can it be considered a valid invoice for reimbursement and accounting. Therefore, it is particularly important to ensure the compliance verification of invoice data efficiently and quickly in the case of a large number of invoices and different invoice scenarios. Traditional invoice data verification lacks knowledge of these aspects and is difficult to meet the requirements of invoice data verification under current complex conditions. In addition, traditional invoice data verification is to call different verification templates or interfaces according to different invoice types when issuing invoices to complete compliance verification, resulting in insufficient verification concentration and poor portability. Summary of the invention

[0003] The purpose of the present invention is to provide an invoice verification method, device, readable medium and electronic device for overall verification of invoice data that are common to multiple invoice types, so as to meet the requirements for invoice data verification under current complex conditions.

[0004] In order to achieve the above object, the present disclosure provides a method for invoice verification, the method comprising:

[0005] According to the ticket type to be invoiced, a preset special character library corresponding to the ticket type is called to verify the mandatory items of the invoice to be issued;

[0006] According to the length of the tax number of the invoice to be issued, calling a preset tax number rule corresponding to the length to verify the tax number of the invoice to be issued;

[0007] According to the ticket type to be invoiced, a preset data item length rule corresponding to the ticket type is called to verify the length of the data item to be invoiced;

[0008] According to the ticket type to be invoiced, the format of the data item to be invoiced is verified by calling the preset data item format rule corresponding to the ticket type;

[0009] According to the ticket type of the invoice to be issued, the pre-installed note verification rule corresponding to the ticket type is called to verify the notes of the invoice to be issued;

[0010] The invoice to be issued is checked for amount error, tax error and overall invoice error.

[0011] Optionally, the calling of a preset special character library corresponding to the ticket type to verify the mandatory items of the invoice to be issued according to the ticket type to be issued includes:

[0012] When it is determined that the type of the invoice to be issued is a special invoice, the first special character library is called to verify the mandatory items of the invoice to be issued. When a special character in the first special character library appears in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The first special character library includes line breaks;

[0013] When it is determined that the type of the invoice to be issued is a non-special invoice, the second special character library is called to verify the mandatory items of the invoice to be issued. When special characters in the second special character library appear in the mandatory items, the verification shows that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The second special character library does not include line breaks.

[0014] Optionally, the calling of a preset tax number rule corresponding to the length of the tax number of the to-be-issued invoice to verify the tax number of the to-be-issued invoice comprises:

[0015] When it is determined that the length of the tax number of the invoice to be issued is 6 to 15 digits, it is determined whether the tax number of the invoice to be issued satisfies the first tax number rule. When the tax number of the invoice to be issued does not satisfy the first tax number rule, it is verified that the invoice to be issued is not compliant. The first tax number rule is any combination of digits and letters from 6 to 15 digits.

[0016] When it is determined that the length of the tax number of the invoice to be issued is 16 to 18 digits, it is determined whether the tax number of the invoice to be issued satisfies the second tax number rule, the third tax number rule and the fourth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the second tax number rule, the third tax number rule and the fourth tax number rule, it is verified that the invoice to be issued is non-compliant. The second tax number rule is 6 digits plus any combination of digits and letters up to 12 digits, the third tax number rule is 1 letter plus 6 digits plus any combination of digits and letters up to 11 digits, and the fourth tax number rule is 2 letters plus 6 digits plus any combination of digits and letters up to 10 digits.

[0017] When it is determined that the length of the tax number of the invoice to be issued is 19 to 20 digits, it is determined whether the tax number of the invoice to be issued satisfies the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule, it is verified that the invoice to be issued is non-compliant. The fifth tax number rule is a 15-digit ID number plus a maximum of 5 arbitrary digits and letters combination, the sixth tax number rule is an 18-digit ID number plus a maximum of 2 arbitrary digits and letters combination, the seventh tax number rule is 1 letter plus 15-digit ID number plus a maximum of 4 arbitrary digits and letters combination, the eighth tax number rule is 1 letter plus 18-digit ID number plus a maximum of 1 arbitrary digit and letters combination, and the ninth tax number rule is 6 digits plus a maximum of 14 arbitrary digits and non-OISZ letter combination.

[0018] Optionally, the checking the length of the data item to be invoiced by calling a preset data item length rule corresponding to the ticket type according to the ticket type to be invoiced includes:

[0019] When it is determined that the invoice type to be issued is a special invoice, it is determined whether the purchaser's tax number of the invoice to be issued is empty. When the purchaser's tax number of the invoice to be issued is empty, it is verified that the invoice to be issued is not compliant;

[0020] When determining that the type of the invoice to be issued is a roll invoice, determine whether the length of the commodity name to be invoiced is 40 bytes. When the length of the commodity name to be invoiced is not 40 bytes, verify that the invoice to be issued is non-compliant.

[0021] Optionally, the checking the format of the data item of the to-be-invoiced invoice by calling a preset data item format rule corresponding to the ticket type according to the ticket type to be invoiced comprises:

[0022] When it is determined that the invoice type to be issued is a blue-letter invoice, it is determined whether the data item of the invoice to be issued satisfies the first data item format rule. When the data item of the invoice to be issued does not satisfy the first data item format rule, it is verified that the invoice to be issued is not compliant. The first data item format rule includes: the total amount is greater than 0; and, for a commodity line with a negative amount, the amount of the previous commodity line is positive;

[0023] When determining that the type of the invoice to be issued is a red-ink invoice, determine whether the data items of the invoice to be issued meet the second data item format rules. When the data items of the invoice to be issued do not meet the second data item format rules, verify that the invoice to be issued is non-compliant. The second data item format rules include: the total amount is less than 0, which means it is an invoice that has not been offset against red ink, and it is a valid invoice.

[0024] Optionally, calling a pre-installed note verification rule corresponding to the ticket type to verify the notes of the invoice to be issued according to the ticket type to be invoiced includes:

[0025] When it is determined that the type of the invoice to be issued is a special invoice with red ink, it is determined whether the remarks of the invoice to be issued include the first content. When the remarks of the invoice to be issued do not include the first content, it is verified that the invoice to be issued is not compliant, and the first content is: the number of the information form for issuing a special invoice with red ink;

[0026] When it is determined that the type of the invoice to be issued is an ordinary red-ink invoice, it is determined whether the remarks of the invoice to be issued include a second content. When the remarks of the invoice to be issued do not include the second content, it is verified that the invoice to be issued is not compliant, and the second content is: a corresponding positive invoice code and a corresponding positive invoice number;

[0027] When it is determined that the type of the invoice to be issued is an agency invoice, it is determined whether the remarks of the invoice to be issued include the third content. When the remarks of the invoice to be issued do not include the third content, it is verified that the invoice to be issued is not compliant. The third content is: the remarks of the agency invoice indicate the agency enterprise tax number and agency enterprise name, and the actual filling is;

[0028] When it is determined that the type of the invoice to be issued is a blue invoice for differential taxation, it is determined whether the remarks of the invoice to be issued include the fourth content. When the remarks of the invoice to be issued do not include the fourth content, it is verified that the invoice to be issued is not compliant, and the fourth content is: the blue invoice for differential taxation must be indicated at the beginning of the remarks;

[0029] When determining that the type of the invoice to be issued is a red invoice for differential taxation, determine whether the remarks of the invoice to be issued include the fifth content. When the remarks of the invoice to be issued do not include the fifth content, verification shows that the invoice to be issued is non-compliant, and the fifth content is: the red invoice for differential taxation must be indicated at the beginning of the remarks.

[0030] Optionally, the method further comprises:

[0031] When the invoice to be issued is in a tax-inclusive mode, the invoice to be issued is converted into a tax-exclusive mode according to a preset price-tax separation algorithm.

[0032] The present disclosure also provides a billing verification device, comprising:

[0033] A special character verification module is used to call a preset special character library corresponding to the ticket type to verify the mandatory items of the invoice to be issued according to the ticket type to be issued;

[0034] A tax number verification module, used to verify the tax number of the invoice to be issued by calling a preset tax number rule corresponding to the length of the tax number to be issued;

[0035] A data item length verification module, used to verify the length of the data item of the to-be-invoiced invoice by calling a preset data item length rule corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type;

[0036] A data item format verification module, used to verify the format of the data item of the to-be-invoiced invoice by calling the preset data item format rules corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type;

[0037] A remark verification module, used for verifying the remark of the invoice to be issued by calling the pre-installed remark verification rule corresponding to the invoice type according to the invoice type to be issued;

[0038] The error checking module is used to perform amount error checking, tax amount error checking and invoice overall error checking on the invoice to be issued.

[0039] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when the program is executed by a processor.

[0040] The present disclosure also provides an electronic device, characterized in that it includes:

[0041] a memory having a computer program stored thereon;

[0042] A processor is used to execute the computer program in the memory to implement the steps of the above method.

[0043] The technical solution provided by the present disclosure includes: verifying the special characters, tax number, data item length, data item format, remarks, amount error, tax amount error, and overall error of the invoice to be issued, completing the overall verification of the invoice to be issued, and meeting the invoice data verification requirements under the current complex conditions. In addition, the solution can perform compliance verification for each type of invoice, which is to verify the type of invoice at each step of the verification. That is, the solution calls the same template (invoice verification template) for each type of invoice to complete the compliance verification. Therefore, compared with the traditional invoice data verification, which is to call different verification templates (for example, VAT general invoice template, VAT special invoice template) or different interfaces according to different types of invoices when the invoice is issued, the verification of this solution is more centralized and more portable.

[0044] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0046] Figure 1 It is a flow chart of an invoice verification method provided by an embodiment of the present disclosure.

[0047] Figure 2 It is a block diagram of a billing verification device provided by an embodiment of the present disclosure.

[0048] Figure 3 It is a block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0049] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0050] The embodiment of the present disclosure provides a method for verifying invoice issuance. Figure 1 FIG. 1 shows a flow chart of the invoice verification method. Figure 1 As shown, the method includes:

[0051] Step S11, according to the ticket type to be invoiced, a preset special character library corresponding to the ticket type is called to verify the required items of the invoice to be issued.

[0052] Among them, at least one preset special character library is pre-stored, and each preset special character library corresponds to at least one type of ticket. According to the tax policy requirements on special characters that are not allowed to appear in the mandatory items of each type of ticket, each type of ticket is classified, and each category corresponds to the same preset special character library. Through this step, the preset special character library corresponding to each type of ticket is called for each type of ticket to perform special character verification on the mandatory items of each type of ticket, so as to uniformly filter and intercept special characters that do not meet the regulations and cannot appear on the invoice.

[0053] Step S12, based on the length of the tax number of the invoice to be issued, calling a preset tax number rule corresponding to the length to verify the tax number of the invoice to be issued.

[0054] Since the tax policy has very high requirements on the format of the tax number, it is necessary to verify the format, length, case and other aspects of the tax number separately to ensure the legality of the invoicing tax number. Through this step, according to the tax policy requirements on the tax number, different preset tax number rules are set based on the length of the tax number, and according to the length of the tax number to be invoiced, the preset tax number rule corresponding to the length is called to verify the tax number to be invoiced, so as to complete the compliance verification of the purchaser's tax number and the seller's tax number in the invoice information.

[0055] Step S13, based on the ticket type to be invoiced, calling the preset data item length rule corresponding to the ticket type to verify the length of the data item to be invoiced.

[0056] Since the length requirements of each data item are not the same between different ticket types. According to the requirements of tax policies on the length of each data item of each ticket type, each preset data item length rule is set for each ticket type. The preset data item length rules can be completely different, so the length verification of the data item to be invoiced can be: firstly process the difference in the length of each field of each ticket type by ticket type, take a special logic verification branch, that is, implement step S13; then follow the general data item length verification rule, that is, each ticket type uniformly executes the same data item length rule verification (that is, this method also includes a general data item length rule verification for the invoice to be issued). Similarly, the preset data item length rules can be partially the same and partially different, the different parts are the differences in the length of each field of each ticket type mentioned above, and the same parts are the general data item length verification rules mentioned above. The length verification of the data item to be invoiced can be: according to the ticket type to be invoiced, call the preset data item length rule corresponding to the ticket type to verify the length of the data item to be invoiced (that is, this method only includes step S13 for verifying the length of the data item to be invoiced).

[0057] Step S14, according to the ticket type to be invoiced, calling the preset data item format rules corresponding to the ticket type to verify the format of the data item to be invoiced.

[0058] Since the format requirements for each data item are different between different invoice types, the format rules for each data item are set for each invoice type according to the tax policy requirements for each data item format. Through this step, the format of the data items of the invoice can be verified by invoice type.

[0059] Step S15, according to the ticket type to be invoiced, calling the pre-installed note verification rule corresponding to the ticket type to verify the remarks of the invoice to be issued.

[0060] According to tax policies, the remark requirements for special invoices such as red invoices, agency invoices, and differential tax invoices are different, so they need to be verified. Through this step, according to the type of invoice to be issued, the pre-installed remark verification rules corresponding to the invoice type are called to verify the remark of the invoice to be issued, so that the remark verification of special invoices such as red invoices, agency invoices, and differential tax invoices can be realized.

[0061] Step S16, performing amount error check, tax amount error check and invoice overall error check on the invoice to be issued.

[0062] Through this step, the amount error check, tax amount error check and invoice overall error check are performed on each invoice type according to the error range allowed by the tax policy.

[0063] The technical solution provided by the present disclosure includes: verifying the special characters, tax number, data item length, data item format, remarks, amount error, tax amount error, and overall error of the invoice to be issued, completing the overall verification of the invoice to be issued, and meeting the invoice data verification requirements under the current complex conditions. In addition, the solution can perform compliance verification for each type of invoice, which is to verify the type of invoice at each step of the verification. That is, the solution calls the same template (invoice verification template) for each type of invoice to complete the compliance verification. Therefore, compared with the traditional invoice data verification, which is to call different verification templates (for example, VAT general invoice template, VAT special invoice template) or different interfaces according to different types of invoices when the invoice is issued, the verification of this solution is more centralized and more portable.

[0064] Optionally, step S11 includes:

[0065] When it is determined that the type of invoice to be issued is a special invoice, the first special character library is called to verify the mandatory items of the invoice to be issued. When special characters in the first special character library appear in the mandatory items, the verification shows that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The first special character library includes line breaks.

[0066] Among them, the special invoice is a special value-added tax invoice, and its required items include the seller's address and telephone number, the buyer's address and telephone number, the seller's bank account and account number, the buyer's bank account and account number, etc.

[0067] When it is determined that the type of the invoice to be issued is a non-special invoice, the second special character library is called to verify the mandatory items of the invoice to be issued. When special characters in the second special character library appear in the mandatory items, the verification shows that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The second special character library does not include line breaks.

[0068] Among them, the required items for non-special invoices include the issuer, cashier, invoice sequence, specifications and models, etc.

[0069] Optionally, step S12 includes:

[0070] When it is determined that the length of the tax number of the invoice to be issued is 6 to 15 digits, determine whether the tax number of the invoice to be issued meets the first tax number rule. When the tax number of the invoice to be issued does not meet the first tax number rule, it is verified that the invoice to be issued is non-compliant. The first tax number rule is any combination of digits and letters from 6 to 15 digits.

[0071] When it is determined that the length of the tax number of the invoice to be issued is 16 to 18 digits, determine whether the tax number of the invoice to be issued satisfies the second tax number rule, the third tax number rule and the fourth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the second tax number rule, the third tax number rule and the fourth tax number rule, the verification results show that the invoice to be issued is non-compliant. The second tax number rule is 6 digits plus any combination of digits and letters up to 12 digits, the third tax number rule is 1 letter plus 6 digits plus any combination of digits and letters up to 11 digits, and the fourth tax number rule is 2 letters plus 6 digits plus any combination of digits and letters up to 10 digits.

[0072] When it is determined that the length of the tax number of the invoice to be issued is 19 to 20 digits, it is determined whether the tax number of the invoice to be issued satisfies the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule, it is verified that the invoice to be issued is non-compliant. The fifth tax number rule is a 15-digit ID number plus a maximum of 5 arbitrary digits and letters combination, the sixth tax number rule is an 18-digit ID number plus a maximum of 2 arbitrary digits and letters combination, the seventh tax number rule is 1 letter plus 15-digit ID number plus a maximum of 4 arbitrary digits and letters combination, the eighth tax number rule is 1 letter plus 18-digit ID number plus a maximum of 1 arbitrary digit and letters combination, and the ninth tax number rule is 6 digits plus a maximum of 14 arbitrary digits and non-OISZ letter combination.

[0073] The above technical solution can be shown in the following table:

[0074]

[0075] Optionally, step S13 includes:

[0076] When determining that the invoice type to be issued is a special invoice, determine whether the purchaser's tax number of the invoice to be issued is empty. When the purchaser's tax number of the invoice to be issued is empty, verification shows that the invoice to be issued is non-compliant.

[0077] According to tax policy, the purchaser's tax number of special invoices cannot be empty, while the purchaser's tax number of other invoices can be empty. Therefore, when issuing special invoices, users may be influenced by the habit of issuing other invoices and leave the purchaser's tax number empty, resulting in errors. This step can avoid this error.

[0078] When determining that the type of the invoice to be issued is a roll invoice, determine whether the length of the commodity name to be invoiced is 40 bytes. When the length of the commodity name to be invoiced is not 40 bytes, verify that the invoice to be issued is non-compliant.

[0079] According to tax policy, the length of the product name of a roll invoice is 40 bytes, and the length of the product name of other invoices is 90 bytes. Therefore, when issuing a roll invoice, the user may be influenced by the habit of issuing other invoices and make the product name length 90 bytes, resulting in an error. This step can avoid this error.

[0080] Optionally, step S14 includes:

[0081] When determining that the type of the invoice to be issued is a blue-letter invoice, determine whether the data items of the invoice to be issued meet the first data item format rules. When the data items of the invoice to be issued do not meet the first data item format rules, verification determines that the invoice to be issued is non-compliant. The first data item format rules include: the total amount is greater than 0; and, for a commodity row with a negative amount, the amount of the previous commodity row is positive.

[0082] When determining that the type of the invoice to be issued is a red-ink invoice, determine whether the data items of the invoice to be issued meet the second data item format rules. When the data items of the invoice to be issued do not meet the second data item format rules, verify that the invoice to be issued is non-compliant. The second data item format rules include: the total amount is less than 0, which means it is an invoice that has not been offset against red ink, and it is a valid invoice.

[0083] A blue invoice is a positive invoice, and a red invoice is a negative invoice. The data item format rules can be as shown in the following table:

[0084]

[0085]

[0086] Optionally, step S15 includes:

[0087] When determining that the type of the invoice to be issued is a special invoice with red ink, determine whether the remarks of the invoice to be issued include the first content. When the remarks of the invoice to be issued do not include the first content, verification determines that the invoice to be issued is non-compliant, and the first content is: the number of the information form for issuing a red-ink special value-added tax invoice.

[0088] When determining that the type of the invoice to be issued is an ordinary red-ink invoice, determine whether the remarks of the invoice to be issued include a second content. When the remarks of the invoice to be issued do not include the second content, verification determines that the invoice to be issued is non-compliant. The second content is: a corresponding positive invoice code and a corresponding positive invoice number.

[0089] When determining that the type of the invoice to be issued is an invoice issued on behalf of another, determine whether the remarks of the invoice to be issued include a third content. When the remarks of the invoice to be issued do not include the third content, verification shows that the invoice to be issued is non-compliant. The third content is: the remarks of the invoice issued on behalf of another indicate the tax number and name of the enterprise issuing the invoice on behalf of another, and the actual content is filled in.

[0090] When it is determined that the type of the invoice to be issued is a blue invoice for differential taxation, it is determined whether the remarks of the invoice to be issued include the fourth content. When the remarks of the invoice to be issued do not include the fourth content, it is verified that the invoice to be issued is non-compliant. The fourth content is: the blue invoice for differential taxation must be indicated at the beginning of the remarks.

[0091] When determining that the type of the invoice to be issued is a red invoice for differential taxation, determine whether the remarks of the invoice to be issued include the fifth content. When the remarks of the invoice to be issued do not include the fifth content, verification shows that the invoice to be issued is non-compliant, and the fifth content is: the red invoice for differential taxation must be indicated at the beginning of the remarks.

[0092] The above technical solution is: for special red-letter invoices, the remarks must include "issuance of red-letter special VAT invoice information form number" and other content; for ordinary red-letter invoices, the remarks must include "corresponding positive invoice code" and "corresponding positive invoice number"; for invoices issued on behalf of others, the remarks must include "the remarks on invoices issued on behalf of others indicate the tax number and name of the enterprise issued on behalf of others, and the actual filling is"; for blue invoices for differential taxation, the remarks must include "the blue invoices for differential taxation must be indicated at the beginning of the remarks", and if it is a red invoice for differential taxation, the remarks must include "the red invoices for differential taxation must be indicated at the beginning of the remarks". When an invoice is both a red invoice (special red-letter invoice or ordinary red-letter invoice) and an invoice for differential taxation, the remarks verification rules must overlap.

[0093] Since the user may use the tax-inclusive mode when issuing the invoice, it is necessary to convert it to the tax-exclusive mode. Optionally, the method further includes:

[0094] When the invoice to be issued is in a tax-inclusive mode, the invoice to be issued is converted into a tax-exclusive mode according to a preset price-tax separation algorithm.

[0095] The preset price-tax separation algorithm is as follows (the unit price quantity is rounded to 8 decimal places, and the amount and tax are rounded to 2 decimal places):

[0096] For non-discounted tickets: Amount excluding tax = Amount including tax / (1 + tax rate); Unit price excluding tax = Amount excluding tax / Quantity (the item quantity is not empty and the unit price is empty); Unit price excluding tax = Unit price including tax / (1 + tax rate) (the item quantity is empty and the unit price is not empty); Quantity = Amount excluding tax / Unit price excluding tax; Unit price excluding tax = Unit price including tax / (1 + tax rate) (if both quantity and unit price are not empty, the unit price is calculated according to the unit price); Tax amount = Amount including tax - Amount excluding tax.

[0097] For discount tickets: Difference = Amount including tax - Deduction; Difference excluding tax = Difference / (1 + tax rate); Amount excluding tax = Difference excluding tax + Deduction; Unit price excluding tax = Amount excluding tax / Quantity (the item quantity is not empty and the unit price is empty); Unit price excluding tax = Unit price including tax / (1 + tax rate) (the item quantity is empty and the unit price is not empty); Quantity = Amount excluding tax / Unit price excluding tax; Unit price excluding tax = Amount excluding tax / Quantity (both quantity and unit price are not empty, the unit price is calculated based on the quantity); Tax amount = Amount including tax - Amount excluding tax.

[0098] Optionally, step S16 includes:

[0099] The invoice to be issued is checked for amount errors.

[0100] The specific verification rule can be: for each detail line, in both tax-inclusive and tax-exclusive modes, the error between the amount and the product of the quantity and unit price cannot exceed 0.01. That is, when tax is included, the amount including tax - the unit price including tax * the quantity of goods must be less than 0.01; when tax is not included, the amount excluding tax - the unit price excluding tax * the quantity of goods must be less than 0.01, otherwise the verification will result in the invoice to be issued being non-compliant.

[0101] The tax amount error check is performed on the invoice to be issued.

[0102] The specific verification rules can be: the difference between the tax-inclusive amount and the tax-exclusive amount of each detail line cannot exceed 0.06; the difference between the total tax-inclusive amount and the total tax-exclusive amount of the invoice cannot exceed 1.27. There is a special treatment for this. For the list red invoice, since multiple details are combined into one line of details, the difference between the tax-inclusive amount and the tax-exclusive amount of the detail line and the tax amount cannot exceed 1.27.

[0103] Perform an overall error check on the invoice to be issued.

[0104] The specific verification rules can be: the sum of the tax-inclusive amounts of each detail line must be equal to the total tax-inclusive amount of the invoice; the sum of the tax-exclusive amounts of each detail line must be equal to the total tax-exclusive amount of the invoice; the sum of the tax amounts of each detail line must be equal to the total tax amount of the invoice.

[0105] When implementing the above technical solution, the invoice type code can be set to identify whether the invoice to be issued is a special VAT invoice, a general VAT invoice, a general VAT electronic invoice, or a roll invoice, etc.; the invoice type can be set to identify whether the invoice to be issued is a blue-letter invoice or a red-letter invoice; and the invoice type can be identified as a differential tax invoice based on the fact that the version number of the coding table is not empty and the deduction amount in the first line of the invoice details is not empty.

[0106] Based on the above inventive concept, the embodiment of the present disclosure also provides a billing verification device 10. Figure 2 As shown, the invoice verification device 10 comprises:

[0107] The special character verification module 11 is used to call a preset special character library corresponding to the ticket type to verify the required items of the invoice to be issued according to the ticket type to be issued;

[0108] The tax number verification module 12 is used to verify the tax number of the invoice to be issued by calling a preset tax number rule corresponding to the length of the tax number of the invoice to be issued;

[0109] A data item length checking module 13 is used to check the length of the data item of the to-be-invoiced invoice by calling a preset data item length rule corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type;

[0110] The data item format verification module 14 is used to verify the format of the data item of the to-be-invoiced invoice by calling the preset data item format rules corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type;

[0111] A remark verification module 15 is used to verify the remark of the invoice to be issued by calling the pre-installed remark verification rule corresponding to the invoice type according to the invoice type to be issued;

[0112] The error checking module 16 is used to perform amount error checking, tax amount error checking and invoice overall error checking on the invoice to be issued.

[0113] The technical solution provided by the present disclosure includes: verifying the special characters, tax number, data item length, data item format, remarks, amount error, tax amount error, and overall error of the invoice to be issued, completing the overall verification of the invoice to be issued, and meeting the invoice data verification requirements under the current complex conditions. In addition, the solution can perform compliance verification for each type of invoice, which is to verify the type of invoice at each step of the verification. That is, the solution calls the same template (invoice verification template) for each type of invoice to complete the compliance verification. Therefore, compared with the traditional invoice data verification, which is to call different verification templates (for example, VAT general invoice template, VAT special invoice template) or different interfaces according to different types of invoices when the invoice is issued, the verification of this solution is more centralized and more portable.

[0114] Optionally, the special character checking module 11 includes:

[0115] The special character verification submodule for special invoices is used to call the first special character library to verify the mandatory items of the invoice to be issued when it is determined that the type of invoice to be issued is a special invoice. When special characters in the first special character library appear in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The first special character library includes line breaks.

[0116] Among them, the special invoice is a special value-added tax invoice, and its required items include the seller's address and telephone number, the buyer's address and telephone number, the seller's bank account and account number, the buyer's bank account and account number, etc.

[0117] The non-special invoice special character verification submodule is used to call the second special character library to verify the mandatory items of the invoice to be issued when it is determined that the type of the invoice to be issued is a non-special invoice. When special characters in the second special character library appear in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The second special character library does not include line breaks.

[0118] Among them, the required items for non-special invoices include the issuer, cashier, invoice sequence, specifications and models, etc.

[0119] Optionally, the tax number verification module 12 includes:

[0120] The first tax number length submodule is used to determine whether the tax number of the invoice to be issued meets the first tax number rule when it is determined that the length of the tax number of the invoice to be issued is 6 to 15 digits. When the tax number of the invoice to be issued does not meet the first tax number rule, it is verified that the invoice to be issued is non-compliant. The first tax number rule is any combination of digits and letters from 6 to 15 digits.

[0121] The second tax number length submodule is used to determine whether the tax number of the invoice to be issued satisfies the second tax number rule, the third tax number rule and the fourth tax number rule when it is determined that the length of the tax number of the invoice to be issued is 16 to 18 digits. When the tax number of the invoice to be issued does not satisfy any one of the second tax number rule, the third tax number rule and the fourth tax number rule, it is verified that the invoice to be issued is non-compliant. The second tax number rule is 6 digits plus any combination of digits and letters up to 12 digits, the third tax number rule is 1 letter plus 6 digits plus any combination of digits and letters up to 11 digits, and the fourth tax number rule is 2 letters plus 6 digits plus any combination of digits and letters up to 10 digits.

[0122] The third tax number length submodule is used to determine whether the tax number of the invoice to be issued satisfies the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule when it is determined that the length of the tax number of the invoice to be issued is 19 to 20 digits. When the tax number of the invoice to be issued does not satisfy any one of the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule, it is verified that the invoice to be issued is non-compliant. The fifth tax number rule is a 15-digit ID number plus a maximum of 5 arbitrary digits and letters, the sixth tax number rule is an 18-digit ID number plus a maximum of 2 arbitrary digits and letters, the seventh tax number rule is 1 letter plus 15-digit ID number plus a maximum of 4 arbitrary digits and letters, the eighth tax number rule is 1 letter plus 18-digit ID number plus a maximum of 1 arbitrary digit and letters, and the ninth tax number rule is 6 digits plus a maximum of 14 arbitrary digits and non-OISZ letter combinations.

[0123] Optionally, the data item length checking module 13 includes:

[0124] The special invoice data item length verification submodule is used to determine whether the purchaser's tax number of the invoice to be issued is empty when it is determined that the invoice type to be issued is a special invoice. When the purchaser's tax number of the invoice to be issued is empty, the verification results show that the invoice to be issued is non-compliant.

[0125] The roll ticket data item length verification submodule is used to determine whether the length of the product name to be invoiced is 40 bytes when it is determined that the type of ticket to be invoiced is a roll ticket. When the length of the product name to be invoiced is not 40 bytes, the verification results show that the invoice to be invoiced is non-compliant.

[0126] Optionally, the data item format verification module 14 includes:

[0127] The blue-letter invoice data item format verification submodule is used to determine whether the data items of the invoice to be issued meet the first data item format rules when it is determined that the invoice type to be issued is a blue-letter invoice. When the data items of the invoice to be issued do not meet the first data item format rules, the verification results show that the invoice to be issued is non-compliant. The first data item format rules include: the total amount is greater than 0; and, for a commodity row with a negative amount, the amount of the previous commodity row is positive.

[0128] The red-ink invoice data item format verification submodule is used to determine whether the data items of the invoice to be issued meet the second data item format rules when it is determined that the type of the invoice to be issued is a red-ink invoice. When the data items of the invoice to be issued do not meet the second data item format rules, the verification results show that the invoice to be issued is non-compliant. The second data item format rules include: the total amount is less than 0, which is an invoice that has not been offset against red ink, and is a valid invoice.

[0129] A blue invoice is a positive invoice, and a red invoice is a negative invoice. The data item format rules can be as shown in the following table:

[0130]

[0131] Optionally, the remark checking module 15 includes:

[0132] The special invoice red-ink invoice remarks verification submodule is used to determine whether the remarks of the invoice to be issued contain the first content when it is determined that the type of invoice to be issued is a special invoice red-ink invoice. When the remarks of the invoice to be issued do not contain the first content, the verification results show that the invoice to be issued is non-compliant, and the first content is: the number of the information form for issuing red-ink special value-added tax invoices.

[0133] The ordinary red-ink invoice remark verification submodule is used to determine whether the remark of the invoice to be issued contains a second content when it is determined that the invoice type to be issued is an ordinary red-ink invoice. When the remark of the invoice to be issued does not contain the second content, the verification results show that the invoice to be issued is non-compliant, and the second content is: the corresponding positive invoice code and the corresponding positive invoice number.

[0134] The submodule for verifying the remarks of invoices issued on behalf of others is used to determine whether the remarks of the invoice to be issued contain the third content when determining that the type of invoice to be issued is an invoice issued on behalf of others. When the remarks of the invoice to be issued do not contain the third content, the verification results show that the invoice to be issued is non-compliant. The third content is: the remarks of the invoice issued on behalf of others indicate the tax number and name of the enterprise issuing the invoice on behalf of others, and the actual content is filled in.

[0135] The blue invoice note verification submodule for differential taxation is used to determine whether the notes of the invoice to be issued contain the fourth content when it is determined that the type of the invoice to be issued is the blue invoice for differential taxation. When the notes of the invoice to be issued do not contain the fourth content, the verification results show that the invoice to be issued is non-compliant, and the fourth content is: the blue invoice for differential taxation must be indicated at the beginning of the notes.

[0136] The red invoice remark verification submodule for differential taxation is used to determine whether the remark of the invoice to be issued contains the fifth content when it is determined that the type of the invoice to be issued is a red invoice for differential taxation. When the remark of the invoice to be issued does not contain the fifth content, the verification results in that the invoice to be issued is non-compliant, and the fifth content is: the red invoice for differential taxation must be indicated at the beginning of the remark.

[0137] The above technical solution is: for special red-letter invoices, the remarks must include "issuance of red-letter special VAT invoice information form number" and other content; for ordinary red-letter invoices, the remarks must include "corresponding positive invoice code" and "corresponding positive invoice number"; for invoices issued on behalf of others, the remarks must include "the remarks on invoices issued on behalf of others indicate the tax number and name of the enterprise issued on behalf of others, and the actual filling is"; for blue invoices for differential taxation, the remarks must include "the blue invoices for differential taxation must be indicated at the beginning of the remarks", and if it is a red invoice for differential taxation, the remarks must include "the red invoices for differential taxation must be indicated at the beginning of the remarks". When an invoice is both a red invoice (special red-letter invoice or ordinary red-letter invoice) and an invoice for differential taxation, the remarks verification rules must overlap.

[0138] Since the user may use the tax-inclusive mode when issuing an invoice, it is necessary to switch to the tax-exclusive mode. Optionally, the invoice verification device 10 further includes:

[0139] The price-tax separation module is used to convert the invoice to be issued into a tax-exclusive mode according to a preset price-tax separation algorithm when the invoice to be issued is in a tax-inclusive mode.

[0140] The preset price-tax separation algorithm is as follows (the unit price quantity is rounded to 8 decimal places, and the amount and tax are rounded to 2 decimal places):

[0141] For non-discounted tickets: Amount excluding tax = Amount including tax / (1 + tax rate); Unit price excluding tax = Amount excluding tax / Quantity (the item quantity is not empty and the unit price is empty); Unit price excluding tax = Unit price including tax / (1 + tax rate) (the item quantity is empty and the unit price is not empty); Quantity = Amount excluding tax / Unit price excluding tax; Unit price excluding tax = Unit price including tax / (1 + tax rate) (if both quantity and unit price are not empty, the unit price is calculated according to the unit price); Tax amount = Amount including tax - Amount excluding tax.

[0142] For discount tickets: Difference = Amount including tax - Deduction; Difference excluding tax = Difference / (1 + tax rate); Amount excluding tax = Difference excluding tax + Deduction; Unit price excluding tax = Amount excluding tax / Quantity (the item quantity is not empty and the unit price is empty); Unit price excluding tax = Unit price including tax / (1 + tax rate) (the item quantity is empty and the unit price is not empty); Quantity = Amount excluding tax / Unit price excluding tax; Unit price excluding tax = Amount excluding tax / Quantity (both quantity and unit price are not empty, the unit price is calculated based on the quantity); Tax amount = Amount including tax - Amount excluding tax.

[0143] Optionally, the error checking module 16 includes:

[0144] The amount error checking submodule is used to perform amount error checking on the invoice to be issued.

[0145] The specific verification rule can be: for each detail line, in both tax-inclusive and tax-exclusive modes, the error between the amount and the product of the quantity and unit price cannot exceed 0.01. That is, when tax is included, the amount including tax - the unit price including tax * the quantity of goods must be less than 0.01; when tax is not included, the amount excluding tax - the unit price excluding tax * the quantity of goods must be less than 0.01, otherwise the verification will result in the invoice to be issued being non-compliant.

[0146] The tax amount error checking submodule is used to perform tax amount error checking on the invoice to be issued.

[0147] The specific verification rules can be: the difference between the tax-inclusive amount and the tax-exclusive amount of each detail line cannot exceed 0.06; the difference between the total tax-inclusive amount and the total tax-exclusive amount of the invoice cannot exceed 1.27. There is a special treatment for this. For the list red invoice, since multiple details are combined into one line of details, the difference between the tax-inclusive amount and the tax-exclusive amount of the detail line and the tax amount cannot exceed 1.27.

[0148] The invoice overall error checking submodule is used to perform an invoice overall error checking on the invoice to be issued.

[0149] The specific verification rules can be: the sum of the tax-inclusive amounts of each detail line must be equal to the total tax-inclusive amount of the invoice; the sum of the tax-exclusive amounts of each detail line must be equal to the total tax-exclusive amount of the invoice; the sum of the tax amounts of each detail line must be equal to the total tax amount of the invoice.

[0150] When implementing the above technical solution, the invoice type code can be set to identify whether the invoice to be issued is a special VAT invoice, a general VAT invoice, a general VAT electronic invoice, or a roll invoice, etc.; the invoice type can be set to identify whether the invoice to be issued is a blue-letter invoice or a red-letter invoice; and the invoice type can be identified as a differential tax invoice based on the fact that the version number of the coding table is not empty and the deduction amount in the first line of the invoice details is not empty.

[0151] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0152] Based on the above inventive concept, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above invoice verification method are implemented.

[0153] Based on the above inventive concept, an embodiment of the present disclosure further provides an electronic device. Figure 3 FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Figure 3 As shown, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0154] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned invoice verification method. The memory 702 is used to store various types of data to support the operation of the electronic device 700. For example, these data may include instructions for any application or method used to operate on the electronic device 700, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module, etc.

[0155] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned invoice verification method.

[0156] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned invoice verification method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned invoice verification method.

[0157] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0158] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0159] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A billing verification method, characterized in that: The method comprises: According to the ticket type to be invoiced, a preset special character library corresponding to the ticket type is called to verify the mandatory items of the invoice to be issued; According to the length of the tax number of the invoice to be issued, calling a preset tax number rule corresponding to the length to verify the tax number of the invoice to be issued; According to the ticket type to be invoiced, a preset data item length rule corresponding to the ticket type is called to verify the length of the data item to be invoiced; According to the ticket type to be invoiced, the format of the data item to be invoiced is verified by calling the preset data item format rule corresponding to the ticket type; According to the ticket type of the invoice to be issued, the pre-installed note verification rule corresponding to the ticket type is called to verify the notes of the invoice to be issued; Performing amount error check, tax amount error check and invoice overall error check on the invoice to be issued; The step of calling a preset special character library corresponding to the ticket type to verify the mandatory items of the invoice to be issued includes: When it is determined that the type of the invoice to be issued is a special invoice, the first special character library is called to verify the mandatory items of the invoice to be issued. When a special character in the first special character library appears in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The first special character library includes line breaks; When it is determined that the type of the invoice to be issued is a non-special invoice, the second special character library is called to verify the mandatory items of the invoice to be issued. When special characters in the second special character library appear in the mandatory items, the verification shows that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The second special character library does not include line breaks.

2. The invoice verification method according to claim 1, characterized in that: The step of calling a preset tax number rule corresponding to the length of the tax number of the invoice to be issued to verify the tax number of the invoice to be issued includes: When it is determined that the length of the tax number of the invoice to be issued is 6 to 15 digits, it is determined whether the tax number of the invoice to be issued satisfies the first tax number rule. When the tax number of the invoice to be issued does not satisfy the first tax number rule, it is verified that the invoice to be issued is not compliant. The first tax number rule is any combination of digits and letters from 6 to 15 digits. When it is determined that the length of the tax number of the invoice to be issued is 16 to 18 digits, it is determined whether the tax number of the invoice to be issued satisfies the second tax number rule, the third tax number rule and the fourth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the second tax number rule, the third tax number rule and the fourth tax number rule, it is verified that the invoice to be issued is non-compliant. The second tax number rule is 6 digits plus any combination of digits and letters up to 12 digits, the third tax number rule is 1 letter plus 6 digits plus any combination of digits and letters up to 11 digits, and the fourth tax number rule is 2 letters plus 6 digits plus any combination of digits and letters up to 10 digits. When it is determined that the length of the tax number of the invoice to be issued is 19 to 20 digits, it is determined whether the tax number of the invoice to be issued satisfies the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule. When the tax number of the invoice to be issued does not satisfy any one of the fifth tax number rule, the sixth tax number rule, the seventh tax number rule, the eighth tax number rule and the ninth tax number rule, it is verified that the invoice to be issued is non-compliant. The fifth tax number rule is a 15-digit ID number plus a maximum of 5 arbitrary digits and letters combination, the sixth tax number rule is an 18-digit ID number plus a maximum of 2 arbitrary digits and letters combination, the seventh tax number rule is 1 letter plus 15-digit ID number plus a maximum of 4 arbitrary digits and letters combination, the eighth tax number rule is 1 letter plus 18-digit ID number plus a maximum of 1 arbitrary digit and letters combination, and the ninth tax number rule is 6 digits plus a maximum of 14 arbitrary digits and non-OISZ letter combination.

3. The invoice verification method according to claim 1, characterized in that: The checking of the length of the data item of the to-be-invoiced invoice by calling the preset data item length rule corresponding to the ticket type according to the ticket type to be invoiced comprises: When it is determined that the invoice type to be issued is a special invoice, it is determined whether the purchaser's tax number of the invoice to be issued is empty. When the purchaser's tax number of the invoice to be issued is empty, it is verified that the invoice to be issued is not compliant; When determining that the type of the invoice to be issued is a roll invoice, determine whether the length of the commodity name to be invoiced is 40 bytes. When the length of the commodity name to be invoiced is not 40 bytes, verify that the invoice to be issued is non-compliant.

4. The invoice verification method according to claim 1, characterized in that: The step of calling the preset data item format rule corresponding to the ticket type to verify the format of the data item to be invoiced according to the ticket type to be invoiced includes: When it is determined that the invoice type to be issued is a blue-letter invoice, it is determined whether the data item of the invoice to be issued satisfies the first data item format rule. When the data item of the invoice to be issued does not satisfy the first data item format rule, it is verified that the invoice to be issued is not compliant. The first data item format rule includes: the total amount is greater than 0; and, for a commodity line with a negative amount, the amount of the previous commodity line is positive; When determining that the type of the invoice to be issued is a red-ink invoice, determine whether the data items of the invoice to be issued meet the second data item format rules. When the data items of the invoice to be issued do not meet the second data item format rules, verify that the invoice to be issued is non-compliant. The second data item format rules include: the total amount is less than 0, which means it is an invoice that has not been offset against red ink, and it is a valid invoice.

5. The invoice verification method according to claim 1, characterized in that: The step of calling a pre-installed note verification rule corresponding to the ticket type to verify the notes of the invoice to be issued according to the ticket type to be issued includes: When it is determined that the type of the invoice to be issued is a special invoice with red ink, it is determined whether the remarks of the invoice to be issued include the first content. When the remarks of the invoice to be issued do not include the first content, it is verified that the invoice to be issued is not compliant, and the first content is: the number of the information form for issuing a special invoice with red ink; When it is determined that the type of the invoice to be issued is an ordinary red-ink invoice, it is determined whether the remarks of the invoice to be issued include a second content. When the remarks of the invoice to be issued do not include the second content, it is verified that the invoice to be issued is not compliant, and the second content is: a corresponding positive invoice code and a corresponding positive invoice number; When it is determined that the type of the invoice to be issued is an agency invoice, it is determined whether the remarks of the invoice to be issued include the third content. When the remarks of the invoice to be issued do not include the third content, it is verified that the invoice to be issued is not compliant. The third content is: the remarks of the agency invoice indicate the agency enterprise tax number and agency enterprise name, and the actual filling is; When it is determined that the type of the invoice to be issued is a blue invoice for differential taxation, it is determined whether the remarks of the invoice to be issued include the fourth content. When the remarks of the invoice to be issued do not include the fourth content, it is verified that the invoice to be issued is not compliant, and the fourth content is: the blue invoice for differential taxation must be indicated at the beginning of the remarks; When determining that the type of the invoice to be issued is a red invoice for differential taxation, determine whether the remarks of the invoice to be issued include the fifth content. When the remarks of the invoice to be issued do not include the fifth content, verification shows that the invoice to be issued is non-compliant, and the fifth content is: the red invoice for differential taxation must be indicated at the beginning of the remarks.

6. The invoice verification method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the invoice to be issued is in a tax-inclusive mode, the invoice to be issued is converted into a tax-exclusive mode according to a preset price-tax separation algorithm.

7. A billing verification device, characterized in that: include: A special character verification module is used to call a preset special character library corresponding to the ticket type to verify the mandatory items of the invoice to be issued according to the ticket type to be issued; A tax number verification module, used to verify the tax number of the invoice to be issued by calling a preset tax number rule corresponding to the length of the tax number to be issued; A data item length verification module, used to verify the length of the data item of the to-be-invoiced invoice by calling a preset data item length rule corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type; A data item format verification module, used to verify the format of the data item of the to-be-invoiced invoice by calling the preset data item format rules corresponding to the to-be-invoiced invoice type according to the to-be-invoiced invoice type; A remark verification module, used for verifying the remark of the invoice to be issued by calling the pre-installed remark verification rule corresponding to the invoice type according to the invoice type to be issued; An error checking module is used to perform amount error checking, tax amount error checking and invoice overall error checking on the invoice to be issued; The special character verification module includes: A special character verification submodule for special invoices is used to call the first special character library to verify the mandatory items of the invoice to be issued when it is determined that the type of the invoice to be issued is a special invoice. When a special character in the first special character library appears in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The first special character library includes line breaks; The non-special invoice special character verification submodule is used to call the second special character library to verify the mandatory items of the invoice to be issued when it is determined that the type of the invoice to be issued is a non-special invoice. When special characters in the second special character library appear in the mandatory items, the verification results show that the invoice to be issued is non-compliant, and the special characters that appear are marked in the mandatory items. The second special character library does not include line breaks.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.

9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 6.