예제 #1
0
파일: Product.php 프로젝트: aloewens/vacan
 function Process_Sale($post_array)
 {
     require_once APPPATH . 'models/Sales_Model.php';
     $sales = new Sales_Model();
     $prodID = $this->db->insert_id();
     $ref = "Cargo Venta";
     $type = "Debito";
     // Consulta Valor Tipo Producto
     $this->db->select('Price');
     $this->db->from('productcatalog');
     $this->db->where('ProductCatalogID', $this->input->post('PrProductCatalogID'));
     $ret = $this->db->get()->result();
     $value = $ret[0]->Price;
     //log_message('error', 'Value = ' . $value);
     // Registro Cargo Venta
     $method = 1;
     $entity = "OpenLife";
     $comment = "Cargo Venta";
     $user = $this->session->userdata('user_id');
     $sales->RegisterCharge($prodID, $ref, $type, $value, $method, $entity, $comment, $user);
     return true;
 }