if ($order_line->discount_percent != 0) {
$total += add_gl_trans_customer(ST_CUSTCREDIT, $credit_no, $date_, $branch_data["sales_discount_account"],
$dim, $dim2, -($line_taxfree_price * $order_line->qty_dispatched * $order_line->discount_percent),
if ($order_line->discount_percent != 0) {
$total += add_gl_trans_customer(ST_CUSTCREDIT, $credit_no, $date_, $branch_data["sales_discount_account"],
$dim, $dim2, -($line_taxfree_price * $order_line->qty_dispatched * $order_line->discount_percent),