public static function getTableInstance()
 {
     if (!self::$_table) {
         self::$_table = new Model_Table_FinancialDetails();
     }
     return self::$_table;
 }
Example #2
0
 public function getIecDetailsByIecId($iec_id)
 {
     $iec_info = Model_EntityIecinfo::getEntityInfobyId($iec_id)->toArray();
     $iec_info['state'] = Model_States::getById($iec_info['state'])->toArray()['name'];
     $iec_info['district'] = Model_States::getById($iec_info['district'])->toArray()['name'];
     $iec_info['city'] = Model_States::getById($iec_info['city'])->toArray()['name'];
     $category = Model_EntityCategories::getCategoryById($iec_info['category'])->toArray();
     $iec_info['category_name'] = $category['name'];
     $iec_info['bank_details'] = Model_EntityBankDetails::getBankDetailsByIecId($iec_id)->toArray();
     $iec_details = Model_EntityDetails::getIecDetailsByIecId($iec_id)->toArray();
     $iec_info['finance_details'] = Model_FinancialDetails::getFinancialDetailsByIecId($iec_id)->toArray();
     foreach ($iec_details as $detail) {
         $detail['state'] = Model_States::getById($detail['state'])->toArray()['name'];
         $detail['district'] = Model_Districts::getById($detail['district'])->toArray()['name'];
         $detail['city'] = Model_Cities::getById($detail['city'])->toArray()['name'];
         if ($detail['entity_category_id'] == 0) {
             $iec_info['branch_details'][] = $detail;
         } else {
             $iec_info['partner_details'][] = $detail;
         }
     }
     print_r($iec_info);
     return $iec_info;
 }