0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
model
/
[
Home
]
File: financial_report_mdl.php
<?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; require_once "../model/defaultValues_mdl.php"; class Reports {//6 public function Ledger($groupname,$accountname,$date,$ledgertype,$typeid,$debit,$credit,$description) { //9 try{//10 $table_id=Common::getTableID("ledger","ledg_id"); $table_id=$table_id+1; $u_id=@$_SESSION['user_id']; $p_id=@$_SESSION['project_id']; $sql="INSERT INTO `ledger` ( `ledg_id` , `user_id` , `project_id` , `group_name`, `account_name` , `date`, `ledger_type` , `type_id` , `debit`, `credit`, `description` ) VALUES ( '$table_id','$u_id','$p_id','$groupname','$accountname','$date', '$ledgertype', '$typeid', '$debit','$credit','$description' ) "; mysql_query($sql); if (mysql_affected_rows()>0) { return "True"; } else { return "False"; } }//10 catch(Exception $ex) {//10 echo $ex-> getMessage(); return null; }//10 }//9 public function updateLedger($sql) {//76 try{ //78 mysql_query($sql); if(mysql_affected_rows()>0) { return "True"; } else { return "False"; } }//78 catch(Exception $ex) { //78 echo $ex-> getMessage(); return null; } //78 }//76 }//5 ?>