function addTodayService($datafields)
 {
     $dbmain = new DBmain();
     $arrfields = array("date", "sup_code", "loan_code", "unit_price", "units", "total_amount", "no_of_installment", "amount_of_installment", "description", "editor");
     $boolres = $dbmain->insert("today_service", $datafields, $arrfields);
     if ($boolres == true) {
         return true;
     } else {
         return false;
     }
 }
 function addToDailySupply($datafields)
 {
     $dbmain = new DBmain();
     $arrfields = array("date", "supplier_code", "approved_kgs", "supplied_kgs", "units", "editor", "approved_by", "last_editor", "last_edit_date");
     $boolres = $dbmain->insert("daily_supply", $datafields, $arrfields);
     if ($boolres == true) {
         return true;
     } else {
         return false;
     }
 }
 function addSupplier($datafields)
 {
     $dbmain = new DBmain();
     $arrfields = array('supplier_code', 'f_name', 'l_name', 'address_1', 'address_2', 'address_3', 'nic_no', 'mobile_no', 'phone_no', 'e_mail', 'birth_day', 'estate_name', 'reg_no', 'size_of_estate', 'address_of_estate', 'account_name', 'account_no', 'bank', 'branch', 'e_mail_send', 'sms_send', 'last_edit_date', 'editor');
     $boolres = $dbmain->insert("suppliers", $datafields, $arrfields);
     if ($boolres == true) {
         return true;
     } else {
         return false;
     }
 }