A kind of automatic complement method and system of roll type bill
Technical field
The present invention relates to printing invoice field, the automatic complement method and system of more particularly to a kind of roll type bill.
Background technology
What pin type mini-printer was used is all to roll up ticket, about 48 watts of the peak power of the pin type mini-printer, it is impossible to make
It is powered with portable cell, so when the burst power-off in print procedure or other abnormal conditions, printing will be immediately
Stop.
The print command that existing printer driver is provided all meets the specification of EPSON, and the maximum problem of the specification is exactly
Print result is not returned, this can cause after print software has sent print request, it is impossible to obtain print result, and think to send out
Ticket has been printed and completed.And require that the invoice number above invoice must with the invoice number for printing in VAT invoice system upgrade version
Must be consistent, otherwise can be considered as false tickets, and for the invoice completed without printing, in addition it is also necessary to the stream specified according to system
Journey goes to cancel.So causing the situation that invoice do not beaten, the personnel of making out an invoice to need the following thing of strict implement for unexpected abnormality:
1) whether manual detection has invoice not print and completes;
2) ticket paper feed will be rolled up at the black mark of next invoice, prepare with next printing invoice using paper feed key;
3) invoice number is made into the invoice number of next, and printed invoice again using the interface of equipment of making out an invoice;
4) using equipment of making out an invoice, a upper invoice number is scrapped according to the flow process of regulation.
Therefore, such case operate for the personnel of making out an invoice, not only it is extremely complex, and be easy to due to the personnel of making out an invoice dredge
Suddenly (for example forget to detect whether not print complete invoice etc.) and cause gross error, and bring larger trouble.
The content of the invention
One of the technical problem to be solved in the present invention, is to provide a kind of roll type bill automatic complement method, by the party
Method realizes automatically processing for the invoice to not printed, and the invoice of the simplified personnel that make out an invoice scraps flow process.
The present invention is realized in one of technical problem:A kind of automatic complement method of roll type bill, methods described includes
Following steps:
Step 1, initialization are made out an invoice equipment data, and after invoice dress volume, the equipment of making out an invoice just obtains the number section letter of invoice
Breath, and be saved in printing device;
Step 2, in the interface of making out an invoice that equipment offer is provided it is input into invoice information, and sends that print please to printing device
Ask, comprising invoice information and check code in the print request;
Step 3, printing device are preserved the invoice information and check code of reception, and arrange a printing mark, and
Printing device printed invoice is driven, if printing invoice is completed, memory dump mark, and return to step 2 prints next invoice,
Just stop after the volume printing invoice is complete, with the invoice volume for more renewing;If occurring abnormal, execution step 4 in the process;
After step 4, restarting systems, whether printing device is received completely by check code automatic decision invoice information,
And judge whether invoice prints and complete by printing mark, and a judged result is generated, afterwards execution step 5;
Step 5, equipment of making out an invoice read the judged result of printing device, and perform corresponding invoice complement according to judged result
Operation.
Further, the step 4 is specially:System restarting after, printing device with regard to automatic comparison invoice information with
Whether check code corresponds to, and for judging whether invoice information receives completely, and reads automatically and prints mark, for judging that invoice is
No printing is completed;If invoice information is not corresponding with check code, the judged result for generating is:Invoice information reception failure, afterwards
Execution step 5;If invoice information is corresponding with check code, and reads printing mark, then the judged result for generating is:Invoice is not
Printing is completed, afterwards execution step 5;If invoice information is corresponding with check code, and does not read printing mark, then what is generated sentences
Disconnected result is:Invoice is printed and completed, afterwards execution step 5.
Further, the step 5 is specially:Equipment of making out an invoice reads the judged result of printing device, if what is read sentences
Disconnected result is invoice information reception failure, then to printing device the print request of the invoice is sent again, to print this again
Open invoice;Do not print and complete if the judged result for reading is invoice, provide for move back automatically paper and print again should
Ticket, the invoice and the invoice is printed again and process choosing for three of the manual handle invoice for cancelling automatically
, for personnel selection process of making out an invoice;Print and complete if the judged result for reading is invoice, return to step 2 prints next
Open invoice.
Further, be used for described in personnel selection when making out an invoice and move back paper automatically and print the Treatment Options of the invoice again
When, equipment of making out an invoice just moves back paper to the black cursor position of the invoice automatically by instruction control printing device, to print this again
Invoice;The premise for selecting the option is not print the invoice for completing not being torn;
Be used for described in personnel selection when making out an invoice the invoice and when printing the Treatment Options of the invoice again of cancelling automatically,
Equipment make out an invoice just by the black cursor position of the automatic paper feed of instruction control printing device to next invoice, and automatically should by what is obtained
The number section information for opening invoice is changed to the number section information of next invoice, to print the invoice again, while cancelling according to invoice
Flow process is cancelled and is not printed the invoice for completing automatically;
When make out an invoice the Treatment Options for being used for the manual handle invoice described in personnel selection when, with regard to manual paper feeding to next
The original position of invoice, and the invoice by equipment offer of making out an invoice scraps interface the invoice scrapped, while by opening
The interface of making out an invoice that ticket equipment is provided issues invoice again.
The two of the technical problem to be solved in the present invention, are to provide a kind of roll type bill automatic complement system, by described
System realizes automatically processing for the invoice to not printed, and the invoice of the simplified personnel that make out an invoice scraps flow process.
The present invention is realized in the twos' of technical problem:A kind of automatic complement system of roll type bill, the system includes
Initialization module, input module, printing drive module, judge module and control complement module;
The initialization module, for initializing equipment data of making out an invoice, and after invoice dress volume, the equipment of making out an invoice just is obtained
The number section information of invoice, and be saved in printing device;
The input module, for being input into invoice information in the interface of making out an invoice for making out an invoice equipment offer, and to printing device
Print request is sent, comprising invoice information and check code in the print request;
The printing drive module, is preserved the invoice information and check code of reception for printing device, and is arranged
One prints mark, and drives printing device printed invoice, if printing invoice is completed, memory dump mark, and return input
Module prints next invoice, just stops after the volume printing invoice is complete, with the invoice volume for more renewing;If going out in the process
It is now abnormal, then perform judge module;
The judge module, after restarting systems, printing device is by check code automatic decision invoice information
It is no to receive complete, and indicate that judging whether invoice prints completes by printing, and a judged result is generated, control is performed afterwards
Complement module;
The control complement module, for making out an invoice, equipment reads the judged result of printing device, and is held according to judged result
The corresponding invoice complement operation of row.
Further, the judge module is specially:After system restarting, printing device is with regard to automatic comparison invoice information
It is whether corresponding with check code, for judging whether invoice information receives completely, and printing mark is read automatically, for judging invoice
Whether printing is completed;If invoice information is not corresponding with check code, the judged result for generating is:Invoice information reception failure, it
Control complement module is performed afterwards;If invoice information is corresponding with check code, and reads printing mark, the then judged result for generating
It is:Invoice is not printed and completed, and control complement module is performed afterwards;If invoice information is corresponding with check code, and do not read beat
Franking, then the judged result for generating is:Invoice is printed and completed, and control complement module is performed afterwards.
Further, the control complement module is specially:Equipment of making out an invoice reads the judged result of printing device, if reading
To judged result be invoice information reception failure, then to printing device the print request of the invoice is sent again, with again
Print the invoice;Do not print and complete if the judged result for reading is invoice, provide for moving back paper automatically and printing again
The invoice, the invoice and the invoice is printed again and for three of the manual handle invoice for cancelling automatically
Treatment Options, for personnel selection process of making out an invoice;Print and complete if the judged result for reading is invoice, return input module
Print next invoice.
Further, be used for described in personnel selection when making out an invoice and move back paper automatically and print the Treatment Options of the invoice again
When, equipment of making out an invoice just moves back paper to the black cursor position of the invoice automatically by instruction control printing device, to print this again
Invoice;The premise for selecting the option is not print the invoice for completing not being torn;
Be used for described in personnel selection when making out an invoice the invoice and when printing the Treatment Options of the invoice again of cancelling automatically,
Equipment make out an invoice just by the black cursor position of the automatic paper feed of instruction control printing device to next invoice, and automatically should by what is obtained
The number section information for opening invoice is changed to the number section information of next invoice, to print the invoice again, while cancelling according to invoice
Flow process is cancelled and is not printed the invoice for completing automatically;
When make out an invoice the Treatment Options for being used for the manual handle invoice described in personnel selection when, with regard to manual paper feeding to next
The original position of invoice, and the invoice by equipment offer of making out an invoice scraps interface the invoice scrapped, while by opening
The interface of making out an invoice that ticket equipment is provided issues invoice again.
The invention has the advantages that:When there is power-off or exception, it is possible to achieve the invoice to not printed is carried out
Automatically process, the invoice for simplifying the personnel of making out an invoice scraps flow process, and reduces the personnel that make out an invoice because operational error brings what invoice cancelled
Trouble.
Description of the drawings
With reference to the accompanying drawings in conjunction with the embodiments the present invention is further illustrated.
Fig. 1 is the inventive method execution flow chart.
Specific embodiment
Refer to shown in Fig. 1, a kind of automatic complement method of roll type bill, methods described comprises the steps:
Step 1, initialization are made out an invoice equipment data, and after invoice dress volume, the equipment of making out an invoice just obtains the number section letter of invoice
Breath, and be saved in printing device;
Step 2, in the interface of making out an invoice that equipment offer is provided it is input into invoice information, and sends that print please to printing device
Ask, comprising invoice information and check code in the print request;The invoice information can include payee, the name of an article, price, open
The information such as ticket position.After invoice information of being totally lost, " making out an invoice " button that can pass through to be arranged on interface of making out an invoice is sent out to printing device
Send print request.
Step 3, printing device are preserved the invoice information and check code of reception, and arrange a printing mark, should
Mark is printed for indicating printing device in print state, and drives printing device printed invoice, if printing invoice is completed,
Memory dump mark, and return to step 2 prints next invoice, just stops after the volume printing invoice is complete, with what is more renewed
Invoice volume;If occurring abnormal, execution step 4 in the process;
After step 4, restarting systems, whether printing device is received completely by check code automatic decision invoice information,
And judge whether invoice prints and complete by printing mark, and a judged result is generated, afterwards execution step 5;The step tool
Body is:After system restarting, whether printing device is corresponding with check code with regard to automatic comparison invoice information, for judging that invoice is believed
Whether breath receives successfully, and reads printing mark automatically, completes for judging whether invoice prints;If invoice information and check code
Do not correspond to, then the judged result for generating is:Invoice information reception failure, afterwards execution step 5;If invoice information and check code pair
Should, and reading printing mark, then the judged result for generating is:Invoice is not printed and completed, afterwards execution step 5;If invoice
Information is corresponding with check code, and does not read printing mark, then the judged result for generating is:Invoice is printed and completed, afterwards
Execution step 5.
Step 5, equipment of making out an invoice read the judged result of printing device, and perform corresponding invoice complement according to judged result
Operation.The step is specially:Equipment of making out an invoice reads the judged result of printing device, if the judged result for reading is invoice information
Reception failure, then to printing device send the print request of the invoice, to print the invoice again again;If reading
Judged result is that invoice is not printed and completed, then provide for move back paper automatically and print the invoice again, for cancelling this automatically
Open invoice and print the invoice and three Treatment Options for the manual handle invoice again, for personnel selection of making out an invoice
Process;Print and complete if the judged result for reading is invoice, return to step 2 prints next invoice.
And when make out an invoice described in personnel selection be used for move back paper automatically and print the Treatment Options of the invoice again when, billing machine
Tool just moves back paper to the black cursor position of the invoice automatically by instruction control printing device, to print the invoice again;Select
The premise of the option is not print the invoice for completing not being torn;
Be used for described in personnel selection when making out an invoice the invoice and when printing the Treatment Options of the invoice again of cancelling automatically,
Equipment make out an invoice just by the black cursor position of the automatic paper feed of instruction control printing device to next invoice, and automatically should by what is obtained
The number section information for opening invoice is changed to the number section information of next invoice, to print the invoice again, while cancelling according to invoice
Flow process is cancelled and is not printed the invoice for completing automatically;
When make out an invoice the Treatment Options for being used for the manual handle invoice described in personnel selection when, with regard to manual paper feeding to next
The original position of invoice, and the invoice by equipment offer of making out an invoice scraps interface the invoice scrapped, while by opening
The interface of making out an invoice that ticket equipment is provided issues invoice again.
A kind of automatic complement system of roll type bill, the system includes initialization module, input module, print drive mould
Block, judge module and control complement module;
The initialization module, for initializing equipment data of making out an invoice, and after invoice dress volume, the equipment of making out an invoice just is obtained
The number section information of invoice, and be saved in printing device;
The input module, for being input into invoice information in the interface of making out an invoice for making out an invoice equipment offer, and to printing device
Print request is sent, comprising invoice information and check code in the print request;The invoice information can include payee, product
The information such as name, price, unit of making out an invoice.After invoice information of being totally lost, can pass through to be arranged on " making out an invoice " button at interface of making out an invoice to
Printing device sends print request.
The printing drive module, is preserved the invoice information and check code of reception for printing device, and is arranged
One prints mark, and the printing indicates for indicating printing device in print state, and drives printing device printed invoice, if
Printing invoice is completed, then memory dump mark, and is returned input module and printed next invoice, after the volume printing invoice is complete
Just stop, with the invoice volume for more renewing;If occurring exception in the process, judge module is performed;
The judge module, after restarting systems, printing device is by check code automatic decision invoice information
It is no to receive complete, and indicate that judging whether invoice prints completes by printing, and a judged result is generated, control is performed afterwards
Complement module;The module is specially:After system restarting, whether printing device is right with check code with regard to automatic comparison invoice information
Should, for judging whether invoice information receives successfully, and printing mark is read automatically, complete for judging whether invoice prints;
If invoice information is not corresponding with check code, the judged result for generating is:Invoice information reception failure, performs afterwards control complement
Module;If invoice information is corresponding with check code, and reads printing mark, then the judged result for generating is:Invoice is not printed
Complete, control complement module is performed afterwards;If invoice information is corresponding with check code, and does not read printing mark, then generate
Judged result be:Invoice is printed and completed, and control complement module is performed afterwards.
The control complement module, for making out an invoice, equipment reads the judged result of printing device, and is held according to judged result
The corresponding invoice complement operation of row;The module is specially:Equipment of making out an invoice reads the judged result of printing device, if what is read sentences
Disconnected result is invoice information reception failure, then to printing device the print request of the invoice is sent again, to print this again
Open invoice;Do not print and complete if the judged result for reading is invoice, provide for move back automatically paper and print again should
Ticket, the invoice and the invoice is printed again and process choosing for three of the manual handle invoice for cancelling automatically
, for personnel selection process of making out an invoice;Print and complete if the judged result for reading is invoice, return to step 2 prints next
Open invoice.
And when make out an invoice described in personnel selection be used for move back paper automatically and print the Treatment Options of the invoice again when, billing machine
Tool just moves back paper to the black cursor position of the invoice automatically by instruction control printing device, to print the invoice again;Select
The premise of the option is not print the invoice for completing not being torn;
Be used for described in personnel selection when making out an invoice the invoice and when printing the Treatment Options of the invoice again of cancelling automatically,
Equipment make out an invoice just by the black cursor position of the automatic paper feed of instruction control printing device to next invoice, and automatically should by what is obtained
The number section information for opening invoice is changed to the number section information of next invoice, to print the invoice again, while cancelling according to invoice
Flow process is cancelled and is not printed the invoice for completing automatically;
When make out an invoice the Treatment Options for being used for the manual handle invoice described in personnel selection when, with regard to manual paper feeding to next
The original position of invoice, and the invoice by equipment offer of making out an invoice scraps interface the invoice scrapped, while by opening
The interface of making out an invoice that ticket equipment is provided issues invoice again.
In a word, the invention has the advantages that:When there is power-off or exception, it is possible to achieve to the invoice not printed
Automatically processed, the invoice for simplifying the personnel of making out an invoice scraps flow process, and reduction makes out an invoice personnel because operational error brings invoice to make
Useless trouble.
Although the foregoing describing the specific embodiment of the present invention, those familiar with the art should manage
Solution, the specific embodiment described by us is merely exemplary, rather than for the restriction to the scope of the present invention, is familiar with this
The technical staff in field should be covered the present invention's in the equivalent modification and change made according to the spirit of the present invention
In scope of the claimed protection.