51 $entity = static::getEntityTable();
55 if(is_numeric($number))
57 if($r = $entity::getById($number)->fetch())
60 if($r = $entity::getList(array(
61 'select' => array(
'ID'),
62 'filter' => array(
'ID_1C' => $number),
63 'order' => array(
'ID' =>
'DESC')))->fetch()
68 if($r = $entity::getList(array(
69 'select' => array(
'ID'),
70 'filter' => array(
'=ACCOUNT_NUMBER' => $number),
71 'order' => array(
'ID' =>
'DESC')))->fetch()
75 if ($accountNumberPrefix !==
"")
77 if(mb_strpos($number, $accountNumberPrefix) === 0)
79 $number = mb_substr($number, mb_strlen($accountNumberPrefix));
80 if ($r = $entity::getById($number)->fetch())
87 if ($r = $entity::getList(array(
88 'select' => array(
'ID'),
89 'filter' => array(
'ID_1C' => $number),
90 'order' => array(
'ID' =>
'DESC')))->fetch()
94 if ($r = $entity::getList(array(
95 'select' => array(
'ID'),
96 'filter' => array(
'=ACCOUNT_NUMBER' => $number),
97 'order' => array(
'ID' =>
'DESC')))->fetch()
101 if($accountNumberPrefix !=
"")
103 if(mb_strpos($number, $accountNumberPrefix) === 0)
105 $number = mb_substr($number, mb_strlen($accountNumberPrefix));
106 if($r = $entity::getById($number)->fetch())
109 if($r = $entity::getList(array(
110 'select' => array(
'ID'),
111 'filter' => array(
'=ACCOUNT_NUMBER' => $number),
112 'order' => array(
'ID' =>
'DESC')))->fetch()