Importing sales orders via XML for child accounts is not updating the parent debtor record

Problem

Importing XML sales orders for child accounts is not updated into the parent account when the sales order is processed.  This applies to version 7.00.175 and earlier.

Solution

SQL skills are required

Basic SQL skills are required to complete this task.

This script updates the records in the DB_Trans table linking the child / branch transactions to the parent / office account

 
UPDATE DB_Trans SET DebtorID = (SELECT ParentDebtorID FROM DB_Main WHERE DB_Main.DebtorID = DB_Trans.DebtorID)