This forum has been archived. All content is frozen. Please use KDE Discuss instead.

check_template.html

Tags: None
(comma "," separated)
rdonnelly
Registered Member
Posts
10
Karma
0
OS

check_template.html

Wed Mar 02, 2011 3:57 pm
Hi I am a noob on your forum. Been using KMyMoney over 2 years, I have the check plugin installed and working on v.3.98.1. Is there a place to download template for different check formats, or do I need to edit the check template? I gave it a try but it seems to have alot of entries to edit.

Any help would be appreciated, Thanks Bob
User avatar
Hei Ku
Registered Member
Posts
784
Karma
3
OS

Re: check_template.html

Wed Mar 02, 2011 4:08 pm
You have to create and edit the template yourself. I'd recommend upgrading to the latest stable version first, 4.5.3


Hei Ku, proud to be a member of the KMyMoney Development Team since January-2008
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Wed Mar 02, 2011 4:40 pm
Hei Ku wrote:You have to create and edit the template yourself. I'd recommend upgrading to the latest stable version first, 4.5.3


Ok, so how do I go about editing the template?

What part of the template do I edit?

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
@media screen {

  table.check {
    width:16cm;
    height:7cm;
    empty-cells:show
  }

  table.check td.owner {
    font-size: 8pt;
    text-align: center
  }
 
  table.check td.institution {
    font-size: 8pt;
    text-align: center
  }

  table.check td.date {
    font-size: 12pt;
    text-align: center;
  }

  table.check td.amountnumeric {
    font-size: 12pt;
    text-align: right;
    height: 2cm
  }

  table.check td.amountliteral {
    font-size: 12pt;
    text-align: left;
    height: 2cm
  }

  table.check td.text {
    font-size: 8pt;
    text-align: center;
    max-width: 2cm
  }

  table.check td.payee {
    font-size: 12pt;
    text-align: left;
    min-width: 70%
  }
}

@media print {
  table.check {
    width:16cm;
    height:7cm;
    empty-cells:show
  }

  table.check td.owner {
    font-size: 8pt;
    text-align: center
  }
 
  table.check td.institution {
    font-size: 8pt;
    text-align: center
  }

  table.check td.date {
    font-size: 12pt;
    text-align: center;
  }

  table.check td.amountnumeric {
    font-size: 12pt;
    text-align: right;
    height: 2cm
  }

  table.check td.amountliteral {
    font-size: 12pt;
    text-align: left;
    height: 2cm
  }

  table.check td.text {
    font-size: 8pt;
    text-align: center;
    max-width: 2cm
  }

  table.check td.payee {
    font-size: 12pt;
    text-align: left;
    min-width: 70%
  }
}

</style>
</head><body>
<table class="check">
<tr>
  <td class="text" rowspan="3"></td>
  <td class="owner">$OWNER_NAME</td>
  <td class="institution">$INSTITUTION_NAME</td>
  <td class="text" rowspan="3"></td>
  <td class="date" rowspan="3">$DATE</td>
</tr>
<tr>
  <td class="owner">$OWNER_ADDRESS</td>
  <td class="institution">$INSTITUTION_STREET</td>
</tr>
<tr>
  <td class="owner">$OWNER_CITY $OWNER_STATE</td>
  <td class="institution">$INSTITUTION_CITY</td>
</tr>
<tr>
  <td class="space" colspan="4"></td>
</tr>
<tr>
  <td class="text">Pay</td>
  <td class="amountliteral" colspan="2">$AMMOUNT_STRING</td>
  <td class="text"></td>
  <td class="amountnumeric">$AMMOUNT_DECIMAL</td>
</tr>
<tr>
  <td class="space" colspan="4"></td>
</tr>
<tr>
  <td class="text" rowspan="3">To the order of</td>
  <td class="payee" colspan="2">$PAYEE_NAME</td>
  <td class="text" rowspan="3">Per</td>
  <td class="text" rowspan="3">$MEMO</td>
</tr>
<tr>
  <td class="payee" colspan="2">$PAYEE_ADDRESS</td>
</tr>
<tr>
  <td class="payee" colspan="2">$PAYEE_CITY $PAYEE_STATE</td>
</tr>
</table>
</body></html>
cristian.onet
KDE Developer
Posts
253
Karma
2
OS

Re: check_template.html

Thu Mar 03, 2011 12:59 pm
The check template is a HTML with the placeholders. To create your own check template you must know how to create a HTML document that contains the placeholders that you are interested in at the positions you want them to be. I totally agree that this method of editing the check template is totally useless to a regular user with no knowledge of HTML but right now this is the only way to do it. You could try a WYSIWYG HTML editor to create a check template if you don't want to edit the HTML directly.


cristian.onet, proud to be a member of KDE forums since 2008-Oct.
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Thu Mar 03, 2011 7:55 pm
So I managed to make a template that would fit into the formatting of my check stock, all fits well I have just a few minor problems.

Code: Select all
$DATE 

      $PAYEE_NAME ----------------------------------------------------------------------------------               $AMMOUNT_DECIMAL

$AMMOUNT_STRING --------------------------------------------------------------------------------------------------------------------------------






      $PAYEE_NAME

      $PAYEE_ADDRESS

      $PAYEE_CITY $PAYEE_STATE 

      $MEMO


I made some copies of my check stock for print tests
in the $AMMOUNT_DECIMAL field I put "$800.66" and it went OK
in $AMMOUNT_STRING it printed the wrong amount of "eight hundred and 65/100"
Also the $AMMOUNT_STRING prints out in all lower case
Another thing is $PAYEE_ADDRESS and $PAYEE_CITY $PAYEE_STATE all prints on one line?

If you could tell me how to handle those couple of problems I should be able to get this working perfect.

Thank You
cristian.onet
KDE Developer
Posts
253
Karma
2
OS

Re: check_template.html

Fri Mar 04, 2011 9:15 am
in $AMMOUNT_STRING it printed the wrong amount of "eight hundred and 65/100"

That is a bug that I should fix.

Also the $AMMOUNT_STRING prints out in all lower case

How should it be printed? (I've never printed a check before)
Another thing is $PAYEE_ADDRESS and $PAYEE_CITY $PAYEE_STATE all prints on one line?

Each placeholder is replaced with their corresponding value from the application. If it's rendered on one line or not it depends on the check template.


cristian.onet, proud to be a member of KDE forums since 2008-Oct.
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Fri Mar 04, 2011 9:58 am
cristian.onet wrote:
in $AMMOUNT_STRING it printed the wrong amount of "eight hundred and 65/100"

That is a bug that I should fix.

Also the $AMMOUNT_STRING prints out in all lower case

How should it be printed? (I've never printed a check before)
Another thing is $PAYEE_ADDRESS and $PAYEE_CITY $PAYEE_STATE all prints on one line?

Each placeholder is replaced with their corresponding value from the application. If it's rendered on one line or not it depends on the check template.


Thanks for the quick reply, it would be great if you can fix that bug in the fraction, the text amount of the check should print with the first letter of each word in caps, "eight hundred", should be "Eight Hundred". And I am pretty sure the address prints on on line because in the KMyMoney program the Payee information address is put in one box for all fields, and that is where it is getting the data from. One more question is how would I add "Postal Code" to the template?

Here is the actual HTML with source, feel free to add it to any revised check print plugin in the future as my small contribution. And thank you for your contribution.

http://dl.dropbox.com/u/19672761/check_template2.html

This is the style check the template fits
http://www.checkstomorrow.com/productde ... D=LB3-GRNL
zebulon
Registered Member
Posts
417
Karma
2
OS

Re: check_template.html

Fri Mar 04, 2011 6:29 pm
That is a bug that I should fix.
While you're at it, could you please also remove that annoying extra "M"? The proper spelling is "amount".
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Fri Mar 04, 2011 6:32 pm
zebulon wrote:
That is a bug that I should fix.
While you're at it, could you please also remove that annoying extra "M"? The proper spelling is "amount".


They are Romanian, maybe that is how they spell amount?

Last edited by rdonnelly on Fri Mar 04, 2011 8:32 pm, edited 1 time in total.
zebulon
Registered Member
Posts
417
Karma
2
OS

Re: check_template.html

Fri Mar 04, 2011 8:02 pm
It isn't important; it's just that today is National Grammar Day... :)
cristian.onet
KDE Developer
Posts
253
Karma
2
OS

Re: check_template.html

Sat Mar 05, 2011 8:45 am
rdonnelly wrote:
zebulon wrote:
That is a bug that I should fix.
While you're at it, could you please also remove that annoying extra "M"? The proper spelling is "amount".


They are Romanian, maybe that is how they spell amount?


I'll fix it, but I think that the mocking is not appropriate after all I am doing this in my free time so you can enjoy this feature so please refrain yourself in the future from such comments.


cristian.onet, proud to be a member of KDE forums since 2008-Oct.
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Sat Mar 05, 2011 12:46 pm
cristian.onet wrote:I'll fix it, but I think that the mocking is not appropriate after all I am doing this in my free time so you can enjoy this feature so please refrain yourself in the future from such comments.


I agree, and we appreciate all you do for the Linux/KDE community. And BTW, I was not mocking, I am not sure if amount is spelled different in you part of the world?
cristian.onet
KDE Developer
Posts
253
Karma
2
OS

Re: check_template.html

Sat Mar 05, 2011 9:58 pm
One more question is how would I add "Postal Code" to the template?


If you are referring to the institution's postal code I've just added the possibility to use it trough the $PAYEE_POSTCODE placeholder. The institution's postcode was already available using $INSTITUTION_POSTCODE.

Here is the actual HTML with source, feel free to add it to any revised check print plugin in the future as my small contribution. And thank you for your contribution.


Thanks for sharing the check template that you have created, I have already added it to the plugin see http://websvn.kde.org/?revision=1223910&view=revision which contains fixes for the other issues that you have reported without the 'words should begin uppercase' one.

Is that really needed? If so I have to change the strings which are already translated and I could not find a general guideline to confirm this on the Internet.


cristian.onet, proud to be a member of KDE forums since 2008-Oct.
zebulon
Registered Member
Posts
417
Karma
2
OS

Re: check_template.html

Sat Mar 05, 2011 10:47 pm
s that really needed? If so I have to change the strings which are already translated and I could not find a general guideline to confirm this on the Internet.
I don't think it is. The first word is often capitalized, but not the others. From ehow.com: "One hundred forty dollars and 17/100". Wikihow.com: "One hundred dollars and 73/100 only -----------"

I pay bills online, and my bank writes and sends the checks. Those are all uppercase.
rdonnelly
Registered Member
Posts
10
Karma
0
OS

Re: check_template.html

Sun Mar 06, 2011 1:30 am
Thanks Cristian, I will try them out in a couple of days when I return and report back how they worked out.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]