function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo,
$date_, $reference, $Total, $discount=0, $Tax=0, $Freight=0, $FreightTax=0,
$sales_type=0, $order_no=0, $ship_via=0, $due_date="",
function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo,
$date_, $reference, $Total, $discount=0, $Tax=0, $Freight=0, $FreightTax=0,
$sales_type=0, $order_no=0, $ship_via=0, $due_date="",