- $total_gl += add_gl_trans($this->trans_type, $this->order_id, $this->tran_date, $gl->code_id, $gl->dimension_id, $gl->dimension2_id,
- $gl->reference, $gl->amount, $this->currency, $gl->person_type_id, $gl->person_id, "", $this->rate);
+ if (!isset($gl->date))
+ $gl->date = $this->tran_date;
+
+ $total_gl += add_gl_trans($this->trans_type, $this->order_id, $gl->date, $gl->code_id, $gl->dimension_id, $gl->dimension2_id,
+ $gl->reference, $gl->amount, $this->currency, $gl->person_type_id, $gl->person_id, $this->rate);