HEX
Server: Apache
System: Linux server1.royalgt4.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User: mostafedeg (1125)
PHP: 5.6.40
Disabled: mail,passthru,parse_ini_file,show_source,eval,assert,pcntl_exec,dl,putenv,proc_open,popen
Upload Files
File: /home/mostafedeg/public_html/erp/models/mysql/ext/MInsuranceMySqlExtDAO.class.php
<?php
/**
 * Class that operate on table 'm_insurance'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2014-09-28 10:14
 */
class MInsuranceMySqlExtDAO extends MInsuranceMySqlDAO{

	public function updateInsuranceGoEX($stageIdBefore,$currentStage,$shipNameGo,$shipCompanyGo,$shipPersonalGo,$shipCostGo,$insuranceDate,$ourSerial){
		$sql = 'UPDATE m_insurance SET  stageIdBefore = '.$stageIdBefore.',
		 currentStage = '.$currentStage.', shipNameGo = '.$shipNameGo.', shipCompanyGo = '.$shipCompanyGo.', 
		 shipPersonalGo = '.$shipPersonalGo.', shipCostGo = '.$shipCostGo.', insuranceDate = "'.$insuranceDate.'" 
		 WHERE ourSerial = "'.$ourSerial.'" and returned=0';
		$sqlQuery = new SqlQuery($sql);
	

	//print_r($sql);

		return $this->executeUpdate($sqlQuery);
	}
	
	public function updateInsuranceReturnEX($ourSerial,$stageIdBefore,$currentStage,$shipNameReturn,$shipCompanyReturn,$shipPersonalReturn,$shipCostReturn,$insuranceDate   ,$type,$oldSN,$newSN,$insuranceCost,$insuranceDiscount){
		$sql = 'UPDATE m_insurance SET  stageIdBefore = '.$stageIdBefore.',
		 currentStage = '.$currentStage.', shipNameReturned = '.$shipNameReturn.', shipCompanyReturned = '.$shipCompanyReturn.', 
		 shipPersonalReturned = '.$shipPersonalReturn.', shipCostReturned = '.$shipCostReturn.', insuranceDate = "'.$insuranceDate.'" 
		 , returned = 1 ,type = '.$type.',oldSN = "'.$oldSN.'",newSN = "'.$newSN.'",insuranceCost = '.$insuranceCost.',insuranceDiscount = '.$insuranceDiscount.'
		
		 WHERE ourSerial = "'.$ourSerial.'" and returned=0';
		$sqlQuery = new SqlQuery($sql);
	

	//print_r($sql);

		return $this->executeUpdate($sqlQuery);
	}
	
	public function updateInsuranceCurrentStage($stageIdBefore,$currentStage,$ourSerial){
		$sql = 'UPDATE m_insurance SET  stageIdBefore = '.$stageIdBefore.',currentStage = '.$currentStage.'
		 WHERE ourSerial = "'.$ourSerial.'" and returned=0';
		$sqlQuery = new SqlQuery($sql);
	
		return $this->executeUpdate($sqlQuery);
	}
	
	public function getinsuranceIdUsingourserial($ourSerial){
		$sql = 'SELECT insuranceId 
		FROM m_insurance 
		WHERE ourSerial = "'.$ourSerial.'"
		 and returned=0';
		$sqlQuery = new SqlQuery($sql);
		
		//print_r($sql);
		return $this->querySingleResult($sqlQuery);
	}

}
?>