[Kmymoney] HTML Check Template
Jack
ostroffjh at frontier.com
Sun Nov 8 16:44:19 UTC 2015
On 2015.11.08 09:01, Doug Lytle wrote:
> I've been working on design for my own checks. I've bought proper
> fonts and MICR toner and blank check stock from Amazon.
>
> My place of employment already prints checks, so I have access to
> tools to confirm layout and readability of the checks that I'm
> producing.
>
> In creating the HTML template for KMyMoney check printing, I've noted
> that the $DATE variable is today's date and not the check date. Are
> there a list of variables that aren't included in the sample HTML?
>
> I'd be looking for a $CHECK_DATE.
Doug,
Well, looking into the code itself, I see the following:
// replace the predefined tokens
// data about the user
checkHTML.replace("$OWNER_NAME", file->user().name());
checkHTML.replace("$OWNER_ADDRESS", file->user().address());
checkHTML.replace("$OWNER_CITY", file->user().city());
checkHTML.replace("$OWNER_STATE", file->user().state());
// data about the account institution
checkHTML.replace("$INSTITUTION_NAME", institution.name());
checkHTML.replace("$INSTITUTION_STREET", institution.street());
checkHTML.replace("$INSTITUTION_TELEPHONE",
institution.telephone());
checkHTML.replace("$INSTITUTION_TOWN", institution.town());
checkHTML.replace("$INSTITUTION_CITY", institution.city());
checkHTML.replace("$INSTITUTION_POSTCODE", institution.postcode());
checkHTML.replace("$INSTITUTION_MANAGER", institution.manager());
// data about the transaction
checkHTML.replace("$DATE",
KGlobal::locale()->formatDate(QDate::currentDate(), KLocale::LongDate));
checkHTML.replace("$CHECK_NUMBER", (*it).split().number());
checkHTML.replace("$PAYEE_NAME",
file->payee((*it).split().payeeId()).name());
checkHTML.replace("$PAYEE_ADDRESS",
file->payee((*it).split().payeeId()).address());
checkHTML.replace("$PAYEE_CITY",
file->payee((*it).split().payeeId()).city());
checkHTML.replace("$PAYEE_POSTCODE",
file->payee((*it).split().payeeId()).postcode());
checkHTML.replace("$PAYEE_STATE",
file->payee((*it).split().payeeId()).state());
checkHTML.replace("$AMOUNT_STRING",
converter.convert((*it).split().shares().abs()));
checkHTML.replace("$AMOUNT_DECIMAL",
MyMoneyUtils::formatMoney((*it).split().shares().abs(), currency));
checkHTML.replace("$MEMO", (*it).split().memo());
I suppose nobody expected anyone to print checks they weren't writing
today. It looks like it would be fairly easy to add a new line using
the transaction date. I suppose this should be filed as a "whishlist"
at bugs.kde.org, so it doesn't get lost.
Jack
More information about the KMyMoney
mailing list