id = $context['id']; $this->status_table = $context['status_table']; $this->status_id = $context['status']; $this->department_id = $context['dept_id']; $this->sign_counter = 0; } public function set() { global $database; $id = $this->id; $status_id = $this->status_id; //$database->debug = true; $this->client_type = 1; if(!empty($id)) { $result = common_quotes::get_details($id); // bug::bug_array('',$result); $this->company_id = $result['client_id']; $this->client_id = $result['client_id']; $this->qid = $result['id']; $this->description = $result['description']; $this->complete_address = $result['address']; $this->suburb= $result['suburb']; $this->state = $result['state']; $this->postcode = $result['post_code']; $this->address_nice = $result['address_nice']; $this->company_name = common_clients::get_client_name($result['client_id']); $this->contacts_first_name = $result['contacts'][0]['first_name']; $this->contacts_last_name = $result['contacts'][0]['last_name']; $this->primary_location_id = $result['primary_location_id']; $this->location_id = $result['primary_location_id']; $location_details = common_ref_client::get_client_location($this->primary_location_id); $this->address = $location_details['address']; $this->suburb = $location_details['suburb']; $this->state = $location_details['state']; $this->post_code = $location_details['post_code']; $this->first_name = $result['first_name']; $this->last_name = $result['last_name']; $this->phone = $result['phone']; $this->email = $result['email']; $this->job_tag = $result['job_tag']; $this->job_number = $result['job_number']; $this->job_name = $result['job_name']; $this->description = $result['description']; $this->phone = $result['phone']; $this->flag = $result['flag']; $this->status = $result['dqstatus']; /* $this->jobtypes= unserialize($result['jobtype']); if(is_array($job_types)) { foreach($this->jobtypes as $k ) { $newk = explode('=>',$k); $this->$newk[0] = $newk[1]; $this->config{$newk[0]} = array("id"=> $id,"value"=> $newk[1], "input_name" => $newk[0], "name" => $newk[0],"rule" => ""); } }*/ } if($_POST['Submit'] == "Save") { /*$this->address = $this->address; $this->post_code = $this->post_code; $this->state = $this->state; $this->suburb = $this->suburb; $this->country = $this->country; $this->phone = $this->phone; $this->first_name = $_POST['first_name']; $this->last_name = $_POST['last_name']; $this->email = $_POST['email']; $this->client_id = $_POST['client_id']; $this->location_id = $_POST['location_id']; $this->primary_location_id = $this->primary_location_id; $this->job_number = $this->job_number; $this->job_tag = $this->job_tag; $this->description = $this->description; $this->job_type = $_POST['jobtype']; $this->company = $this->company; $this->flag =$this->flag; $this->status = $request['status']; foreach($_POST as $post => $pp){ if (preg_match("/jobtype/i", $post)) { //echo $post; $this->$post = $pp; } } foreach($_POST as $sign => $ss){ if (preg_match("/signtype/i", $sign)) { //echo $post; $this->$sign = $ss; } } if($this->sign_counter > 0){ $this->reasons .= "Required at least one"; } */ } $this->config['client_id'] = array("id"=> $id,"value"=> $this->client_id, "input_name" => "client_id", "name" => "Client","rule" => "required"); $this->config['status'] = array("id"=> $id,"value"=> $this->status, "input_name" => "status", "name" => "Status","rule" => ""); foreach($_POST as $post => $pp){ if (preg_match("/jobtype/i", $post)) { //echo $post; $this->config{$post} = array("id"=> $id,"value"=> $pp, "input_name" => $post, "name" => $post,"rule" => ""); } } foreach($_POST as $sign => $ss){ if (preg_match("/signtype/i", $sign)) { //echo $post; $this->config{$sign} = array("id"=> $id,"value"=> $ss, "input_name" => $sign, "name" => $sign,"rule" => "required"); } } self::run_validation(); } public function run_validation() { $static_function = (($_POST['Submit'] == "")) ? "initial" : "validate"; /*$this->validation['job_number'] = validation::$static_function($this->config['job_number']); $this->validation['description'] = validation::$static_function($this->config['description']); $this->validation['client_id'] = validation::initial($this->config['client_id']); foreach($_POST as $post => $pp){ if (preg_match("/jobtype/i", $post)) { //echo $post; $this->validation{$post} = validation::$static_function($this->config{$post}); } } foreach($_POST as $sign => $ss){ if (preg_match("/signtype/i", $sign)) { //echo $post; $this->sign_counter++; $this->validation{$sign} = validation::$static_function($this->config{$sign}); } } $this->validation['jobtype_id'] = validation::$static_function($this->config['jobtype_id']); $this->validation['status'] = validation::$static_function($this->config['status']); */ $this->reasons = validation::formalise($this->validation); } public function quote_template() { $id= $this->id; $job_name = $this->job_name; $client_id = $this->client_id; $description = $this->description; $client_name = common_clients::get_client_name($client_id); $sheets = common_quotesheets::get_total_sales($id); $address= explode(',',$this->complete_address); $address1 = $address[0]; $address2 = $address[1].','.$address[2].','.$address[3]; $add = explode(',' , $this->address_nice); $address2 = $add[1].', '.$add[2].', '.$add[3]; $postcode = $this->postcode; //$address2 = $suburb.', '.$state.', '.$postcode; $first_name = $this->contacts_first_name; $last_name = $this->contacts_last_name; ?>
test
Include :
Terms & Conditions
Edit Terms and Condition
<? //check if file has been generated already $flag=0; if(file_exists('quotes/quote_'.$id.'.html')) { $file = file_get_contents('quotes/quote_'.$id.'.html'); // $clean =str_replace('<img data-mce-src="http://ihub.huxxer.com/images/quote_header.png" alt="" src="http://ihub.huxxer.com/images/quote_header.png"><br />','',$file); $clean =str_replace('<img src="http://ihub.metrosigns.com.au/images/quote_header.png"/><br />','',$file); // include('quotes/quote_'.$id.'.html'); echo $clean; $flag=1; }else{ ?> <p>16th March 2025</p> <br /> <br /> <br /> <br /> Dear , <br /><p> Re: Quotation for </p> <br /> Further to your recent request, we have much pleasure in submitting our quotation for the <span style="background-color: #ffff00;"></span> <span style="background-color: #ff9900;">REPLACE THIS </span>, located at the above address, as shown on the attached artwork and detailed herein. <br /> <br /> <b>Price to Supply & Install: $0.00 </b>(plus GST)<br /> Please note: Prices subject to the attached conditions of purchase. <br /> , thank you for the opportunity to submit this quotation and we look forward to your further instructions. <br /> Yours faithfully,<br /> Peter Rose <br /> General Manager <br /> <span style="font-size: medium;"> <font color="#0000ff">Metro</font><font color="#ff6600">Signs</font></span> </span> <br /> <p> 7 Wurundjeri Drive<br /> Epping Vic 3076<br /><br /> p 03 9422 1200<br /> f 03 9422 1209<br /> m 0432 103 277<br /><br /> <font size=1px> <h6>www.metrosigns.com.au</h6></font> <? }?>
Please enable JavaScript to use file uploader.
Download file
(Right-click, then Save-As, then Open file using MS Word then Save-As PDF)