diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 2feb5e7e7..df92c7193 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1449,8 +1449,10 @@ Namespace Modelos End Function Public Function AgregarPS(CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Obs As String, - Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "", Optional CveSubProyecto As Integer = -1, - Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional CuentaPredial As String = "") As Boolean + Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "", + Optional CveSubProyecto As Integer = -1, + Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, + Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1) As Boolean If Not CvePS > 0 Then Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError) @@ -1626,7 +1628,7 @@ Namespace Modelos Row("EntregaDirecta") = 0 'Contratos Row("CveContratoDetalle") = -1 - Row("CveVentaDetalle") = -1 + Row("CveVentaDetalle") = CveVentaDetallePadre Row("CveMovimientoDetallePedido") = -1 Row("CveOrdenCompraDetalle") = -1 Row("CveVentaDetalleRemision") = -1 @@ -2154,7 +2156,7 @@ Namespace Modelos CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal, CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta, - CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta) Then + CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") diff --git a/Content/AjaxControlToolkit/Styles/Tabs.css b/Content/AjaxControlToolkit/Styles/Tabs.css index 5908a0886..628e0cd98 100644 --- a/Content/AjaxControlToolkit/Styles/Tabs.css +++ b/Content/AjaxControlToolkit/Styles/Tabs.css @@ -86,7 +86,6 @@ border: 1px solid #999999; border-top: 0; font-family: verdana,tahoma,helvetica; - font-size: 12px; padding: 8px; } diff --git a/Inventarios/RepNotasSinAlmacen.aspx b/Inventarios/RepNotasSinAlmacen.aspx index eeb3a3dbc..5fc8a751c 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx +++ b/Inventarios/RepNotasSinAlmacen.aspx @@ -165,14 +165,16 @@ - + - - - + + + - + + + diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index fb5cdbac1..b267fc391 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -74,7 +74,16 @@ Partial Class RepNotasSinAlmacen Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) GvVentas.Columns(5).Visible = TienePermisoImportes GvCompras.Columns(4).Visible = TienePermisoImportes - GvCompras.Columns(5).Visible = TienePermisoDesmarcar + GvCompras.Columns(5).Visible = TienePermisoDesmarcar + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria + GvVentas.Columns(3).HeaderText = "Hospital" + GvVentas.Columns(6).Visible = True + GvVentas.Columns(7).Visible = True + CType(GvVentas.Columns(2), BoundField).DataFormatString = "{0:dd/MM/yyyy HH:mm}" + CType(GvVentas.Columns(2), BoundField).ItemStyle.Width = Unit.Pixel(120) + End If + End Sub Private Sub CargaCombos() TxtFechaF.Text = NowADS().ToShortDateString @@ -88,18 +97,10 @@ Partial Class RepNotasSinAlmacen DdlProveedor.setEsWebService(True) DdlProveedor.Attributes.Add("data-metodo", "getproveedores") DdlProveedor.SelectedText = "Todos" - DdlProveedor.SelectedValue = "-1" - - 'DdlSucursal.DataSource = GlobalDTSucursales(UsuarioActual.CveEmpresa) - 'DdlSucursal.DataBind() - - CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) - 'DdlSubProyecto.Items.Clear() - 'DdlSubProyecto.SelectedValue = Nothing - 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1) - 'DdlSubProyecto.DataBind() - - 'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1")) + DdlProveedor.SelectedValue = "-1" + + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + End Sub Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click @@ -131,13 +132,8 @@ Partial Class RepNotasSinAlmacen GvVentas.DataSource = Nothing End If - GvVentas.DataBind() - - 'If (GvVentas.Rows.Count > 0) Then - ' GvVentas.UseAccessibleHeader = True - ' GvVentas.HeaderRow.TableSection = TableRowSection.TableHeader - ' RegistraScript("OrdenarGvVentas();") - 'End If + GvVentas.DataBind() + Else 'Compras If Not DdlProveedor.SelectedValue.ToEntero > 0 Then diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 198e128c5..d23b2813d 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -374,8 +374,7 @@ Partial Class OS_OrdenesServicios 'CargaEstatusOS() CargaDatos() 'PermisosSegunEstatus() - CargaDetalles() - CargaMateriales() + DivSeFactura.Visible = True BtnGuardar.Text = "Guardar Cambios" @@ -706,7 +705,8 @@ Partial Class OS_OrdenesServicios CargaEventoBitacora() CargaHistorial() - + CargaDetalles() + CargaMateriales() If TipoEstatus.Contiene(1, 2, 3) Then LnkAccionesMaterialUtilizado.Visible = True @@ -3032,8 +3032,6 @@ Partial Class OS_OrdenesServicios End If - - Dim ProcesoOK As Boolean = True Dim ObjV As New ClsVentas Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL()) @@ -3041,8 +3039,6 @@ Partial Class OS_OrdenesServicios Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL()) Dim GenrarRemisionMovimientos As Boolean = False - - If DdlTipoVenta.SelectedValue.ToEntero = 5 Then For Each GVRow As GridViewRow In GvMU.Rows @@ -3054,20 +3050,15 @@ Partial Class OS_OrdenesServicios Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie")) Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote")) Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate) - If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia) ProcesoOK = False Exit For End If - End If Next - If ProcesoOK Then - Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero - If CveOSEstatusFinalizada > 0 Then If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then ProcesoOK = False @@ -3144,7 +3135,7 @@ Partial Class OS_OrdenesServicios Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal If CantidadRegistro > 0 Then - Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero ' DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero + Dim CveVentaDetalle As Integer = DtVentaDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePadre = {GvRow.DataKey("CveVentaDetalle")}").ToEntero Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero Dim Serie As String = GvRow.DataKey("Serie") @@ -3225,13 +3216,9 @@ Partial Class OS_OrdenesServicios End If End If - - - If ProcesoOK Then ObjV.Commit() - If DdlTipoVenta.SelectedValue.ToEntero = 5 Then Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; " Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga) @@ -3288,7 +3275,7 @@ Partial Class OS_OrdenesServicios Dim Obs As String = GvRow.DataKey("Observaciones") If CantidadRegistro > 0 Then - If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then + If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=GvRow.DataKey("CveVentaDetalle").ToEntero) Then Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia) ProcesoOK = False Exit For diff --git a/Ventas/RepRemisiones.aspx b/Ventas/RepRemisiones.aspx index e97d8a298..2ad99df24 100644 --- a/Ventas/RepRemisiones.aspx +++ b/Ventas/RepRemisiones.aspx @@ -220,81 +220,21 @@ + data-sort="true" GridLines="None"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -304,15 +244,8 @@ <%----%> - - - - - - - <%----%> - - + + diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index 41da0b713..5f7c92f82 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -97,10 +97,10 @@ Partial Class RepRemisiones End If If DtVentas IsNot Nothing Then - GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0 + GvDatos.Columns(10).Visible = DtVentas.SUMD("Descuento") > 0 End If - GvDatos.Columns(10).Visible = chkInv.Checked 'solo se visualiza si está selccionada + GvDatos.Columns(13).Visible = chkInv.Checked 'solo se visualiza si está selccionada ObjVentas.Dispose() GvDatos.DataBind() @@ -118,16 +118,12 @@ Partial Class RepRemisiones e.Row.CssClass = "SubTotales2" e.Row.Font.Bold = True e.Row.Attributes.Add("style", "background:#CCCCCC !important") - Else - e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" - e.Row.FCLiteral("LtlFecha").Text = "" & e.Row.FCLiteral("LtlFecha").Text & "" - + Else If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then ' e.Row.Cells(2).CssClass = "danger" e.Row.Cells(2).ForeColor = Drawing.Color.Red - End If - - e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%" + End If + End If e.Row.FCLiteral("LtlTotal").Text = " 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "" @@ -137,28 +133,28 @@ Partial Class RepRemisiones #Region "CARGA COMBOS FILTRO" Private Sub CargaCliente() - 'CargaClientes - 'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) - 'If EsWS Then + DdlClientes.setEsWebService(True) - ' Else - 'DdlClientes.setEsWebService(False) - 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) - 'DdlClientes.DataBind() - 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - 'End If - If UsuarioActual.TienePermisoProceso(201) Then divVerInv.Visible = True + End If + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria + GvDatos.Columns(3).HeaderText = "Hospital" + GvDatos.Columns(5).Visible = True + GvDatos.Columns(6).Visible = True + 'columna de fecha + GvDatos.Columns(1).HeaderText = "Fecha Cirugía" + CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}" + CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120) End If - End Sub Private Sub CargaSucursales() DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyectos.DataBind() - 'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyectos.DataBind() + End Sub Private Sub CargaContrato() diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 78638fa73..04f557f2f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -21679,7 +21679,7 @@ Partial Class Ventas Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero() Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal EditoRemision = True - CveClienteSucursal = DdlClienteSucursal.SelectedValue.ToEntero + CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero Try 'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then @@ -33550,7 +33550,7 @@ Partial Class Ventas TxtPedidoContrato.Enabled = True TxtObsAlmacen.Enabled = True RblPaqueteria.Enabled = True - + DdlSucursalCliente.Enabled = True LnkUpdateLineaAdicional.Visible = True 'Acciones BtnEditar.Text = "Guardar"