From a40c5b9cb9b0f4da22ebe58ebfd73e25949d9f22 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 14 Mar 2025 11:56:03 -0700 Subject: [PATCH 01/20] Reporte de Pedidos liga a venta si tiene permiso, RepAlmacen obs grupo medico, KArdex Almacen horizontal fix segunda consulta --- App_Code/ClsInventarios.vb | 3 ++- Inventarios/KardexAlmacenHorizontal.aspx | 2 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 11 ++++++-- Inventarios/RepAlmacen.aspx | 29 +++++++++++++++++---- Inventarios/RepAlmacen.aspx.vb | 26 +++++++++++++++--- Ventas/RepPedidosSTF.aspx | 3 ++- Ventas/RepPedidosSTF.aspx.vb | 17 ++++++++++++ 7 files changed, 77 insertions(+), 14 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index e0e8b665d..f014d0ed2 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -325,7 +325,7 @@ Public Class ClsInventarios End Function Public Function GetRepAlmacenes(FechaInicio As String, FechaFin As String, CveEmpresa As Integer, CveTipoAlmacen As String, Contabilizable As Integer, Inventariable As Integer, Optional SoloMovimientosContables As Boolean = False, Optional Almacenes As String = "-1", Optional CveSubProyecto As Integer = -1, - Optional CveUsuarioConsulta As Integer = -1) As Boolean + Optional CveUsuarioConsulta As Integer = -1, Optional Gpo As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_AlmacenesRepGet") @@ -340,6 +340,7 @@ Public Class ClsInventarios .Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@Gpo", SqlDbType.Int).Value = Gpo End With Try SqlAdapter.Fill(Data) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index 164c6990a..2d344c96a 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -348,7 +348,7 @@ table.adssigscroll { " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - +
diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index bc9f5654a..39b1117ca 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -161,6 +161,9 @@ Partial Class Inventarios_KardexAlmacenHorizontal End Sub Private Sub CargarKardex(CvePS As Integer) + 'GvDatos.Columns.Clear() + 'GvDatos.AutoGenerateColumns = True + Dim dt As New DataTable Dim ObjMovimientos As New ClsInventarios Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1") @@ -202,13 +205,16 @@ Partial Class Inventarios_KardexAlmacenHorizontal GvDatos.DataSource = dt Else Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia) - GvDatos.Columns.Clear() - dt = Nothing + GvDatos.DataSource = dt + GvDatos.DataBind() + UpDatos.Update() + Exit Sub End If Else ObjMovimientos.Dispose() Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError) + UpDatos.Update() Exit Sub End If GvDatos.DataBind() @@ -232,6 +238,7 @@ Partial Class Inventarios_KardexAlmacenHorizontal Next + UpDatos.Update() End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound diff --git a/Inventarios/RepAlmacen.aspx b/Inventarios/RepAlmacen.aspx index b470d529a..06e760204 100644 --- a/Inventarios/RepAlmacen.aspx +++ b/Inventarios/RepAlmacen.aspx @@ -140,17 +140,35 @@
Tipo Almacen:
-
+
Aplica Almacen
-
+
- +
+ + + + + +
Grupo:
+
+ + + + +
+ + + + + +
@@ -159,11 +177,12 @@ - + - <%# Eval("Almacen") %> + <%--<%# Eval("Almacen") %>--%> diff --git a/Inventarios/RepAlmacen.aspx.vb b/Inventarios/RepAlmacen.aspx.vb index 8164a5732..ee1a1501b 100644 --- a/Inventarios/RepAlmacen.aspx.vb +++ b/Inventarios/RepAlmacen.aspx.vb @@ -54,7 +54,7 @@ Partial Class Inventarios_RepAlmacen Dim CveSubProyecto As Integer = DdlSucursal.SelectedValue.ToEntero() If objInv.GetRepAlmacenes(FechaI, FechaF, UsuarioActual.CveEmpresa, TipoAlmacen, DdlModalidadFiltro.SelectedValue.ToEntero, DdlAplicaInventario.SelectedValue.ToEntero, - Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + Almacenes:=Almacenes, CveSubProyecto:=CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, Gpo:=DdlGrupo.SelectedValue.ToEntero) Then GVAlmacen.DataSource = objInv.DtResultados TmpDT = objInv.DtResultados End If @@ -103,12 +103,28 @@ Partial Class Inventarios_RepAlmacen Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click GenerarPDF() End Sub - Private Sub GVAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVAlmacen.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.FCLabel("LtlAlmacen").Text = "" Then + Private Sub GVAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVAlmacen.RowDataBound + + If e.Row.RowType = DataControlRowType.DataRow Then + + 'If e.Row.FCLabel("LtlAlmacen").Text = "" Then + ' e.Row.CssClass = "Totales" + 'End If + + If e.Row.Cells(0).Text = "" Then e.Row.CssClass = "Totales" End If + + If e.Row.DataKey("CveAlmacen").ToEntero > 0 Then + Dim Liga As String = $"./RepEntradasSalidas.aspx?CveAlmacen={e.Row.DataKey("CveAlmacen").ToEntero}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1" + e.Row.Cells(0).Text = $"{e.Row.DataKey("Gpo")}" + + <%# Eval("Almacen") %>- + End If + + End If + End Sub #End Region @@ -169,4 +185,6 @@ Partial Class Inventarios_RepAlmacen #End Region Public Overrides Sub VerifyRenderingInServerForm(control As Control) End Sub + + End Class diff --git a/Ventas/RepPedidosSTF.aspx b/Ventas/RepPedidosSTF.aspx index 32ac76c96..4ca4521a7 100644 --- a/Ventas/RepPedidosSTF.aspx +++ b/Ventas/RepPedidosSTF.aspx @@ -236,7 +236,8 @@
+ CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio,CveVenta,SerieFolio" data-sort="true" GridLines="None" Width="99%" + OnRowDataBound="GvE_RowDataBound"> diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb index d645f16d0..06e929e9f 100644 --- a/Ventas/RepPedidosSTF.aspx.vb +++ b/Ventas/RepPedidosSTF.aspx.vb @@ -150,6 +150,11 @@ Partial Class Ventas_RepPedidosSTF If e.Row.DBCampo("TipoRenglon") = "1" Then e.Row.CssClass = "SubTotales" + If UsuarioActual.TienePermisoPagina(6) Then + e.Row.Cells(1).Text = $"{e.Row.DataKey("SerieFolio")}" + End If + + End If If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then @@ -444,4 +449,16 @@ Partial Class Ventas_RepPedidosSTF UpBodyHorariosPedidos.Update() RegistraScript("$('#divHorariosPedidos').modal({ backdrop: 'static', keyboard: false});") End Sub + + Protected Sub GvE_RowDataBound(sender As Object, e As GridViewRowEventArgs) + + If e.Row.RowType = DataControlRowType.DataRow Then + If UsuarioActual.TienePermisoPagina(6) Then + e.Row.Cells(1).Text = $"{e.Row.DataKey("SerieFolio")}" + End If + End If + + + + End Sub End Class From 897e8eab6e00b30d33b5ad66e2ec73791d406a99 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 14 Mar 2025 13:29:54 -0700 Subject: [PATCH 02/20] --FIX filtro tipo transaccion --- Ventas/RepRecuperacion.aspx | 89 ++++++++++++++------------- Ventas/RepRecuperacion.aspx.vb | 14 +++-- Ventas/RepRecuperacionDetalle.aspx | 4 -- Ventas/RepRecuperacionDetalle.aspx.vb | 10 +-- 4 files changed, 60 insertions(+), 57 deletions(-) diff --git a/Ventas/RepRecuperacion.aspx b/Ventas/RepRecuperacion.aspx index 6b5e73c87..773320d17 100644 --- a/Ventas/RepRecuperacion.aspx +++ b/Ventas/RepRecuperacion.aspx @@ -253,7 +253,7 @@
-
+
@@ -262,42 +262,40 @@
-
- Fecha Inicio: - -
-
-
- - - - +
+
+ + +
+ + + + +
+ + + + + +
- - - - - - -
-
- Fecha Fin: - -
-
-
- - - - +
+ +
+ + + + +
+ + + + + +
- - - - - -
+
@@ -315,7 +313,7 @@ - + @@ -425,7 +423,7 @@
F. Registro IE inicio:
-
+
@@ -440,7 +438,7 @@
F. Registro IE Fin:
-
+
@@ -471,7 +469,7 @@
F. Conciliado inicio:
-
+
@@ -486,7 +484,7 @@
F. Conciliado Fin:
-
+
@@ -525,15 +523,18 @@
+
+ Tipo Transacción: +
+
+ + +
- -
- -
- + diff --git a/Ventas/RepRecuperacion.aspx.vb b/Ventas/RepRecuperacion.aspx.vb index 45b3a2877..ae1793527 100644 --- a/Ventas/RepRecuperacion.aspx.vb +++ b/Ventas/RepRecuperacion.aspx.vb @@ -92,9 +92,15 @@ Partial Class Ventas_RepRecuperacion End Sub + Private Sub CargaTipoTransaccion() + DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Ing' AND Estatus = 1 ") + DdlTipoTransaccion.DataBind() + DdlTipoTransaccion.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub Private Sub CargaCombos() - 'Carga Clientes + CargaTipoTransaccion() + 'Carga Clientes If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then DdlClientes.setEsWebService(True) DdlClientes.Attributes.Add("data-metodo", "getcliente") @@ -192,7 +198,7 @@ Partial Class Ventas_RepRecuperacion TCEspecifico = -1 End If - Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked + Dim ModalidadContable As Boolean = True Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM) Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) @@ -220,7 +226,7 @@ Partial Class Ventas_RepRecuperacion DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, - CveResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveBanco:=DdlBanco.SelectedValue.ToEntero(), EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero(), CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveTipoTransaccion:=-1, FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, + CveResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveBanco:=DdlBanco.SelectedValue.ToEntero(), EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero(), CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveMoneda:=DdlMoneda.SelectedValue.ToEntero()) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados @@ -370,7 +376,7 @@ Partial Class Ventas_RepRecuperacion Dim Liga As String = $"/Ventas/RepRecuperacionDetalle.aspx?GPO={DdlGrupo.SelectedValue}&AnioVenta={e.Row.DBCampo("AnioVenta")}&MesVenta={e.Row.DBCampo("MesVenta")}&AnioMesVenta={e.Row.DBCampo("AnioMesVenta")}&FechaVenta={e.Row.DBCampo("FechaVenta")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}" - Liga = $"{Liga}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={e.Row.DBCampo("TipoCambio")}&TCEspecifico={e.Row.DBCampo("TCEspecifico")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={ e.Row.DBCampo("CveCondicionesPago")}&TipoCliente={DdlTipoCliente.SelectedValue}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}" + Liga = $"{Liga}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={e.Row.DBCampo("TipoCambio")}&TCEspecifico={e.Row.DBCampo("TCEspecifico")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={ e.Row.DBCampo("CveCondicionesPago")}&TipoCliente={DdlTipoCliente.SelectedValue}&ModalidadContable={1}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}" Liga = $"{Liga}&CveResponsable={e.Row.DBCampo("CveResponsable")}&CveBanco={e.Row.DBCampo("CveBanco")}&CveEstatusCliente={e.Row.DBCampo("CveEstatusCliente")}&CveCuenta={e.Row.DBCampo("CveCuenta")}&CveTipoTransaccion={e.Row.DBCampo("CveTipoTransaccion")}&FechaAplicadoI={FechaAplicadoI}&FechaAplicadoF={FechaAplicadoF}&FechaRegistroIEI={FechaRegistroIEI}&FechaRegistroIEF={FechaRegistroIEF}&CveSubProyectoCobranza={e.Row.DBCampo("CveSubProyectoCobranza")}&Grupo={e.Row.DBCampo("GPO")}" diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx index 6b997f618..55bba2324 100644 --- a/Ventas/RepRecuperacionDetalle.aspx +++ b/Ventas/RepRecuperacionDetalle.aspx @@ -620,10 +620,6 @@
- -
- -
diff --git a/Ventas/RepRecuperacionDetalle.aspx.vb b/Ventas/RepRecuperacionDetalle.aspx.vb index c3df0d594..cd3f8ac12 100644 --- a/Ventas/RepRecuperacionDetalle.aspx.vb +++ b/Ventas/RepRecuperacionDetalle.aspx.vb @@ -92,7 +92,7 @@ Partial Class Ventas_RepRecuperacionDetalle End If End Sub -#Region "CARGAS" +#Region "CARGAS" Private Sub CargaCombos() Dim CveCliente, CveUsuario, CveProyecto, CveSubProyectoCobranza, @@ -103,8 +103,8 @@ Partial Class Ventas_RepRecuperacionDetalle Dim CveSucursal, CveSubProyecto, CveVendedor, CveSubProyectoEjecucion, CveEstatusFactura, CveCorte, IVA, CveCondicionesPago, CveTipoRelacion As String Dim AnioVenta, MesVenta, AnioMesVenta, FechaVenta As String Dim AnioEjec, MesEjec, AnioMesEjec, FechaEjec, FechaIEjec, FechaFEjec As String - - 'Carga Clientes + + 'Carga Clientes If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then DdlClientes.setEsWebService(True) DdlClientes.Attributes.Add("data-metodo", "getcliente") @@ -432,7 +432,7 @@ Partial Class Ventas_RepRecuperacionDetalle End If - Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked + Dim ModalidadContable As Boolean = True Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM) Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) @@ -460,7 +460,7 @@ Partial Class Ventas_RepRecuperacionDetalle DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, - CveResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveBanco:=DdlBanco.SelectedValue.ToEntero(), EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero(), CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveTipoTransaccion:=-1, FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, + CveResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveBanco:=DdlBanco.SelectedValue.ToEntero(), EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero(), CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero(), Tipo:=Me.Tipo, Grupo:=Me.Grupo, CveMoneda:=DdlMoneda.SelectedValue.ToEntero()) Then DtDatos = ObjMovtos.DtResultados.Copy() From 2b2cedd106c422c50136247d9f3b014be42b57f2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 14 Mar 2025 16:26:23 -0700 Subject: [PATCH 03/20] ProveedoresAbonar Ajsute direcia 1 centavo entre descuento y RNC --- Bancos/ProveedoresAbonar.aspx.vb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 721e35e49..a74d504d2 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -888,6 +888,8 @@ Partial Class Bancos_ProveedoresAbonar CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + + 'Importe de pago Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal 'Tipos de cambio @@ -941,15 +943,15 @@ Partial Class Bancos_ProveedoresAbonar If descuentoParts.Length = 0 Then Descuento = 0 Else - - For i As Integer = 0 To descuentoParts.Length - 1 - Dim descuentoPart As Decimal = descuentoParts(i).Trim().ToDecimal - If descuentoPart > 0 Then - Descuento = Descuento + ((TotalTemp - Descuento) * (descuentoPart / 100)) - Else - Continue For - End If - Next + Descuento = gvr.DataKey("Saldo").ToString.ToDecimal - gvr.FCTextBox("TxtAbonar").Text.ToDecimal + 'For i As Integer = 0 To descuentoParts.Length - 1 + ' Dim descuentoPart As Decimal = descuentoParts(i).Trim().ToDecimal + ' If descuentoPart > 0 Then + ' Descuento = Descuento + ((TotalTemp - Descuento) * (descuentoPart / 100)) + ' Else + ' Continue For + ' End If + 'Next End If @@ -970,7 +972,7 @@ Partial Class Bancos_ProveedoresAbonar FolioRNC = serieFolioArray(0) End If - Descuento = Descuento.RoundSQL(2) + 'Descuento = Descuento.RoundSQL(2) If PorcentajeIVA > 0 Then Descuento = ((Descuento) / (1 + PorcentajeIVA)) From cf3f44285d769f1eda52e838f70d57d8bc82373b Mon Sep 17 00:00:00 2001 From: caudillochon Date: Fri, 14 Mar 2025 18:20:22 -0700 Subject: [PATCH 04/20] dias vacacionews minimas 12 --- RH/Personal.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index f0351a9a0..efc45abbf 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -7023,7 +7023,7 @@ Partial Class RH_Personal If objRH.DtResultados.Rows.Count > 0 Then Dim diasvaca As Integer = objRH.DtResultados(0)("Dias").ToString().ToEntero() - TxtFIDiasVacaciones.Text = If(diasvaca > 5, diasvaca, 6).ToString() + TxtFIDiasVacaciones.Text = If(diasvaca > 11, diasvaca, 12).ToString() Else TxtFIDiasVacaciones.Text = "12" End If From 79e4621a15f7e7fe67862bde4dc810b4922308b8 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 18 Mar 2025 17:06:30 -0700 Subject: [PATCH 05/20] PrestamosProveedor permiso boton, rep alamcen ajustes --- Empresas/Grales/Formatos/RepAlmacen.rdlc | 1469 +++++++++++----------- Inventarios/PrestamosdeProveedor.aspx | 4 +- Inventarios/PrestamosdeProveedor.aspx.vb | 9 +- Inventarios/RepAlmacen.aspx | 6 +- Inventarios/RepAlmacen.aspx.vb | 38 +- Inventarios/RepEntradasSalidas.aspx.vb | 47 +- 6 files changed, 803 insertions(+), 770 deletions(-) diff --git a/Empresas/Grales/Formatos/RepAlmacen.rdlc b/Empresas/Grales/Formatos/RepAlmacen.rdlc index 4359d05d5..9704c6726 100644 --- a/Empresas/Grales/Formatos/RepAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepAlmacen.rdlc @@ -1,735 +1,5 @@  - - - - - - - - - - - true - true - - - - - Almacén - - - - - - - Textbox28 - - - - - - Gray - 2pt - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - Tipo Almacén - - - - - - - Textbox6 - - - - - - Gray - 2pt - 2pt - 2pt - 1pt - - - - - - - - - - - 5cm - - - 5cm - - - - - 0.3751cm - - - - - true - - - - - =Fields!Existencia.Value - - - - - - - Existencia - - - =IIF(Fields!Almacen.Value="Total","#67809F","White") - 2pt - 2pt - 1pt - 1pt - - - - - - - - true - - - - - =Fields!Total.Value - - - - - - - Total - - - =IIF(Fields!Almacen.Value="Total","#67809F","White") - 2pt - 2pt - 1pt - 1pt - - - - - - - - - - - - - 0.3751cm - - - true - true - - - - - Existencia - - - - - - - Textbox3 - - - Gray - 2pt - 2pt - 2pt - 1pt - - - - - - - - 0.3751cm - - - true - true - - - - - Total - - - - - - - Textbox40 - - - Gray - 2pt - 2pt - 2pt - 1pt - - - - - - - - - - - - - =Fields!Almacen.Value - - - - 5cm - - - true - - - - - =Fields!Almacen.Value - - - - - - =IIF(Fields!Almacen.Value="Total","#67809F","White") - 2pt - 2pt - 1pt - 1pt - - - - - - - - 5cm - - - true - true - - - - - =Fields!TipoAlmacen.Value - - - - - - =IIF(Fields!Almacen.Value="Total","#67809F","White") - 2pt - 2pt - 1pt - 1pt - - - - - - - - - - DataSet1 - 0.38751in - 0.7502cm - 20cm - - - - - - true - true - - - - - =Parameters!Filtros.Value - HTML - - - - - - - Filtros - 0.20788cm - 0.6cm - 20cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.81828in - - - - - - - Textbox1 - 0.18521cm - 5cm - 0.6cm - 10cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE ALMACENES - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 5cm - 0.52945cm - 10cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 1.63216cm - 5cm - 2 - - - - - - - - - - - 0.94391cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.06cm - 15cm - 0.68085cm - 5cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.06cm - 7.16958cm - 0.68085cm - 2.83042cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!ExecutionTime - - - - - - - Textbox11 - 0.06cm - 10cm - 0.68085cm - 5cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0in - 0cm - 19.26933cm - 5 - - - - - - true - true - - - - - IMPRESO EN SIG, Rep. Almacén - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox28 + + + + + + Gray + 2pt + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + Tipo Almacén + + + + + + + Textbox6 + + + + + + Gray + 2pt + 2pt + 2pt + 1pt + + + + + + + + + + + 5cm + + + 5cm + + + + + 0.3751cm + + + + + true + + + + + =Fields!Existencia.Value + + + + + + + Existencia + + + =IIF(Fields!Gpo.Value="Total","#67809F","White") + 2pt + 2pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Total.Value + + + + + + + Total + + + =IIF(Fields!Gpo.Value="Total","#67809F","White") + 2pt + 2pt + 1pt + 1pt + + + + + + + + + + + + + 0.3751cm + + + true + true + + + + + Existencia + + + + + + + Textbox3 + + + Gray + 2pt + 2pt + 2pt + 1pt + + + + + + + + 0.3751cm + + + true + true + + + + + Total + + + + + + + Textbox40 + + + Gray + 2pt + 2pt + 2pt + 1pt + + + + + + + + + + + + + =Fields!Gpo.Value + + + + 5cm + + + true + + + + + =Fields!Gpo.Value + + + + + + =IIF(Fields!Gpo.Value="Total","#67809F","White") + 2pt + 2pt + 1pt + 1pt + + + + + + + + 5cm + + + true + true + + + + + =Fields!TipoAlmacen.Value + + + + + + =IIF(Fields!Gpo.Value="Total","#67809F","White") + 2pt + 2pt + 1pt + 1pt + + + + + + + + + + DataSet1 + 0.38751in + 0.7502cm + 20cm + + + + + + true + true + + + + + =Parameters!Filtros.Value + HTML + + + + + + + Filtros + 0.20788cm + 0.6cm + 20cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.81828in + + + + + + + Textbox1 + 0.18521cm + 5cm + 0.6cm + 10cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE ALMACENES + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 5cm + 0.52945cm + 10cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 1.63216cm + 5cm + 2 + + + + + + + + + + + 0.94391cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.06cm + 15cm + 0.68085cm + 5cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.06cm + 7.16958cm + 0.68085cm + 2.83042cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.06cm + 10cm + 0.68085cm + 5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0cm + 19.26933cm + 5 + + + + + + true + true + + + + + IMPRESO EN SIG, Rep. Almacén + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + @@ -830,8 +839,12 @@ - + + + <%----%> + + +
+ + - - - diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index eeb186ce7..d1407318a 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -2950,7 +2950,7 @@ public partial class Nomina_Nomina2 : ClsPaginas pnlAddupMovto.Visible = false; CargaMovtoPermanente(); CargaPersonalIncapacidad(); - RegistraScript("$('#ModalConceptos').modal();"); + RegistraScript("$('#C_UpModalConceptos.allspacevhwh').removeClass('allspacevhwh');$('#ModalConceptos').modal();"); } #region Asistencias @@ -7666,14 +7666,14 @@ public partial class Nomina_Nomina2 : ClsPaginas } protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e) { - CargaConcepto(); + //CargaConcepto(); UpMovtosPermanentesModal.Update(); } protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e) { DdlTipo.SelectedValue = "D"; - CargaConcepto(); + //CargaConcepto(); DdlTipoDescto_SelectedIndexChanged(null, null); pnlAddupMovto.Visible = true; LnkAddMovto.Visible = true; @@ -7692,7 +7692,7 @@ public partial class Nomina_Nomina2 : ClsPaginas GVMovtoPermanenteSaldos.DataBind(); UpMovtosPermanentesModal.Update(); - RegistraScript("$('#ModalMovtoPermanente').modal({backdrop: 'static', keyboard: false});"); + RegistraScript("$('#C_UpModalConceptos:not(.allspacevhwh)').addClass('allspacevhwh');$('#ModalMovtoPermanente').modal({backdrop: 'static', keyboard: false});"); } diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index a78516e2e..32e59cbbb 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -192,6 +192,11 @@ + + + + + @@ -230,6 +235,7 @@ Movimientos Activos Inactivos + Acumulado Saldo From 16f6bef7c02ab77a77dfa8326f0940acc54562a1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 19 Mar 2025 17:09:45 -0700 Subject: [PATCH 08/20] --Cambios formato --- Empresas/189/Formatos/SaldoAntNCDev.rdlc | 81 ++++++++++++++---------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/Empresas/189/Formatos/SaldoAntNCDev.rdlc b/Empresas/189/Formatos/SaldoAntNCDev.rdlc index 7bca4418e..e09e5fbaa 100644 --- a/Empresas/189/Formatos/SaldoAntNCDev.rdlc +++ b/Empresas/189/Formatos/SaldoAntNCDev.rdlc @@ -21,6 +21,10 @@ SerieFolio System.String + + SerieFolioEstatus + System.String + FechaAplicado System.String @@ -29,6 +33,10 @@ Importe System.Double + + TotalNC + System.Double + Moneda System.String @@ -63,14 +71,13 @@ Folio @@ -80,10 +87,19 @@ #e36c09 + + LightGrey + + + LightGrey + + + LightGrey + - #e36c09 + LightGrey 1pt @@ -98,10 +114,10 @@ 3.42604cm - 3.37313cm + 2.43119cm - 3.00271cm + 3.94465cm @@ -135,7 +151,7 @@ - White + =IIF(Fields!TotalNC.Value < 0, "#e7505a","White") 0.5pt @@ -167,7 +183,7 @@ - White + =IIF(Fields!TotalNC.Value < 0, "#e7505a","White") 0.5pt @@ -175,14 +191,14 @@ - + true true - =Fields!Importe.Value + =Fields!TotalNC.Value - Importe + TotalNC - White + =IIF(Fields!TotalNC.Value < 0, "#e7505a","White") 0.5pt @@ -225,24 +241,23 @@ Fecha Textbox19 - #e36c09 + LightGrey 1pt @@ -262,24 +277,23 @@ Moneda Textbox21 - #e36c09 + LightGrey 1pt @@ -299,24 +313,23 @@ Importe Textbox23 - #e36c09 + LightGrey 1pt @@ -330,16 +343,16 @@ - 2.39924cm + 6.69369cm - + true true - =Fields!SerieFolio.Value + =Fields!SerieFolioEstatus.Value - SerieFolio + SerieFolioEstatus - White + =IIF(Fields!TotalNC.Value < 0, "#e7505a","White") 0.5pt @@ -369,9 +382,9 @@ true DataSet1 0.12375cm - 0.06614cm + 0.25664cm 0.8825cm - 12.20112cm + 16.49557cm From 356e97ad3651fea4228486aaf49a691c858b584d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 19 Mar 2025 21:34:24 -0700 Subject: [PATCH 09/20] --tipos de venta --- App_Code/ClsVentas.vb | 6 ++++-- Ventas/ClientesAbonar.aspx.vb | 1 + Ventas/RepVentas.aspx | 5 +++++ Ventas/RepVentas.aspx.vb | 18 +++++++++++----- Ventas/RepVentasDetalle.aspx | 37 ++++++++++++++++++++------------- Ventas/RepVentasDetalle.aspx.vb | 13 +++++++++++- Ventas/Ventas.aspx.vb | 28 +++++++++++++++++++++++++ 7 files changed, 85 insertions(+), 23 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 7fca6c177..95d767d6f 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1744,7 +1744,7 @@ Public Class ClsVentas CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1) As Boolean + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRep") @@ -1777,6 +1777,7 @@ Public Class ClsVentas .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio .Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal .Add("@EsFilial", SqlDbType.Int).Value = EsFilial + .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta End With Try @@ -1923,7 +1924,7 @@ Public Class ClsVentas CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False, - Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1) As Boolean + Optional EsDistribuidor As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ServicioDomicilio As Integer = -1, Optional EsFacturaGlobal As Integer = -1, Optional EsFilial As Integer = -1, Optional CveTipoVenta As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRepDetalle") @@ -1961,6 +1962,7 @@ Public Class ClsVentas .Add("@ServicioDomicilio", SqlDbType.Int).Value = ServicioDomicilio .Add("@EsFacturaGlobal", SqlDbType.Int).Value = EsFacturaGlobal .Add("@EsFilial", SqlDbType.Int).Value = EsFilial + .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta End With Try diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 973191626..28c42cb46 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1662,6 +1662,7 @@ Partial Class Ventas_ClientesAbonar DtVentasNC.AcceptChanges() ObjFacturaDevolucion.DtVentasNC = DtVentasNC + ObjFacturaDevolucion.CveTipoVenta = 8 'PRONTO PAGO ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC) diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 1f5ed3205..61dcdd7b3 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -368,6 +368,11 @@
+ +
+ + +
diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 92752ed76..eb0c42851 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -215,7 +215,15 @@ Partial Class Ventas_RepVentas ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS End Sub - Private Sub CargaCombos() + Private Sub CargaCombos() + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + LblTipoVenta.Visible = True + DivTipoVenta.Visible = True + + DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ") + DdlTipoVenta.DataBind() + DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1")) + End If CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1) @@ -265,8 +273,8 @@ Partial Class Ventas_RepVentas TxtFechaISabana.Text = NowADS().FirstDayOfMonth.ToShortDateString TxtFechaFSabana.Text = NowADS().ToShortDateString - End Sub - + End Sub + #End Region @@ -310,7 +318,7 @@ Partial Class Ventas_RepVentas If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, - EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then + EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -531,7 +539,7 @@ Partial Class Ventas_RepVentas 'LIGA A DETALLE - Dim Liga As String = $"/Ventas/RepVentasDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}" + Dim Liga As String = $"/Ventas/RepVentasDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}&CveTipoVenta={e.Row.DBCampo("CveTipoVenta")}" e.Row.FCLiteral("LtlGrupo").Text = "" & e.Row.FCLiteral("LtlGrupo").Text & "" diff --git a/Ventas/RepVentasDetalle.aspx b/Ventas/RepVentasDetalle.aspx index 16de624de..64b7ea27c 100644 --- a/Ventas/RepVentasDetalle.aspx +++ b/Ventas/RepVentasDetalle.aspx @@ -331,14 +331,20 @@
Factura Global: -
- - Todos - Solo Globales - Sin Globales - -
- +
+ + Todos + Solo Globales + Sin Globales + +
+
+
+ +
+ + +
@@ -346,7 +352,7 @@ - <%-- 0--%> @@ -607,11 +613,11 @@ - - - - - + + + + + <%-- 42--%> @@ -814,7 +820,8 @@ - + + diff --git a/Ventas/RepVentasDetalle.aspx.vb b/Ventas/RepVentasDetalle.aspx.vb index ab3168e0b..0f8eec6f0 100644 --- a/Ventas/RepVentasDetalle.aspx.vb +++ b/Ventas/RepVentasDetalle.aspx.vb @@ -186,6 +186,8 @@ Partial Class RepVentasDetalle TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero CveTipoRelacion = If(Request("CveTipoRelacion") IsNot Nothing, Request("CveTipoRelacion").ToString, "-1").ToString + Dim CveTipoVenta = If(Request("CveTipoVenta") IsNot Nothing, Request("CveTipoVenta").ToString.ToEntero, -1).ToString.ToEntero + DdlTipoVenta.SelectedValueExist(CveTipoVenta) DdlTipoCliente.SelectedValueExist(TipoCliente) @@ -318,6 +320,15 @@ Partial Class RepVentasDetalle End Sub Private Sub CargaCombos() + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + LblTipoVenta.Visible = True + DivTipoVenta.Visible = True + + DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'") + DdlTipoVenta.DataBind() + DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1")) + End If + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1) CargaClientes() @@ -457,7 +468,7 @@ Partial Class RepVentasDetalle CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), - ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then + ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then DtVentas = AddRows(ObjVentas.DtResultados) ImgImprimir.Enabled = True GvDatos.DataSource = AddRows(ObjVentas.DtResultados) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c5874f90b..dfd33cfbd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -12424,6 +12424,9 @@ Partial Class Ventas End If End If + + ObjFacturaBonificacion.CveTipoVenta = 7 'PRONTO PAGO + End Sub @@ -14638,6 +14641,31 @@ Partial Class Ventas End If End If + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then + CveTipoVentaGuardar = -1 + + If NCDescuento Then + If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then + 'VERIFICA SI BONIFICACION + If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then + CveTipoVentaGuardar = 7 ' BONIFICACION + ElseIf ListaNCDescuento.Any(Function(RNC) (Not RNC.Num1 = 2)) Then + CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS + End If + End If + Else + If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then + 'VERIFICA SI BONIFICACION + If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then + CveTipoVentaGuardar = 7 ' BONIFICACION + ElseIf ListaRemisionesNC.Any(Function(RNC) (Not RNC.Num1 = 2)) Then + CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS + End If + End If + + End If + End If + If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, From 8a3ec1f452cae2697082954684ffd1615a11cfa4 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Thu, 20 Mar 2025 01:26:32 -0700 Subject: [PATCH 10/20] --- RH/CalculoSBC.aspx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RH/CalculoSBC.aspx b/RH/CalculoSBC.aspx index aec2b7fe2..c4b81e18c 100644 --- a/RH/CalculoSBC.aspx +++ b/RH/CalculoSBC.aspx @@ -10,7 +10,9 @@ .GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) { background-color: #88d6cd !important; - } + }.GVDetalleParteVariable tr > td:nth-child(n+2) { + text-align: right; +} @@ -472,7 +474,7 @@ + CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor GVDetalleParteVariable"> From 8d424112ea6235ae58bc1c55de9d97a7e1833328 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 20 Mar 2025 08:35:02 -0700 Subject: [PATCH 11/20] =?UTF-8?q?Compras=20CvePersonal=20de=20viaticos=20e?= =?UTF-8?q?n=20detalle,=20=20pretamos=20proveedor=20ajustes=20visuales,=20?= =?UTF-8?q?re=20recuperaci=C3=B3n=20vendedor=20list=20bug=20cuando=20el=20?= =?UTF-8?q?item=20es=20mas=20grande=20que=20elcontnedor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 11 ++++++ Inventarios/PrestamosdeProveedor.aspx | 56 +++++++++++++-------------- Ventas/RepRecuperacion.aspx | 22 ++++++++++- 3 files changed, 59 insertions(+), 30 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 241e90e0d..8fefa2be5 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5571,6 +5571,17 @@ Partial Class Compras_Compras CvePersonal = GvPersonal.Rows(Cont).FCDropDownList("DdlPersonalGv").SelectedValue.ToEntero Referencia = GvPersonal.Rows(Cont).FCTextBox("TxtReferencia").Text End If + + + If CvePersonal <= 0 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 Then + CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero + If Not CvePersonal > 0 Then + Alert("Debe asignar personal al reembolso.", TipoMensaje.MsgAdvertencia) + ErrorDetalles = True + End If + End If + + Cont = Cont + 1 'Si es AF-INSUMO se guarda CveAF en CompraDetalle diff --git a/Inventarios/PrestamosdeProveedor.aspx b/Inventarios/PrestamosdeProveedor.aspx index ec234bb63..382bac5a8 100644 --- a/Inventarios/PrestamosdeProveedor.aspx +++ b/Inventarios/PrestamosdeProveedor.aspx @@ -59,7 +59,7 @@
-
+
@@ -68,7 +68,7 @@
- RECEPCIÓN DE TRASPASO + Devolución de Préstamo
@@ -80,10 +80,10 @@
-
- -
-
+
+ +
+
@@ -99,31 +99,29 @@
-
-
- - -
- - - -
-
-
- -
+ + + +
+ + + +
+ +
+
+ +
-
-
- -
- - - -
-
-
+ +
+ + + +
+
+
diff --git a/Ventas/RepRecuperacion.aspx b/Ventas/RepRecuperacion.aspx index ab11d858c..78b9ad4ce 100644 --- a/Ventas/RepRecuperacion.aspx +++ b/Ventas/RepRecuperacion.aspx @@ -52,6 +52,25 @@ width: 100%; height: 500px; } + .select2-container--default .select2-selection--multiple .select2-selection__choice { + /*max-width: 150px;*/ /* Ajusta a tu gusto */ + max-width: calc(100% - 2em); + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } + /*.select2-selection__choice__remove{*/ + /* o absolute/fixed, según necesites */ + /*position: absolute; + z-index: 9999;*/ /* un valor alto para estar sobre los demás */ + /*} + .select2-search.select2-search--inline .select2-search__field .select2-selection__rendered .select2-container--default .select2-container--focus { + + position: absolute; + z-index: 1; + }*/ + + @@ -337,7 +356,8 @@
- + <%----%> +
From a89c8b82bcb520147ec42357fec635d20ec8ff77 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Thu, 20 Mar 2025 16:07:45 -0700 Subject: [PATCH 12/20] --- Nomina/Nomina.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index d1407318a..2998d580c 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -7666,14 +7666,14 @@ public partial class Nomina_Nomina2 : ClsPaginas } protected void DdlTipo_SelectedIndexChanged(object sender, EventArgs e) { - //CargaConcepto(); + CargaConcepto(); UpMovtosPermanentesModal.Update(); } protected void LnkAddMovtoPermanente_Click(object sender, EventArgs e) { DdlTipo.SelectedValue = "D"; - //CargaConcepto(); + CargaConcepto(); DdlTipoDescto_SelectedIndexChanged(null, null); pnlAddupMovto.Visible = true; LnkAddMovto.Visible = true; From b3944d2f1178130426cc599570dbdab74b88ceb9 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 20 Mar 2025 17:08:52 -0700 Subject: [PATCH 13/20] --fix tipos venta --- Ventas/ProductosServicios.aspx.vb | 26 ++++++++++++++------------ Ventas/Ventas.aspx.vb | 5 +++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index ffc42ca94..de094ebf7 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -1470,7 +1470,7 @@ Partial Class ProductosyServicios Exit Sub End If - If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked Then + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked AndAlso DivListaPrecios.Visible Then Dim tcontador As Integer = 0 For Each GvRow As GridViewRow In GvPLMultiple.Rows Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero() @@ -3012,13 +3012,12 @@ Partial Class ProductosyServicios If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra Dim objPS As New ClsProductosServicios If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then - GvPLMultiple.DataSource = objPS.DtResultados + GvPLMultiple.DataSource = objPS.DtResultados.Copy() End If objPS.Dispose() - DivListaPrecios.Visible = True GvPLMultiple.DataBind() + DivListaPrecios.Visible = True End If - End Sub Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs) @@ -3035,16 +3034,19 @@ Partial Class ProductosyServicios Dim TieneError As Boolean = False Try - For Each GvRow As GridViewRow In GvPLMultiple.Rows - Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero() - Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal() + If DivListaPrecios.Visible Then + For Each GvRow As GridViewRow In GvPLMultiple.Rows + Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero() + Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal() - TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True) + TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True) + + If TieneError Then + Exit For + End If + Next + End If - If TieneError Then - Exit For - End If - Next Catch ex As Exception OnError("Ocurrió un error al actualizar precios", ex) TieneError = True diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index dfd33cfbd..a3a4124f2 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14649,7 +14649,7 @@ Partial Class Ventas 'VERIFICA SI BONIFICACION If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then CveTipoVentaGuardar = 7 ' BONIFICACION - ElseIf ListaNCDescuento.Any(Function(RNC) (Not RNC.Num1 = 2)) Then + ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS End If End If @@ -14658,7 +14658,7 @@ Partial Class Ventas 'VERIFICA SI BONIFICACION If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then CveTipoVentaGuardar = 7 ' BONIFICACION - ElseIf ListaRemisionesNC.Any(Function(RNC) (Not RNC.Num1 = 2)) Then + ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS End If End If @@ -37929,6 +37929,7 @@ Partial Class Ventas ObjFacturaProntoPago.DtVentasNC = DtVentasNC ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago) + ObjFacturaProntoPago.CveTipoVenta = 8 Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion) From 45011332759518c2b4f378748014fe9228b10468 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Fri, 21 Mar 2025 07:21:06 -0700 Subject: [PATCH 14/20] cssgastos --- Contabilidad/RepGastosCC.aspx | 49 ++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index b43b120a0..b3631dbe6 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -80,6 +80,53 @@ border: none; outline: 0; } + + + /*Begin ScrollADS V2*/ + +.divContainerads { + width: 100%; + max-height: calc(100vh - 260px); + overflow-y: auto; +} +table.adssigscroll { + min-width: 100%; + background-color: #fff; +} + table.adssigscroll tbody, table.adssigscroll thead { + background-color: #fff; + } + + table.adssigscroll tr { + background-color: inherit; + } + + table.adssigscroll tr.stickyRow { + position: sticky; + top: 0; /* Se mantiene pegado en la parte superior */ + background-color: inherit; /* Para que no se superponga con otros elementos */ + z-index: 4; /* Asegura que esté sobre otros elementos */ + } +.tr_order tr > th::after { + content: "\f0dc"; + font:normal normal normal 14px / 1 FontAwesome; + display: inline-block; + margin-left: 5px; + color: #32A1CF; +} +.tr_order tr > th.asce::after { + content: "\f0de"; +} + +.tr_order tr > th.desc::after { + content: "\f0dd"; +} + /*END ScrollADS V2*/ + + table.GvDatos tr td:nth-child(1){ + min-width:300px; + /*white-space:nowrap;*/ + } @@ -166,7 +213,7 @@ From 2abcaa8b82219eaf211d54d2f6d30e759454d526 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 21 Mar 2025 11:48:53 -0700 Subject: [PATCH 15/20] --Columna TipoVenta en RepVentasDetalle --- Ventas/RepVentasDetalle.aspx | 15 ++++++++++++--- Ventas/RepVentasDetalle.aspx.vb | 1 + Ventas/RepVentasPeriodo.aspx.vb | 5 ++++- Ventas/Ventas.aspx.vb | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Ventas/RepVentasDetalle.aspx b/Ventas/RepVentasDetalle.aspx index 64b7ea27c..bf70f132e 100644 --- a/Ventas/RepVentasDetalle.aspx +++ b/Ventas/RepVentasDetalle.aspx @@ -613,23 +613,30 @@ + <%-- 42--%> - <%-- 42--%> + <%-- 43--%> - <%-- 43--%> + <%-- 44--%> + <%-- 45--%> + + + + + @@ -822,7 +829,9 @@ - + + + diff --git a/Ventas/RepVentasDetalle.aspx.vb b/Ventas/RepVentasDetalle.aspx.vb index 0f8eec6f0..1d7735992 100644 --- a/Ventas/RepVentasDetalle.aspx.vb +++ b/Ventas/RepVentasDetalle.aspx.vb @@ -1042,6 +1042,7 @@ Partial Class RepVentasDetalle GvDatos.Columns(42).Visible = ChkGestionCobranzaTurno.Checked GvDatos.Columns(43).Visible = ChkDescargarXML.Checked GvDatos.Columns(44).Visible = ChkDescargarPDF.Checked + GvDatos.Columns(45).Visible = ChkTipoVenta.Checked Personalizo = 1 If Personalizo = 1 Then diff --git a/Ventas/RepVentasPeriodo.aspx.vb b/Ventas/RepVentasPeriodo.aspx.vb index 3c224f9b5..719cc08fa 100644 --- a/Ventas/RepVentasPeriodo.aspx.vb +++ b/Ventas/RepVentasPeriodo.aspx.vb @@ -87,7 +87,10 @@ Partial Class RepVentasPeriodo DdlTipoComprobante.SelectedValuesIfExistM(Opcion) DdlGrupo.SelectedValueExist("7") DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty) - DdlEstatus.SelectedValue = "-1" + DdlEstatus.SelectedValue = "-1" + Else + DdlTipoComprobante.SelectedValuesIfExistM("Ing") + DdlEstatus.SelectedValuesIfExistM("3") End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a3a4124f2..1ef94d20a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -12425,7 +12425,7 @@ Partial Class Ventas End If - ObjFacturaBonificacion.CveTipoVenta = 7 'PRONTO PAGO + ObjFacturaBonificacion.CveTipoVenta = 7 'BONIFICACION End Sub @@ -37929,7 +37929,7 @@ Partial Class Ventas ObjFacturaProntoPago.DtVentasNC = DtVentasNC ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago) - ObjFacturaProntoPago.CveTipoVenta = 8 + ObjFacturaProntoPago.CveTipoVenta = 8 'PRONTO PAGO Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion) From a103e16cab89880f0694894f98592d197980d135 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 21 Mar 2025 18:06:47 -0700 Subject: [PATCH 16/20] STF. plantilla mail venta --- App_Code/ClsPaginas.vb | 104 ++++++++++++++++++++ Ashx/E194.ashx | 211 +++++++++++++++++++++-------------------- 2 files changed, 213 insertions(+), 102 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7c52cd248..7208a8403 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -11400,5 +11400,109 @@ Public Class ClsPaginas End If End Sub + + Public Shared Function PlantillaMailVenta(ObjFactura As Modelos.Factura, UsuarioActual As Usuario) As MCuerpoFacturaMail + Dim Retorno As New MCuerpoFacturaMail() + Try + Dim Asunto As String = String.Empty + Dim Cuerpo As String = String.Empty + Dim TipoComprobante As String = "" + + Dim TipoDocto = ObjFactura.TipoDocto + + If TipoDocto = "Ing" Then TipoComprobante = "Factura" + If TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito" + If TipoDocto = "Dev" Then TipoComprobante = "Nota de Devolución" + If TipoDocto = "Rem" Then TipoComprobante = "Remisión" + If TipoDocto = "Cot" Then TipoComprobante = "Cotización" + If TipoDocto = "Ant" Then TipoComprobante = "Anticipo" + + + If TipoDocto = "Cot" Then + If UsuarioActual.Empresa.PlantillaMailVentaCotizacion.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVentaCotizacion + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy")) + Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.FormatoNumero(2)) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy")) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) + Cuerpo = Cuerpo.Replace("{""Vigencia""}", ObjFactura.Vigencia.ToString("dd/MM/yyyy")) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", ObjFactura.AtencionA) + Cuerpo = Cuerpo.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta) + End If + + If UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion + Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Asunto = Asunto.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial) + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""Total""}", ObjFactura.Total.FormatoNumero(2)) + Asunto = Asunto.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) + Asunto = Asunto.Replace("{""Vigencia""}", ObjFactura.Vigencia.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""AtencionA""}", ObjFactura.AtencionA) + Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto) + Asunto = Asunto.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta) + End If + Else + If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy")) + Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.FormatoNumero(2)) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy")) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", ObjFactura.AtencionA) + Cuerpo = Cuerpo.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto) + Cuerpo = Cuerpo.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta) + End If + + If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta + Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Asunto = Asunto.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial) + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""Total""}", ObjFactura.Total.FormatoNumero(2)) + Asunto = Asunto.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) + Asunto = Asunto.Replace("{""Vigencia""}", ObjFactura.Vigencia.ToString("dd/MM/yyyy")) + Asunto = Asunto.Replace("{""AtencionA""}", ObjFactura.AtencionA) + Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto) + Asunto = Asunto.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta) + End If + End If + + Dim DisplayName As String = "" + If UsuarioActual.CveEmpresa = 119 Then DisplayName = "Facturación Agroquímicos JAM" + + Retorno.DisplayName = DisplayName + Retorno.Cuerpo = Cuerpo + Retorno.Asunto = Asunto + + Catch ex As Exception + + End Try + + Return Retorno + End Function + Public Class MCuerpoFacturaMail + Public Sub New() + Asunto = "" + Cuerpo = "" + DisplayName = "" + Archivos = New List(Of ClsSisMail.ArchivoMail) + End Sub + Public Property Asunto As String + Public Property Cuerpo As String + Public Property DisplayName As String + Public Property Archivos As List(Of ClsSisMail.ArchivoMail) + End Class End Class diff --git a/Ashx/E194.ashx b/Ashx/E194.ashx index ffceffa11..01ff5c8d4 100644 --- a/Ashx/E194.ashx +++ b/Ashx/E194.ashx @@ -36,7 +36,17 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe pFechaF = context.Request("FechaF") End If - Retorno = IniciaFacturacionMasiva(CveEmpresaFacturar.ToString, pFechaI, pFechaF) + Retorno = IniciaFacturacionMasiva(context, CveEmpresaFacturar.ToString, pFechaI, pFechaF) + End If + + If Metodo = "EnviarMailDemo" Then + Dim pFechaI As String = "" + Dim pFechaF As String = "" + + If context.Request("CveVenta") IsNot Nothing Then + Dim CveVenta = context.Request("CveVenta").ToString().ToEntero() + Retorno = EnviarMailDemo(context, CveEmpresaFacturar.ToString, CveVenta) + End If End If Catch ex As Exception @@ -52,7 +62,20 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe End Sub - Private Function IniciaFacturacionMasiva(pCveEmpresa As String, pFechaI As String, pFechaF As String) As Boolean + Private Function EnviarMailDemo(ByVal context As HttpContext, pCveEmpresa As String, CveVenta As Integer) As Boolean + Dim Retorno As Boolean = True + Dim CveEmpresa As Integer = pCveEmpresa.ToEntero() + + If CveEmpresa > 0 Then + GuardaLogFacturacion($"EnviarMail - CveE:{CveEmpresa}") + Dim Usuario = ValidaUsuarioSistema(CveEmpresa, context) + EnviarCorreo(CveVenta, Usuario) + End If + + Return Retorno + End Function + + Private Function IniciaFacturacionMasiva(ByVal context As HttpContext, pCveEmpresa As String, pFechaI As String, pFechaF As String) As Boolean Dim Retorno As Boolean = True Dim JsonRetorno As New JObject() Dim CveEmpresa As Integer = pCveEmpresa.ToEntero() @@ -60,9 +83,8 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe GuardaLogFacturacion("- Inicio de facturación ") If CveEmpresa > 0 Then GuardaLogFacturacion($"1.10 - CveE:{CveEmpresa}") - Dim Usuario = ValidaUsuarioSistema(CveEmpresa) + Dim Usuario = ValidaUsuarioSistema(CveEmpresa, context) Dim FechaI, FechaF As DateTime - 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario) If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then GuardaLogFacturacion("1.200") @@ -156,7 +178,7 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe If Resp.CveVenta > 0 AndAlso Not Resp.TieneError Then If Resp.SeTimbro OrElse Not Produccion Then - EnviarCorreo(ObjFactura, UsuarioActual) + EnviarCorreo(Resp.CveVenta, UsuarioActual) End If End If @@ -223,7 +245,7 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe End Function #Region "V A L I D A - D A T O S" - Private Function ValidaUsuarioSistema(CveEmpresa As Integer) As Usuario + Private Function ValidaUsuarioSistema(CveEmpresa As Integer, ByVal context As HttpContext) As Usuario Dim UsuarioActual As Usuario = Nothing Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(CveEmpresa) Dim ObjUsuarios As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena) @@ -232,8 +254,13 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa:=CveEmpresa) + If UsuarioActual IsNot Nothing AndAlso context.Session("UsuarioSIG") Is Nothing Then + context.Session("UsuarioSIG") = UsuarioActual + End If End If ObjUsuarios.Dispose() + + Return UsuarioActual End Function Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) @@ -758,8 +785,9 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe End Function #End Region #Region "E N V I O - C O R R E O" - Private Sub EnviarCorreo(Objfactura As Modelos.Factura, UsuarioActual As Usuario) + Private Sub EnviarCorreo(CveVenta As Integer, UsuarioActual As Usuario) Try + Dim ObjFactura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, CargaDatosCliente:=True) Dim Hilo As New System.Threading.Thread(Sub() EnviarCorreoFactura(Objfactura, UsuarioActual)) Hilo.Start() Catch ex As Exception @@ -790,115 +818,94 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe End Function Private Sub EnviarCorreoFactura(ObjFactura As Modelos.Factura, UsuarioActual As Usuario) - Dim ObjMail As New ClsSisMail() - Dim ObjVentas As New ClsVentas - Dim ObjCliente As New ClsClientes - Dim Mail As String = "" - Dim MailCC As String = "" + If ObjFactura.CveVenta > 0 Then + Dim ObjMail As New ClsSisMail() + Dim ObjVentas As New ClsVentas + Dim ObjCliente As New ClsClientes + Dim Mail As String = "" + Dim MailCC As String = "" - Dim ArchivoXML As String = "" - Dim ArchivoPDF As String = "" - Dim ArchivoPDFBytes As Byte() = Nothing - Dim ExistePDF As Boolean = False - Try - ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) - ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) - - If Not File.Exists(ArchivoPDF) Then - ArchivoPDFBytes = DescargarFactura(ObjFactura.CveVenta, ObjFactura.CveEmpresa) - Else - ExistePDF = True - End If - - If ObjFactura.CveClienteSucursal > 0 Then - If ObjCliente.GetSucursales(ObjFactura.CveCliente, ObjFactura.CveClienteSucursal) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString - If Correo.Trim.Length > 0 Then - Mail = Correo - End If - MailCC = ObjCliente.NotificarA - End If - End If - Else - If ObjCliente.GetClientes(ObjFactura.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, TipoCliente:=-1) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - Mail = If(ObjFactura.TipoDocto = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail) - End If - End If - End If - - Catch ex As Exception - OnError("Ocurrió un error al obtener el correo", ex) - Finally - ObjCliente.Dispose() - End Try - - If Not String.IsNullOrEmpty(Mail) Then + Dim ArchivoXML As String = "" + Dim ArchivoPDF As String = "" + Dim ArchivoPDFBytes As Byte() = Nothing + Dim ExistePDF As Boolean = False Try - Dim Asunto As String = String.Empty - Dim Cuerpo As String = String.Empty - Dim ResultadoMail As Integer = 0 + ArchivoXML = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) + ArchivoPDF = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) - Dim TipoComprobante As String = "" - - If ObjFactura.TipoDocto = "Ing" Then TipoComprobante = "Factura" - If ObjFactura.TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito" - If ObjFactura.TipoDocto = "Dev" Then TipoComprobante = "Nota de Devolución" - If ObjFactura.TipoDocto = "Rem" Then TipoComprobante = "Remisión" - If ObjFactura.TipoDocto = "Cot" Then TipoComprobante = "Cotización" - If ObjFactura.TipoDocto = "Ant" Then TipoComprobante = "Anticipo" - - If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then - Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta - Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) - Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial) - Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) - Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy")) - Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.ToString) - Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy")) - Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) - End If - - If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then - Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta - Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) - Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto) - Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio) - End If - - Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoXML}) - If ExistePDF Then - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoPDF}) + If Not File.Exists(ArchivoPDF) Then + ArchivoPDFBytes = DescargarFactura(ObjFactura.CveVenta, ObjFactura.CveEmpresa) Else - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = ArchivoPDFBytes, .NombreArchivo = String.Format("{0}.pdf", ObjFactura.SerieFolio)}) + ExistePDF = True End If - Dim DisplayName As String = "" - If UsuarioActual.CveEmpresa = 119 Then DisplayName = "Facturación Agroquímicos JAM" - - If ObjMail.SendMail(UsuarioActual.Empresa, Mail, Asunto, Cuerpo, If(String.IsNullOrEmpty(MailCC), "", MailCC), LSRutasMail, Displayname:=DisplayName) Then - ResultadoMail = 1 + If ObjFactura.CveClienteSucursal > 0 Then + If ObjCliente.GetSucursales(ObjFactura.CveCliente, ObjFactura.CveClienteSucursal) Then + If ObjCliente.DtResultados.Rows.Count > 0 Then + Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString + If Correo.Trim.Length > 0 Then + Mail = Correo + End If + MailCC = ObjCliente.NotificarA + End If + End If Else - GuardaLogFacturacion($"No se envio el correo {Mail}, {Asunto}, {Cuerpo}, {MailCC},") - GuardaLogFacturacion($"Ruta XML {ArchivoXML}") - ResultadoMail = 3 + If ObjCliente.GetClientes(ObjFactura.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, TipoCliente:=-1) Then + If ObjCliente.DtResultados.Rows.Count > 0 Then + Mail = If(ObjFactura.TipoDocto = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail) + End If + End If End If - ObjVentas.UpdateVentaMail(ResultadoMail, ObjFactura.CveVenta) + 'Mail = "japmx95@gmail.com" Catch ex As Exception - OnError("Ocurrió error al mandar el Mail", ex) - GuardaLogFacturacion(ex.ToString()) - ObjVentas.UpdateVentaMail(3, ObjFactura.CveVenta) + OnError("Ocurrió un error al obtener el correo", ex) Finally - ObjVentas.Dispose() - If ObjFactura IsNot Nothing Then - ObjFactura.Dispose() - End If + ObjCliente.Dispose() End Try + + If Not String.IsNullOrEmpty(Mail) Then + Try + Dim ObjCuerpoMail = ClsPaginas.PlantillaMailVenta(ObjFactura, UsuarioActual) + + Dim Asunto As String = ObjCuerpoMail.Asunto + Dim Cuerpo As String = ObjCuerpoMail.Cuerpo + Dim ResultadoMail As Integer = 0 + Dim LSRutasMail = ObjCuerpoMail.Archivos + + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoXML}) + If ExistePDF Then + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoPDF}) + Else + LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = ArchivoPDFBytes, .NombreArchivo = String.Format("{0}.pdf", ObjFactura.SerieFolio)}) + End If + + Dim DisplayName As String = ObjCuerpoMail.DisplayName + + If ObjMail.SendMail(UsuarioActual.Empresa, Mail, Asunto, Cuerpo, If(String.IsNullOrEmpty(MailCC), "", MailCC), LSRutasMail, Displayname:=DisplayName) Then + ResultadoMail = 1 + Else + GuardaLogFacturacion($"No se envio el correo {Mail}, {Asunto}, {Cuerpo}, {MailCC},") + GuardaLogFacturacion($"Ruta XML {ArchivoXML}") + ResultadoMail = 3 + End If + + ObjVentas.UpdateVentaMail(ResultadoMail, ObjFactura.CveVenta) + + Catch ex As Exception + OnError("Ocurrió error al mandar el Mail", ex) + GuardaLogFacturacion(ex.ToString()) + ObjVentas.UpdateVentaMail(3, ObjFactura.CveVenta) + Finally + ObjVentas.Dispose() + If ObjFactura IsNot Nothing Then + ObjFactura.Dispose() + End If + End Try + End If End If + End Sub #End Region From 63fe94f35dc36171803f75ba3c1b6319607e2daa Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 21 Mar 2025 18:08:07 -0700 Subject: [PATCH 17/20] E194. Formato de Salida de almacen. E189. Correcion formato factura --- Compras/PopUpVerFactura.aspx.vb | 20 ++++++++++++--- Empresas/189/Formatos/Factura.mrt | 42 +++++++++++++++---------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 8922c3ac0..b8d896db9 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2893,7 +2893,7 @@ Partial Class PopUpVerFactura Dim ResponsableRecibio As String = ObjInventarios.ResponsableRecibio Dim UsuarioCapturo As String = ObjInventarios.DtResultados.FiltroPrimeroValor("UsuarioCapturo") Dim CvePrePoliza As Integer = ObjInventarios.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero - + Dim DireccionCliente As String = ObjInventarios.DtResultados.FiltroPrimeroValor("DireccionCliente") Dim Ruta As String = "" Dim Supervisor As String = "" @@ -3098,7 +3098,7 @@ Partial Class PopUpVerFactura PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego, CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo, - Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola) + Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola, DireccionCliente:=DireccionCliente) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -3117,7 +3117,7 @@ Partial Class PopUpVerFactura EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "", - Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1") + Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1", Optional DireccionCliente As String = "") Select Case CveConcepto @@ -3926,7 +3926,7 @@ Partial Class PopUpVerFactura Observaciones = ObservacionesSolicitud End If - If UsuarioActual.CveEmpresa.Contiene(119, 186) Then + If UsuarioActual.CveEmpresa.Contiene(119, 186, 201) Then If CalleOrigen.Length > 0 Then SBDireccionO.AppendFormat("{0}", CalleOrigen) If NoExtOrigen.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", NoExtOrigen) @@ -3978,6 +3978,18 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CveVentaDetalle", DtMovimientos(0)("CveVentaDetalle").ToString)) params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString)) + ElseIf UsuarioActual.CveEmpresa = 201 Then + params.Add(New ReportParameter("AlmacenOrigen", Almacen)) + params.Add(New ReportParameter("AlmacenDestino", "")) + params.Add(New ReportParameter("DireccionCliente", DireccionCliente)) + params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text + params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString)) + params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString)) + params.Add(New ReportParameter("CveVentaDetalle", DtMovimientos(0)("CveVentaDetalle").ToString)) + params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) + params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString)) + + NombreArchivo = String.Format("Saldia del sistema - {0}", Folio) Else params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString)) diff --git a/Empresas/189/Formatos/Factura.mrt b/Empresas/189/Formatos/Factura.mrt index ce6d370c0..e71c26bfa 100644 --- a/Empresas/189/Formatos/Factura.mrt +++ b/Empresas/189/Formatos/Factura.mrt @@ -192,7 +192,7 @@ True Transparent - 0.2,-0,6,2.4 + 0.2,0,6,2.4 68, 114, 196 @@ -1155,7 +1155,6 @@ iigAooooAKKKKAP/2Q== Text6 - OnlyLastPage {ImporteLetra} Black Expression @@ -1285,7 +1284,6 @@ iigAooooAKKKKAP/2Q== DataBand8 - OnlyLastPage @@ -1312,18 +1310,31 @@ iigAooooAKKKKAP/2Q== Black Expression - + + [227:108:9] + True + 15.6,1.28,5.29,0.14 + + + Arial,10,Regular,Point,False,0 + 2,2,2,2 + Text7 + + + Black + + Transparent True 5.4,1.88,10.25,1.68 Myriad Pro,7,Regular,Point,False,0 + True 2,2,2,2 Textbox26 - OnlyLastPage TERMINOS Y CONDICIONES PARA SOLICITAR DEVOLUCION DE MATERIAL 1.- SE TIENE UN PLAZO DE 30 DIAS A PARTIR DE FECHA FACTURA PARA SOLICITAR DEVOLUCION 2.- PRESENTAR FACTURA DE LA COMPRA @@ -1335,23 +1346,10 @@ iigAooooAKKKKAP/2Q== Black Expression - - [227:108:9] - True - 15.6,1.28,5.29,0.14 - - - Arial,10,Regular,Point,False,0 - 2,2,2,2 - Text7 - - - OnlyLastPage - Black - + False FooterBand1 @@ -6364,10 +6362,10 @@ FUERO DE MI DOMICILIO. LA CANTIDAD DE $ {Total} SON: {(ImporteLetra)}. Stimulsoft.Report.Dll Factura - 12/30/2024 5:44:19 PM + 3/21/2025 12:49:26 PM 7/11/2022 2:49:19 PM - Factura.mrt - 33bb66bee0224df694ddbbead45940b8 + C:\inetpub\wwwSIG\Empresas\189\Formatos\Factura.mrt + e53f4619d7e549e6a19a6047fc704c17 Factura Centimeters 2022.4.5.0 From 05f985a6391cb48db9b6b6bc6a5e183813e03e24 Mon Sep 17 00:00:00 2001 From: caudillochon Date: Fri, 21 Mar 2025 18:43:54 -0700 Subject: [PATCH 18/20] --- Contabilidad/RepGastosCC.aspx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index b3631dbe6..a062ef868 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -123,6 +123,9 @@ table.adssigscroll { } /*END ScrollADS V2*/ + table.GvDatos{ + + } table.GvDatos tr td:nth-child(1){ min-width:300px; /*white-space:nowrap;*/ @@ -213,7 +216,7 @@ table.adssigscroll { From e7c208a4f167ef5032f88a27bea709d3f65f357f Mon Sep 17 00:00:00 2001 From: caudillochon Date: Fri, 21 Mar 2025 18:44:55 -0700 Subject: [PATCH 19/20] ordenamiento --- Contabilidad/RepGastosCC.aspx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Contabilidad/RepGastosCC.aspx b/Contabilidad/RepGastosCC.aspx index a062ef868..c62dbfa85 100644 --- a/Contabilidad/RepGastosCC.aspx +++ b/Contabilidad/RepGastosCC.aspx @@ -216,8 +216,7 @@ table.adssigscroll { + CssClass="table table-striped table-advance table-hover Widthall GvDatos adssigscrollJS tr_order" data-cols="1" data-rows="2" GridLines="None"> From ede50c100478e774d2d4f2d5ed06b3388d82a8d4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 22 Mar 2025 13:25:34 -0700 Subject: [PATCH 20/20] --FIX Rep traspaso solicitud --FIX tipo docto en ventas --- .../Grales/Formatos/RepTraspasoAlmacen.rdlc | 124 ++++++++++++++++-- Ventas/Ventas.aspx.vb | 10 +- 2 files changed, 120 insertions(+), 14 deletions(-) diff --git a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc index 37dd8f1c3..c1ffcb13c 100644 --- a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc @@ -21,6 +21,10 @@ Cantidad System.Double + + CantidadOriginal + System.Decimal + UnidadMedida System.String @@ -93,32 +97,35 @@ 1.69333cm + + 1.29923cm + 1.16467cm - 1.51446cm + 1.17434cm 3.37414cm - 5.82471cm + 6.19513cm 1.53921cm - 1.57859cm + 1.86963cm - 2.32298cm + 2.02533cm 2.21787cm - 2.36613cm + 2.44551cm @@ -237,6 +244,62 @@ + + + + true + true + + + + + C.Orig. + + + + + + + Textbox23 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -582,7 +645,7 @@ - Alm. Origen + Alm.Origen + + + + + + CantidadOriginal + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + @@ -1004,6 +1104,7 @@ @@ -1152,6 +1253,7 @@ + @@ -1171,7 +1273,7 @@ DataSet1 0.17639cm 1.0148cm - 24.56252cm + 25.96481cm @@ -1182,7 +1284,7 @@ 0.67394in