Topic: connection within the fields

Under 0_debtor_trans, there are trans_no, debtor_no, type, order_

Type 10 = sales customer invoice (trans_no)
Type 12 = payment received for sales customer invoice (trans_no)
Type 13 - sales customer order (trans_no)

How does one know when by sql where type='13', the appropriate inv number can be obtained, to identify all related delivery order for that invoice? numerous delivery orders are Batch processed to generate an invoice.

Pls advise

Re: connection within the fields

Under 0_sales_orders, there are order_no, trans_type, debtor_no

Type 30 = sales?
How to identify all sales _orders that are being invoiced as one?

Re: connection within the fields

Take a backup of the db.
Make 2 sales orders
Batch them into one invoice
Take another backup of the db
Compare the two backups and see what records get inserted into which tables and what keys are involved and provide feedback here so that the ERD diagrams in the wiki can be enhanced.