GNOME Bugzilla – Bug 621016
Print multiple checks at the same time
Last modified: 2018-06-29 22:40:32 UTC
Created attachment 163098 [details] Patch to implement multiple check printing The print checks operation should be able to print more than one check with a single invocation of the "Print Check..." command. The attached patch does this. If the active register is an account register, then the selected transaction is printed (as before). If it is a search results register where all the splits are from the same account, then it prints a check for each of them. Anything else is an error.
To preface, I'm not sure I'm using this right because I have very little experience with GnuCash. 1. If the splits are not from the same account in a search results register, the first entry is printed, regardless what is selected. 2. Why are you testing for splits from the same account? I don't understand its purpose. 3. What do you think about this alternative: If a register is restricted by Find.. or by Filter.., then offer as an option ( eg a checkbox ) to print all transactions in the register, otherwise just print the selected entry as before.
(In reply to comment #1) > 1. If the splits are not from the same account in a search results register, > the first entry is printed, regardless what is selected. You're clearly doing something differently than I did since it worked when I tested this. Please enter step by step instructions for making it fail, preferably with a data file that demonstrates the problem. > 2. Why are you testing for splits from the same account? I don't understand > its purpose. My reasoning was something like this: 1 You're printing on preprinted check forms. 2 All the checks are from the same bank account. 3 If you print checks from different banks on these forms some checks will be invalid. 4 Each bank account corresponds with a single Gnucash account Although this last point is normally true, I can see that it might not be true for some people. I can change the error to a warning. > 3. What do you think about this alternative: If a register is restricted by > Find.. or by Filter.., then offer as an option ( eg a checkbox ) to print all > transactions in the register, otherwise just print the selected entry as > before. This is essentially what I did. If you do a Find... from an account register and print checks from the resulting window, it will print everything in the window. I didn't implement the same thing for a filtered check register since it didn't seem necessary to do both and since filtering doesn't give you nearly the control over what is included.
1. I tried to reproduce in a small file and couldn't do it. My 'big' file is giving me other problems, so I think it may be messed up. I'll play with it more, but won't bother you with anything I can't reproduce in a small test file. 2. Thanks. That helped a lot. I don't know enough to have an opinion on your comment regarding 2.4 3. I understand now, and it seems very effective. Apart from that, a Filter.. on the Find.. works as you would expect. Two other comments: a. If I use a voucher check ( 1 check per page ), only the first one prints, the other pages 'printing' but they are blank. b. The default for your spin control is 1. For regular checks ( 3 per page ), shouldn't the default be 3? That way the default will fill the page, and if I'm feeding a partial page I would know that I need to do something different. I don't use these types of checks, so no experience.
You're right, voucher checks don't work. I never use them so I hadn't noticed. Since I figured multiple checks per page was the hard case, I didn't test the other case well enough. I'll look into fixing it. As far as the default value for "checks on the first page" I don't think any value is better than any other. It's a one in three chance that the last check I print will be the last check on a page (which is when 3 is the right value the next time I print checks), so defaulting to 3 doesn't seem much better than 1. At least if you default to 1 and it's wrong all the checks will print somewhere and you can go back and use the other one or two checks on the first page since they haven't been printed on.
Other check formats have problems as well. I tried to set [Check Positions] in the format file so that positions_max would be set, the format height would be defined, but there was still only one 'position'. It still didn't work. Also the rotation and translation parameters seem to have some trouble. I don't think it has anything to do with your patch, but I haven't tested that way. I agree with your view regarding the 'checks on the first page' default.
Created attachment 163446 [details] [review] Second version of patch This patch fixes a few problems with the previous one: 1. The message about multiple accounts in a search result is now a warning instead of an error. 2. The custom check position, which has never worked right, now works. Note that this is not the same as the custom check format, it's a custom position on the page for an existing check format. 3. Formats with one check per page don't print blank pages for the second and following pages. 4. Minor cosmetic changes.
You don't really mean "commit now" do you, since it violates the string freeze? I've made one other change beyond the second patch to fix the case where the previously selected check format no longer exists when the print checks dialog is opened. This didn't work right in some cases. Rather than committing the patch as it is, I should commit that version.
I tested the second patch and everything looks great except for one small problem. I noticed that the custom position parameter widgets ( on the Custom Format tab ) are active when the Check Position CUSTOM is selected, however when a new check format is selected, the widgets become inactive. This happens even when the check position is CUSTOM when the new format is selected. If I change the option to TOP then CUSTOM they become active again.
Created attachment 164441 [details] [review] Third version of the patch Thanks for doing such a good job of QA on this change. The attached patch fixes the problem with enabling the custom position fields when check position is "Custom" and the format is changed. It is based on SVN revision 19285. Let me know if it doesn't fix the problem for you.
Comment on attachment 164441 [details] [review] Third version of the patch Looks good!
Looks good to me as well.
Comment on attachment 164441 [details] [review] Third version of the patch Since we have a minor string change anyway, I decided it can go in right away. THanks!
Does this patch allow me to print 3 business size checks on one sheet or multiple checks on multiple sheets? I am a real newbie to Ubuntu and GnuCash so if it will allow me to print 3 business checks on one sheet, please post instructions on how to install the patch. My extent of abilities on terminal is copy and paste instructions. I am using GnuCash v2.4.5 built from r20528M on 2011-04-12. If this patch is part of this version then I just need to figure out how to apply it. Also, this may need to be a separate post but, I have been using Quickbooks for several years and I have pre-printed checks with my routing,account and check number. My business name and address were printed when I ran my checks. Would someone have a patch which would enable me to do that? Thanks for your help. Joining the Ubuntu community has been a new and pleasant discovery every day. I wish I would have made the switch 10 years ago.
This patch is part of GnuCash 2.4. Check printing is table driven so you can print to any check forms you have available, although I don't know of any forms that contain three business checks per page. The formats are defined in text files located in share/gnucash/checks in the install directory. You can also define a custom format using the "Custom format" tab of the print checks dialog, although that seems to only allow one check per page. If you have check stock with more than one check per page you will need to create a new format file in the checks directory.
Mike, Thank you for your response. I found the files you referenced, unfortunately I am not experienced enough to rewrite them for my needs. Using the custom feature, I believe, will still only have one payee not three. Three checks to a sheet is fairly common as can be seen in these links. Note the laser/ink jet checks http://secure.checksinthemail.com/index_promo.aspx?code=WB10476 http://www.checkworks.com/ http://www.compuchecks.com/threecheck.htm http://www.bestchecks.com/compatibility.htm Thanks for your help, baconmaker
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=621016. Please update any external references or bookmarks.