After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621016 - Print multiple checks at the same time
Print multiple checks at the same time
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Check Printing
git-master
Other Mac OS
: Normal enhancement
: ---
Assigned To: David Hampton
Depends on:
Blocks:
 
 
Reported: 2010-06-08 20:18 UTC by Mike Alexander
Modified: 2018-06-29 22:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to implement multiple check printing (19.16 KB, application/octet-stream)
2010-06-08 20:18 UTC, Mike Alexander
  Details
Second version of patch (25.66 KB, patch)
2010-06-12 03:21 UTC, Mike Alexander
accepted-commit_now Details | Review
Third version of the patch (26.78 KB, patch)
2010-06-23 22:10 UTC, Mike Alexander
committed Details | Review

Description Mike Alexander 2010-06-08 20:18:05 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.
Comment 1 Thomas Troesch 2010-06-09 06:07:19 UTC
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.
Comment 2 Mike Alexander 2010-06-09 18:54:48 UTC
(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.
Comment 3 Thomas Troesch 2010-06-09 23:13:44 UTC
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.
Comment 4 Mike Alexander 2010-06-10 05:33:17 UTC
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.
Comment 5 Thomas Troesch 2010-06-10 23:28:44 UTC
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.
Comment 6 Mike Alexander 2010-06-12 03:21:27 UTC
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.
Comment 7 Mike Alexander 2010-06-14 17:21:15 UTC
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.
Comment 8 Thomas Troesch 2010-06-21 04:40:47 UTC
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.
Comment 9 Mike Alexander 2010-06-23 22:10:18 UTC
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 10 Christian Stimming 2010-06-25 18:52:49 UTC
Comment on attachment 164441 [details] [review]
Third version of the patch

Looks good!
Comment 11 Thomas Troesch 2010-06-28 21:48:19 UTC
Looks good to me as well.
Comment 12 Christian Stimming 2010-07-14 20:39:11 UTC
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!
Comment 13 baconmaker 2011-04-15 17:31:55 UTC
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.
Comment 14 Mike Alexander 2011-04-23 18:19:08 UTC
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.
Comment 15 baconmaker 2011-04-24 13:41:44 UTC
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
Comment 16 John Ralls 2018-06-29 22:40:32 UTC
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.