+ $this->gl_items[$index]->person_id = $person_id;
+
+ $gl_type = is_subledger_account($code_id, $person_id);
+ if ($gl_type)
+ {
+ $this->gl_items[$index]->person_type_id = $gl_type > 0 ? PT_CUSTOMER : PT_SUPPLIER;
+ $this->gl_items[$index]->person_name = get_subaccount_name($code_id, $person_id);
+ } else
+ {
+ $this->gl_items[$index]->person_type_id = $this->gl_items[$index]->person_name = '';
+ }