diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 23f442f65..f9a9423f3 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -717,6 +717,34 @@ Public Class ClsVentas Return Retorno End Function + Public Function UpdateDatosMedicosVenta(CveVenta As Integer, CveEmpresa As Integer, + CveMedico As Integer, + CveProcedimiento As Integer, + Paciente As String, + Optional Episodio As String = "-1", + Optional FolioAdicional As String = "-1", + Optional FechaParaSurtir As DateTime = MinFecha) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasDatosMedicosUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveMedico", SqlDbType.Int).Value = CveMedico + .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir + .Add("@Paciente", SqlDbType.VarChar).Value = Paciente + .Add("@Episodio", SqlDbType.VarChar).Value = Episodio + .Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar los datos médicos de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateVentaTC(CveVenta As Integer, CveEmpresa As Integer, TipoCambio As Decimal) As Boolean Dim Retorno As Boolean = False