A method and system for automatic settlement of associated transactions based on digital electrical invoices
By setting unit price tolerances and tail difference adjustments, digital invoices are automatically matched with purchase receipt transactions, solving the problem of insufficient flexibility and accuracy of invoice automation settlement platforms in existing technologies, and achieving efficient and accurate automated settlement.
Patent Information
- Application Number
- CN202411927351.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing automated invoice processing and settlement platform is unable to cope with complex situations, has poor flexibility, and is unable to handle slight differences in the unit price accuracy of the two parties to the transaction, resulting in low accuracy and efficiency of the automated settlement platform.
By setting the unit price tolerance excluding tax and the total amount difference including tax, you can automatically match the digital invoice detail lines with the purchase receipt transaction lines, adjust the amount excluding tax and the tax amount to ensure data consistency, and create an A/P invoice document.
It improves the flexibility and accuracy of automated invoice settlement, reduces manual intervention, improves work efficiency, ensures the consistency of business data and financial data, and reduces error rates.
Smart Images

Figure CN119850353B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more specifically, to a method and system for automated settlement of related transactions based on digital electronic invoices. Background Art
[0002] Traditional settlement processes often require financial and business personnel to manually process and enter large numbers of tax invoices and settlement documents. This is not only time-consuming and labor-intensive, but also prone to errors. As transaction scale and business volume increase, this manual processing method can no longer meet the ever-increasing business needs. Therefore, companies urgently need a method to automate the processing of invoices and settlement documents to improve settlement efficiency and accuracy.
[0003] With the continuous development of new technologies such as optical character recognition (OCR), natural language processing, and machine learning algorithms, the technical conditions for automated settlement have emerged. These technologies can support businesses in automatically processing, analyzing, and archiving invoices and settlement documents, thereby automating the settlement process. At the same time, the State Taxation Administration is also actively promoting the use of digital invoices and providing corresponding technical support and services, providing a strong guarantee for businesses to achieve automated settlement.
[0004] The current invoice automation processing and settlement can only perform some simple invoice automation processing, and cannot cope with some complex situations. It has limited functions and cannot cope with the difference in unit price when the unit price accuracy of the two parties to the transaction is different, nor can it handle the slight difference between the amount on the invoice and the actual transaction amount due to rounding or calculation accuracy. These situations still require manual intervention, resulting in poor flexibility of the automated settlement platform. Therefore, there is an urgent need to provide an invoice automation processing and settlement platform with more comprehensive functions and higher practicality. Summary of the Invention
[0005] In response to the defects of the existing technology, the purpose of this application is to provide a method and system for automated settlement of related transactions based on digital electronic invoices, aiming to solve the problem that the existing invoice automation processing and settlement platform is unable to cope with complex situations and has poor flexibility.
[0006] To achieve the above objectives, in a first aspect, the present application provides a method for automated settlement of related-party transactions based on digital invoices, comprising:
[0007] Obtain a digital electricity invoice issued by a seller and a purchase receipt transaction provided by a purchaser; the digital electricity invoice includes at least one invoice detail line, a total amount excluding tax, a total tax amount, and a total amount including tax; the purchase receipt transaction includes at least one receipt transaction line, and each invoice detail line and each receipt transaction line includes: quantity, unit price excluding tax, amount excluding tax, and tax amount;
[0008] Matching each invoice detail line with a purchase receipt transaction based on the tax-exclusive unit price, quantity, and a preset tax-exclusive unit price tolerance; obtaining corresponding matching information when each invoice detail line matches one or more corresponding receipt transaction lines; summarizing the tax-exclusive amounts and tax amounts of all receipt transaction lines in the matching information to obtain a summarized tax-exclusive amount, a summarized tax amount, and a summarized tax-inclusive amount;
[0009] When at least one of the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount is not equal to the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the digital invoice, and the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the digital invoice is not greater than the preset total tax-inclusive amount tail difference tolerance, the tax-exclusive amount and / or the tax amount of at least one receiving transaction line in the matching information is adjusted until the three amounts are equal;
[0010] An A / P invoice document is created based on the adjusted matching information to settle the digital invoice.
[0011] It can be understood that this application maximizes the matching degree between the invoice detail line and the receiving transaction line within the unit price tolerance range by presetting the unit price tolerance and the total amount difference, and automatically eliminates the tax-free amount and the tax amount difference summarized in the payable invoice settlement document, ensuring the consistency of business data and financial data, and improving the flexibility and practicality of the digital invoice automation settlement platform.
[0012] In one possible implementation, the preset tax-exclusive unit price tolerance includes: the tax-exclusive unit price tolerance of each invoice detail line; wherein the tax-exclusive unit price tolerance of each invoice detail line is the same, the tax-exclusive unit price tolerance of some invoice detail lines is the same, or the tax-exclusive unit price tolerance of each invoice detail line is different;
[0013] And / or combined with preset tax-exclusive unit price tolerances, match each invoice detail line to the purchase receipt transaction, including:
[0014] The matching includes exact matching and fuzzy matching; the exact matching has a higher priority than the fuzzy matching;
[0015] The exact matching is as follows: first, matching is performed based on whether the tax-exclusive unit price of the receiving transaction line is the same as the tax-exclusive unit price of each invoice detail line, filtering out the receiving transaction lines with exact matching tax-exclusive unit prices, and then matching based on quantity;
[0016] The fuzzy matching is as follows: first, matching is performed based on the difference between the tax-exclusive unit price of the receiving transaction line and the tax-exclusive unit price of each invoice detail line being no greater than the corresponding tax-exclusive unit price tolerance, screening out the receiving transaction lines with fuzzy matching of the tax-exclusive unit price, and then matching based on quantity; and / or
[0017] The matching criteria based on quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, the quantity of an invoice detail line is consistent with the total quantity of multiple receiving transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line, and the quantity of an invoice detail line is consistent with the total partial quantity of multiple receiving transaction lines.
[0018] In a possible implementation, each receiving transaction line further includes: a remaining invoicable quantity; the remaining invoicable quantity refers to the quantity in the receiving transaction line that has not yet been invoiced;
[0019] If the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, or the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, the corresponding one or more receiving transaction lines will be used as the receiving transaction lines that match the invoice detail line, and the information of the matching receiving transaction lines will be copied to the matching information. The remaining invoicable quantity of the corresponding one or more receiving transaction lines will be updated to 0;
[0020] If the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line or the total partial quantity of multiple receiving transaction lines, the corresponding one or more receiving transaction lines will be used as the receiving transaction lines that match the invoice detail line, and the information of the matched receiving transaction lines will be copied to the matching information. In the matching information, the quantity or the total quantity of the one or more receiving transaction lines will be set to be consistent with the quantity of the invoice detail line, and the quantity of the invoice detail line will be deducted from the remaining invoicable quantity of the corresponding one or more receiving transaction lines.
[0021] In a possible implementation, the matching according to quantity includes:
[0022] From all filtered receiving transaction lines, select a receiving transaction line whose quantity matches the quantity of the invoice detail line. This line is used as the receiving transaction line that matches the invoice detail line. The information of the matching receiving transaction line is copied to the matching information, and the remaining invoicable quantity of the matching receiving transaction line is set to 0.
[0023] If the quantity of each of the filtered receiving transaction lines is inconsistent with the quantity of the invoice detail line, multiple receiving transaction lines whose total quantity is equal to the quantity of the invoice detail line are selected. The selected receiving transaction lines are used as the receiving transaction lines that match the invoice detail line. The information of the matching receiving transaction lines is copied to the matching information, and the remaining invoicable quantity of the matching receiving transaction lines is set to 0.
[0024] If the quantity of each of the filtered receiving transaction lines is inconsistent with the quantity of the invoice detail line, then select a receiving transaction line with a quantity greater than the quantity of the invoice detail line as the receiving transaction line that matches the invoice detail line, copy the information of the matched receiving transaction line to the matching information, set the quantity of the receiving transaction line in the matching information to be consistent with the quantity of the invoice detail line, and subtract the quantity of the invoice detail line from the remaining invoiceable quantity of the receiving transaction line; or
[0025] If the quantity of all the received transaction lines in all the filtered received transaction lines is inconsistent with the quantity of the invoice detail line, then according to the preset rules, multiple received transaction lines whose total quantity is greater than the quantity of the invoice detail line are selected, and the selected multiple received transaction lines are used as the received transaction lines that match the invoice detail line, and the information of the matched multiple received transaction lines is copied to the matching information; in the matching information, the quantities of the multiple received transaction lines are respectively set according to the preset rules, so that the sum of the set quantities is consistent with the quantity of the invoice detail line, and the quantities set in the corresponding matching information are respectively subtracted from the remaining invoiceable quantities of the multiple received transaction lines; wherein the preset rules are to select multiple received transaction lines whose corresponding total quantities match in the order of the number of received transaction lines from large to small, the quantity from small to large, the difference in quantity relative to the number of the invoice detail line to be matched from small to large, the difference in quantity relative to the number of the invoice detail line to be matched from large to small, or the quantity is random, and the quantities are respectively set in the matching information.
[0026] In one possible implementation, adjusting the tax-exclusive amount and / or tax amount of the receiving transaction line includes:
[0027] Arbitrarily select one or more receiving transaction lines from the matching information to adjust their tax-exclusive amount and / or tax amount; or select at least one receiving transaction line at at least one preset position from the matching information to adjust its tax-exclusive amount and / or tax amount.
[0028] In one possible implementation, adjusting the tax-exclusive amount and / or tax amount of the receiving transaction line includes:
[0029] When the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not equal to 0, and the difference is not greater than the preset tolerance for the tail difference of the total tax-inclusive amount, or when the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is equal to 0, but the difference between the aggregated tax amount and the total tax amount of the digital electronic invoice is not equal to 0, adjust the tax-exclusive amount and / or tax amount of at least one receiving transaction line selected from the matching information so that the adjusted aggregated tax-exclusive amount, aggregated tax amount, and aggregated tax-inclusive amount are respectively the same as the total tax-exclusive amount, total tax amount, and total tax-inclusive amount of the digital electronic invoice.
[0030] In one possible implementation, obtaining the digital electricity invoice issued by the seller of the related-party transaction and the purchase receipt transaction provided by the purchaser includes:
[0031] Determine the purchase order for the related transaction based on the sales order number and / or supplier name information carried on the digital electricity invoice; the purchase order is provided by the purchaser;
[0032] The purchase receipt transaction is determined from the purchase order; the purchase receipt transaction is the details of the goods shipped by the seller and the purchaser has confirmed receipt of the goods.
[0033] In a second aspect, the present application provides an automated settlement system for related-party transactions based on digital invoices, including:
[0034] A digital electronic invoice acquisition unit is configured to acquire a digital electronic invoice issued by a seller and a purchase receipt transaction provided by a purchaser; the digital electronic invoice includes at least one invoice detail line, a total amount excluding tax, a total tax amount, and a total amount including tax; the purchase receipt transaction includes at least one receipt transaction line, and each invoice detail line and each receipt transaction line includes: quantity, unit price excluding tax, amount excluding tax, and tax amount;
[0035] an invoice detail matching unit, configured to match each invoice detail line with a purchase receipt transaction based on the tax-exclusive unit price, quantity, and a preset tax-exclusive unit price tolerance; obtain corresponding matching information when each invoice detail line matches one or more corresponding receipt transaction lines; and aggregate the tax-exclusive amounts and tax amounts of all receipt transaction lines in the matching information to obtain an aggregated tax-exclusive amount, an aggregated tax amount, and an aggregated tax-inclusive amount;
[0036] a matching amount tail difference elimination unit, configured to adjust the tax-exclusive amount and / or tax amount of at least one received transaction line in the matching information until the three amounts are respectively equal when the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount are unequal to the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the digital electronic invoice, and when the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not greater than a preset total tax-inclusive amount tail difference tolerance;
[0037] The payable invoice document creation unit is used to create a payable invoice document based on the adjusted matching information so as to settle the digital invoice.
[0038] In one possible implementation, the preset tax-exclusive unit price tolerance includes: the tax-exclusive unit price tolerance of each invoice detail line; wherein the tax-exclusive unit price tolerance of each invoice detail line is the same, the tax-exclusive unit price tolerance of some invoice detail lines is the same, or the tax-exclusive unit price tolerance of each invoice detail line is different;
[0039] And / or the invoice detail matching unit matches each invoice detail line with the purchase receiving transaction in the following matching methods: exact matching and fuzzy matching; the exact matching has a higher priority than fuzzy matching; the exact matching is: first matching based on the fact that the tax-exclusive unit price of the receiving transaction line is the same as the tax-exclusive unit price of each invoice detail line, screening out the receiving transaction lines with exact matching tax-exclusive unit prices, and then matching based on quantity; the fuzzy matching is: first matching based on the fact that the difference between the tax-exclusive unit price of the receiving transaction line and the tax-exclusive unit price of each invoice detail line is not greater than the corresponding tax-exclusive unit price tolerance, screening out the receiving transaction lines with fuzzy matching tax-exclusive unit prices, and then matching based on quantity; and / or the criteria for matching based on quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line, and the quantity of an invoice detail line is consistent with the sum of the partial quantities of multiple receiving transaction lines.
[0040] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.
[0042] In a fifth aspect, the present application provides a computer program product, which, when executed on a processor, enables the processor to execute the method described in the first aspect or any possible implementation of the first aspect.
[0043] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0044] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the existing technologies:
[0045] The present application provides a method and system for automated settlement of related transactions based on digital invoices. By setting the tolerance of the unit price excluding tax and the tail difference of the total amount including tax, the application fully considers the slight differences in the unit price accuracy of the seller and the buyer, as well as the slight differences between the amount on the invoice and the actual transaction amount due to rounding or calculation accuracy during the invoice issuance process. By considering the unit price tolerance, automatically judging and processing the tail difference, the matching degree between the invoice detail line and the receiving transaction line is maximized within the unit price tolerance range, and the tail difference of the amount excluding tax and the tax amount summarized in the settlement document of the payable invoice is automatically eliminated to ensure that the amount of the payable invoice document is consistent with the tax invoice amount, thereby improving the accuracy of the data. The application further improves the efficiency and practicality of the automated settlement of digital invoices, significantly reduces the workload of business personnel in manually uploading tax invoices, conducting invoice reviews, and adjusting tolerances and tail differences, thereby greatly improving work efficiency.
[0046] The present application provides a method and system for automated settlement of related transactions based on digital electronic invoices, which can connect to the digital electronic invoice system to automatically obtain invoice structured information and invoice image files, and automatically create related transaction settlement documents by automatically matching digital electronic invoices with purchase orders and receiving transactions. The automated process reduces manual operation workload and human intervention, improves work efficiency while reducing the error rate caused by manual operations, and ensures the consistency of business data and financial data. The present application can summarize and archive digital electronic invoices and their related settlement documents throughout the entire process, generate statistical reports, and facilitate enterprises to view and audit at any time, thereby improving the compliance and transparency of enterprises. The present application provides an efficient, accurate and flexible settlement automation processing method to meet the growing business needs of enterprises, improve settlement efficiency and accuracy, and reduce operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is one of the flow charts of the method for automated settlement of related transactions based on digital electronic invoices provided in an embodiment of the present application;
[0048] Figure 2 This is the second flow chart of the method for automated settlement of related transactions based on digital electronic invoices provided in an embodiment of the present application;
[0049] Figure 3 This is an architectural diagram of an automated settlement system for related transactions based on digital invoices provided in an embodiment of the present application;
[0050] Figure 4 This is an architectural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0052] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.
[0053] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0054] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0055] Figure 1 This is one of the flow charts of the method for automated settlement of related transactions based on digital invoices provided in the embodiment of the present application; Figure 1 As shown, the following steps are included:
[0056] Step S101, obtain the digital electricity invoice issued by the seller and the purchase receipt transaction provided by the purchaser; the digital electricity invoice includes at least one invoice detail line, the total amount excluding tax, the total tax amount and the total amount including tax, and the purchase receipt transaction includes at least one receipt transaction line, and each invoice detail line and each receipt transaction line include: quantity, unit price excluding tax, amount excluding tax and tax amount.
[0057] In one example, the purchase order of the related transaction can be determined based on the sales order number and / or supplier name information carried in the digital electricity invoice; the above-mentioned purchase order is provided by the purchaser; further, the above-mentioned purchase receipt transaction is determined from the purchase order; wherein, the purchase receipt transaction is the details of the goods shipped by the seller and the purchaser has confirmed the receipt of the goods.
[0058] In step S102, each invoice detail line is matched with the purchase receipt transaction based on the unit price excluding tax, the quantity, and the preset tolerance of the unit price excluding tax; when each invoice detail line is matched to one or more corresponding receipt transaction lines, corresponding matching information is obtained; the tax-excluding amount and tax amount of all receipt transaction lines in the matching information are summarized to obtain a summarized tax-excluding amount, a summarized tax amount, and a summarized tax-inclusive amount.
[0059] Specifically, the preset tax-exclusive unit price tolerance includes the tax-exclusive unit price tolerance for each invoice detail line; the tax-exclusive unit price tolerance for each invoice detail line may be the same, the tax-exclusive unit price tolerance for some invoice detail lines may be the same, or the tax-exclusive unit price tolerance for each invoice detail line may be different. Furthermore, preferably, the tax-exclusive unit price for all invoice detail lines may be the same, or different tax-exclusive unit price tolerances may be set for different magnitudes of tax-exclusive unit price.
[0060] For example, after the seller and the buyer mutually determine the unit price, the unit price may be displayed to 2 to 15 decimal places due to the different ways of expressing the unit price according to the system accuracy. Taking into account the difference in the decimal places of the unit prices displayed by the seller and the buyer, and / or the unit price tolerance within a certain range agreed in advance by the seller and the buyer, a reasonable tax-exclusive unit price tolerance can be preset to maximize the matching degree between the invoice detail line and the receiving transaction line within the unit price tolerance. The above-mentioned tax-exclusive unit price tolerance is generally less than 0.01; for example, it can be 0.02, 0.01 or 0.0001 (the value can be determined according to financial experience), and the unit is RMB. For transactions with larger amounts, the tolerance range can be appropriately relaxed; for transactions with smaller amounts, stricter tolerance standards can be set.
[0061] In one example, each invoice detail line is matched with a purchase receipt transaction, including exact matching and fuzzy matching. Exact matching has a higher priority than fuzzy matching, i.e., exact matching is performed first, followed by fuzzy matching. Exact matching is performed by first matching the receipt transaction line's unit price excluding tax to the unit price excluding tax of each invoice detail line, filtering out receipt transaction lines with exact matching of the unit price excluding tax, and then matching based on quantity. Fuzzy matching is performed by first matching the receipt transaction line's unit price excluding tax to the unit price excluding tax of each invoice detail line, ensuring that the difference between the unit price excluding tax and the unit price excluding tax is not greater than the corresponding tolerance of the unit price excluding tax, filtering out receipt transaction lines with fuzzy matching of the unit price excluding tax, and then matching based on quantity.
[0062] Furthermore, the above-mentioned exact matching is to first match the tax-exclusive unit price of each invoice detail line, screen out all receiving transaction lines whose tax-exclusive unit price in the receiving transaction line is consistent with it, then perform quantity matching among all the screened receiving transaction lines, and select at least one receiving transaction line with matching quantity as the receiving transaction line that matches the invoice detail line; the above-mentioned fuzzy matching is to match the tax-exclusive unit price of each invoice detail line in combination with the preset tax-exclusive unit price tolerance, screen out all receiving transaction lines whose tax-exclusive unit price in the receiving transaction line and the tax-exclusive unit price of the invoice detail line are not greater than the tax-exclusive unit price tolerance, then perform quantity matching among all the screened receiving transaction lines, and select at least one receiving transaction line with matching quantity as the receiving transaction line that matches the invoice detail line.
[0063] Further preferably, the above-mentioned matching criteria by quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line, and the quantity of an invoice detail line is consistent with the sum of the partial quantities of multiple receiving transaction lines.
[0064] For example, each receiving transaction line further includes: a remaining invoicable quantity; the remaining invoicable quantity refers to the quantity in the receiving transaction line that has not yet been invoiced;
[0065] Further preferably, the above-mentioned matching by quantity specifically includes: if the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, or the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, then the corresponding one or more receiving transaction lines are used as receiving transaction lines that match the invoice detail line, and the information of the matched receiving transaction lines is copied to the matching information, and the remaining invoicable quantity of the corresponding one or more receiving transaction lines is updated to 0.
[0066] During the actual matching process, a receiving transaction line with a quantity that is consistent with the quantity of the invoice detail line is first selected from all filtered receiving transaction lines as the receiving transaction line that matches the invoice detail line, and the information of the matched receiving transaction line is copied to the matching information, and the remaining invoicable quantity of the matched receiving transaction line is set to 0; then, if the quantity of each receiving transaction line in all filtered receiving transaction lines is inconsistent with the quantity of the invoice detail line, multiple receiving transaction lines with a total quantity equal to the quantity of the invoice detail line are selected from them, and the selected multiple receiving transaction lines are used as the receiving transaction lines that match the invoice detail line, and the information of the matched receiving transaction lines is copied to the matching information, and the remaining invoicable quantities of the matched multiple receiving transaction lines are all set to 0.
[0067] Further preferably, the above-mentioned matching by quantity specifically also includes: if the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line or is consistent with the total partial quantities of multiple receiving transaction lines, then the corresponding one or more receiving transaction lines are used as receiving transaction lines that match the invoice detail line, and the information of the matched receiving transaction lines is copied to the matching information, and in the matching information, the quantity or the total quantity of the one or more receiving transaction lines is set to be consistent with the quantity of the invoice detail line, and the quantity of the invoice detail line is subtracted from the remaining invoicable quantity of the corresponding one or more receiving transaction lines.
[0068] During the actual matching, if the quantity of each of the screened receiving transaction lines is inconsistent with the quantity of the invoice detail line, a receiving transaction line with a quantity greater than the quantity of the invoice detail line is selected as the receiving transaction line that matches the invoice detail line, and the information of the matched receiving transaction line is copied to the matching information. In the matching information, the quantity of the receiving transaction line is set to be consistent with the quantity of the invoice detail line, and the quantity of the invoice detail line is subtracted from the remaining invoiceable quantity of the receiving transaction line. If the quantity of all of the screened receiving transaction lines is inconsistent with the quantity of the invoice detail line, multiple receiving transaction lines whose total quantity is greater than the quantity of the invoice detail line are selected according to a preset rule, and the selected multiple receiving transaction lines are used as the receiving transaction lines that match the invoice detail line, and the information of the matched multiple receiving transaction lines is copied to the matching information. In the matching information, the quantities of the multiple receiving transaction lines are respectively set according to the preset rule so that the sum of the set quantities is consistent with the quantity of the invoice detail line, and the quantities set in the corresponding matching information are respectively subtracted from the remaining invoiceable quantities of the multiple receiving transaction lines.
[0069] Among them, the preset rule is to select multiple receiving transaction lines with corresponding quantity matching sums in order of quantity from large to small, quantity from small to large, difference in quantity relative to the quantity of matching invoice detail lines from small to large, difference in quantity relative to the quantity of matching invoice detail lines from large to small, or random quantity, and set the quantity in the matching information respectively.
[0070] Step S103: When at least one of the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount corresponding to the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the digital electronic invoice is not equal, and the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not greater than the preset total tax-inclusive amount tail difference tolerance, adjust the tax-exclusive amount and / or tax amount of at least one receiving transaction line in the matching information until the three are respectively equal.
[0071] For example, the above-mentioned tolerance for the tail difference of the total tax-inclusive amount is usually relatively small. The tail difference generally refers to the slight difference between the amount on the invoice and the actual transaction amount due to rounding or calculation accuracy during the invoice issuance process; for example, the above-mentioned tolerance for the tail difference can be 0.1, 0.2, etc. (can be determined according to financial experience); the unit is yuan.
[0072] Specifically, one or more receiving transaction lines can be arbitrarily selected from the matching information to adjust their tax-exclusive amount and / or tax amount; or at least one receiving transaction line at at least one preset position can be selected from the matching information to adjust its tax-exclusive amount and / or tax amount.
[0073] In one example, when the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not equal to 0, and the difference is not greater than the preset total tax-inclusive amount tail difference tolerance, or when the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is equal to 0, but the difference between the aggregated tax amount and the total tax amount of the digital electronic invoice is not equal to 0, the tax-exclusive amount and / or tax amount of at least one receiving transaction line selected from the matching information is adjusted so that the adjusted aggregated tax-exclusive amount, aggregated tax amount, and aggregated tax-inclusive amount are respectively the same as the total tax-exclusive amount, total tax amount, and total tax-inclusive amount of the digital electronic invoice.
[0074] Step S104: creating an invoice payable document based on the adjusted matching information to settle the digital electricity invoice.
[0075] Figure 2 This is the second flow chart of the method for automated settlement of related transactions based on digital invoices provided in the embodiment of the present application; Figure 2 Shown, including:
[0076] (1) Invoice data acquisition: Periodically pull digital invoice structured data and invoice image files from the digital invoice system. Configure the user and password authorized for the digital invoice service, set up the Restful interface call task, use the invoice code as the unique primary key, and periodically synchronize the invoice data. Invoice structured data includes invoice number, invoice date, invoice issuing company name (related transaction seller), invoice issuing company unified social credit code, remarks, total amount including tax, amount excluding tax, tax amount; product code, product description, specification model, unit, quantity, unit price, amount excluding tax, tax rate, tax amount. The digital invoice image file can refer to the display information of the existing digital invoice.
[0077] (2) Purchase order matching: Automatically match the purchase order and purchase receipt transaction of the buyer of the related transaction in the procurement system based on the sales order number and supplier name in the digital invoice of the seller of the related transaction. If the total amount is consistent, a reconciliation statement will be automatically created.
[0078] (3) Invoice details matching: Based on the principle of precise matching first and fuzzy matching later, precise matching refers to the line where the unit price excluding tax on the digital invoice detail line is exactly the same as the unit price excluding tax on the purchase order receipt transaction line. Fuzzy matching is based on the rule that if the difference between the unit price excluding tax on the invoice and the unit price excluding tax on the purchase order receipt transaction is within the tolerance range, the two are considered to be the same. The specific steps are as follows:
[0079] (3-1) Get the preset unit price tolerance Δp. Define the number of invoice detail lines as j, j = 1, 2, 3, ..., n; define the number of purchase order receipt transaction lines as k, k = 1, 2, 3, ..., m. Q k The invoiced quantity for line k of the purchase order receipt transaction.
[0080] (3-2) Set the number of traversal rounds to S, with an initial value of 1 and a value of S ≤ 5. Match the invoicable quantities of the purchase receipt transaction lines one by one according to the invoice line numbers from smallest to largest.
[0081] (3-3) If S=1, the invoice line and the receiving transaction line with the same unit price and quantity are marked as matched and removed from the matching range. If all invoice lines j are marked as matched, proceed to step (4) to determine and eliminate the tail difference, otherwise proceed to the next step.
[0082] (3-4) Set S = S + 1 and S ≤ 5. Match invoice lines with the same unit price as the receiving transaction line, but with a smaller invoice line quantity than the receiving transaction line, in ascending order of the available invoice quantity of the receiving transaction line. Mark the matched invoice lines as matched and remove them from the matching range. Any invoice line with a matching quantity less than the available invoice quantity of the receiving transaction line that is greater than 0 will be used for subsequent invoice line matching. If all invoice lines j are marked as matched, proceed to step (4) to determine and eliminate the difference. Otherwise, proceed to the next step.
[0083] (3-5) Set S = S + 1 and S ≤ 5: For invoice lines with the same unit price as the receiving transaction line, but with a larger invoice line quantity than the receiving transaction line, perform a cumulative match based on the receiving transaction line's available invoice quantity from smallest to largest. Matched invoice lines and receiving transaction lines are marked as matched and removed from the matching range. The receiving transaction line's available invoice quantity minus the matched quantity, if greater than 0, is used for subsequent invoice line matching. If all invoice lines j are marked as matched, proceed to step (4) to determine and eliminate the tail difference; otherwise, proceed to the next step.
[0084] (3-6) Set S = S + 1 and S ≤ 5: Add the unit price tolerance Δp, and add the remaining unit prices of the receiving transaction lines ± Δp to obtain the unit price range within the tolerance range. Match the invoice line unit price with it. If it falls within the unit price range of the receiving transaction line, it meets the unit price matching condition. Continue to match the invoice lines that meet the conditions and whose quantity is less than the invoiceable quantity of the receiving transaction line according to the invoiceable quantity of the receiving transaction line from small to large. Mark the matched ones as matched and eliminate the matching range. The invoice line with the invoiceable quantity of the receiving transaction line minus the matched quantity is greater than 0 and continues to be used for subsequent invoice line matching. If all invoice lines j are marked as matched, then go to step (4) to judge and eliminate the tail difference, otherwise go to the next step.
[0085] (3-7) Set S = S + 1, and S ≤ 5: Invoice lines that meet the unit price matching conditions in the previous round and whose quantity is greater than the invoiceable quantity of the receiving transaction line are cumulatively matched according to the invoiceable quantity of the receiving transaction line from the smallest to the largest. Invoice lines that have been matched are marked as matched and removed from the matching range. Invoice lines whose invoiceable quantity of the receiving transaction line is greater than 0 after deducting the matched quantity are used for subsequent invoice line matching. If all invoice lines j are marked as matched, proceed to step (4) to determine and eliminate the difference. Otherwise, notify the buyer by email and verify with the seller to re-invoice.
[0086] When all invoice lines j are marked as matched, the correspondence between the invoice detail lines, the purchase receipt transaction lines, and the invoiced quantity is output, as shown in Table 1:
[0087] Table 1
[0088]
[0089] As shown in Table 1, the first invoice detail line matches the i-th receiving transaction line, the j-th receiving transaction line, ..., and the h-th receiving transaction line. The invoice quantities for each matching receiving transaction line are: Accordingly, the remaining invoicable quantity of the i-th receiving transaction line, the j-th receiving transaction line, ..., and the h-th receiving transaction line in the original purchase receiving transaction is deducted from the original remaining invoicable quantity.
[0090] Accordingly, the aggregated matching information can be listed as follows:
[0091]
[0092] in, The quantity of invoice issued for each receiving transaction line (1, 2, ..., m) after this matching.
[0093] (4) Determination and elimination of tail difference: Determine whether there is any difference between the total amount including tax and tax amount of the matched digital invoice and the total amount including tax and tax amount of the matched purchase receipt transaction line summary. If there is no difference, directly create the invoice payable document for the purchaser of the related transaction and associate it with the digital invoice image file. If there is a tail difference in any of the total amount including tax and tax amount, adjust the amount of the invoice payable document according to the set tail difference tolerance range so that it is no different from the tax invoice amount, and automatically create the invoice payable document for the purchaser of the related transaction and associate it with the tax invoice image file. If it exceeds the tail difference tolerance range set by the system, the seller will be notified by email to re-invoice. The steps for adjusting the tail difference are as follows:
[0094] (4-1) Parameter definition
[0095] a. Obtain the allowable difference Δt (Δt>0) between the total amount including tax of the invoice and the total amount including tax of the payable invoice.
[0096] b. Define the total amount including tax, total amount excluding tax, and total tax amount of an A / P invoice as X, Y, and Z, respectively, where X = Y + Z. For a digital invoice, the total amount including tax, total amount excluding tax, and total tax amount are X', Y', and Z', respectively, where X' = Y' + Z'.
[0097] c. Define the product detail line number of the payable invoice as i, i = 1, 2, 3, ..., n; X i 、Y i , Z i Respectively represent the tax-inclusive amount, tax-exclusive amount, and tax amount of the i-th line of the invoice payable. i , Y′ i , Z′ i Respectively represent the adjusted tax-inclusive amount, tax-exclusive amount, and tax amount of row i of the A / P invoice.
[0098] Total amount including tax of invoice payable:
[0099] Total amount of invoice payable excluding tax:
[0100] Total tax amount of invoice payable:
[0101] d. Define the difference between the total tax amount of the A / P invoice and the digital invoice as ΔX, where ΔX = |XX′|; and the difference between the total tax amount of the A / P invoice and the digital invoice as ΔZ, where ΔZ = |ZZ′|.
[0102] (4-2) Determination of tail difference range
[0103] When the total amount including tax differs by ΔX≠0 and ΔX≤Δt, or ΔX=0 and ΔZ≠0, the system meets the allowable range for the difference. The difference between the tax-exclusive amount and the tax amount of the item in the A / P invoice detail line will be automatically adjusted to eliminate the difference. If the total amount including tax differs by ΔX>Δt, the seller will be notified by email to reissue the invoice.
[0104] (4-3) Tail Difference Adjustment
[0105] Scenario 1: When ΔX≠0 and ΔX≤Δt, that is, there is a difference between the total amount including tax of the A / P invoice and the digital invoice, the tax-inclusive amount, tax-exclusive amount, and tax amount of the A / P invoice detail line are adjusted.
[0106] Set i=1. In this example, select the first detail line of the A / P invoice for adjustment.
[0107] The tax-inclusive amount after adjustment: X′1=X1+(X′-X);
[0108] Adjusted tax amount: Z′1=Z1+(Z′-Z);
[0109] The adjusted amount excluding tax is: Y′1=X′1-Z′1.
[0110] Scenario 2: When ΔX = 0 and ΔZ ≠ 0, that is, the total amount including tax of the A / P invoice and the digital invoice is the same, but there is a difference in the total amount excluding tax or the tax amount, then the total amount excluding tax and the tax amount of the A / P invoice detail line will be adjusted.
[0111] Set i=1. In this example, select the first detail line of the A / P invoice for adjustment.
[0112] The tax-inclusive amount after adjustment: X′1=X1;
[0113] Adjusted tax amount: Z′1=Z1+(Z′-Z);
[0114] The adjusted amount excluding tax is: Y′1=Y1+(Y′-Y).
[0115] (4-4) Reassign row detail amounts: Reassign the tax-inclusive amount, tax-exclusive amount, and tax amount of the first detail row of the invoice payable document to X′1, Y′1, and Z′1.
[0116] (5) Creation and push of payable invoice documents: Create, submit and push payable invoice documents to the payable invoice settlement module.
[0117] (6) Review of invoice payable documents and invoice accounting: The financial staff reviews the invoice payable documents. Once approved, they are pushed to the Enterprise Resource Planning (ERP) system for automatic invoice accounting and generate an ERP invoice voucher number.
[0118] (7) Payment order creation: Automatically generate a payment order based on the payable invoice document, including payment amount, payment date, payment method and other information.
[0119] (8) Review of payment orders and payment accounting: After the cashier reviews and approves the payment order, he / she will make the payment according to the payment date, and push the invoice payment information to ERP for invoice payment accounting, generating an ERP payment voucher number.
[0120] (9) Full-process data aggregation and archiving: The purchase orders, purchase receipt transactions, payable invoice documents and status, payment documents and status, invoice vouchers, and payment vouchers associated with digital invoices are aggregated and archived throughout the entire process to generate statistical reports.
[0121] In a further embodiment, an automated settlement system for related transactions based on digital invoices may be constructed based on the automated settlement method described above. The system may include:
[0122] (1) Digital invoice data acquisition module
[0123] This module is responsible for regularly obtaining the structured data and invoice image files of invoices from the digital invoice system.
[0124] Specific features include:
[0125] 1. Data interface connection: Configure the user and password authorized for the digital invoice service, verify the interface connectivity, and ensure that the interface can accurately obtain digital invoice data.
[0126] 2. Scheduled task settings: Set interface scheduled tasks according to user needs.
[0127] 3. Scheduled retrieval: Set the time according to the scheduled task and retrieve invoice data from the electronic invoice system on a regular basis every day.
[0128] 4. Data parsing and storage: The acquired invoice structured data, such as invoice number, invoice date, and invoice issuer information, is stored in the database. Simultaneously, the invoice image file is saved to the file server.
[0129] (2) A / P Invoice Creation Module
[0130] This module is responsible for matching the purchase orders associated with digital invoices, automatically reconciling accounts, and creating payable invoices. Specific functions include:
[0131] 1. Purchase order matching: Automatically match the purchase order of the buyer of the related transaction in the procurement system based on the sales order number and supplier name in the digital electricity invoice remarks.
[0132] 2. Invoice details matching: Match the unit price excluding tax and quantity on the digital invoice detail line with the unit price excluding tax and invoicable quantity on the purchase order receiving transaction line until all invoice details are matched.
[0133] 3. Difference Determination and Processing: This function determines whether there are any differences in the total amount including tax, total amount excluding tax, and tax amount between the digital invoice line and the corresponding A / P invoice document for the current invoicing line of the receiving transaction. If the difference is within the allowable range, the A / P invoice amount is automatically adjusted to align with the tax invoice amount. If it is outside the allowable range, the buyer is notified by email and the invoice is reissued after verification with the seller.
[0134] 4. Creation of A / P invoice documents: Based on the results of invoice line matching and tail difference processing, A / P invoice documents are automatically created and associated with the corresponding digital invoice image files.
[0135] (3) Payable Invoice Settlement Module
[0136] This module is responsible for reviewing the invoices payable and automatically generating payment orders for review and payment after approval. Specific functions include:
[0137] 1. Review of payable invoices: Financial personnel review payable invoices in the supplier settlement system to ensure the accuracy and compliance of the document information.
[0138] 2. Payment order generation: After the A / P invoice is reviewed and approved, the system automatically generates a payment order, including payment amount, payment date, payment method, and other information.
[0139] 3. Payment order review and payment: The cashier reviews the payment order and proceeds with the payment after confirming that it is correct. After the payment is successful, the payment information is pushed to the ERP system for payment accounting.
[0140] (4) Financial automatic accounting module
[0141] This module is responsible for automatically recording invoices based on the associated digital invoices with the payable invoices, and for recording invoice payments based on the payable invoices' payment status. Specific functions include:
[0142] 1. Automatic invoice accounting: For approved payable invoice documents, they are automatically pushed to the ERP system for invoice accounting and generate ERP invoice voucher numbers.
[0143] 2. Automatic payment accounting: according to the payment of the payable invoice, automatically push the ERP system to perform payment accounting, generate ERP payment voucher number. At the same time, associate the payment information with the invoice information to ensure the integrity and accuracy of the data.
[0144] (5) Report management module
[0145] This module is responsible for summarizing and archiving the whole process of the purchase order, purchase receipt transaction, payable invoice, payment document, invoice voucher and payment voucher associated with the electronic invoice, and generating statistical report.
[0146] In a further embodiment, Figure 3 is the architecture diagram of the electronic invoice-based associated transaction automatic settlement system provided by the embodiment of the application; as Figure 3 shown, comprising:
[0147] The electronic invoice acquisition unit 310 is configured to acquire the electronic invoice issued by the seller and the purchase receipt transaction provided by the purchaser. The electronic invoice includes at least one invoice detail line, a total tax-exclusive amount, a total tax amount, and a total tax-inclusive amount. The purchase receipt transaction includes at least one receipt transaction line. Each invoice detail line and each receipt transaction line includes: quantity, tax-exclusive unit price, tax-exclusive amount, and tax amount.
[0148] The invoice detail matching unit 320 is configured to match each invoice detail line with the purchase receipt transaction in combination with the tax-exclusive unit price, quantity, and preset tax-exclusive unit price tolerance. When each invoice detail line is matched to one or more corresponding receipt transaction lines, the corresponding matching information is acquired. The tax-exclusive amounts and tax amounts of all receipt transaction lines in the matching information are summarized respectively to obtain a summarized tax-exclusive amount, a summarized tax amount, and a summarized tax-inclusive amount.
[0149] The matching amount tail difference elimination unit 330 is configured to adjust the tax-exclusive amount and / or tax amount of at least one receipt transaction line in the matching information when the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount are not equal to at least one of the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the electronic invoice, and the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the electronic invoice is not greater than the preset total tax-inclusive amount tail difference tolerance, until the three are equal respectively.
[0150] The payable invoice document creation unit 340 is configured to create a payable invoice document according to the adjusted matching information, so as to settle the electronic invoice.
[0151] In one possible implementation, the preset tax-exclusive unit price tolerance includes: the tax-exclusive unit price tolerance of each invoice detail line; wherein the tax-exclusive unit price tolerance of each invoice detail line is the same, the tax-exclusive unit price tolerance of some invoice detail lines is the same, or the tax-exclusive unit price tolerance of each invoice detail line is different;
[0152] The invoice detail matching unit 320 matches each invoice detail line with the purchase receipt transaction in the following matching methods: exact matching and fuzzy matching; the exact matching has a higher priority than the fuzzy matching; the exact matching is: first matching is performed based on the fact that the tax-exclusive unit price of the receipt transaction line is the same as the tax-exclusive unit price of each invoice detail line, filtering out the receipt transaction lines with exact tax-exclusive unit price matches, and then matching is performed based on quantity; the fuzzy matching is: first matching is performed based on the fact that the difference between the tax-exclusive unit price of the receipt transaction line and the tax-exclusive unit price of each invoice detail line is not greater than the corresponding tax-exclusive unit price tolerance, filtering out the receipt transaction lines with fuzzy tax-exclusive unit price matches, and then matching is performed based on quantity; and / or the matching criteria based on quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receipt transaction line, the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receipt transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receipt transaction line, and the quantity of an invoice detail line is consistent with the sum of the partial quantities of multiple receipt transaction lines.
[0153] It should be understood that the above-mentioned system is used to execute the method in the above-mentioned embodiment. The implementation principle and technical effect of the corresponding program unit in the system are similar to those described in the above-mentioned method. The working process of the system can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0154] Based on the method in the above embodiment, the embodiment of the present application provides an electronic device, such as Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the method in the above embodiment.
[0155] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
[0156] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0157] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0158] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0159] The method steps in the embodiments of the present application can be implemented by means of hardware, or by means of a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in a Random Access Memory (RAM), a flash memory, a Read-only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), a register, a hard disk, a mobile hard disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0160] In the above embodiments, all or part of the embodiments can be implemented by means of software, hardware, firmware or any combination thereof. When implemented by means of software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed by a computer, all or part of the computer program instructions generate the processes or functions described in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as Solid State Disk (SSD)), etc.
[0161] It can be understood that the various numerical numbers involved in the embodiments of the present application are only used for differentiation for convenience of description, and do not limit the scope of the embodiments of the present application.
[0162] It is easy for those skilled in the art to understand that the above is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for automated settlement of related transactions based on digital invoices, characterized in that: include: Obtain the digital electricity invoice issued by the seller and the purchase receipt transaction provided by the buyer; The digital invoice includes at least one invoice detail line, a total amount excluding tax, a total tax amount, and a total amount including tax; the purchase receipt transaction includes at least one receipt transaction line, and each invoice detail line and each receipt transaction line includes: quantity, unit price excluding tax, amount excluding tax, and tax amount; Matching each invoice detail line with a purchase receipt transaction based on the tax-exclusive unit price, quantity, and a preset tax-exclusive unit price tolerance; obtaining corresponding matching information when each invoice detail line matches one or more corresponding receipt transaction lines; summarizing the tax-exclusive amounts and tax amounts of all receipt transaction lines in the matching information to obtain a summarized tax-exclusive amount, a summarized tax amount, and a summarized tax-inclusive amount; When at least one of the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount is not equal to the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the digital invoice, and the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the digital invoice is not greater than the preset total tax-inclusive amount tail difference tolerance, the tax-exclusive amount and / or the tax amount of at least one receiving transaction line in the matching information is adjusted until the three amounts are equal; Creating an A / P invoice document based on the adjusted matching information to settle the digital electricity invoice; The preset tax-exclusive unit price tolerance includes: the tax-exclusive unit price tolerance of each invoice detail line; wherein the tax-exclusive unit price tolerance of each invoice detail line is the same, the tax-exclusive unit price tolerance of some invoice detail lines is the same, or the tax-exclusive unit price tolerance of each invoice detail line is different; and / or in combination with a preset tax-exclusive unit price tolerance, matching each invoice detail line with the purchase receipt transaction, including: exact matching and fuzzy matching; the exact matching has a higher priority than the fuzzy matching; The exact matching is as follows: first, matching is performed based on whether the tax-exclusive unit price of the receiving transaction line is the same as the tax-exclusive unit price of each invoice detail line, filtering out the receiving transaction lines with exact matching tax-exclusive unit prices, and then matching based on quantity; The fuzzy matching is as follows: first, matching is performed based on the difference between the tax-exclusive unit price of the receiving transaction line and the tax-exclusive unit price of each invoice detail line being no greater than the corresponding tax-exclusive unit price tolerance, screening out the receiving transaction lines with fuzzy matching of the tax-exclusive unit price, and then matching based on quantity; and / or The matching criteria based on quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, the quantity of an invoice detail line is consistent with the total quantity of multiple receiving transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line, and the quantity of an invoice detail line is consistent with the total partial quantity of multiple receiving transaction lines.
2. The method according to claim 1, characterized in that Each receiving transaction line also includes: the remaining invoicable quantity; the remaining invoicable quantity refers to the quantity in the receiving transaction line that has not yet been invoiced; If the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, or the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, the corresponding one or more receiving transaction lines will be used as the receiving transaction lines that match the invoice detail line, and the information of the matching receiving transaction lines will be copied to the matching information. The remaining invoicable quantity of the corresponding one or more receiving transaction lines will be updated to 0; If the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line or the total partial quantity of multiple receiving transaction lines, the corresponding one or more receiving transaction lines will be used as the receiving transaction lines that match the invoice detail line, and the information of the matched receiving transaction lines will be copied to the matching information. In the matching information, the quantity or the total quantity of the one or more receiving transaction lines will be set to be consistent with the quantity of the invoice detail line, and the quantity of the invoice detail line will be deducted from the remaining invoicable quantity of the corresponding one or more receiving transaction lines.
3. The method according to claim 1 or 2, characterized in that The matching by quantity includes: From all filtered receiving transaction lines, select a receiving transaction line whose quantity matches the quantity of the invoice detail line. This line is used as the receiving transaction line that matches the invoice detail line. The information of the matching receiving transaction line is copied to the matching information, and the remaining invoicable quantity of the matching receiving transaction line is set to 0. If the quantity of each of the filtered receiving transaction lines is inconsistent with the quantity of the invoice detail line, multiple receiving transaction lines whose total quantity is equal to the quantity of the invoice detail line are selected. The selected receiving transaction lines are used as the receiving transaction lines that match the invoice detail line. The information of the matching receiving transaction lines is copied to the matching information, and the remaining invoicable quantity of the matching receiving transaction lines is set to 0. If the quantity of each of the filtered receiving transaction lines is inconsistent with the quantity of the invoice detail line, then select a receiving transaction line with a quantity greater than the quantity of the invoice detail line as the receiving transaction line that matches the invoice detail line, copy the information of the matched receiving transaction line to the matching information, set the quantity of the receiving transaction line in the matching information to be consistent with the quantity of the invoice detail line, and subtract the quantity of the invoice detail line from the remaining invoiceable quantity of the receiving transaction line; or If the quantity of all the received transaction lines in all the filtered received transaction lines is inconsistent with the quantity of the invoice detail line, then according to the preset rules, multiple received transaction lines whose total quantity is greater than the quantity of the invoice detail line are selected, and the selected multiple received transaction lines are used as the received transaction lines that match the invoice detail line, and the information of the matched multiple received transaction lines is copied to the matching information; in the matching information, the quantities of the multiple received transaction lines are respectively set according to the preset rules, so that the sum of the set quantities is consistent with the quantity of the invoice detail line, and the quantities set in the corresponding matching information are respectively subtracted from the remaining invoiceable quantities of the multiple received transaction lines; wherein the preset rules are to select multiple received transaction lines whose corresponding total quantities match in the order of the number of received transaction lines from large to small, the quantity from small to large, the difference in quantity relative to the number of the invoice detail line to be matched from small to large, the difference in quantity relative to the number of the invoice detail line to be matched from large to small, or the quantity is random, and the quantities are respectively set in the matching information.
4. The method according to claim 1, wherein Adjust the tax-exclusive amount and / or tax amount of the receiving transaction line, including: Arbitrarily select one or more receiving transaction lines from the matching information to adjust their tax-exclusive amount and / or tax amount; or select at least one receiving transaction line at at least one preset position from the matching information to adjust its tax-exclusive amount and / or tax amount.
5. The method according to claim 1 or 4, characterized in that Adjust the tax-exclusive amount and / or tax amount of the receiving transaction line, including: When the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not equal to 0, and the difference is not greater than the preset tolerance for the tail difference of the total tax-inclusive amount, or when the difference between the aggregated tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is equal to 0, but the difference between the aggregated tax amount and the total tax amount of the digital electronic invoice is not equal to 0, adjust the tax-exclusive amount and / or tax amount of at least one receiving transaction line selected from the matching information so that the adjusted aggregated tax-exclusive amount, aggregated tax amount, and aggregated tax-inclusive amount are respectively the same as the total tax-exclusive amount, total tax amount, and total tax-inclusive amount of the digital electronic invoice.
6. The method according to claim 1 or 2, characterized in that Obtain digital electricity invoices issued by the seller of related-party transactions and purchase receipts provided by the purchaser, including: Determine the purchase order for the related transaction based on the sales order number and / or supplier name information carried on the digital electricity invoice; the purchase order is provided by the purchaser; The purchase receipt transaction is determined from the purchase order; the purchase receipt transaction is the details of the goods shipped by the seller and the purchaser has confirmed receipt of the goods.
7. An automated settlement system for related transactions based on digital invoices, characterized by: include: The digital invoice acquisition unit is used to obtain the digital invoice issued by the seller and the purchase receipt transaction provided by the purchaser; The digital invoice includes at least one invoice detail line, a total amount excluding tax, a total tax amount, and a total amount including tax; the purchase receipt transaction includes at least one receipt transaction line, and each invoice detail line and each receipt transaction line includes: quantity, unit price excluding tax, amount excluding tax, and tax amount; an invoice detail matching unit, configured to match each invoice detail line with a purchase receipt transaction based on the tax-exclusive unit price, quantity, and a preset tax-exclusive unit price tolerance; obtain corresponding matching information when each invoice detail line matches one or more corresponding receipt transaction lines; and aggregate the tax-exclusive amounts and tax amounts of all receipt transaction lines in the matching information to obtain an aggregated tax-exclusive amount, an aggregated tax amount, and an aggregated tax-inclusive amount; a matching amount tail difference elimination unit, configured to adjust the tax-exclusive amount and / or tax amount of at least one received transaction line in the matching information until the three amounts are respectively equal when the summarized tax-exclusive amount, the summarized tax amount, and the summarized tax-inclusive amount are unequal to the total tax-exclusive amount, the total tax amount, and the total tax-inclusive amount of the digital electronic invoice, and when the difference between the summarized tax-inclusive amount and the total tax-inclusive amount of the digital electronic invoice is not greater than a preset total tax-inclusive amount tail difference tolerance; an invoice payable document creation unit, configured to create an invoice payable document based on the adjusted matching information, so as to settle the digital invoice; The preset tax-exclusive unit price tolerance includes: the tax-exclusive unit price tolerance of each invoice detail line; wherein the tax-exclusive unit price tolerance of each invoice detail line is the same, the tax-exclusive unit price tolerance of some invoice detail lines is the same, or the tax-exclusive unit price tolerance of each invoice detail line is different; And / or the invoice detail matching unit matches each invoice detail line with the purchase receiving transaction in the following matching methods: exact matching and fuzzy matching; the exact matching has a higher priority than fuzzy matching; the exact matching is: first matching based on the fact that the tax-exclusive unit price of the receiving transaction line is the same as the tax-exclusive unit price of each invoice detail line, screening out the receiving transaction lines with exact matching tax-exclusive unit prices, and then matching based on quantity; the fuzzy matching is: first matching based on the fact that the difference between the tax-exclusive unit price of the receiving transaction line and the tax-exclusive unit price of each invoice detail line is not greater than the corresponding tax-exclusive unit price tolerance, screening out the receiving transaction lines with fuzzy matching tax-exclusive unit prices, and then matching based on quantity; and / or the criteria for matching based on quantity include at least one of the following criteria: the quantity of an invoice detail line is consistent with the quantity of a receiving transaction line, the quantity of an invoice detail line is consistent with the sum of the quantities of multiple receiving transaction lines, the quantity of an invoice detail line is consistent with the partial quantity of a receiving transaction line, and the quantity of an invoice detail line is consistent with the sum of the partial quantities of multiple receiving transaction lines.
8. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Order settlement method and device
CN116720810A