Disclosure of Invention
In view of the above, the present invention has been made to provide a price and tax separating method, apparatus, electronic device and readable storage medium that solve the above problems, or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a price and tax separation method, where the method includes:
acquiring a transaction code of a to-be-processed transaction detail document;
according to the transaction code, determining a tax accounting entry corresponding to the transaction detail document;
and inputting the tax-dividing accounting entry into a financial system.
Optionally, in the method, determining, according to the transaction code, a tax-dividing accounting entry corresponding to the transaction document includes:
inputting the transaction code into a rules engine;
outputting a tax-dividing accounting entry corresponding to the transaction detail document by utilizing the rule engine;
the rule engine specifies the corresponding relation between the transaction code and the transaction behavior and the tax rate.
Optionally, in the method, obtaining the transaction code of the pending transaction detail document includes:
adding the transaction detail bill of the previous day into the memory;
and acquiring the transaction detail bill from the memory in a concurrent and circulating manner, and acquiring the transaction codes of the transaction details one by one.
Optionally, in the method, the adding of the transaction detail document of the previous day to the memory includes:
acquiring an accounting running file and an ending identification file generated by each service system in the previous day;
under the condition that the ending identification file is obtained, analyzing the accounting journal file to obtain a transaction detail bill of the previous day;
and adding the transaction detail bill into a memory.
Optionally, in the method, before the step of adding the previous-day transaction detail document to the memory, the method further includes:
and clearing the historical record of the tax accounting entry.
In a second aspect, an embodiment of the present invention provides a price and tax separating apparatus, including:
the acquisition module is used for acquiring the transaction code of the to-be-processed transaction detail bill;
the determining module is used for determining a tax-dividing accounting entry corresponding to the transaction detail bill according to the transaction code;
and the transmission module is used for inputting the tax-separating accounting entry into the financial system.
Optionally, in the apparatus, the determining module specifically includes:
an input unit for inputting the transaction code into a rules engine;
the determining unit is used for determining a tax-dividing accounting entry corresponding to the transaction detail document according to an output result of the rule engine;
wherein, the rule engine is used for outputting the accounting entry according to the transaction code.
Optionally, in the apparatus, the obtaining module includes:
the acquisition unit is used for acquiring the transaction detail document of the previous day and adding the transaction detail document into the memory;
and the processing unit is used for acquiring the transaction detail bill from the memory in a concurrent and cyclic manner and acquiring the transaction codes of the transaction detail bill one by one.
Optionally, in the apparatus, the obtaining unit includes:
the file acquisition subunit is used for acquiring the accounting running files and the ending identification files generated by each service system in the previous day;
the analysis subunit is configured to, in the case that the end identifier file is obtained, analyze the accounting journal file to obtain a transaction detail document of the previous day;
and the adding subunit is used for adding the transaction detail bill into the memory.
Optionally, the apparatus further comprises:
and the clearing module is used for clearing the historical record of the tax-dividing accounting entry before the step of adding the transaction detail document of the previous day into the memory.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the transaction code of the to-be-processed transaction detail document is obtained; determining a tax accounting entry corresponding to the transaction detail document according to the transaction code; and inputting the tax accounting entry into a financial system. Because the corresponding tax-dividing accounting entry is obtained according to the transaction code in the transaction detail document, the tax-adding separation processing of a large amount of transaction detail documents can be quickly completed, and the tax-adding separation processing method is also suitable for tax-adding separation of non-entity commodities, and then tax-dividing accounting entry data is pushed to a financial system, so that subsequent financial behaviors can be executed. The embodiment of the invention effectively solves the problems that the existing price and tax entry mode is slow in tax entry processing speed and cannot meet the tax entry scene of transaction receipts without entity products.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, a flow chart of steps of an embodiment of a price and tax separation method according to the present invention is shown, and may specifically include steps 101 to 103.
The embodiment of the invention is applied to the terminal, and the terminal can be a mobile terminal and a non-mobile terminal, such as office equipment of a computer, a portable computer and the like.
Step 101, acquiring a transaction code of a pending transaction detail document.
In the step, no matter the transaction is a physical commodity transaction or a virtual commodity transaction, or a financial behavior or a service behavior transaction, the transaction detail documents are set with different transaction codes according to different transaction behaviors, in the T +1 automatic batch processing, all the transaction detail documents of the T day are added into the memory, the transaction detail documents added into the memory are circularly added, and then the transaction codes of the transaction documents to be processed are obtained.
And 102, determining a tax-dividing accounting entry corresponding to the transaction detail document according to the transaction code.
In this step, because the transaction code is an identification code of transaction behaviors such as commodity transaction, service transaction, financial transaction and the like, according to the transaction code in each transaction detail document, a specific transaction behavior corresponding to the transaction detail unit can be determined, and according to a corresponding relationship between the transaction behavior and the tax rate, the tax corresponding to each transaction detail document can be determined, so that a tax accounting entry for representing the debit and credit relationship voucher can be generated in an operation-change-increase manner.
And 103, inputting the tax-dividing accounting entry into a financial system.
In the step, the fiscal behaviors such as making financial statements and the like can be carried out subsequently by inputting the tax accounting entry corresponding to the transaction detail document into the financial system. Alternatively, the financial system may be a golden butterfly system or the like.
In the embodiment of the invention, the transaction code of the transaction detail bill to be processed is obtained; determining a tax accounting entry corresponding to the transaction detail document according to the transaction code; and inputting the tax accounting entry into a financial system. Because the corresponding tax-separating accounting entry is obtained according to the transaction code in the transaction detail document, the tax-separating processing of a large number of transaction detail documents can be quickly completed, and the tax-separating accounting entry is also suitable for tax-separating non-entity commodities, and then tax-separating accounting entry data is pushed to a financial system, so that subsequent financial behaviors can be executed. The embodiment of the invention effectively solves the problems that the existing price and tax entry mode is slow in tax entry processing speed and cannot meet the tax entry scene of a transaction document without a solid product.
Optionally, in an embodiment, the step 102 specifically includes steps 201 to 202.
Step 201, inputting the transaction code into a rule engine; the rule engine specifies the corresponding relation between the transaction code and the transaction behavior and the tax rate.
In the step, the transaction codes in the transaction detail receipt are read one by one, and after the corresponding transaction codes are read, the transaction codes are directly input into a rule engine which defines the corresponding relation between the transaction codes and the transaction behaviors and the tax rate in advance. When the corresponding relation between the transaction code and the transaction behavior and the tax rate is determined, the conditions of tax rate reduction and exemption and the like are considered.
And 202, outputting a tax-dividing accounting entry corresponding to the transaction detail document by using the rule engine.
In the step, the rule engine is a service for quickly explaining the corresponding rule according to the rule; because the rule engine stipulates the corresponding relation between the transaction code and the transaction behavior and the tax rate, the transaction behavior and the tax rate corresponding to the transaction code can be determined according to the corresponding relation, the tax to be paid is further calculated, and then the corresponding accounting entry is generated according to the transaction behavior and the tax.
When the tax is not zero, namely the transaction behavior corresponding to the transaction code needs to pay the tax, the output result of the rule engine comprises a tax-dividing accounting entry and a non-tax-dividing accounting entry corresponding to the transaction code; when the tax is zero, that is, the transaction behavior corresponding to the transaction code does not need to pay the tax, the output result of the rule engine only includes the non-tax accounting entry corresponding to the transaction code, that is, the corresponding tax accounting entry is a null value. Therefore, the tax-dividing accounting entry corresponding to each transaction detail document can be determined according to the output result of the rule engine.
In practical application, the rule engine can determine the corresponding tax rate according to the transaction codes, namely, the transaction codes of the corresponding transaction detail documents needing tax payment can be screened out, the transaction codes of the corresponding transaction detail documents needing no tax payment can be screened out, the tax payment is determined according to a tax rate formula for the needed tax payment, and tax payment accounting entries serving as loan vouchers are output in the rule engine according to the tax payment and transaction behaviors, so that the price and tax separation behavior is completed.
In the embodiment, transaction behaviors needing tax separation are quickly positioned through the rule engine by depending on a transaction code rule system, and tax separation accounting entry is generated.
Optionally, in an embodiment, the step 101 includes steps 111 to 112.
And step 111, acquiring the transaction detail bill of the previous day and adding the transaction detail bill into the memory.
In the step, when the preset time limit is reached, transaction detail documents generated by each business system needing tax adding separation processing in the previous day are obtained and added into the memory once.
And step 112, concurrently and circularly obtaining the transaction detail bill from the memory, and obtaining the transaction codes of the transaction detail bill one by one.
In the step, a concurrent mode is adopted, a plurality of processing devices are utilized to circularly obtain the transaction detail documents required to be processed by the corresponding processing devices from the memory in which the transaction detail documents are stored, and the transaction codes in the transaction detail documents are obtained one by one, so that the plurality of processing devices can be coordinated, and the tax adding separation processing on the transaction detail documents generated in the previous day can be quickly realized.
Optionally, in a specific embodiment, the step 111 includes steps 121 to 123.
And step 121, acquiring the accounting running files and the ending identification files generated by each service system in the previous day.
In this step, the accounting running file is a file for accounting a transaction detail document including a transaction code, and includes the transaction detail document including the transaction code; the accounting streamline file is generated by the transaction streamline of the previous day acquired from each transaction service system; the ending identification file is an identification file obtained by the transaction flow of each business system.
And step 122, under the condition that the ending identification file is obtained, analyzing the accounting running file to obtain the transaction detail bill of the previous day.
In this step, when the end identification file is obtained, it indicates that all the transaction streams of the previous day of each business system are obtained, and the generated accounting stream file includes all the transaction streams of the previous day of each business system, so that all the transaction detail documents of each business system of the previous day can be obtained by analyzing the accounting stream file.
And step 123, adding the transaction detail bill into a memory.
In the step, the transaction detail documents obtained by analyzing the accounting running file are all added into the memory, so that the price and tax separation processing of the transaction detail documents can be conveniently completed in a subsequent concurrent mode.
In the specific implementation mode, only under the condition of acquiring the ending identification file, the analysis detail document is acquired through analyzing the accounting running file and is added to the memory, so that data omission is avoided, and the price and tax separation processing on each transaction detail document can be completed in a subsequent concurrent mode conveniently.
Optionally, in a specific implementation manner, the price and tax separating method provided in the embodiment of the present invention, before the step 111, further includes a step 120:
and clearing the historical record of the tax-separating accounting entry.
In the specific implementation mode, before the transaction detail document of the previous day is acquired and added to the memory, the historical record of the tax-dividing accounting entry in the memory is cleared, so that the subsequently generated tax-dividing accounting entry of the memory record is vacated, and the data of the current tax-dividing accounting entry and the data of the last tax-dividing accounting entry can be effectively prevented from being confused.
Referring to fig. 2, a logic diagram for implementing the price and tax separation method according to the embodiment of the invention is shown.
As shown in fig. 2, in step 211, an accounting flow file and an ending identification file generated by the transaction flow of the previous day acquired from each transaction service system are acquired, and then step 212 is performed;
in step 212, removing the operation, modification and separation temporary table data in the memory as the tax-dividing accounting entry on the same day;
in step 213, it is determined whether an end identification file for identifying that the generation of the accounting pipeline file is completed is acquired; if the end identification file is not acquired, step 214 is executed; if the end identification file is obtained, entering step 215;
in step 214, controlling the corresponding thread to sleep and re-executing step 213;
in step 215, the generated accounting pipeline file is obtained;
in step 216, the price and tax generation separation is performed on each transaction in the accounting running water file in an operation-to-improvement mode, the classified subjects are stored in an operation-to-improvement entry temporary table in a running water mode, the tax adding entry is completed, and then the tax added entry can be input into the financial system for subsequent financial behaviors.
In summary, the price and tax separation method provided in the embodiment of the present invention utilizes the rule engine to obtain the corresponding tax-separating accounting entry according to the transaction code in the transaction detail document, so that the tax-adding separation processing on a large number of transaction detail documents can be quickly completed, and the method is also suitable for tax-adding separation on non-entity goods, and then pushes the tax-separating accounting entry data to the financial system, so as to execute the subsequent financial behavior. The embodiment of the invention effectively solves the problems that the existing price and tax entry mode is slow in tax entry processing speed and cannot meet the tax entry scene of a transaction document without a solid product.
Referring to fig. 3, there is shown a block diagram illustrating a structure of an embodiment of a price separation apparatus 30 according to the present invention, the price separation apparatus comprising:
the acquisition module 31 is used for acquiring the transaction code of the to-be-processed transaction detail document;
the determining module 32 is used for determining a tax-dividing accounting entry corresponding to the transaction detail document according to the transaction code;
and the transmission module 33 is used for inputting the tax-dividing accounting entry into the financial system.
According to the price and tax separating device, the corresponding tax-separating accounting entry is obtained according to the transaction code in the transaction detail document, so that tax-adding separation processing of a large number of transaction detail documents can be rapidly completed, the price and tax separating device is also suitable for tax-adding separation of non-entity commodities, and then tax-separating accounting entry data is pushed into a financial system, so that subsequent financial behaviors can be executed. The embodiment of the invention effectively solves the problems that the existing price and tax entry mode is slow in tax entry processing speed and cannot meet the tax entry scene of transaction receipts without entity products.
Optionally, in the apparatus, the determining module 32 specifically includes:
the input unit is used for inputting the transaction code into a rule engine;
the determining unit is used for determining a tax-dividing accounting entry corresponding to the transaction detail document according to an output result of the rule engine;
wherein, the rule engine is used for outputting an accounting entry according to the transaction code.
Optionally, in the apparatus, the obtaining module 31 includes:
the acquisition unit is used for acquiring the transaction detail document of the previous day and adding the transaction detail document into the memory;
and the processing unit is used for acquiring the transaction detail bill from the memory in a concurrent and cyclic manner and acquiring the transaction codes of the transaction detail bill one by one.
Optionally, in the apparatus, the obtaining unit includes:
the file acquisition subunit is used for acquiring the accounting running files and the ending identification files generated by each service system in the previous day;
the analysis subunit is used for analyzing the accounting running file to obtain the transaction detail document of the previous day under the condition of obtaining the ending identification file;
and the adding subunit is used for adding the transaction detail bill into the memory.
Optionally, the apparatus further comprises:
and the clearing module is used for clearing the historical record of the tax-dividing accounting entry before the step of adding the transaction detail document of the previous day into the memory.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Optionally, an embodiment of the present application further provides an electronic device, including a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, where the program or the instruction is executed by the processor to implement each process of the above-mentioned price and tax separation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
The embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above price and tax separation method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above price and tax separation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as a system-on-chip, or a system-on-chip.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with this teaching. The required structure for constructing such a system is apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed to reflect the intent: rather, the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a file download device according to an embodiment of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.