Implementing a New Payment Type

Based on a discussion in the user forum I have changed a number of archetypes and reports to allow a new payment type.

In this case the payment type is Direct Deposit.

I added a new archetype act.customerAccountPaymentDirect.1.0.  This defines a simple customer payment called Direct Deposit and allows fot the recording at the time of payment record with a reference(can be a number/ code whatver).

Action: Import this archetype (Administration-->archetypes)

I updated the archetype actRelationship.customerAccountPaymentItem to add another entry under the target node that details the new payment archetype.

Action: Import and Update this archetype(Administration-->archetypes)

Finally I changed the Bank Deposit Report and the Tillbalance report.  I am not sure if there are any other reports that require the payment types to be seperated out. Please let me know if I have missed any I am still learning about the OPENVPMS structure.

Action: Replace the old TillBalance and Bank Deposit Reports. with the new ones (Administration --> Templates)

Implementing the change does not allow Refunds via Direct Deposit to be recorded, nor does it allow for Supplier Payments to be recorded as Direct Deposits.

Notes

Finally the Tillbalance report had some wierd behaviours coded in it. In the Bank Deposit report the report essential seperates out payment types by assessing the shortname of the archetype associated with it. In the till balance report the archetype.DisplayName is used, I noticed that really the ShortName (eg EFT)  is used in the archetypes displayname ot the actual Long name(eg EFT Payment).  In my case I used 'Direct Depost' as the archetype Display Name.  This is different from other customerpayment archetypes.  This means that when writing the Booleans in Jasperreports to seperate payments I was unsure how the spaces would be parsed and I elected to drag the SHORTNAME variable across from the Bank Deposit report and use that method.

Side Note

When using iReport 4.5 (in compatability mode to jasperreport 3.7.4)I have noticed occassional it will revert every single field type to java.lang.String.  It does it on save meaning you wont notice it happens until OpenVpms spits the dummy on report preview, throwing 3 errors for every field that was reverted.  This is bloody annoying behaviour IMO.  Anyone else noticed this and know why it is happening to me.

 

Syndicate content