Пример #1
0
	function index()
	{
			$data['customer'] = $this->customer_model->user_data( userdata_customer('email'));
			
			$company_id = $data['customer']->company;
			 	
			$data['total_sales'] = $this->dashboard_model->total_sales_collection($company_id);
			
			$data['open_invoices'] = $this->dashboard_model->open_invoices_total_collection($company_id);
			
			$data['overdue_invoices'] = $this->dashboard_model->overdue_invoices_total_collection($company_id);
			
			$data['paid_invoices'] = $this->dashboard_model->paid_invoices_total_collection($company_id);
			
			$data['quotations_total'] = $this->dashboard_model->quotations_total_collection($company_id);
			
			$data['salesorder'] = $this->dashboard_model->total_salesorders($company_id);
			
			$data['quotations'] = $this->dashboard_model->total_quotations($company_id);
			
			$data['invoices'] = $this->dashboard_model->total_invoices($company_id);
			
			$data['calls'] = $this->dashboard_model->total_calls($company_id);
		
		    $data['meetings'] = $this->dashboard_model->total_meetings($company_id);	 
		    $data['contracts'] = $this->dashboard_model->total_contracts($company_id);	 
		    	  
			$data['customer'] = $this->dashboard_model->get_company( $company_id );
			 	
		  	    $this->load->view('header');			 
				$this->load->view('dashboard/index',$data);
				$this->load->view('footer');	
		
	}
Пример #2
0
	function index()
	{
		 
			 	$data['customer'] = $this->customer_model->user_data( userdata_customer('email') );	
			 	 
			 	
		    	$data['contracts'] = $this->contracts_model->contracts_list($data['customer']->company);
		    			    	 
				$this->load->view('header');
				$this->load->view('contracts/index',$data);
				$this->load->view('footer');
			 
	}
Пример #3
0
	function view($invoice_id)
	{
				$data['customer'] = $this->customer_model->user_data( userdata_customer('email') );
					
		    	$data['invoice'] = $this->invoices_model->get_invoice($invoice_id,$data['customer']->company);
				 
		    	$data['salesorder'] = $this->invoices_model->get_quotation($data['invoice']->order_id);
		    	
		    	 
				$data['companies'] = $this->customers_model->company_list();		    	   
		    	$data['products'] = $this->products_model->products_list();
		    	$data['qo_products'] = $this->invoices_model->invoice_products($invoice_id);    
	 
				$this->load->view('header');
				$this->load->view('invoices/view',$data);
				$this->load->view('footer');
			 
	}
Пример #4
0
   	function print_quot($quotation_id)
	{ 
		$data['customer'] = $this->customer_model->user_data( userdata_customer('email') );
		
        $data['quotation'] = $this->salesorder_model->get_salesorder($quotation_id,$data['customer']->company);
    	
    	$data['qtemplates'] = $this->qtemplates_model->qtemplate_list();
		
		$data['companies'] = $this->customers_model->company_list();
    	
    	$data['staffs'] = $this->staff_model->staff_list(); 
    	
    	$data['pricelists'] = $this->pricelists_model->pricelists_list(); 
    	
    	$data['qo_products'] = $this->salesorder_model->quot_order_products($quotation_id);   		
				
		
		$this->load->view('salesorder/salesorder_print',$data);
				
	}
Пример #5
0
 <div class="header-right">
   <ul class="header-menu nav navbar-nav">
     
     <!-- BEGIN USER DROPDOWN -->
     <li class="dropdown" id="user-header">
       <a href="#" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
       <?php if(userdata_customer('customer_avatar')){?>
        <img src="<?php echo base_url(); ?>uploads/customer/<?php echo userdata_customer('customer_avatar');?>" alt="user image" style="height: 36px;width: 36px;">
       <?php }else{?>
       
       <img src="<?php echo base_url(); ?>public/assets/global/images/avatars/user1.png" alt="user image" style="height: 36px;width: 36px;">                
       <?php }?>	
       
         
       
       <span class="username">Hi, <?php echo userdata_customer('first_name');?></span>
       </a>
       <ul class="dropdown-menu">                   
           
         <li>
           <a href="<?php echo base_url('customer/settings'); ?>"><i class="icon-settings"></i><span>Account Settings</span></a>
         </li>
         <li>
           <a href="<?php echo base_url('customer/logout'); ?>"><i class="icon-logout"></i><span><?php echo $this->lang->line('logout'); ?></span></a>
         </li>
       </ul>
     </li>
     <!-- END USER DROPDOWN -->
     <!-- CHAT BAR ICON -->
     <!--<li id="quickview-toggle"><a href="#"><i class="icon-bubbles"></i></a></li>-->
   </ul>
Пример #6
0
	function password_update()
	{
		return $this->db->update('customer', array('password' => md5($this->input->post('pass1'))), array('email' => userdata_customer('email')));
	}
Пример #7
0
	function change_password()
	{
		check_login_customer();
		
		if( $this->form_validation->run('customer_change_password') == FALSE )
		{
			echo '<div class="alert error"><ul>'.validation_errors('<li>','</li>').'</ul></div>';
		}
		elseif( $this->customer_model->check_password() == 0 )
		{
			echo '<div class="alert error">'.$this->lang->line('invalid_pass').'</div>';
		}
		else
		{
			if( $this->customer_model->password_update() )
			{
				
					$session_data = array(
										  "customername"   => userdata_customer('email'),
										  "customerhash"   => md5( userdata_customer('password').$this->config->item('password_hash')  ) 
										  );
										  
					$this->session->set_userdata($session_data);
					echo '<div class="alert ok">'.$this->lang->line('update_succesful').'</div>';
			}
			else
			{
					echo '<div class="alert error">'.$this->lang->line('technical_problem').'</div>';
			}
		}
		
		
	}