- $result = get_gl_trans($type, $trans_no);
-
- if ($result) {
- while ($row = db_fetch($result)) {
- if ($row['amount'] == 0) continue;
- if (is_bank_account($row['account'])) continue;
- $date = $row['tran_date'];
- $_SESSION['pay_items']->add_gl_item($row['account'], $row['dimension_id'],
- $row['dimension2_id'], $row['amount'], $row['memo_']);
- }
- }
- $_SESSION['pay_items']->memo_ = get_comments_string($type, $trans_no);
- $_SESSION['pay_items']->tran_date = sql2date($date);
- $_SESSION['pay_items']->reference = $Refs->get($type, $trans_no);
- ////////////////////////////////////////////
- // Check Ref Original ?????
- $_POST['ref_original'] = $_SESSION['pay_items']->reference; // Store for comparison when updating