$this->gl_items[$index]->code_id = $code_id;
$this->gl_items[$index]->person_id = $person_id;
- $gl_type = is_subledger_account($code_id, $person_id);
- if ($gl_type)
+ $gl_type = is_subledger_account($code_id);
+ if ($person_id != null && $gl_type)
{
$this->gl_items[$index]->person_type_id = $gl_type > 0 ? PT_CUSTOMER : PT_SUPPLIER;
$data = get_subaccount_data($code_id, $person_id);
foreach($this->gl_items as $gl)
{
- if ($person_type = is_subledger_account($gl->code_id, $gl->person_id))
+ if ($person_type = is_subledger_account($gl->code_id))
{
$tax_info['person_type'] = $person_type < 0 ? PT_SUPPLIER : PT_CUSTOMER;
$tax_info['person_id'] = $gl->person_id;
$this->code_id = $code_id;
$this->person_id = $person_id;
- $gl_type = is_subledger_account($code_id, $person_id);
- if ($gl_type)
+ $gl_type = is_subledger_account($code_id);
+ if ($person_id != null && $gl_type)
{
$this->person_type_id = $gl_type > 0 ? PT_CUSTOMER : PT_SUPPLIER;
$data = get_subaccount_data($code_id, $person_id);