I have a similar issue but my php skills  are lacking somewhat . The format of the PV can be as illustrated here http://www.besttemplates.org/wp-content/uploads/2012/05/Payment-Voucher-Template.jpg but with internal control section to show which GL accounts are credited or debited as the case may be.

I would appreciate any help

/cj