Topic: trans_no in 0_debtor_trans table

can someone explain to me what it is the trans_nr in the 0_debtor_trans , and where it comes from

Re: trans_no in 0_debtor_trans table

This is an internal number created when the records are done. Normally you would use the reference number when sending the invoices out.

Joe

Re: trans_no in 0_debtor_trans table

Thanks Joe

I see this happen, the trans_nr is now known to me

SELECT max(last_no) last_no FROM (
SELECT MAX(`trans_no`) as last_no FROM 0_debtor_trans WHERE `type`='13'
UNION SELECT MAX(`id`) as last_no FROM 0_voided WHERE `type`='13') a

But what is the purpose of the voided table?

Re: trans_no in 0_debtor_trans table

To make sure that the new trans_nr is 1 more than the maximum of any previously allocated trans_nr which may or may not have been voided.

Re: trans_no in 0_debtor_trans table

Thanks apmuthu

I understand now