Topic: Transaction References

I am using FA 2.4.2 Build 30.07.2017 and am stuck at Transaction Reference section.

I want to use the following format:

For Journal Entries: JV-1710-1 , where JV is the prefix for Journal Voucher, 1710 denotes the year 2017 and 10 denotes the month (October) and actual number of the voucher is 1 which should be increased everytime a new JV is processed.

But FA actually increases 1710 and makes the next number as JV-1711-1. How can I stop the middle number from increasing and start the last number after hyphen to increase by 1.

/TOR

Re: Transaction References

Hi, just tried this,... {MM}{YYYY}/{001} Which gives 102017/001, next invoice  updates to 002, So for your case JV-{YY}{MM}-{001} will work.

Placeholders can only be {UU},{P},{MM},{YYYY} & {YY}


Not sure what the {UU}&{P} are for; they give 01 & 1 respectively.

Last edited by poncho1234 (10/12/2017 01:07:02 pm)

Re: Transaction References

Thank you for your reply poncho1234.

It is not happening at my end. I tried to copy the same syntax as you ie., 102017/001. The new JV (Journal Entry) becomes 102018/001 instead of 102017/002.

This numbering problem becomes even more troublesome when dealing with multiple Bank Payment Transaction Types.

/TOR

Re: Transaction References

Just so we're on the same page.. FA 2.42 go to setup - Transaction References - edit a reference copy an paste the following:- {YY}{MM}-{001} exactly as it is written with curly brackets and YY & MM. This works for me. My pasted example gives 1710-001, my next entry was 1710-002, etc....

Last edited by poncho1234 (10/12/2017 02:13:31 pm)

Re: Transaction References

The lines 55-67 of includes/references.inc

$refline_placeholders = array(
    'MM' => 'date',
    'YY' => 'date',
    'YYYY' => 'date',
    'UU' => 'user',
     'P' => 'pos',
//     FIXME:  for placeholders below all the code should work, but as the ref length is variable,
//       length specification in placeholder format should be implemented.
//    'C' => 'customer',
//    'B' => 'branch',
//    'S' => 'supplier',
//    'L' => 'location'
);

Hence {UU} is the logged in user.

The method function _parse_next() gets the next formatted reference.

Re: Transaction References

Thank you poncho smile Viola!! It worked fine for Bank Payments. But it doesn't seem to work for the Journal Entry somehow.

Thank you apmuthu for the placeholder info. Thats pretty useful.

You guys are just great! Thanks. But let me tell you my problems aren't over yet smile smile

/TOR

Re: Transaction References

Hi poncho,

Its started working for the Journal Entry too! Thank you so much!

/TOR