Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static public function MdlIngresarVentas($tabla, $datos){
- $sql = 'call Sales_Actualizar(:nroRegistro, :registrosTotales, :cantidad, :precioVenta,
- :totalVenta, :fechaVenta, :tipoVenta, :usuario,
- :idMedicamento, :codigoBarra, @sFinal, @sErrorFinal)';
- $stmt = Conexion::conectar()->prepare($sql);
- $stmt->bindParam(":nroRegistro", $datos["consecutivo"], PDO::PARAM_STR);
- $stmt->bindParam(":registrosTotales", $datos["registrosTotal"], PDO::PARAM_STR);
- $stmt->bindParam(":cantidad", $datos["cantidad"], PDO::PARAM_STR);
- $stmt->bindParam(":precioVenta", $datos["prventa"], PDO::PARAM_STR);
- $stmt->bindParam(":totalVenta", $datos["total"], PDO::PARAM_STR);
- $stmt->bindParam(":fechaVenta", $datos["fechaVenta"], PDO::PARAM_STR);
- $stmt->bindParam(":tipoVenta", $datos["tipo"], PDO::PARAM_STR);
- $stmt->bindParam(":usuario", $datos["usuario"], PDO::PARAM_STR);
- $stmt->bindParam(":idMedicamento", $datos["idMedicamento"], PDO::PARAM_STR);
- $stmt->bindParam(":codigoBarra", $datos["codigo"], PDO::PARAM_STR);
- if($stmt->execute()){
- return "ok";
- }else{
- return "error";
- }
- $stmt->close();
- $stmt = null;
- }
Add Comment
Please, Sign In to add comment