+ $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']);
+ $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
+ $rep->NewPage();
+
+ $result = get_sales_order_details($i, ST_SALESORDER);