function get_max_id($tablename, $id){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query("select $id FROM $tablename ORDER BY $id DESC LIMIT 1"); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->$id+1; } } else { return 1; } } function pos_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="POS"'); return $query->result(); } function state_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="state"'); return $query->result(); } function source_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="Source"'); return $query->result(); } function ledger_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and (group_id>=29 or group_id=22 or group_id=25 or group_id=18) order by name'); return $query->result(); } function mode_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and (group_id=17 or group_id=18) order by name'); return $query->result(); } function sub_dealer_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and (group_id>=29 or group_id=30 or group_id=22) order by name'); return $query->result(); } function customes_list() { $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query("select * from m_custome where company_id=" . get_cookie("ae_company_id") ." "); return $query->result(); } function transporter_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and (group_id=31) order by name'); return $query->result(); } function destination_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="Destination" order by name'); return $query->result(); } function godown_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="Godown" order by name'); return $query->result(); } function item_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name,specification from m_item where company_id='.get_cookie('ae_company_id').' order by name'); return $query->result(); } function cash_in_hand_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and group_id=18'); return $query->result(); } function indirect_expenses_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and group_id=8'); return $query->result(); } function consignee_list(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id,name from m_ledger where company_id='.get_cookie('ae_company_id').' and group_id=32'); return $query->result(); } function getMaxPaymentFreight(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id from tbl_payment_freight where company_id='.get_cookie('ae_company_id').' order by id desc limit 0,1'); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->id; } } } function getDispatchId(){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select id from tbl_trans where company_id='.get_cookie('ae_company_id').' and vtype="DISPATCH" order by id desc limit 0,1'); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->id; } } } function category_list(){ $ci=& get_instance(); $ci->load->database(); $usertype=get_cookie('ae_usertype'); $srch = ""; if($usertype=="CEMENT") { $srch = " and name='CEMENT'"; } if($usertype=="FERTILIZERS") { $srch = " and name='FERTILIZERS'"; } $query=$ci->db->query('select id,name from m_master where company_id='.get_cookie('ae_company_id').' and type="Item Group"' . $srch . ''); return $query->result(); } function getLedgerNameById($lid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select name from m_ledger where company_id='.get_cookie('ae_company_id').' and id='.$lid); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->name; } } } function getDestinationNameById($did){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select name from m_master where company_id='.get_cookie('ae_company_id').' and type="Destination" and id='.$did); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->name; } } } function get_category_vat($cid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select vat from m_master where company_id='.get_cookie('ae_company_id').' and type="Item Group" and id='.$cid); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->vat; } } } function get_tol_rate_by_billno($bid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select sum(amt) tolamt from tbl_trans2 where company_id='.get_cookie('ae_company_id').' and billno='.$bid); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->tolamt; } } } function get_tol_freight_by_billno($bid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select tol_freight tolfreight from tbl_trans1 where company_id='.get_cookie('ae_company_id').' and id='.$bid); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->tolfreight; } } } function get_max_sno($cid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select max(serialno) maxsno from tbl_trans1 where company_id='.get_cookie('ae_company_id').' and cat_id='.$cid); if($query->num_rows()>0){ foreach($query->result() as $row){ return $row->maxsno+1; } }else{ return 1; } } ///////////////////SMS function sendsms($message,$mobileno) { $ci=& get_instance(); $ci->load->database(); $api=""; $query=$ci->db->query('select sms_value from m_sms'); if($query->num_rows()>0){ foreach($query->result() as $row){ $api= $row->sms_value; } } $msg=$message; $message=urlencode($message); $mobileno=urlencode($mobileno); $api=str_replace("(0)",$mobileno,$api); $api=str_replace("(1)",$message,$api); // $api_key="1868AoS2vvQSBjQ6581d997c"; // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options // curl_setopt($ch, CURLOPT_URL, "http://login.bulksms.bz/api/sendhttp.php?authkey=".$api_key."&mobiles=".$mobileno."&message=".$message."&sender=GDRWLA&route=4&country=0"); curl_setopt($ch, CURLOPT_URL, $api); // curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); } function get_prefix_by_category($cid){ $ci=& get_instance(); $ci->load->database(); $query=$ci->db->query('select prefix from m_master where company_id='.get_cookie('ae_company_id').' and type="Item Group" and id='.$cid); if($query->num_rows()()>0){ foreach($query->result() as $row){ return $row->prefix; } }else{ return ''; } } ///////////// function take_order_data($result,$type,$dtype="") { $return_string=""; if(count($result)>0) { if($dtype=="Adjustment") { $return_string=$return_string . '
'; } } return $return_string; } ///////////////
Rosa is a restaurant, bar and coffee roastery located on a busy corner site in Farringdon's Exmouth Market. With glazed frontage on two sides of the building, overlooking the market and a bustling London inteon.
Read more
Rosa is a restaurant, bar and coffee roastery located on a busy corner site in Farringdon's Exmouth Market. With glazed frontage on two sides of the building, overlooking the market and a bustling London inteon.
View Full MenuIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.