CN109389439A - A kind of method and system splitting invoice - Google Patents
A kind of method and system splitting invoice Download PDFInfo
- Publication number
- CN109389439A CN109389439A CN201811301525.3A CN201811301525A CN109389439A CN 109389439 A CN109389439 A CN 109389439A CN 201811301525 A CN201811301525 A CN 201811301525A CN 109389439 A CN109389439 A CN 109389439A
- Authority
- CN
- China
- Prior art keywords
- amount
- money
- whole
- difference
- open
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/04—Billing or invoicing
Landscapes
- Business, Economics & Management (AREA)
- Development Economics (AREA)
- Accounting & Taxation (AREA)
- Economics (AREA)
- Finance (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention discloses a kind of method and system for splitting invoice, for so that the amount of every invoice is all maximized utilization.The method comprise the steps that obtaining the first material amount of money of ticket to be developed and the minimum fractionation unit of first material, the minimum unit that splits includes integer and non-integer;According to the first material amount of money, the quantity of ticket to be developed is determined;According to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split, so that the amount of every invoice is maximized utilization.The present embodiment additionally provides a kind of system for splitting invoice, for so that the amount of every invoice is all maximized utilization.
Description
Technical field
The present invention relates to electronic technology field more particularly to a kind of method and system for splitting invoice.
Background technique
Existing ERP system is only supported to realize that fractionation issues invoice according to certain parameter configuration, such as rolls and split, i.e.,
It is traversed according to the material arranged in advance, then executes Splitting Logic when the accumulative amount of money reaches the upper limit;And averagely split,
It is then that required invoiced amount is calculated according to invoice limit to the selected material amount of money meter General Logistics Department, the amount of money of every invoice is equal to total
The amount of money is divided by invoiced amount.
And this method for splitting at least has the disadvantages that
Either rolling and splitting still average split all is to split rule according to the fractionation parameter setting of configuration, encounters needs
When the material quantity of fractionation is according to split of integral number, then will appear invoice amount can not to greatest extent close to invoice limit, thus
The problem of leading to the invoice wasting of resources.
Summary of the invention
The embodiment of the invention provides it is a kind of split invoice method and system, for so that every invoice amount all by
It maximally utilizes.
The embodiment of the present application first aspect provides a kind of method for splitting invoice, comprising:
It obtains the first material amount of money of ticket to be developed and the minimum of first material splits unit, the minimum fractionation unit
Including integer and non-integer;
According to the first material amount of money, the quantity of ticket to be developed is determined;
According to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split, so that
The amount of every invoice is maximized utilization.
Preferably, it is described according to the first material amount of money and it is described it is minimum split unit, to the amount of every invoice into
Row is split, so that the amount of every invoice is maximized utilization, comprising:
Minimum according to the first material splits unit, and first material is divided into and whole tear material open and non-whole tears material open;
The whole amount of money for tearing material open is subjected to the first sequence according to sequence from big to small;
The non-whole amount of money for tearing material open is subjected to the second sequence according to sequence from small to large;
The whole amount of money for tearing material open and the non-whole amount of money for tearing material open are successively traversed, so that current invoice amount is by most
Bigization utilizes.
Preferably, described successively to traverse the whole amount of money for tearing material open and the non-whole amount of money for tearing material open, so that currently
Invoice amount is maximized utilization, comprising:
The whole amount of money for tearing material open preferentially is traversed according to first sequence, and is judged in the whole amount of money for tearing material open
With the presence or absence of first amount of money for being equal to the current invoice amount;
If it is not, then choosing the second gold medal that is closest and being less than the current invoice amount in the material amount of money from whole tear open
Volume, so that the current invoice amount is maximized utilization;
Calculate the first difference of second amount of money Yu the current invoice amount;
It judges whether there is and to be split whole tears material open;
If so, obtaining the whole unit price for tearing material open and quantity to be split, and judge whether first difference is less than institute
State the whole unit price for tearing material open to be split;
If so, the non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is by most
Bigization utilizes.
Preferably, described to traverse the non-whole amount of money for tearing material open according to second sequence, so that first difference
It is maximized utilization, comprising:
The non-whole amount of money for tearing material open is traversed according to second sequence, and is judged in the non-whole amount of money for tearing material open
With the presence or absence of the third amount of money for being equal to first difference;
If it is not, then closest to and less than the 4th gold medal of first difference from being chosen in the non-whole amount of money for tearing material open
Volume, and the 5th amount of money greater than first difference;
According to the 4th amount of money and the 5th amount of money, so that first difference is maximized utilization.
Preferably, described according to the 4th amount of money and the 5th amount of money, so that first difference is maximized benefit
With, comprising:
The minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split, the minimum number precision
For decimal digits;
According to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, the 5th amount of money is judged
Whether first difference can be split out;
If it is not, then according to the unit price of the 5th amount of money corresponding material and the minimum number precision that is split, by described the
Five amount of money split out closest to and are less than the 6th amount of money of first difference;
From the 4th amount of money and the 6th amount of money, the amount of money number of first difference is determined closest to and is less than
Value, so that first difference is maximized utilization.
The embodiment of the present application second aspect provides a kind of system for splitting invoice, comprising:
Acquiring unit, it is described for obtaining the first material amount of money of ticket to be developed and the minimum fractionation unit of first material
It includes integer and non-integer that minimum, which splits unit,;
Determination unit, for determining the quantity of ticket to be developed according to the first material amount of money;
Split cells, for splitting unit according to the first material amount of money and the minimum, to the amount of every invoice
It is split, so that the amount of every invoice is maximized utilization.
Preferably, the split cells, comprising:
Subelement is divided, for splitting unit according to the minimum of the first material, first material is divided into and whole tears object open
Material and non-whole tear material open;
First sorting subunit, for the whole amount of money for tearing material open to be carried out first row according to sequence from big to small
Sequence;
Second sorting subunit, for the non-whole amount of money for tearing material open to be carried out second row according to sequence from small to large
Sequence;
Subelement is traversed, for successively traversing the whole amount of money for tearing material open and the non-whole amount of money for tearing material open, so that
Current invoice amount is maximized utilization.
Preferably, the traversal subelement, comprising:
Ergodic judgement module for preferentially traversing the whole amount of money for tearing material open according to first sequence, and judges institute
It states in the whole amount of money for tearing material open with the presence or absence of first amount of money equal to the current invoice amount;
Module is chosen, in whole tear open in the amount of money of material there is no first amount of money, then whole tears material open from described
Second amount of money that the current invoice amount is chosen closest to and be less than in the amount of money, so that the current invoice amount is maximized
It utilizes;
Computing module, for calculating the first difference of second amount of money Yu the current invoice amount;
Judgment module to be split whole tears material open for judging whether there is;
Obtain judgment module, for exist wait split it is whole tear material open when, obtain the whole unit price for tearing material open to be split
And quantity, and judge whether first difference is less than the whole unit price for tearing material open to be split;
Spider module, for when first difference is less than the whole unit price for tearing material open wait split, then according to institute
It states the second sequence and traverses the non-whole amount of money for tearing material open, so that first difference is maximized utilization.
Preferably, the spider module, comprising:
Ergodic judgement submodule for traversing the non-whole amount of money for tearing material open according to second sequence, and judges institute
It states in the non-whole amount of money for tearing material open with the presence or absence of the third amount of money equal to first difference;
Submodule is chosen, is used for when the third amount of money is not present, from being chosen in the non-whole amount of money for tearing material open
The 4th amount of money that is closest and being less than first difference, and the 5th amount of money greater than first difference;
Difference maximizes submodule, is used for according to the 4th amount of money and the 5th amount of money, so that first difference
It is maximized utilization.
Preferably, the difference maximizes submodule, comprising:
Micromodule is read, the minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split,
The minimum number precision is decimal digits;
Judge micromodule, for according to the unit price of the 5th amount of money corresponding material and the minimum number precision that is split,
Judge whether the 5th amount of money can split out first difference;
Micromodule is split, for when the 5th amount of money cannot split out first difference, then according to the described 5th
5th amount of money is split out closest to and is less than described by the unit price of amount of money corresponding material and the minimum number precision being split
6th amount of money of the first difference;
Micromodule is determined, for from the 4th amount of money and the 6th amount of money, determining closest to and being less than described
The amount of money numerical value of first difference, so that first difference is maximized utilization.
Present invention also provides a kind of computer installation, including processor, which is stored on memory in execution
Computer program when, for realizing the embodiment of the present application first aspect provide fractionation invoice method.
The embodiment of the present application also provides a kind of readable storage medium storing program for executing, are stored thereon with computer program, the computer journey
When sequence is executed by processor, the method for the fractionation invoice for being provided for realizing the embodiment of the present application first aspect.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that
In the embodiment of the present invention, first obtains the amount of money of the first material of ticket to be developed and the minimum of first material splits list
Position, minimum split unit include it is whole tear open with it is non-it is whole tear open, then according to the amount of money of first material and it is minimum split unit, every is sent out
The amount of ticket is split, so that the amount of every invoice is all maximized utilization, avoids the waste of invoice resource.
Detailed description of the invention
Fig. 1 is one embodiment schematic diagram that the method for invoice is split in the embodiment of the present application;
Fig. 2 is another embodiment schematic diagram that the method for invoice is split in the embodiment of the present application;
Fig. 3 is another embodiment schematic diagram that the method for invoice is split in the embodiment of the present application;
Fig. 4 is another embodiment schematic diagram that the method for invoice is split in the embodiment of the present application;
Fig. 5 is another embodiment schematic diagram that the method for invoice is split in the embodiment of the present application;
Fig. 6 is one embodiment schematic diagram that the system of invoice is split in the embodiment of the present application;
Fig. 7 is the refinement structure chart of split cells in the embodiment of the present application;
Fig. 8 is the refinement structure chart that subelement is traversed in the embodiment of the present application;
Fig. 9 is the refinement structure chart of spider module in the embodiment of the present application;
Figure 10 is the refinement structure chart that difference maximizes submodule in the embodiment of the present application.
Specific embodiment
The embodiment of the invention provides a kind of method and system for splitting invoice, for the first material according to ticket to be developed
The amount of money and it is minimum split unit, the amount of every invoice is split, so that the amount of every invoice is maximized
It utilizes, avoids the waste to invoice amount.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
Description and claims of this specification and term " first ", " second ", " third ", " in above-mentioned attached drawing
Four " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein or describing
Sequence other than appearance is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that covering is non-exclusive
Include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to clearly arrange
Those of out step or unit, but may include be not clearly listed or it is solid for these process, methods, product or equipment
The other step or units having.
For in the prior art, the method for splitting and averagely splitting is rolled, invoice amount can not be made to be fully utilized
Problem, the invention proposes a kind of method and systems for splitting invoice, for basis wait open the amount of money for taking the first material of invoice,
And the minimum of first material splits unit, splits to the amount of every invoice, so that the amount of every invoice is all maximum
Change and utilizes.
For convenience of understanding, the method for the fractionation invoice in the present invention is described below, referring to Fig. 1, the present invention is real
Apply a kind of one embodiment for the method for splitting invoice in example, comprising:
101, it obtains the first material amount of money of ticket to be developed and the minimum of first material splits unit, the minimum fractionation
Unit includes integer and non-integer;
Before opening material and taking invoice, it is necessary first to obtain wait open the first material amount of money for taking invoice, then according to every
The amount of invoice makes out an invoice to the first material amount of money.
It is different from the prior art, the present invention first obtains before opening and taking invoice and takes the first material of invoice most wait open
Small fractionation unit, wherein it includes integer and non-integer that minimum, which splits unit,.
Specifically, referring to that the minimum unit of the material split out when making out an invoice invoice is necessary when splitting unit is integer
For integer, and when splitting unit is non-integer, refer to when making out an invoice invoice, the minimum unit of the material split out can be small
Number.
Such as: when first material is chair, then open take invoice when, minimum splits unit and is only integer, and when first
Material be pipe when, then open take invoice when, minimum split unit then can be decimal, it should be noted that in the present embodiment
First material is to treat the general name for opening the material for taking invoice, and first material can include but is not limited to a kind of material, such as the first object
Material may include various materials, can also only include a kind of material, be not particularly limited herein to the type of first material.
102, according to the first material amount of money, the quantity of ticket to be developed is determined;
In practical application, after obtaining the first material amount of money, the number of ticket to be developed can be determined according to the amount of every invoice
Amount, such as: the first material amount of money is 265, and the amount of every invoice is 100, then at least needs 3 invoices.
103, according to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split,
So that the amount of every invoice is maximized utilization.
After getting the amount of money wait open the first material for taking invoice and minimum fractionation unit, then according to the gold of first material
Volume and minimum fractionation unit, split the amount of every invoice, so that the amount of every invoice is maximized utilization.
Specifically, how according to the amount of money of first material and it is minimum split unit, the amount of every invoice is split,
So that the amount of every invoice is maximized utilization, will be described in detail in the following embodiments, details are not described herein again.
In the embodiment of the present invention, first obtains the amount of money of the first material of ticket to be developed and the minimum of first material splits list
Position, minimum split unit include it is whole tear open with it is non-it is whole tear open, then according to the amount of money of first material and it is minimum split unit, every is sent out
The amount of ticket is split, so that the amount of every invoice is all maximized utilization, avoids the waste of invoice resource.
Based on Fig. 1 the embodiment described step 103, it is described below in detail single according to the amount of money of first material and minimum fractionation
Position, the amount of every invoice is split so that the amount of every invoice be maximized by specific fractionation in the way of, please join
Read Fig. 2, a kind of another embodiment for the method splitting invoice in the embodiment of the present invention, comprising:
201, unit is split according to the minimum of the first material, first material is divided into and whole tear material open and non-whole tears object open
Material;
Specifically, get first material it is minimum split unit after, first material is divided into the whole material and non-torn open
It is whole to tear material open, it is so-called it is whole tear material open, refer to that the material number split out when splitting invoice is only integer, rather than it is whole tear material open,
Refer to that the material number split out when splitting invoice can be decimal.
202, the whole amount of money for tearing material open is subjected to the first sequence according to sequence from big to small;
Mark off it is whole tear material open after, by the whole amount of money for tearing material open according to from big to small sequence carry out first sequence, hold
It is readily understood to be, when splitting invoice, because whole material of tearing open requires fractionation unit, when splitting invoice, pay the utmost attention to
It is whole to tear material open, and torn open whole after material carries out the first sequence, it easier can select the amount of money closest to invoice amount.
203, the non-whole amount of money for tearing material open is subjected to the second sequence according to sequence from small to large;
Because non-whole material of tearing open can split out the material of decimal place, therefore general non-whole material of tearing open is mainly used for supplementary invoice
In amount, the remaining amount after material occupies amount is torn open by whole, so by non-whole material of tearing open according to sequence progress from small to large
After second sequence, the amount of money close to remaining amount easier can be selected, so that invoice amount is maximized utilization.
204, the whole amount of money for tearing material open and the non-whole amount of money for tearing material open are successively traversed, so that current invoice amount
It is maximized utilization.
Obtain the first sequence it is whole tear open the material amount of money and second sequence it is non-it is whole tear the material amount of money open after, then successively traverse whole
The amount of money and the non-whole amount of money for tearing material open of material are torn open, so that current invoice amount is maximized utilization.
Specifically, for make current invoice amount be maximized by the way of, will be specific in the following embodiments
It is described, details are not described herein again.
In the embodiment of the present application, to according to the first material amount of money and minimum fractionation unit, the amount of every invoice is carried out
Split so that the amount of every invoice be maximized by the way of further describe, increase the embodiment of the present application
Exploitativeness.
Based on the step 204 in embodiment described in Fig. 2, be described below in detail how successively to traverse the whole amount of money for tearing material open and
The non-whole amount of money for tearing material open, so that current invoice amount is maximized the concrete mode utilized, referring to Fig. 3, the application is implemented
A kind of another embodiment for the method splitting invoice in example, comprising:
301, the whole amount of money for tearing material open preferentially is traversed according to first sequence, and judges the whole gold for tearing material open
With the presence or absence of first amount of money equal to the current invoice amount in volume, if so, 307 are thened follow the steps, if it is not, thening follow the steps
302;
After the whole amount of money for tearing material open is carried out the first sequence according to sequence from big to small, then preferentially according to first row
Sequence traverses the whole amount of money for tearing material open, and judges in the whole amount of money for tearing material open with the presence or absence of the first gold medal equal to current invoice amount
Volume, if so, 307 are thened follow the steps, if it is not, thening follow the steps 302.
302, second amount of money that is closest and being less than the current invoice amount is chosen in the material amount of money from whole tear open, make
It obtains the current invoice amount and is maximized utilization;
If tearing the material amount of money open from whole there is no after first amount of money equal to current invoice amount in the whole amount of money for tearing material open
In select closest to and be less than second amount of money of current invoice amount so that current invoice amount is maximized utilization.
Specifically, for example: the whole amount of money for tearing material open is respectively as follows: 60 (unit price 20), 50 (unit prices 8), and 35 (unit prices 7) are non-whole
The amount of money for tearing material open is respectively as follows: 1.99,2.5,5.5, and the amount of current invoice is 100, then preferentially tears open in the material amount of money from whole
60 and 35 are selected, so that 60+35=95, closest to the amount 100 of current invoice.
It is easily understood that second amount of money can be the amount of money of a material, it is also possible to the amount of money summation of multiple materials,
In above-mentioned example, second amount of money is 60 and 35 summation.
303, the first difference of second amount of money and the current invoice amount is calculated;
After obtaining second amount of money, the first difference of second amount of money and current invoice amount is calculated, as being based in the example above,
First difference is 100-95=5, then executes step 304.
304, judge whether there is it is to be split it is whole tear material open, if it is not, 306 are thened follow the steps, if so, thening follow the steps
305;
After obtaining the first difference, judges whether there is need to split whole and tear material open, if so, then follow the steps 305, if
It is no, then follow the steps 306.
305, the whole quantity for tearing material open and unit price to be split are obtained, it is to be split to judge whether first difference is less than
It is whole to tear material unit price open, if so, 306 are thened follow the steps, if it is not, thening follow the steps 308;
When exist wait split it is whole tear material open when, then judge whether the first difference is less than and need the whole list for tearing material open that splits
Valence is because paying the utmost attention to can only be by the whole material torn open, so judging first after obtaining the first difference when splitting invoice
Whether difference, which is less than, needs the whole unit price for tearing material open that splits, that is, judges whether the first difference can continue to split out one and whole tear open
Material, if being less than, i.e., cannot split out again one it is whole tear material open, then follow the steps 306, if being not less than, then follow the steps 308.
306, the non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is maximized
It utilizes;
If the first difference is less than the whole unit price for tearing material open, illustrate that the first current difference can not split out one again and whole tear object open
Material then traverses the non-whole amount of money for tearing material open according to the second sequence, so that the first difference is maximized utilization.
Specifically, corresponding to the first difference in step 303, when the first difference 5 is both less than the whole unit price for tearing material open respectively
When, then illustrate the first difference can not split out again one it is whole tear material open, then traverse the non-whole amount of money for tearing material open according to the second sequence, make
It obtains the first difference and is maximized utilization.
Further, for traversing the non-whole amount of money for tearing material open according to the second sequence, so that the first difference is maximized utilization
Concrete mode, will be described in detail in the following embodiments, details are not described herein again.
307, first amount of money is selected, issuing for current invoice amount is completed, and triggers and enters issuing for next invoice.
If whole tear first amount of money existed in the material amount of money equal to current invoice amount open, filled using first amount of money current
The amount of invoice, and trigger into next invoice and issue process, while triggering and executing step 301.
308, according to the whole quantity for tearing material open to be split and unit price, the first difference is split, until current invoice
Remaining amount be less than the whole unit price for tearing material open to be split, then traverse the non-whole amount of money for tearing material open according to the second sequence so that
Remaining amount is maximized utilization.
When the first difference is not less than the whole unit price for tearing material open, i.e. the first difference, which can also continue to split out, whole tears material open
When, then continue to split the first difference according to the whole unit price for tearing material open to be split and quantity, until cannot split out whole
When tearing material open, then the remaining difference of current invoice is calculated, and traverse the non-whole amount of money for tearing material open according to the second sequence, so that
The residue difference is maximized utilization.
To how successively to traverse the whole amount of money for tearing material open and the non-whole amount of money for tearing material open in the embodiment of the present application, so that currently
Invoice amount is maximized the concrete mode utilized and is described in detail, and increases the exploitativeness of the embodiment of the present application.
Based on the step 306 in embodiment described in Fig. 3, how it is described below in detail according to described in the second sequence traversal
The non-whole amount of money for tearing material open, so that first difference is maximized the concrete mode utilized, referring to Fig. 4, the application is implemented
One of example splits another embodiment of the method for invoice, comprising:
401, the non-whole amount of money for tearing material open is traversed according to second sequence, and judges the non-whole gold for tearing material open
With the presence or absence of the third amount of money equal to first difference in volume, if it is not, 402 are thened follow the steps, if so, thening follow the steps 404;
After obtaining the first difference, the non-whole amount of money for tearing material open is traversed according to the second sequence, judges the non-whole amount of money for tearing material open
In with the presence or absence of equal to the first difference the third amount of money, if it is not, 402 are thened follow the steps, if so, thening follow the steps 404.
402, the 4th amount of money that is closest and being less than first difference from being chosen in the non-whole amount of money for tearing material open,
And the 5th amount of money greater than first difference;
When it is non-it is whole tear open in material there is no equal to the first difference the third amount of money when, then selected from the non-whole amount of money for tearing material open
Take closest to and less than the 4th amount of money of the first difference, and greater than the 5th amount of money of the first difference.
Specifically, the non-whole amount of money for tearing material open is respectively as follows: 1.99 as shown in step 302 in the embodiment shown in fig. 3,
2.5,5.5, and the first difference is 5, then selection is closest and less than the 4th amount of money of the first difference 5, i.e., 2.5, and is greater than first
5th amount of money of difference, i.e., 5.5, then execute step 403.
403, according to the 4th amount of money and the 5th amount of money, so that first difference is maximized utilization.
Obtain closest to and be less than the 4th amount of money of first difference, and the 5th amount of money greater than first difference
Afterwards, then according to the 4th amount of money and the 5th amount of money, so that the first difference is maximized utilization, specifically, how according to the 4th amount of money
It will be described in detail into the following examples with the 5th amount of money so that the first difference is maximized the concrete mode utilized.
404, the third amount of money is then selected, the utilization to the first difference is completed, and triggers and enters issuing for next invoice.
When it is non-it is whole tear in material the first difference for just existing and being equal to the third amount of money open when, then select the third amount of money, and
The utilization to the first difference is completed using the third amount of money, that then triggers next invoice of entrance issues process.
In the embodiment of the present application, be described in detail how according to the second sequence traverse the non-whole amount of money for tearing material open,
So that the first difference is maximized the concrete mode utilized, the exploitativeness of the application is improved.
Based on the step 403 in embodiment described in Fig. 4, how it is described below in detail according to the 4th amount of money and the 5th amount of money,
So that the first difference is maximized the concrete mode utilized, referring to Fig. 5, one of the embodiment of the present application splits the side of invoice
Another embodiment of method, comprising:
501, the minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split, the minimum number
Precision is decimal digits;
It is easily understood that in practical applications, required by often having to the minimum number precision of material, such as to X object
The minimum number precision of material can be as accurate as after decimal point 2, and to the minimum number precision of Y material, it really may only be accurate
1 after to decimal point, in this way, then may result in the 5th amount of money may split out the first difference, it is also possible to can not split
Perhaps the 5th amount of money can split out and tears open than the 4th amount of money closer to the numerical value of the first difference or the 5th amount of money one difference
It can not divide the numerical value than the 4th amount of money closer to the first difference, therefore need to read the monovalent and split of the 5th amount of money corresponding material
The minimum number precision divided, to execute step 502, the minimum number that the 5th amount of money corresponding material can be split in the present embodiment is smart
Degree, i.e., the non-minimum number precision tearing material open and being split refer to after being split as decimal, the decimal digits after decimal point.
502, according to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, judge the described 5th
Whether the amount of money can split out first difference, if it is not, 503 are thened follow the steps, if so, thening follow the steps 505;
After obtaining the monovalent of the 5th amount of money corresponding material and the minimum number precision being split, it can be determined that the 5th amount of money energy
No to split out the first difference, such as when the non-whole amount of money for tearing material open is respectively as follows: 1.99,2.5,5.5, difference 5, the 5th amount of money is 5.5
When, it is assumed that the material unit price that the 5th amount of money is 5.5 is 1, and the minimum number precision split is 0.1, then the 5th amount of money 5.5 can be with
The first difference 5 is split out, and when the material unit price that the 5th amount of money is 5.5 is 1.5, and the minimum number precision split out is
When 0.01, then the 5th amount of money can not split out the first difference 5, because when splitting out the first difference 5, the material quantity split out is
3.33333333 being unable to satisfy the demand of minimum number precision.
503, according to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, by the hardware
Volume splits out closest to and is less than the 6th amount of money of first difference;
When the 5th amount of money cannot split out the first difference, then the 5th amount of money according to the unit price of corresponding material and is split
Minimum number precision, by the 5th amount of money split out closest to and less than the 6th amount of money of the first difference, i.e. the 5th amount of money 5.5
It can split out closest and be 4.995 less than the 6th amount of money of the first difference.
It should be noted that certain amount of money precision can also be arranged sometimes during invoice retracts, such as when the 5th amount of money
When 5.5 the 6th amount of money split out are 4.995, if the 6th amount of money is rounded to 2 after setting amount of money precision as decimal
5.00, while in order to which the error to be balanced, monovalent * quantity=amount of money generally can be also taken, the unit price of the material is carried out
Inverse, to eliminate error.
504, from the 4th amount of money and the 6th amount of money, determine closest to and be less than the gold of first difference
Specified number value, so that first difference is maximized utilization.
After the 5th amount of money 5.5 splits out the 6th amount of money 4.995, the 4th amount of money 2.5 and the 6th amount of money 4.995 are compared
Compared with, it determines closest to and less than the amount of money numerical value of the first difference 5 to be 4.995, so that the first difference 5 is maximized utilization, until
This, then complete whole to tear the step of material makes the first difference be maximized utilization open according to non-.
505, the 5th amount of money is split out into the first difference, so that the first difference is maximized utilization.
When the 5th amount of money can split out the first difference, then the 5th amount of money is split out into the first difference, so that first is poor
Volume is maximized utilization.
In the embodiment of the present application, it is described in detail how according to the 4th amount of money and the 5th amount of money, so that the first difference is by most
The concrete mode that bigization utilizes improves the exploitativeness of the application.
Described above is the methods for splitting invoice, are described, please refer to the fractionation invoice system in the application below
Fig. 6, one embodiment of the fractionation invoice system in the application, comprising:
Acquiring unit 601, the first material amount of money and the minimum of first material for obtaining ticket to be developed split unit,
The minimum unit that splits includes integer and non-integer;
Determination unit 602 determines the quantity of ticket to be developed according to the first material amount of money;
Split cells 603, for splitting unit according to the first material amount of money and the minimum, to the volume of every invoice
Degree is split, so that the amount of every invoice is maximized utilization.
It should be noted that the effect of each unit is similar with described in embodiment described in Fig. 1 in the present embodiment, herein not
It repeats again.
Based on the split cells 603 in Fig. 6, referring to Fig. 7, Fig. 7 is the refinement structure of split cells 603, specifically, tearing open
Sub-unit 603, comprising:
Subelement 6031 is divided, for splitting unit according to the minimum of the first material, first material is divided into whole
It tears material open and non-whole tears material open;
First sorting subunit 6032, for the whole amount of money for tearing material open to be carried out first according to sequence from big to small
Sequence;
Second sorting subunit 6033, for the non-whole amount of money for tearing material open to be carried out the according to sequence from small to large
Two sequences;
Subelement 6034 is traversed, for successively traversing the whole amount of money for tearing material open and the non-whole amount of money for tearing material open,
So that current invoice amount is maximized utilization.
It should be noted that the effect of each unit is similar with described in embodiment described in Fig. 2 in the present embodiment, herein not
It repeats again.
Based on the traversal subelement 6034 in Fig. 7, referring to Fig. 8, Fig. 8 is the refinement structure for traversing subelement 6034, tool
Body, traverse subelement 6034, comprising:
Ergodic judgement module 60341 for preferentially traversing the whole amount of money for tearing material open according to first sequence, and is sentenced
Break in the whole amount of money for tearing material open with the presence or absence of first amount of money equal to the current invoice amount;
Module 60342 is chosen, in whole tear open in the amount of money of material there is no first amount of money, then whole is torn open from described
Second amount of money that the current invoice amount is chosen closest to and be less than in the material amount of money, so that the current invoice amount is by most
Bigization utilizes;
Computing module 60343, for calculating the first difference of second amount of money Yu the current invoice amount;
Judgment module 60344 to be split whole tears material open for judging whether there is;
Obtain judgment module 60345, for exist wait split it is whole tear material open when, obtain whole material of tearing open to be split
Unit price and quantity, and judge whether first difference is less than the whole unit price for tearing material open to be split;
Spider module 60346, for when first difference is less than the whole unit price for tearing material open wait split, then pressing
The non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is maximized utilization.
It should be noted that the effect of each module is similar with described in embodiment described in Fig. 3 in the present embodiment, herein not
It repeats again.
Based on the spider module 60346 in Fig. 8, referring to Fig. 9, Fig. 9 is the refinement structure of spider module 60346, specifically
, spider module 60246, comprising:
Ergodic judgement submodule 603461, for traversing the non-whole amount of money for tearing material open according to second sequence, and
Judge in the non-whole amount of money for tearing material open with the presence or absence of the third amount of money equal to first difference;
Submodule 603462 is chosen, is used for when the third amount of money is not present, from the non-whole amount of money for tearing material open
The 4th amount of money that is closest and being less than first difference in selection, and the 5th amount of money greater than first difference;
Difference maximizes submodule 603463, for according to the 4th amount of money and the 5th amount of money, so that described the
One difference is maximized utilization.
It should be noted that the effect of each submodule is similar with described in embodiment described in Fig. 4 in the present embodiment, this
Place repeats no more.
Submodule 603463 is maximized based on the difference in Fig. 9, referring to Fig. 10, Figure 10 is that difference maximizes submodule
603463 refinement structure, specifically, difference maximizes submodule 603463, comprising:
Micromodule 6034631 is read, the minimum number for reading the unit price of the 5th amount of money corresponding material and being split
Accuracy of measurement, the minimum number precision are decimal digits;
Micromodule 6034632 is judged, for according to the monovalent of the 5th amount of money corresponding material and the minimum number being split
Accuracy of measurement, judges whether the 5th amount of money can split out first difference;
Micromodule 6034633 is split, for when the 5th amount of money cannot split out first difference, then according to institute
The minimum number precision stating the unit price of the 5th amount of money corresponding material and being split, the 5th amount of money is split out closest and small
In the 6th amount of money of first difference;
Micromodule 6034634 is determined, for determining closest and small from the 4th amount of money and the 6th amount of money
In the amount of money numerical value of first difference, so that first difference is maximized utilization.
It should be noted that the effect of each micromodule is similar with described in embodiment described in Fig. 5 in the present embodiment, this
Place repeats no more.
It is described above from system of the angle of modular functionality entity to the fractionation invoice in the embodiment of the present invention,
The computer installation in the embodiment of the present invention is described from the angle of hardware handles below:
The computer installation for realizing the system for splitting invoice function, computer installation one in the embodiment of the present invention
Embodiment includes:
Processor and memory;
Memory can when processor is used to execute the computer program stored in memory for storing computer program
To realize following steps:
It obtains the first material amount of money of ticket to be developed and the minimum of first material splits unit, the minimum fractionation unit
Including integer and non-integer;
According to the first material amount of money, the quantity of ticket to be developed is determined;
According to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split, so that
The amount of every invoice is maximized utilization.
In some embodiments of the invention, processor is specifically used for realizing following steps:
Minimum according to the first material splits unit, and first material is divided into and whole tear material open and non-whole tears material open;
The whole amount of money for tearing material open is subjected to the first sequence according to sequence from big to small;
The non-whole amount of money for tearing material open is subjected to the second sequence according to sequence from small to large;
The whole amount of money for tearing material open and the non-whole amount of money for tearing material open are successively traversed, so that current invoice amount is by most
Bigization utilizes.
In some embodiments of the invention, processor is specifically used for realizing following steps:
The whole amount of money for tearing material open preferentially is traversed according to first sequence, and is judged in the whole amount of money for tearing material open
With the presence or absence of first amount of money for being equal to the current invoice amount;
If it is not, then choosing the second gold medal that is closest and being less than the current invoice amount in the material amount of money from whole tear open
Volume, so that the current invoice amount is maximized utilization;
Calculate the first difference of second amount of money Yu the current invoice amount;
It judges whether there is and to be split whole tears material open;
If so, obtaining the whole unit price for tearing material open and quantity to be split, and judge whether first difference is less than institute
State the whole unit price for tearing material open to be split;
If so, the non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is by most
Bigization utilizes.
In some embodiments of the invention, processor is specifically used for realizing following steps:
The non-whole amount of money for tearing material open is traversed according to second sequence, and is judged in the non-whole amount of money for tearing material open
With the presence or absence of the third amount of money for being equal to first difference;
If it is not, then closest to and less than the 4th gold medal of first difference from being chosen in the non-whole amount of money for tearing material open
Volume, and the 5th amount of money greater than first difference;
According to the 4th amount of money and the 5th amount of money, so that first difference is maximized utilization.
In some embodiments of the invention, processor is specifically used for realizing following steps:
The minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split, the minimum number precision
For decimal digits;
According to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, the 5th amount of money is judged
Whether first difference can be split out;
If it is not, then according to the unit price of the 5th amount of money corresponding material and the minimum number precision that is split, by described the
Five amount of money split out closest to and are less than the 6th amount of money of first difference;
From the 4th amount of money and the 6th amount of money, the amount of money number of first difference is determined closest to and is less than
Value, so that first difference is maximized utilization.
It is understood that when the processor in above explained computer installation executes the computer program, it can also
To realize the function of each unit in above-mentioned corresponding each Installation practice, details are not described herein again.Illustratively, the computer journey
Sequence can be divided into one or more module/units, and one or more of module/units are stored in the memory
In, and executed by the processor, to complete the present invention.One or more of module/units can be can complete it is specific
The series of computation machine program instruction section of function, the instruction segment are used to describe the computer program in the fractionation invoice and are
Implementation procedure in system.For example, the computer program can be divided into each unit in the system of above-mentioned fractionation invoice, respectively
The concrete function as described in the above-mentioned corresponding system for splitting invoice may be implemented in unit.
The computer installation can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The computer installation may include, but are not limited to processor, memory.It will be understood by those skilled in the art that processor,
Memory is only the example of computer installation, does not constitute the restriction to computer installation, may include more or fewer
Component perhaps combines certain components or different components, such as the computer installation can also be set including input and output
Standby, network access equipment, bus etc..
The processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable GateArray, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng the processor is the control centre of the computer installation, utilizes various interfaces and the entire computer installation of connection
Various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of computer installation.The memory can mainly include storing program area and storage data area, wherein storage program
It area can application program needed for storage program area, at least one function etc.;Storage data area can store the use according to terminal
The data etc. created.In addition, memory may include high-speed random access memory, it can also include non-volatile memories
Device, such as hard disk, memory, plug-in type hard disk, intelligent memory card (SmartMedia Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatibility are solid
State memory device.
The present invention also provides a kind of computer readable storage mediums, and the computer readable storage medium is for realizing fractionation
The function of the system of invoice is stored thereon with computer program, when computer program is executed by processor, processor, and Ke Yiyong
In execution following steps:
It obtains the first material amount of money of ticket to be developed and the minimum of first material splits unit, the minimum fractionation unit
Including integer and non-integer;
According to the first material amount of money, the quantity of ticket to be developed is determined;
According to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split, so that
The amount of every invoice is maximized utilization.
In some embodiments of the invention, the computer program of computer-readable recording medium storage is executed by processor
When, processor can be specifically used for executing following steps:
Minimum according to the first material splits unit, and first material is divided into and whole tear material open and non-whole tears material open;
The whole amount of money for tearing material open is subjected to the first sequence according to sequence from big to small;
The non-whole amount of money for tearing material open is subjected to the second sequence according to sequence from small to large;
The whole amount of money for tearing material open and the non-whole amount of money for tearing material open are successively traversed, so that current invoice amount is by most
Bigization utilizes.
In some embodiments of the invention, the computer program of computer-readable recording medium storage is executed by processor
When, processor can be specifically used for executing following steps:
The whole amount of money for tearing material open preferentially is traversed according to first sequence, and is judged in the whole amount of money for tearing material open
With the presence or absence of first amount of money for being equal to the current invoice amount;
If it is not, then choosing the second gold medal that is closest and being less than the current invoice amount in the material amount of money from whole tear open
Volume, so that the current invoice amount is maximized utilization;
Calculate the first difference of second amount of money Yu the current invoice amount;
It judges whether there is and to be split whole tears material open;
If so, obtaining the whole unit price for tearing material open and quantity to be split, and judge whether first difference is less than institute
State the whole unit price for tearing material open to be split;
If so, the non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is by most
Bigization utilizes.
In some embodiments of the invention, the computer program of computer-readable recording medium storage is executed by processor
When, processor can be specifically used for executing following steps:
The non-whole amount of money for tearing material open is traversed according to second sequence, and is judged in the non-whole amount of money for tearing material open
With the presence or absence of the third amount of money for being equal to first difference;
If it is not, then closest to and less than the 4th gold medal of first difference from being chosen in the non-whole amount of money for tearing material open
Volume, and the 5th amount of money greater than first difference;
According to the 4th amount of money and the 5th amount of money, so that first difference is maximized utilization.
In some embodiments of the invention, the computer program of computer-readable recording medium storage is executed by processor
When, processor can be specifically used for executing following steps:
The minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split, the minimum number precision
For decimal digits;
According to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, the 5th amount of money is judged
Whether first difference can be split out;
If it is not, then according to the unit price of the 5th amount of money corresponding material and the minimum number precision that is split, by described the
Five amount of money split out closest to and are less than the 6th amount of money of first difference;
From the 4th amount of money and the 6th amount of money, the amount of money number of first difference is determined closest to and is less than
Value, so that first difference is maximized utilization.
It is understood that if the integrated unit is realized in the form of SFU software functional unit and as independent production
Product when selling or using, can store in a corresponding computer-readable storage medium.Based on this understanding, this hair
The bright all or part of the process realized in above-mentioned corresponding embodiment method, can also be instructed relevant by computer program
Hardware is completed, and the computer program can be stored in a computer readable storage medium, which is being located
It manages when device executes, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program generation
Code, the computer program code can be source code form, object identification code form, executable file or certain intermediate forms
Deng.The computer-readable medium may include: any entity or device, record that can carry the computer program code
It is medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-OnlyMemory), random
Access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs
It is noted that the content that the computer-readable medium includes can be according to making laws in jurisdiction and patent practice is wanted
It asks and carries out increase and decrease appropriate, such as in certain jurisdictions, do not include according to legislation and patent practice, computer-readable medium
Electric carrier signal and telecommunication signal.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (12)
1. a kind of method for splitting invoice characterized by comprising
It obtains the first material amount of money of ticket to be developed and the minimum of first material splits unit, the minimum unit that splits includes
Integer and non-integer;
According to the first material amount of money, the quantity of ticket to be developed is determined;
According to the first material amount of money and the minimum fractionation unit, the amount of every invoice is split, so that every
The amount of invoice is maximized utilization.
2. the method according to claim 1, wherein described tear open according to the first material amount of money and the minimum
Divide unit, the amount of every invoice split, so that the amount of every invoice is maximized utilization, comprising:
Minimum according to the first material splits unit, and first material is divided into and whole tear material open and non-whole tears material open;
The whole amount of money for tearing material open is subjected to the first sequence according to sequence from big to small;
The non-whole amount of money for tearing material open is subjected to the second sequence according to sequence from small to large;
The whole amount of money for tearing material open and the non-whole amount of money for tearing material open are successively traversed, so that current invoice amount is maximized
It utilizes.
3. according to the method described in claim 2, it is characterized in that, the whole amount of money for tearing material open and described of successively traversing
The non-whole amount of money for tearing material open, so that current invoice amount is maximized utilization, comprising:
Preferentially traverse the whole amount of money for tearing material open according to first sequence, and judge in the whole amount of money for tearing material open whether
In the presence of first amount of money for being equal to the current invoice amount;
If it is not, then choosing second amount of money that is closest and being less than the current invoice amount in the material amount of money from whole tear open, make
It obtains the current invoice amount and is maximized utilization;
Calculate the first difference of second amount of money Yu the current invoice amount;
It judges whether there is and to be split whole tears material open;
If so, obtain the whole unit price for tearing material open and quantity to be split, and judge first difference whether be less than it is described to
The whole unit price for tearing material open split;
If so, the non-whole amount of money for tearing material open is traversed according to second sequence, so that first difference is maximized
It utilizes.
4. according to the method described in claim 3, it is characterized in that, described non-whole tear object open according to the second sequence traversal is described
The amount of money of material, so that first difference is maximized utilization, comprising:
Traverse the non-whole amount of money for tearing material open according to second sequence, and judge in the non-whole amount of money for tearing material open whether
In the presence of the third amount of money for being equal to first difference;
If it is not, then from the non-whole amount of money for tearing material open choose in closest to and be less than first difference the 4th amount of money,
And the 5th amount of money greater than first difference;
According to the 4th amount of money and the 5th amount of money, so that first difference is maximized utilization.
5. according to the method described in claim 4, it is characterized in that, described according to the 4th amount of money and the 5th amount of money,
So that first difference is maximized utilization, comprising:
The minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split, the minimum number precision are small
Numerical digit number;
According to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, whether the 5th amount of money is judged
First difference can be split out;
If it is not, then according to the unit price of the 5th amount of money corresponding material and the minimum number precision being split, by the hardware
Volume splits out closest to and is less than the 6th amount of money of first difference;
From the 4th amount of money and the 6th amount of money, the amount of money numerical value of first difference is determined closest to and is less than,
So that first difference is maximized utilization.
6. a kind of system for splitting invoice characterized by comprising
Acquiring unit, the first material amount of money and the minimum of first material for obtaining ticket to be developed split unit, the minimum
Splitting unit includes integer and non-integer;
Determination unit, for determining the quantity of ticket to be developed according to the first material amount of money;
Split cells, for being carried out to the amount of every invoice according to the first material amount of money and the minimum fractionation unit
It splits, so that the amount of every invoice is maximized utilization.
7. system according to claim 6, which is characterized in that the split cells, comprising:
Divide subelement, for splitting unit according to the minimum of the first material, by first material be divided into it is whole tear open material and
It is non-whole to tear material open;
First sorting subunit, for the whole amount of money for tearing material open to be carried out the first sequence according to sequence from big to small;
Second sorting subunit, for the non-whole amount of money for tearing material open to be carried out the second sequence according to sequence from small to large;
Subelement is traversed, for successively traversing the whole amount of money for tearing material open and the non-whole amount of money for tearing material open, so that currently
Invoice amount is maximized utilization.
8. system according to claim 7, which is characterized in that the traversal subelement, comprising:
Ergodic judgement module for preferentially traversing the whole amount of money for tearing material open according to first sequence, and judges described whole
It tears open in the amount of money of material with the presence or absence of first amount of money equal to the current invoice amount;
Module is chosen, in whole tear open in the amount of money of material there is no first amount of money, then whole tears the material amount of money open from described
Middle second amount of money chosen closest to and be less than the current invoice amount, so that the current invoice amount is maximized benefit
With;
Computing module, for calculating the first difference of second amount of money Yu the current invoice amount;
Judgment module to be split whole tears material open for judging whether there is;
Obtain judgment module, for exist wait split it is whole tear material open when, obtain the whole monovalent sum number for tearing material open to be split
Amount, and judge whether first difference is less than the whole unit price for tearing material open to be split;
Spider module, for when first difference is less than the whole unit price for tearing material open wait split, then according to described the
Two sequences traverse the non-whole amount of money for tearing material open, so that first difference is maximized utilization.
9. system according to claim 8, which is characterized in that the spider module, comprising:
Ergodic judgement submodule for traversing the non-whole amount of money for tearing material open according to second sequence, and judges described non-
With the presence or absence of the third amount of money equal to first difference in the whole amount of money for tearing material open;
Submodule is chosen, for most being connect from choosing in the non-whole amount of money for tearing material open when the third amount of money is not present
The 4th amount of money that is close and being less than first difference, and the 5th amount of money greater than first difference;
Difference maximizes submodule, is used for according to the 4th amount of money and the 5th amount of money, so that first difference is by most
Bigization utilizes.
10. system according to claim 9, which is characterized in that the difference maximizes submodule, comprising:
Micromodule is read, the minimum number precision for reading the unit price of the 5th amount of money corresponding material and being split is described
Minimum number precision is decimal digits;
Micromodule is judged, for according to the monovalent of the 5th amount of money corresponding material and the minimum number precision being split, judgement
Whether the 5th amount of money can split out first difference;
Micromodule is split, for when the 5th amount of money cannot split out first difference, then according to the 5th amount of money
The unit price of corresponding material and the minimum number precision being split, the 5th amount of money is split out closest to and is less than described first
6th amount of money of difference;
Micromodule is determined, for from the 4th amount of money and the 6th amount of money, determining closest to and being less than described first
The amount of money numerical value of difference, so that first difference is maximized utilization.
11. a kind of computer installation, including processor, which is characterized in that the processor is stored in memory in processing
When computer program, for realizing the method for the fractionation invoice as described in any one of claims 1 to 5.
12. a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is characterized in that the computer program is processed
When device executes, for realizing the method for the fractionation invoice as described in any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811301525.3A CN109389439B (en) | 2018-11-02 | 2018-11-02 | Invoice splitting method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811301525.3A CN109389439B (en) | 2018-11-02 | 2018-11-02 | Invoice splitting method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109389439A true CN109389439A (en) | 2019-02-26 |
CN109389439B CN109389439B (en) | 2021-02-26 |
Family
ID=65428344
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811301525.3A Active CN109389439B (en) | 2018-11-02 | 2018-11-02 | Invoice splitting method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109389439B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103761811A (en) * | 2014-01-06 | 2014-04-30 | 武小毛 | Invoice generating method and device |
CN105243365A (en) * | 2015-09-28 | 2016-01-13 | 四川长虹电器股份有限公司 | Data processing method and data processing system |
CN106204171A (en) * | 2015-05-08 | 2016-12-07 | 航天信息股份有限公司 | The method and system of single tax rate VAT invoice is opened for the sales slip containing the amount of tax to be paid |
CN106980994A (en) * | 2016-01-15 | 2017-07-25 | 航天信息股份有限公司 | A kind of method for splitting of billing request document |
US20170372386A1 (en) * | 2014-05-30 | 2017-12-28 | Paypal, Inc. | Voice and context recognition for bill creation |
CN107679926A (en) * | 2017-10-11 | 2018-02-09 | 中启行物联科技(北京)有限公司 | A kind of invoice batch intelligence is split and combinational algorithm |
CN107833081A (en) * | 2017-09-30 | 2018-03-23 | 平安科技(深圳)有限公司 | Automatic method for splitting, device, terminal device and the storage medium of a kind of invoice amount |
-
2018
- 2018-11-02 CN CN201811301525.3A patent/CN109389439B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103761811A (en) * | 2014-01-06 | 2014-04-30 | 武小毛 | Invoice generating method and device |
US20170372386A1 (en) * | 2014-05-30 | 2017-12-28 | Paypal, Inc. | Voice and context recognition for bill creation |
CN106204171A (en) * | 2015-05-08 | 2016-12-07 | 航天信息股份有限公司 | The method and system of single tax rate VAT invoice is opened for the sales slip containing the amount of tax to be paid |
CN105243365A (en) * | 2015-09-28 | 2016-01-13 | 四川长虹电器股份有限公司 | Data processing method and data processing system |
CN106980994A (en) * | 2016-01-15 | 2017-07-25 | 航天信息股份有限公司 | A kind of method for splitting of billing request document |
CN107833081A (en) * | 2017-09-30 | 2018-03-23 | 平安科技(深圳)有限公司 | Automatic method for splitting, device, terminal device and the storage medium of a kind of invoice amount |
CN107679926A (en) * | 2017-10-11 | 2018-02-09 | 中启行物联科技(北京)有限公司 | A kind of invoice batch intelligence is split and combinational algorithm |
Non-Patent Citations (1)
Title |
---|
郑逢斌等: "《计算机科学导论》", 30 September 2016 * |
Also Published As
Publication number | Publication date |
---|---|
CN109389439B (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107180371A (en) | The method and system of commodity is bought using reward voucher | |
CN106156092B (en) | Data processing method and device | |
CN109918205A (en) | A kind of edge device dispatching method, system, device and computer storage medium | |
CN107491907A (en) | Cost for Electric Power Engineering control and analysis and system | |
CN110517138A (en) | Intelligent contract processing method, device, computer equipment and storage medium | |
CN106415639A (en) | Advertisement price discounting | |
CN108711047A (en) | A kind of automatic repayment method, system and terminal device | |
CN110263145A (en) | A kind of electronic contract signature method and electronic contract sign equipment | |
CN104380330A (en) | Foreign exchange transaction device, foreign exchange transaction system, transmission/reception method, and program | |
CN106648557A (en) | Application programming interface API sharing method and device | |
CN109947811A (en) | Generic features library generating method and device, storage medium, electronic equipment | |
CN110517145A (en) | Data trade method and relevant device based on multi-tiling interchain | |
EP4120167A1 (en) | Abnormal behavior detection method and apparatus, and electronic device and computer-readable storage medium | |
CN108520471A (en) | It is overlapped community discovery method, device, equipment and storage medium | |
CN107492215A (en) | The method and ATM terminals of banknote are shared in ATM | |
CN109559218A (en) | A kind of determination method, apparatus traded extremely and storage medium | |
CN113672375A (en) | Resource allocation prediction method, device, equipment and storage medium | |
CN108694413A (en) | Adaptively sampled unbalanced data classification processing method, device, equipment and medium | |
CN109426983A (en) | Dodge purchase activity automatic generation method and device, storage medium, electronic equipment | |
CN113935507A (en) | Foreign currency cash exchange reservation method and device based on block chain | |
CN110391972A (en) | A kind of business execution system, method and device | |
CN106157138A (en) | Group belonging to a kind of bank transaction data determines method and device | |
CN108898648A (en) | A kind of K line chart building method, system and relevant device | |
CN109389439A (en) | A kind of method and system splitting invoice | |
CN111522933A (en) | Conversation process control method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |