diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 9b038ba79..7c4bae4d3 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5993,7 +5993,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("Documentacion", Vta.Cliente.Documentacion)) params.Add(New ReportParameter("Medico", Vta.Medico)) params.Add(New ReportParameter("Procedimiento", Vta.Procedimiento)) - params.Add(New ReportParameter("FechaCirugia", Vta.Alfa1.ToDateTime.ToString("dd/MM/yyyy hh:mm"))) + params.Add(New ReportParameter("FechaCirugia", Vta.FechaEjecucion.ToString("dd/MM/yyyy hh:mm"))) End If RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index 70b743efd..d840f90b0 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -2145,6 +2145,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal If dColumn.ColumnName = "SinSubProyecto" Then TxtSub = "Sin SubProyecto" + Continue For End If @@ -2190,6 +2191,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = IndexData + 1 If dColumn.ColumnName = "SinSubProyecto" Then + 'Continue For Exit For End If Next diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index cf474873f..f93d73c20 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1291,7 +1291,7 @@ Utilizado - + diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index f9da6c937..07c8b886f 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3013,16 +3013,21 @@ Partial Class OS_OrdenesServicios For Each GvRow As GridViewRow In GvMU.Rows Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal + If CantidadDev > 0 Then AplicaDevolucion = True - If ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then - GenrarRemisionMovimientos = True - Else + If Not ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then ProcesoOK = False GenrarRemisionMovimientos = False + AplicaDevolucion = False Exit For End If End If + + If GvRow.FCTextBox("TxtUtilizado").Text.ToDecimal > 0 Then + GenrarRemisionMovimientos = True + End If + Next If AplicaDevolucion Then If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then @@ -3152,7 +3157,7 @@ Partial Class OS_OrdenesServicios ObjV.Commit() If GenrarRemisionMovimientos = False Then - Alert("El material sera recivido en almacén.") + Alert("El material sera recibido en almacén.") Else Alert("El material utilizado se guardó correctamente") End If diff --git a/Ventas/CatMedicos.aspx b/Ventas/CatMedicos.aspx index fcb3e9ace..7d6d9c0c2 100644 --- a/Ventas/CatMedicos.aspx +++ b/Ventas/CatMedicos.aspx @@ -225,7 +225,7 @@
@@ -278,13 +278,13 @@ - + - + @@ -548,6 +548,22 @@
+
+
+
+ + +
+
+
+
+ + +
+
+
+ + diff --git a/Ventas/CatMedicos.aspx.vb b/Ventas/CatMedicos.aspx.vb index d1e1ac343..3615ef3c0 100644 --- a/Ventas/CatMedicos.aspx.vb +++ b/Ventas/CatMedicos.aspx.vb @@ -161,6 +161,10 @@ Partial Class Ventas_CatMedicos DdlEspecialidad.SelectedValueExist(-1) DdlSubEspecialidad.SelectedValueExist(-1) TxtTorre.Text = "" + DVUsuarioFechaIng.Visible = False + TxtFechaIng.Text = "" + TxtUsuario.Text = "" + DVEstatus.Visible = False ChkEstatus.Checked = True @@ -196,6 +200,10 @@ Partial Class Ventas_CatMedicos DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero) TxtTorre.Text = GvRow.DataKey("Torre") + DVUsuarioFechaIng.Visible = True + TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt") + TxtUsuario.Text = GvRow.DataKey("Usuario") + DVEstatus.Visible = True LbAgregar.Text = "Actualizar" LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}" diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index dc0a3826e..256ff61ab 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1976,7 +1976,10 @@ - +
+ +
+ diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a92e64d81..9c1935440 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -3418,6 +3418,10 @@ Partial Class Ventas RegistraScript("$('#TxtCantidad').focus();", "A1") End If + If EsVentaMedica Then + TxtPrecio.Enabled = False + End If + End If End Sub @@ -5317,7 +5321,13 @@ Partial Class Ventas End If - TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy") + If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso DbRowVenta("CveProcedimiento").ToString.ToEntero > 0 Then + TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy hh:mm") + DVMEEFechaEje.Visible = False + Else + TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy") + End If + 'DdlSucursalEjecucion.SelectedValueExist(DbRowVenta("CveSucursalEjecucion").ToString()) 'DdlSucursalCobranza.SelectedValueExist(DbRowVenta("CveSucursalCobranza").ToString()) DdlSucursalCliente.SelectedValueExist(DbRowVenta("CveClienteSucursal").ToString()) @@ -8189,6 +8199,10 @@ Partial Class Ventas GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False End If + If EsVentaMedica Then + GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = False + End If + If CveCicloComercial > 0 Then For Each gvr As GridViewRow In GvContratoDetalles.Rows If gvr.RowType = DataControlRowType.DataRow Then @@ -13519,7 +13533,7 @@ Partial Class Ventas If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then - GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList) + GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio) If ErrorList.Count = 0 Then If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then @@ -16793,16 +16807,22 @@ Partial Class Ventas DdlUnidadMedida.DataBind() DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString()) - If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio - If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera - TxtPrecio.Enabled = True - Else - 'TxtPrecio.Enabled = False - End If + If EsVentaMedica Then + TxtPrecio.Enabled = False Else - TxtPrecio.Enabled = True + If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio + If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera + TxtPrecio.Enabled = True + Else + 'TxtPrecio.Enabled = False + End If + Else + TxtPrecio.Enabled = True + End If End If + + Dim PSCodigoSAT As String = drPS("SATClavePS").ToString If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False @@ -21711,7 +21731,14 @@ Partial Class Ventas TxtObsPS.Enabled = True DdlProyecto.Enabled = True DdlSubProyecto.Enabled = True - TxtPrecio.Enabled = True + + If EsVentaMedica Then + TxtPrecio.Enabled = False + Else + TxtPrecio.Enabled = True + End If + + LbAgregar.Enabled = True ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';") LblSubTotal1.Text = TxtSubTotal.Text @@ -36328,7 +36355,7 @@ Partial Class Ventas End Sub - Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean + Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String), CveVentaOS As Integer, SerieFolioOS As String) As Boolean Dim Errores As Boolean = False @@ -36364,18 +36391,22 @@ Partial Class Ventas Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="") If CveOsDetalle > 0 Then - 'MENSAJE PRINCIPAL - 'Dim MensajeAlertOS As New StringBuilder MensajeAlert.AppendFormat(String.Format("
La Orden de Servicio: {0} se generó correctamente.
", ObjOrdenServicio.Folio)) MensajeAlert.AppendFormat("
", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS))) - 'Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";" - 'Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga) Else errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.") Errores = True End If + End If + If Not Errores Then + Dim ObjEventos As New ClsOIEventos(TransacSQL) + Dim LigaVenta As String = String.Format("Pedido en Folio: {1}", CveVentaOS, SerieFolioOS) + If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOSVentaMedica) Then + errorList.Add("Se presento un error al guardar la bitacora de la orden de servicio.") + Errores = True + End If End If Return If(Errores, False, True)