public function checkTransLog($id)
 {
     if (!empty($id)) {
         $transaction = Transaction::find_by_main_id($id);
         print_r($transaction);
         if ($transaction) {
             //echo "<p><strong class='alert-box alert'>Record cannot be deleted! <br /> History already existing for this record</strong></p>";
             return 2;
         } else {
             $merole = Product::find_by_mainid(trim($id));
             print_r($merole);
             if ($merole->delete()) {
                 return 1;
             }
         }
     }
 }