From 6449bb6bd056a9748afcacb6b1fd588cd3486b22 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 May 2024 01:24:46 -0700 Subject: [PATCH 01/44] =?UTF-8?q?OS=20guardar=20en=20historial=20el=20camb?= =?UTF-8?q?io=20de=20t=C3=A9cnico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsOS.vb | 3 ++- Compras/Compras.aspx.vb | 12 +----------- OS/OrdenesServicios.aspx.vb | 30 +++++++++++++++++++++++------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 376513ad8..723c9861d 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -1728,7 +1728,7 @@ Public Class ClsOS Return Retorno End Function - Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuario As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer) As Boolean + Public Function UpdateOrdenesServiciosAsignadas(CveOSDetalle As Integer, CveUsuarioAtendio As Integer, FechaCita As Date, HoraCita As DateTime, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosAsignadasUpdate") @@ -1737,6 +1737,7 @@ Public Class ClsOS .Add("@FechaCita", SqlDbType.Date).Value = FechaCita .Add("@HoraCita", SqlDbType.DateTime).Value = HoraCita .Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle + .Add("@CveUsuarioAtendio", SqlDbType.Int).Value = CveUsuarioAtendio .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2beb02694..ef294b50b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3594,13 +3594,10 @@ Partial Class Compras_Compras End If End If -<<<<<<< HEAD - CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) - CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetIVAConcepto(True, ObjProveedor.DIOTCveTipoOperacion) CargaRetISRConcepto(True, ObjProveedor.DIOTCveTipoOperacion) ->>>>>>> GDiaz 2024.05.21 + LbAgregar.Enabled = True UpPSS.Update() @@ -3647,11 +3644,7 @@ Partial Class Compras_Compras PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago End If -<<<<<<< HEAD -======= - ->>>>>>> GDiaz 2024.05.21 Else Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) End If @@ -3659,9 +3652,6 @@ Partial Class Compras_Compras -<<<<<<< HEAD -======= ->>>>>>> GDiaz 2024.05.21 If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then If ObjProveedor.GetProveedoresEvaluacionPediente(Me.CveProveedor, UsuarioActual.CveEmpresa) Then If ObjProveedor.DtResultados.Rows.Count > 0 Then diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index f04bc0e45..17e266841 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -1866,7 +1866,7 @@ Partial Class OS_OrdenesServicios GvHistorial.DataSource = Nothing End If GvHistorial.DataBind() - ObjGral.Dispose() + UpHistorial.Update() End Sub #End Region @@ -3536,24 +3536,40 @@ Partial Class OS_OrdenesServicios End Class Protected Sub LnkActualizarUsaurioAtendio_Click(sender As Object, e As EventArgs) - Dim ObjOs As New ClsOS - Dim ProcesoOk As Boolean = True + If DdlUsuarioAtendio.SelectedValue.ToEntero > 0 Then + + Dim ObjOS As New ClsOS + ObjOS.IniciaTransacSQL() + + Dim ProcesoOk As Boolean = True + For Each GvRow As GridViewRow In GvPS.Rows - If Not ObjOs.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa) Then + If Not ObjOS.UpdateOrdenesServiciosAsignadas(GvRow.DataKey("CveOSDetalle").ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, MinFecha, DateTime.Parse(MinFecha.ToShortDateString), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then ProcesoOk = False - Alert($"Se presento un error al actualizar el técnico.") Exit For End If Next + If ProcesoOk Then - Alert($"Técnico actualizado correctamenrte a {DdlUsuarioAtendio.SelectedItem.Text}.") + ObjOS.Commit() + Else + ObjOS.RollBack() End If + + ObjOS.Dispose() + + If ProcesoOk Then + Alert($"Se presento un error al actualizar el técnico.") + CargaHistorial() + End If + Else Alert("Debe de seleccionar un ténico para actualziar", TipoMensaje.MsgAdvertencia) End If - ObjOs.Dispose() + + End Sub From b842bf042aa7181957a7b345fd6a84ca32ef5b44 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 31 May 2024 06:05:38 -0700 Subject: [PATCH 02/44] - nuevo parametro Gastosenvio --- App_Code/ClsClientes.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 388078978..c1aeb6b22 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -163,6 +163,7 @@ Public Class ClsClientes Public Property UsaProductoAlterno As Boolean = False Public Property EnDemanda As Boolean = False Public Property EnQuebranto As Boolean = False + Public Property GastosEnvio As Decimal = 0 #End Region @@ -417,6 +418,7 @@ Public Class ClsClientes _UsaProductoAlterno = CBool(Data(0)("UsaProductoAlterno")) _EnDemanda = CBool(Data(0)("UsaProductoAlterno")) _EnQuebranto = CBool(Data(0)("EnQuebranto")) + _GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal End If Retorno = True @@ -535,7 +537,7 @@ Public Class ClsClientes Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False, - Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean + Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -669,6 +671,7 @@ Public Class ClsClientes .Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno .Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda .Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto + .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio End With Try SqlAdapter.Fill(Data) @@ -715,7 +718,7 @@ Public Class ClsClientes Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False, - Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False) As Boolean + Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -859,6 +862,7 @@ Public Class ClsClientes .Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno .Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda .Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto + .Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio End With Try SqlAdapter.Fill(Data) From b143495301d9f4817920ef4778eabb09662391f2 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 31 May 2024 06:05:55 -0700 Subject: [PATCH 03/44] - comisiones sms --- App_Code/ClsVentas.vb | 7 +-- Ventas/RepComisionesSMS.aspx | 82 ++++++++++++++++++++++----------- Ventas/RepComisionesSMS.aspx.vb | 30 ++++++++---- 3 files changed, 82 insertions(+), 37 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6255262da..a90f706f1 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -6899,7 +6899,7 @@ Public Class ClsVentas End Function - Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, Opcion As Integer) As Boolean + Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer, FechaInicioPago As Date, FechaFinPago As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ComisionesMedicasRepGet") @@ -6914,7 +6914,8 @@ Public Class ClsVentas .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta - .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@FechaInicioPago", SqlDbType.Date).Value = FechaInicioPago + .Add("@FechaFinPago", SqlDbType.Date).Value = FechaFinPago End With @@ -6934,7 +6935,7 @@ Public Class ClsVentas #Region "VENTAS MEDICAS COMISIONES ESPECIALES" - Public Function GetComisionesMedicasEsPeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean + Public Function GetComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ComisionesMedicasEspecialesGet") diff --git a/Ventas/RepComisionesSMS.aspx b/Ventas/RepComisionesSMS.aspx index 172a5b8ed..9fce7ed34 100644 --- a/Ventas/RepComisionesSMS.aspx +++ b/Ventas/RepComisionesSMS.aspx @@ -66,8 +66,7 @@
- Fecha Fin: - + Fecha Fin:
@@ -84,32 +83,62 @@
- -
- - -
- - -
- - -
- - -
- - -
- - - +
+ Fecha I. Pago: +
+
+
+ + + + +
+ + + + + + +
+
+ Fecha F. Pago: +
+
+
+ + + + +
+ + + + + + +
@@ -130,7 +159,7 @@ EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> - + @@ -138,14 +167,15 @@ - - + + + diff --git a/Ventas/RepComisionesSMS.aspx.vb b/Ventas/RepComisionesSMS.aspx.vb index 5ec007988..226514bc9 100644 --- a/Ventas/RepComisionesSMS.aspx.vb +++ b/Ventas/RepComisionesSMS.aspx.vb @@ -2,10 +2,7 @@ Option Strict On Imports System.Data -Imports System.Data.Entity Imports Extensiones -Imports Microsoft.EntityFrameworkCore - Partial Class Ventas_RepComisionesSMS Inherits ClsPaginas @@ -62,10 +59,12 @@ Partial Class Ventas_RepComisionesSMS Public Sub CargaDatos() LnkExportar.Visible = False + Dim FechaIPago As Date = If(TxtFechaIPago.Text.ToDate < MinFecha, MinFecha, TxtFechaIPago.Text.ToDate) + Dim FechaFPago As Date = If(TxtFechaFPago.Text.ToDate < MinFecha, MaxFecha, TxtFechaFPago.Text.ToDate) Dim ObjVentas As New ClsVentas - If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then + If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, FechaIPago, FechaFPago) Then GvDatos.DataSource = ObjVentas.DtResultados If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then @@ -76,9 +75,10 @@ Partial Class Ventas_RepComisionesSMS End If ObjVentas.Dispose() - GvDatos.DataBind() + If UsuarioActual.CveVendedor = 0 Then GvDatos.Columns(15).Visible = True 'columna de comisiones de gerente + UpDatos.Update() End Sub @@ -270,7 +270,7 @@ Partial Class Ventas_RepComisionesSMS Dim ObjVentas As New ClsVentas GvComisionesEspeciales.DataSource = Nothing - If ObjVentas.GetComisionesMedicasEsPeciales(-1, -1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetComisionesMedicasEspeciales(-1, -1, UsuarioActual.CveEmpresa) Then GvComisionesEspeciales.DataSource = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -345,7 +345,12 @@ Partial Class Ventas_RepComisionesSMS Dim ObjVentas As New ClsVentas If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then - Alert("Comisión agregada correctamente") + Alert("Comisión agregada correctamente", TipoMensaje.ToastInformacion) + DdlModalPS.SelectedValue = "-1" + DdlModalPS.SelectedValue = "" + DdlModalPS.SelectedText = "" + TxtModalComision.Text = "" + DdlModalPS.Focus() Else errorProceso = True End If @@ -354,7 +359,16 @@ Partial Class Ventas_RepComisionesSMS If Not errorProceso Then CargaComisionesEspeciales() - ReiniciaModalComisionesEspeciales() + 'ReiniciaModalComisionesEspeciales() + End If + + End Sub + + Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("SerieFolio") = "" Then + e.Row.CssClass = "SubTotales" + End If End If End Sub From 2d83c61f88ba3453cf730a4ffb809f7b6dbbd1b4 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 31 May 2024 06:06:25 -0700 Subject: [PATCH 04/44] - registro de caja. cuando no hay facturas. --- Bancos/DepositosCaja.aspx | 10 +++++----- Bancos/DepositosCaja.aspx.vb | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 518ea5655..b24b9059c 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -628,14 +628,14 @@ function txtSumaCuentaRetorno(txt) { debugger; var comision2 = ToDouble($('#C_TxtCuentaRetorno').val()); - if (comision2 > ValorTotalSeleccionado) { - $('#C_TxtCuentaRetorno').val(descuento) - alert("No es posible poner un IVA superior a lo seleccionado") - } else { + //if (comision2 > ValorTotalSeleccionado) { + // $('#C_TxtCuentaRetorno').val(descuento) + // alert("No es posible poner un IVA superior a lo seleccionado") + //} else { saldo = ValorTotalSeleccionado - comision2 + comision - IVA - ComisionIntermediario; $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); descuento = ToDouble($('#C_TxtCuentaRetorno').val()) - } + //} } diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 2f1a1fdcd..c3e8473b4 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -172,13 +172,13 @@ Partial Class Bancos_DepositosCaja Exit Sub End If - + Dim tContador As Integer = 0 For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal Next - If TotalImporte = 0 Then - Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) + If TotalImporte = 0 AndAlso CuentaRetorno <> 0 Then + Alert("Seleccione una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) Exit Sub End If From 36c9f5cc2783cb07da6c84ab528e2255a0ce7023 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 31 May 2024 06:06:44 -0700 Subject: [PATCH 05/44] - cambio tipopago --- UserControl/AddMedico.ascx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UserControl/AddMedico.ascx b/UserControl/AddMedico.ascx index 1a23f6140..9bfc9480e 100644 --- a/UserControl/AddMedico.ascx +++ b/UserControl/AddMedico.ascx @@ -147,11 +147,11 @@
- - 15d próximo mes - 15d próxima quincena + 15d pago a 30d + 15d pago a 15d 7d pago inmediato 2d 15d pago inmediato - 30d próxima quincena + 30d pago a 15d
From d52f844264268eaaede9f03da32e82340bbaea7d Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 31 May 2024 06:07:05 -0700 Subject: [PATCH 06/44] -- redondeo de comparativo --- OC/OC.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 168218ffe..3a7c3dc60 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2313,9 +2313,9 @@ Partial Class OC_OC If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2) dr("RetIVAPorcentaje") = RetIVA - dr("RetIVA") = (RetIVA * Total).RoundSQL(6) + dr("RetIVA") = (RetIVA * Total).RoundSQL(2) dr("RetISRPorcentaje") = RetISR - dr("RetISR") = (RetISR * Total).RoundSQL(6) + dr("RetISR") = (RetISR * Total).RoundSQL(2) dr("CveClasificacion") = CveClasificacion dr("UM") = UM dr("Clasificacion") = Clasificacion @@ -3327,7 +3327,7 @@ Partial Class OC_OC Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA") Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR") - Dim Total As Decimal = (Subtotal - Descuento + IVA + SubTotalIEPS - SubTotalRetIVA - SubTotalRetISR) + Dim Total As Decimal = (Subtotal - Descuento + IVA + SubTotalIEPS - SubTotalRetIVA - SubTotalRetISR).RoundSQL(2) Dim Diferencia As Decimal = (Total - LblTotal.Text.ToDecimal).RoundSQL(2) If Math.Abs(Diferencia) > 0 Then From 3fe6e4a0edc2b6d919d8606f9ae80b89efa7dfae Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 May 2024 12:54:29 -0700 Subject: [PATCH 07/44] RegPrePolizas se vacio Grid al editar pre poliza ya creada --- Compras/Compras.aspx.vb | 6 +++--- Contabilidad/RegPrePolizaS.aspx.vb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ef294b50b..c0c464012 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9780,7 +9780,7 @@ Partial Class Compras_Compras - + Dim TCAnt As Decimal = If(DdlMoneda.SelectedValue = "1", 1, If(CveCompra > 0, LblTC.Text.ToDecimal, TxtTC.Text.ToDecimal)) If UsuarioActual.Empresa.CveEmpresa.Contiene(13, 83) Then @@ -9792,7 +9792,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text), + TCAnt, e.Row.FCTextBox("TxtComision").ClientID )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO @@ -9824,7 +9824,7 @@ Partial Class Compras_Compras e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TCCompra").ToDouble, DdlMoneda.SelectedValue, - IIf(DdlMoneda.SelectedValue = "1", 1, TxtTC.Text) + TCAnt )) 'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO e.Row.FCTextBox("TxtAnticipo").Attributes.Add("onKeyUp", String.Format("FnCambiaAnt({0},this,{1},{2},{3},{4},{5});", diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index ab4a57400..07148d380 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1690,7 +1690,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then Dim x As Integer = 0 For Each gvRow As GridViewRow In GvMov.Rows @@ -1769,7 +1769,7 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientos.AcceptChanges() - If DdlPlantilla.SelectedValue.ToEntero <> 53 Then + If DdlPlantilla.SelectedValue.ToEntero <> 53 And Not CvePrePoliza > 0 Then GvMov.DataSource = DtMovimientos GvMov.DataBind() GvPrePoliza.DataBind() From 1a675098036e178de008b133b8ce6ac4134ee850 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 31 May 2024 16:01:44 -0700 Subject: [PATCH 08/44] Candado de depositos de caja. no permitir si hay pendientes de pagar. --- Bancos/DepositosCaja.aspx.vb | 59 ++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index c3e8473b4..e99be126b 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -157,6 +157,11 @@ Partial Class Bancos_DepositosCaja Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click + + If Not Validaciones() Then + Exit Sub + End If + Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal Dim Comision As Decimal = TxtComision.Text.ToDecimal @@ -465,8 +470,58 @@ Partial Class Bancos_DepositosCaja lblValorTotalSeleccionado.Text = "0.0" CargaDatos() ObjConta.Dispose() - End Sub - + End Sub + + Private Function Validaciones() As Boolean + + Dim Respuesta As Boolean = True + + If Not ValidaCobranza() Then + Respuesta = False + End If + + Return Respuesta + + End Function + + + Private Function ValidaCobranza() As Boolean + Dim Respuesta As Boolean = False + + If UsuarioActual.CveEmpresa.Contiene(195) Then + + Dim ObjMovtos As New ClsMovimientos() + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha).AddDays(1) + + If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, FechaI, FechaF) Then + Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem')") + 'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ") + 'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta + + If dtt.Rows.Count = 0 Then + Respuesta = True + Else + Respuesta = False + Alert("Se detectaron cobros pendientes.", TipoMensaje.MsgAdvertencia) + End If + + Else + Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia) + Respuesta = False + End If + + ObjMovtos.Dispose() + + Else + Respuesta = True + End If + + Return Respuesta + End Function + + Private Sub ObtenerTotalImporta() Dim Total As Double = 0 From 27c325e5ada7d64c3bb1b535efa43cfb65475779 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 May 2024 19:33:23 -0700 Subject: [PATCH 09/44] --Unificacion de reporte de cortes --- App_Code/ClsPuntoVenta.vb | 46 +++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index cc16fe654..a376c0d50 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -17,19 +17,25 @@ Public Class ClsPuntoVenta Private SqlCommand As SqlCommand Private SqlTransacc As SqlTransaction Private Data As DataTable + Private Dataset As DataSet 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes 'PARA REGISTRAR CONEXION - Private CveConexion As Integer = 0 - + Private CveConexion As Integer = 0 + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get DtResultados = Data End Get + End Property + Public ReadOnly Property DataSetResultados() As DataSet + Get + DataSetResultados = Dataset + End Get End Property Public Property CveCorte As Integer @@ -245,6 +251,37 @@ Public Class ClsPuntoVenta Return Retorno End Function + ''' + ''' Desglose del reporte de cortes, resumen e IVA + ''' + ''' + ''' + ''' + ''' + ''' + Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_ReporteCortesDetalleGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Opcion", SqlDbType.Int).Value = Opcion + End With + + Try + Dataset = New DataSet() + SqlAdapter.Fill(Dataset) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los detalle de cortes", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + 'Public Function GetCortesPorCuenta(CveCuenta As Integer, CveEmpresa As Integer) As Boolean ' Dim Retorno As Boolean = False @@ -450,7 +487,8 @@ Public Class ClsPuntoVenta If Not Me.disposedValue Then If disposing Then ' TODO: dispose managed state (managed objects). - If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Data Is Nothing Then Data.Dispose() : Data = Nothing + If Not Dataset Is Nothing Then Dataset.Dispose() : Dataset = Nothing If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing From 1877e57ebaade64abff87611178e75a0dc72f908 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 31 May 2024 19:33:56 -0700 Subject: [PATCH 10/44] --Tipo de producto servicio adicional --- App_Code/ClsProductosServicios.vb | 8 +- Ventas/ProductosServicios.aspx | 136 ++++++++++++++++-------------- Ventas/ProductosServicios.aspx.vb | 16 +++- 3 files changed, 89 insertions(+), 71 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 17d7860aa..65d76357c 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1052,7 +1052,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal) As Boolean + Public Function AddPSAdicionales(CvePS As Integer, CvePSAdicional As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesAdd") @@ -1061,7 +1061,7 @@ Public Class ClsProductosServicios .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try @@ -1081,7 +1081,7 @@ Public Class ClsProductosServicios Return Retorno End Function - Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal) As Boolean + Public Function UpdatePSAdicionales(CvePS As Integer, CvePSAdicional As Integer, CvePSAdicionalAnterior As Integer, Cantidad As Decimal, Tipo As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ProductosServiciosAdicionalesUpdate") @@ -1091,7 +1091,7 @@ Public Class ClsProductosServicios .Add("@CvePSAdicional", SqlDbType.Int).Value = CvePSAdicional .Add("@CvePSAdicionalAnterior", SqlDbType.Int).Value = CvePSAdicionalAnterior .Add("@Cantidad", SqlDbType.Money).Value = Cantidad - + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo End With Try diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index d551e714c..ce4071fea 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -80,9 +80,9 @@
  • -
  • - -
  • +
  • + +
  • @@ -358,7 +358,6 @@
    - a
    @@ -482,7 +481,7 @@
    - + @@ -642,7 +641,7 @@
    - Cargar Archivo + Cargar Archivo
    @@ -823,7 +822,7 @@ -
    - -
    - - -
    -
    + +
    + + +
    +

    @@ -1421,7 +1420,7 @@
    - +
    @@ -1449,7 +1448,7 @@ ValidationGroup="GrpGuardar">
    - + @@ -2091,44 +2090,44 @@ @@ -4618,15 +4615,28 @@
    -
    +
    +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
    -
    @@ -4669,10 +4679,7 @@ - - - - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 47e6963ce..10b2f1556 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1699,8 +1699,11 @@ Partial Class Clientes ' ActivarRegistroAutomatico() 'End If - - '7eleven + ChkEnQuebranto.Checked = ObjClientes.EnQuebranto + ChkEnDemanda.Checked = ObjClientes.EnDemanda + TxtNombreFirmas.Text = ObjClientes.CreditoRegistroFirmas + + '7eleven TxtProveedor.Text = ObjClientes.SevenEleven_NumProveedor 'FORD @@ -2668,7 +2671,8 @@ Partial Class Clientes RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito, - Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then + Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked, + EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then ErrorProceso = True diff --git a/Ventas/RepVencimientosCredito.aspx b/Ventas/RepVencimientosCredito.aspx index 6e137229f..c29f49f8f 100644 --- a/Ventas/RepVencimientosCredito.aspx +++ b/Ventas/RepVencimientosCredito.aspx @@ -77,13 +77,12 @@
    -
    Estatus:
    +
    Tipo Linea:
    - - - <%-- --%> - - + + + +
    Agrupador:
    diff --git a/Ventas/RepVencimientosCredito.aspx.cs b/Ventas/RepVencimientosCredito.aspx.cs index bcd923158..2bb092c17 100644 --- a/Ventas/RepVencimientosCredito.aspx.cs +++ b/Ventas/RepVencimientosCredito.aspx.cs @@ -1,6 +1,4 @@ using System; using System.Web.UI.WebControls; using Extensiones; using System.Data; using static Extensiones.ModExtensiones; -using System.Collections.Generic; -using System.IO; using System.Web.UI; @@ -66,17 +64,15 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas private void InicializaValores() { - txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString(); DdlClientes.setEsWebService(true); DdlClientes.Attributes.Add("data-metodo", "getcliente"); DdlClientes.SelectedText = "Todos"; - DdlClientes.SelectedValue = "-1"; - + DdlClientes.SelectedValue = "-1"; } - protected void BtnConsultar_Click(object sender, EventArgs e) { CargaDatos(); @@ -89,7 +85,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas ClsVentas objVentas = new ClsVentas(); - if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa)) + if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), DdlTipoLinea.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), -1, UsuarioActual.CveEmpresa)) { GvD.DataSource = objVentas.DtResultados; @@ -104,99 +100,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas GvD.DataBind(); UpLineasAdicionales.Update(); } - - - protected void LnkCargarComprobante_Click(object sender, EventArgs e) - { - GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer; - - CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero(); - CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero(); - LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString(); - - RegistraScript("$('#ModalComprobante').modal('show');",""); - } - - + protected void LnkDescargaExcel_Click(object sender, EventArgs e) - { - if(TipoLinea == 1) - { - GridView gvTemp = GvD; - //gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString()); - gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150); - } + { + GridView gvTemp = GvD; + //gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString()); + gvTemp.ExportToExcelGembox("RepVencimientos", UsuarioActual, "Rep Vencimientos de líneas", AnchoImagen: 150); + } - - protected void GvLAPO_RowDataBound(object sender, GridViewRowEventArgs e) - { - if (e.Row.RowType == DataControlRowType.DataRow) - { + - LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus"); - LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante"); - LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante"); + public override void VerifyRenderingInServerForm(Control control) { } - if (e.Row.DataKey("CveLineaAdicional")=="") - { - if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "") - { - e.Row.CssClass = "SubTotales2"; - if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "") - { - e.Row.Cells[0].Text = ""+ e.Row.DBCampo("Proveedor") +""; - } - } - else - { - e.Row.CssClass = "SubTotales"; - } - LnkCambiarEstatus.Visible = false; - LnkCargarComprobante.Visible = false; - LnkDescargaComprobante.Visible = false; - } - else - { - if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1) - { - - if (UsuarioActual.TienePermisoProceso(356)) LnkCambiarEstatus.Visible = true; - LnkCargarComprobante.Visible = true; - } - - if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0) - { - FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}"); - - if (fi.Exists) - { - LnkDescargaComprobante.Visible = true; - ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante); - } - } - } - } - } - - protected void LnkDescargaComprobante_Click(object sender, EventArgs e) - { - GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer; - string Comprobante = GvRow.DataKey("LineaAdicionalComprobante"); - FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}"); - - if (fi.Exists) - { - Response.Clear(); - Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name); - Response.AddHeader("Content-Length", fi.Length.ToString()); - Response.ContentType = "text/octet-stream"; - Response.Flush(); - Response.TransmitFile(fi.FullName); - Response.End(); - } - } - - - } \ No newline at end of file From c79e0b4333a0dee31475e8930e629976c98fbdb5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 1 Jun 2024 08:49:40 -0700 Subject: [PATCH 25/44] =?UTF-8?q?--=20correcci=C3=B3n=20de=20impresi=C3=B3?= =?UTF-8?q?n=20de=20corte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/PopUpVerFactura.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 76933f943..9fcf9bf02 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1592,6 +1592,7 @@ Partial Class PopUpVerFactura If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0") + Fecha = DtReporteCorte.FiltroPrimeroValor("FechaInicial", "") End If If ObjVenta.GetVta_MovimientosCajas(CveCorte, -1) Then From 7690f1c647f2d34e569508fb440c5f83c614866d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 1 Jun 2024 08:49:59 -0700 Subject: [PATCH 26/44] -- cambio de clase de clspv a clsventas --- Ventas/PV.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index e9407e7b2..b934d58fc 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2290,7 +2290,7 @@ Partial Class PV ObjPVenta.Dispose() End Sub Private Sub CargaEntradasSalidas() - Dim ObjPVenta As New ClsPuntoVenta + Dim ObjPVenta As New ClsVentas 'Salida If ObjPVenta.GetVta_MovimientosCajas(CveCorte, 0) Then From e915ede5750b7e72c37fb096e1919a2869e70b4a Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 1 Jun 2024 11:10:51 -0700 Subject: [PATCH 27/44] -- colorea en rojo la dif, en poriva vs el total vendido --- Bancos/RepCortes.aspx.vb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 0ab594189..a735475e7 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -230,6 +230,13 @@ Partial Class Bancos_RepCortes If UsuarioActual.CveEmpresa.Contiene(190, 192) Then DivIVA.Visible = True GvPorIVA.DataSource = DsDatos.Tables(2) + Dim tsum As Decimal = DsDatos.Tables(2).SUMD("IVA16") + DsDatos.Tables(2).SUMD("IVA0") + If Math.Abs(tsum - DtCortesVentasResumen.MAX("Importe").ToDecimal) > 1 Then + GvPorIVA.ForeColor = Drawing.Color.Red + GvPorIVA.ToolTip = (tsum - DtCortesVentasResumen.MAX("Importe").ToDecimal).ToString + Else + GvPorIVA.ForeColor = Drawing.Color.Black + End If End If End If From 8e57bc4bd0d07ab253c51cc60055b7548022ee61 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 3 Jun 2024 16:25:05 -0700 Subject: [PATCH 28/44] Grupo Diaz 2024.05.31 --- App_Code/ClsBancos.vb | 12 +- Bancos/PopIEVentas.aspx | 40 +- Bancos/PopIEVentas.aspx.vb | 23 +- Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc | 2645 ++++++++++--------- Inventarios/EntregaAlmacen.aspx.vb | 2 +- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 7 + Ventas/ClientesAbonar.aspx | 74 +- Ventas/ClientesAbonar.aspx.vb | 25 +- Ventas/RepAnticipo-NC-IXC.aspx | 17 +- Ventas/RepAnticipo-NC-IXC.aspx.cs | 9 +- Ventas/RepVentasUtilidadPadre.aspx | 3 + Ventas/RepVentasUtilidadPadre.aspx.vb | 2 +- 13 files changed, 1569 insertions(+), 1292 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 40d578ba6..aeab054b8 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1106,9 +1106,16 @@ Public Class ClsBancos dttpagosimpuestos = DtResultados End If + + Dim FechaPago As Date = dr("FechaDocumento").ToString.ToDate + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + FechaPago = dr("FechaEmision").ToString.ToDate + End If + Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal, RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, - dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, + FechaPago, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, UsuarioActual.Empresa.CP, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado, RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString) @@ -1480,7 +1487,7 @@ Public Class ClsBancos Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1, - Optional AnticipoPuntual As Boolean = False) As Integer + Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Banc_IEAdd") @@ -1522,6 +1529,7 @@ Public Class ClsBancos .Add("@CveOCAnticipo", SqlDbType.Int).Value = CveOCAnticipo .Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago .Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual + .Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision End With Try diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index e2eb1826e..02fb8830b 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -535,10 +535,44 @@ - - diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 1b32c63d8..f8f7db127 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1110,6 +1110,18 @@ Partial Class Bancos_PopIEVentas #Region "G U A R D A R" Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click + Dim FechaEmision As Date = MinFecha + + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + FechaEmision = TxtFechaEmision.Text.ToDate + + If FechaEmision <= MinFecha Then + Alert("Fecha de Emisión no valida", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + If ChkComplementoPago.Checked Then Dim objGral As New ClsGralFolios Dim SalirDeMetodo As Boolean = False @@ -1248,7 +1260,9 @@ Partial Class Bancos_PopIEVentas Select Case RBLContado.SelectedValue Case "1" ' Banco - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte) + CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", + True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, + Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte, FechaEmision:=FechaEmision) If CveIE > 0 Then Pago.ImportePago = ImportePagado @@ -1523,4 +1537,11 @@ Partial Class Bancos_PopIEVentas End Sub + + Protected Sub ChkComplementoPago_CheckedChanged(sender As Object, e As EventArgs) + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then + DvFechaEmision.Visible = ChkComplementoPago.Checked + UpGuardar.Update() + End If + End Sub End Class \ No newline at end of file diff --git a/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc b/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc index 8e9f7001e..af774b409 100644 --- a/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc +++ b/Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc @@ -1,1273 +1,5 @@  - - - - - - - - - - - true - true - - - - - Cliente - - - - - - - Textbox28 - - - - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 1.4429cm - - - 1.39526cm - - - 1.23593cm - - - 1.42752cm - - - 1.53107cm - - - 1.35467cm - - - 1.34587cm - - - 1.52634cm - - - 1.22649cm - - - - - 0.46771cm - - - - - true - true - - - - - =Fields!OriginalAnticipos.Value - - - - - - - OriginalAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoAnticipos.Value - - - - - - - AplicadoAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalAnticipos.Value - - - - - - - TotalAnticipos - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!OriginalNC.Value - - - - - - - OriginalNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoNC.Value - - - - - - - AplicadoNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalNC.Value - - - - - - - TotalNC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!OriginalIXC.Value - - - - - - - OriginalIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!AplicadoIXC.Value - - - - - - - AplicadoIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TotalIXC.Value - - - - - - - TotalIXC - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox6 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox4 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox40 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox13 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox15 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox42 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Original - - - - - - - Textbox17 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Aplicado - - - - - - - Textbox19 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - true - true - - - - - Saldo - - - - - - - Textbox44 - - - Gray - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 7.10109cm - - - true - true - - - - - =IIF(CInt(Fields!CveCliente.Value) < 1, IIF(CInt(Fields!CveMoneda.Value) = 1, "Total Pesos", "Total Dolares"), Fields!NombreComercial.Value) - - - - - - - Folio - - - =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - DataSet1 - 1.71125cm - 0.06614cm - 0.93542cm - 19.58715cm - - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - - Textbox1 - 0.07056cm - 0.06614cm - 0.58236cm - 19.58715cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Anticipos - - - - - - - Textbox22 - 1.04069cm - 7.16723cm - 0.6cm - 4.03881cm - 2 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - NC X Aplicar - - - - - - - Textbox22 - 1.04069cm - 11.24132cm - 0.6cm - 4.27799cm - 3 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ingresos X Comprobar - - - - - - - Textbox22 - 1.04069cm - 15.55459cm - 0.6cm - 4.0987cm - 4 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - 1.10756in - - - - - - - Textbox1 - 2.43857cm - 0.6cm - 14.68354cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE ANTICIPOS - NC X APLICAR - INGRESOS X COMPROBAR - - - - - - - - - - - - - - - - Textbox2 - 0.63528cm - 2.40329cm - 0.52945cm - 14.68354cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 2 - - - - - - - - - - - 1.08126cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.40041cm - 16.97887cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox28 + + + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.4429cm + + + 1.39526cm + + + 1.23593cm + + + 1.42752cm + + + 1.53107cm + + + 1.35467cm + + + 1.34587cm + + + 1.52634cm + + + 1.22649cm + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!OriginalAnticipos.Value + + + + + + + OriginalAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoAnticipos.Value + + + + + + + AplicadoAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalAnticipos.Value + + + + + + + TotalAnticipos + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!OriginalNC.Value + + + + + + + OriginalNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoNC.Value + + + + + + + AplicadoNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalNC.Value + + + + + + + TotalNC + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!OriginalIXC.Value + + + + + + + OriginalIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AplicadoIXC.Value + + + + + + + AplicadoIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TotalIXC.Value + + + + + + + TotalIXC + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox6 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox4 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox40 + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox13 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox15 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox42 + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Original + + + + + + + Textbox17 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Aplicado + + + + + + + Textbox19 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Saldo + + + + + + + Textbox44 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 7.10109cm + + + true + true + + + + + =IIF(CInt(Fields!CveCliente.Value) < 1, IIF(CInt(Fields!CveMoneda.Value) = 1, "Total Pesos", "Total Dolares"), Fields!NombreComercial.Value) + + + + + + + Folio + + + =IIF(CInt(Fields!CveCliente.Value) < 1, "CornflowerBlue", "Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + DataSet1 + 1.71125cm + 0.06614cm + 0.93542cm + 19.58714cm + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox1 + 0.07056cm + 0.06614cm + 0.58236cm + 19.58715cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ingresos X Comprobar + + + + + + + Textbox22 + 1.04069cm + 15.55459cm + 0.6cm + 4.0987cm + 2 + + =IIF(Parameters!MostarIngresosxComprobar.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + true + + + + + Anticipos + + + + + + + Textbox22 + 0.6cm + 4.03881cm + + =IIF(Parameters!MostarAnticipos.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + true + 1.04069cm + 7.20603cm + 0.6cm + 4.03881cm + 3 + + + + + + + + true + + + + + NC X Aplicar + + + + + + + Textbox22 + 0cm + 0.6cm + 4.27799cm + + =IIF(Parameters!MostarNCxAplicar.Value = "0",True,False) + + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + true + 1.04069cm + 11.26954cm + 0.6cm + 4.27799cm + 4 + + + + + + 1.46173in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE ANTICIPOS - NC X APLICAR - INGRESOS X COMPROBAR + + + + + + + + + + + + + + + + Textbox2 + 0.63528cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.08126cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + @@ -29,7 +35,7 @@ - +
    @@ -125,6 +131,15 @@
    +
    + +
    +
    + +
    +
    + +
    diff --git a/Ventas/RepAnticipo-NC-IXC.aspx.cs b/Ventas/RepAnticipo-NC-IXC.aspx.cs index 2cd819006..021cee834 100644 --- a/Ventas/RepAnticipo-NC-IXC.aspx.cs +++ b/Ventas/RepAnticipo-NC-IXC.aspx.cs @@ -146,7 +146,14 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); - para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); + para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); + + + + para.Add(new ReportParameter("MostarAnticipos", ChkAnticipos.Checked ?"1":"0" )); + para.Add(new ReportParameter("MostarNCxAplicar", ChkNCxAplicar.Checked ? "1" : "0")); + para.Add(new ReportParameter("MostarIngresosxComprobar", ChkIngresosxComprobar.Checked ? "1" : "0")); + if (Imagen.Exists) { para.Add(new ReportParameter("LogoPath", logouri)); diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index 0b3c08446..c3d496d27 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -233,6 +233,9 @@ + + + diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index ebf3144c8..2e58d4ef0 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) e.Row.Cells(0).Text = String.Format("{2}", Css, Liga, e.Row.Cells(0).Text) Else - e.Row.Cells(10).BackColor = Drawing.Color.LightGray + e.Row.Cells(12).BackColor = Drawing.Color.LightGray End If From 8fdf1c8c1561823ef9cc9fb380d0e775fb836af8 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 3 Jun 2024 18:06:46 -0700 Subject: [PATCH 29/44] --parametro de consulta de iva --- App_Code/ClsVentas.vb | 3 ++- Bancos/RepCortes.aspx.vb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 46e5dd0e2..bcddd23b2 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3481,7 +3481,7 @@ Public Class ClsVentas ''' ''' ''' - Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean + Public Function GetVta_ReporteCortesDetalle(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Opcion As Integer, Optional ConsultaIVA As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_ReporteCortesDetalleGet") @@ -3491,6 +3491,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Opcion", SqlDbType.Int).Value = Opcion + .Add("@ConsultaIVA", SqlDbType.Bit).Value = ConsultaIVA End With Try diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 0ab594189..0143f8297 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -214,7 +214,7 @@ Partial Class Bancos_RepCortes 'End If Dim ObjVentas As New ClsVentas - If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then + If ObjVentas.GetVta_ReporteCortesDetalle(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion:=2, ConsultaIVA:=UsuarioActual.CveEmpresa.Contiene(190, 192)) Then Dim DsDatos = ObjVentas.DataSetResultados.Copy() If DsDatos IsNot Nothing Then 'DESGLOSE From 75ab9af48b1a372b74f941aaa0d54dfd040cceb9 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 4 Jun 2024 10:55:57 -0700 Subject: [PATCH 30/44] EMD - poder registrar compra manual, como cuando es reembolso. --- Bancos/DepositosCaja.aspx.vb | 4 ++-- Compras/Compras.aspx.vb | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index e99be126b..7542fe598 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -488,7 +488,7 @@ Partial Class Bancos_DepositosCaja Private Function ValidaCobranza() As Boolean Dim Respuesta As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(195) Then + If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then Dim ObjMovtos As New ClsMovimientos() Dim FechaI, FechaF As Date @@ -504,7 +504,7 @@ Partial Class Bancos_DepositosCaja Respuesta = True Else Respuesta = False - Alert("Se detectaron cobros pendientes.", TipoMensaje.MsgAdvertencia) + Alert("No se puede realizar el depósito, ya que hay cobros pendientes por aplicar.", TipoMensaje.MsgAdvertencia) End If Else diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7f44dc9dc..8410b48e6 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -11735,7 +11735,42 @@ Partial Class Compras_Compras End Sub Protected Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged CambiaTipoPago(True) + + ValidaPagoSinXML() + End Sub + + Private Sub ValidaPagoSinXML() + + If CveFactura <= 0 And CveCompra <= 0 Then + + If UsuarioActual.Empresa.Funcionalidad(123) <> "" And Not UsuarioActual.TienePermisoProceso(156) Then + If Not ValidaCierrePeriodo() Then + Alert("El periodo de la compra actual ya se encuentra cerrado. No podra registrar la compra.", TipoMensaje.MsgAdvertencia) + BtnGuardar.Visible = False + UpFacturar.Update() + Exit Sub + End If + End If + + If UsuarioActual.TienePermisoProceso(365) Then + + BtnGuardar.Visible = False + + If RBLPago.SelectedValue.ToEntero = 3 Then + BtnGuardar.Visible = True + End If + + Else + BtnGuardar.Visible = True + End If + + End If + + UpFacturar.Update() + + End Sub + Private Sub CambiaTipoPago(MostrarModal As Boolean) DdlPersonalReembolso.Visible = False DdlCuentaCajaChicaReembolso.Visible = False From ea295c2e568cc562b8720283c5714b5cf6a7e0c5 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 4 Jun 2024 17:49:43 -0700 Subject: [PATCH 31/44] =?UTF-8?q?--=20ocultar=20txtiva,=20cuando=20es=20ix?= =?UTF-8?q?c,=20est=C3=A1=20reduciendo=20el=20monto=20para=20aplicar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 14c0c445b..3aa0660a9 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -3636,9 +3636,9 @@ Partial Class Bancos_IE End If 'Apartado Nueva Modalidad de INGPC Charlie - If RBL.SelectedValue = "C" AndAlso Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("INGPC", "DEV") Then - DivIvaIxC.Visible = True - End If + 'If RBL.SelectedValue = "C" AndAlso Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("INGPC", "DEV") Then + ' DivIvaIxC.Visible = True + 'End If UpDatos.Update() From 30cdcfd075b03d14ee73c7cd90f015f97ff3467d Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 4 Jun 2024 17:50:24 -0700 Subject: [PATCH 32/44] =?UTF-8?q?--=20se=20agregaron=20m=C3=A1s=20columnas?= =?UTF-8?q?=20din=C3=A1micos=20para=20pesta=C3=B1a=20de=20subproyectos,=20?= =?UTF-8?q?se=20aument=C3=B3=20al=20doble=20de=20las=20=2055?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RepEstadoResultadosHorizontal.aspx | 171 +++++++++++++++++- .../RepEstadoResultadosHorizontal.aspx.vb | 5 - 2 files changed, 165 insertions(+), 11 deletions(-) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 2182ca3a2..638c42d0f 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -1156,6 +1156,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1244,6 +1299,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1390,6 +1500,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1414,12 +1579,6 @@
    - - - - - - diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index 3b5505acb..3b821ada9 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -4,10 +4,8 @@ Option Strict On Imports System.Data Imports System.Drawing Imports System.IO -Imports DocumentFormat.OpenXml.VariantTypes Imports Extensiones Imports GemBox.Spreadsheet -Imports Microsoft.Reporting.WebForms Partial Class Contabilidad_RepEstadoResultadosHorizontal Inherits ClsPaginas @@ -2149,9 +2147,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim TxtSub As String = GlobalDTSubProyectos(-1, CveSubProyecto:=dColumn.ColumnName.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto") - - - CType(GvIngresosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub CType(GvTotalesSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub CType(GvGastosSubProyectoH.Columns(IndexGv), BoundField).HeaderText = TxtSub From dccd0edb143e8ffe46b89b24b1ee2c3b5ff43fc1 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 4 Jun 2024 18:03:17 -0700 Subject: [PATCH 33/44] =?UTF-8?q?--=20correcci=C3=B3n=20columna?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/RepEstadoResultadosHorizontal.aspx | 3 --- 1 file changed, 3 deletions(-) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 638c42d0f..e253acd5f 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -1211,7 +1211,6 @@ - @@ -1354,7 +1353,6 @@ - @@ -1500,7 +1498,6 @@ - From 5d85e7c9f7c6b9a4f3ad0c055bebf9b1a1bf889d Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 4 Jun 2024 18:03:37 -0700 Subject: [PATCH 34/44] =?UTF-8?q?-=20parametro=20de=20porcentaje=20m=C3=A1?= =?UTF-8?q?ximo=20de=20descuento?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsClasificaciones.vb | 6 ++++-- Ventas/CatClasificaciones.aspx | 6 +++++- Ventas/CatClasificaciones.aspx.vb | 14 +++++++++----- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 5c81d9f0c..6bc2a73ac 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -273,7 +273,7 @@ Public Class ClsClasificaciones End Function Public Function AddClasificaciones(Clasificacion As String, Codigo As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False, - Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean + Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1, Optional PorMaximoDescuento As Decimal = 0) As Boolean Dim Retorno As Boolean = False Me.CveClasificacion = -1 @@ -302,6 +302,7 @@ Public Class ClsClasificaciones .Add("@TopCompras", SqlDbType.Bit).Value = TopCompras .Add("@TopVentas", SqlDbType.Bit).Value = TopVentas .Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto + .Add("@PorMaximoDescuento", SqlDbType.Money).Value = PorMaximoDescuento .Add("@CveClasificacion", SqlDbType.Int).Direction = ParameterDirection.Output @@ -371,7 +372,7 @@ Public Class ClsClasificaciones End Function Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True, - Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean + Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1, Optional PorMaximoDescuento As Decimal = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionesUpdate") @@ -400,6 +401,7 @@ Public Class ClsClasificaciones .Add("@TopCompras", SqlDbType.Bit).Value = TopCompras .Add("@TopVentas", SqlDbType.Bit).Value = TopVentas .Add("@PrecioBaseCosto", SqlDbType.Money).Value = PrecioBaseCosto + .Add("@PorMaximoDescuento", SqlDbType.Money).Value = PorMaximoDescuento End With diff --git a/Ventas/CatClasificaciones.aspx b/Ventas/CatClasificaciones.aspx index 2574ba124..0b5833fb2 100644 --- a/Ventas/CatClasificaciones.aspx +++ b/Ventas/CatClasificaciones.aspx @@ -76,7 +76,7 @@
    + DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto, PorMaximoDescuento" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> @@ -253,6 +253,10 @@
    +
    + + +
    diff --git a/Ventas/CatClasificaciones.aspx.vb b/Ventas/CatClasificaciones.aspx.vb index 23e1657fa..30c3644f3 100644 --- a/Ventas/CatClasificaciones.aspx.vb +++ b/Ventas/CatClasificaciones.aspx.vb @@ -2,7 +2,6 @@ Option Strict On Imports System.Data -Imports System.Linq Imports Extensiones Partial Class CatClasificaciones @@ -96,7 +95,9 @@ Partial Class CatClasificaciones CargaIngresos = True DtCuentasContables = Nothing ClasificacionOriginal = "" - + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + divPorMaxDescuento.Visible = True + End If CargaDdlSATPS() CargaDDLs() @@ -165,7 +166,7 @@ Partial Class CatClasificaciones If HdnModalidadClasificacion.Value = "A" Then If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "", DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, - RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then + RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal, PorMaximoDescuento:=TxtPorMaximoDescuento.Text.ToDecimal) Then ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)") @@ -204,7 +205,7 @@ Partial Class CatClasificaciones If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, - RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then + RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal, PorMaximoDescuento:=TxtPorMaximoDescuento.Text.ToDecimal) Then If UsuarioActual.Empresa.TipoContabilidad = 1 Then If DdlCuentaGasto.SelectedValue.ToEntero > 0 Then If Not objConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 6, DdlCuentaGasto.SelectedValue.ToEntero, CveClasificacion:=CveClasificacion) Then @@ -498,7 +499,10 @@ Partial Class CatClasificaciones TxtPrecioBaseCosto.Text = PrecioBaseCosto.FormatoNumero(2) DdlCategoria.SelectedValueExist(CveCategoria) DdlUsoClasificacion.SelectedValue = UsoClasificacion - HdnIDClasificacion.Value = CveClasificacion + HdnIDClasificacion.Value = CveClasificacion + + TxtPorMaximoDescuento.Text = GvRow.DataKey("PorMaximoDescuento").ToString.ToDecimal.FormatoNumero(2) + If GvRow.DataKey("CveSATPS").ToString <> Nothing Then DdlSATPS.SelectedValue = GvRow.DataKey("CveSATPS").ToString DdlSATPS.SelectedText = GvRow.DataKey("SATClaveProductoServicio").ToString From 54d7842bbec1eacfecb5d2144faa25a303459a4a Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 4 Jun 2024 18:04:04 -0700 Subject: [PATCH 35/44] -- no geenere error de menu. --- Ashx/E141.ashx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 4c914b2eb..bd34dbf6f 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -67,7 +67,7 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe If ObjUsuarios.DtResultados.Rows.Count > 0 Then Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() - UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa:=CveEmpresa) + UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa:=CveEmpresa, GenerarMenu:=False) UsuarioActual.CveEmpresa = CveEmpresa HttpContext.Current.Session("UsuarioSIG") = UsuarioActual CreaObjetoEmpresa(UsuarioActual) From 7323c25a478031063b7d42fc1021d80c728e1658 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 5 Jun 2024 09:49:11 -0700 Subject: [PATCH 36/44] =?UTF-8?q?Compras=20=20Emp=2013,83=20validaci=C3=B3?= =?UTF-8?q?n=20registro=20de=20compra=20sin=20xml,=20=20OC=20solo=20mosrta?= =?UTF-8?q?r=20Proveedores=20activos,=20clientes=20Abonar=20correci=C3=B3n?= =?UTF-8?q?=20tama=C3=B1os=20=20txt=20fecha=20de=20emisi=C3=B3n=20Grupo=20?= =?UTF-8?q?D=C3=ADaz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ashx/SIGWeb.ashx | 15 ++++++++++++++- Bancos/PopIEVentas.aspx | 6 +++++- Compras/Compras.aspx.vb | 5 +++-- OC/OC.aspx.vb | 7 +++++-- Ventas/ClientesAbonar.aspx | 4 ++-- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index e606c32b5..dde388876 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -811,6 +811,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim retorno As String = "" Dim DtRetorno As DataTable = Nothing + Dim Estatus = IfNull(context.Request("estatus"), "-1").ToString.ToEntero + + Dim filtro As String = "" + + If Estatus = 1 Then + filtro = " Estatus = 'Activo' " + End If + + If Estatus = 0 Then + filtro = " Estatus = 'Inactivo' " + End If + + Dim usuario As Usuario = UsuarioActual(context) Dim CveEmpresa As Integer If IsNothing(usuario) Then @@ -819,7 +832,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState CveEmpresa = usuario.CveEmpresa Dim Name = IfNull(context.Request("Name"), "-1").ToString - Dim dt As DataTable = ClsPaginas.GlobalDTCompProveedores(CveEmpresa) + Dim dt As DataTable = ClsPaginas.GlobalDTCompProveedores(CveEmpresa).FiltraParametros(filtro) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name)) End If diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 02fb8830b..7326ad20b 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -7,6 +7,10 @@ .row { margin: 0 -10px; } + .calendar-extender-popup { + position: absolute; + z-index: 10000; /* Asegura que se muestre sobre otros elementos */ + }
    @@ -548,7 +552,7 @@
    - + + + + + + +
    + + + +
    + + + +
    Fecha Emisión: +
    + + + + +
    + + + + + + +
    +
    +
    + + + + +
    + +
    -
    Fecha Emisión: -
    +
    diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8410b48e6..8480b35d7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6,6 +6,7 @@ Imports System.Xml Imports System.Diagnostics Imports System.Globalization Imports System.IO +Imports System.IO Imports System.Threading.Tasks Imports Newtonsoft.Json Imports Extensiones @@ -11736,11 +11737,11 @@ Partial Class Compras_Compras Protected Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged CambiaTipoPago(True) - ValidaPagoSinXML() + ValidaRegistroSinXML() End Sub - Private Sub ValidaPagoSinXML() + Private Sub ValidaRegistroSinXML() If CveFactura <= 0 And CveCompra <= 0 Then diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 3a7c3dc60..ae9fcf415 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2006,20 +2006,23 @@ Partial Class OC_OC If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then DdlProveedores.setEsWebService(True) DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.Attributes.Add("data-estatus", "1") DdlProveedores.SelectedText = "Seleccione" DdlProveedores.SelectedValue = "-1" DdlProveedores.ddl.AutoPostBack = True DdlProveedorCot.setEsWebService(True) DdlProveedorCot.Attributes.Add("data-metodo", "getproveedores") + DdlProveedorCot.Attributes.Add("data-estatus", "1") + Else - DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual) + DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(" Estatus = 'Activo' ") DdlProveedores.DataBind() DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlProveedores.ddl.AutoPostBack = True - DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual) + DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(" Estatus = 'Activo' ") DdlProveedorCot.DataBind() DdlProveedorCot.ddl.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 8d3dc006e..1ac398413 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -339,14 +339,14 @@
    +
    '); + tr.append(''); + tr.append(''); } if (!(key == "text" || key == "id")) { td = $(''); @@ -10612,8 +10685,14 @@ for (var key in item) { if (idxColumn == 0 && '<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1') { - let tdExistencia = ' select').select2('close');" + '"> '; + let tdExistencia = ' select').select2('close');" + '"> Buscar existencias '; tr.append(''); + + let tdComplementarios = ' select').select2('close');" + '"> Productos complementarios'; + tr.append(''); + + let tdSimilares = ' select').select2('close');" + '"> Productos similares '; + tr.append(''); } if (!(key == "text" || key == "id")) { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ee6befccd..8e3a9c230 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8710,6 +8710,9 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCLinkButton("LnkDescuentos").Visible = True + If e.Row.DBCampo("TipoDocto") = "Cot" AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe Then + e.Row.FCLinkButton("imgClone").Visible = False + End If End If 'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then @@ -31522,6 +31525,10 @@ Partial Class Ventas LnkDescuentosRNC.Visible = UsuarioActual.TienePermisoProceso(328) End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then + GvPS.Columns(19).Visible = True + End If + UpPS.Update() UPPDescuento.Update() UPObservaciones.Update() @@ -33635,12 +33642,85 @@ Partial Class Ventas ObjVentas.Dispose() ObjEventos.Dispose() End Sub + + +#End Region + Private Sub BtnRefrescarPagina_Click(sender As Object, e As EventArgs) Handles BtnRefrescarPagina.Click Response.Redirect($"~/Ventas/Ventas.aspx?CveVenta={Me.CveVenta}") End Sub -#End Region + Private Sub BtnCargarPSAdicionales_Click(sender As Object, e As EventArgs) Handles BtnCargarPSAdicionales.Click + Dim CvePS = HdnCvePSComparar.Value.ToEntero() + If CvePS > 0 Then + Dim ObjProductosServicios As New ClsProductosServicios() + If ObjProductosServicios.GetPSAdicionales(CvePS, UsuarioActual.CveEmpresa) Then + GvPSAdicionales.DataSource = ObjProductosServicios.DtResultados.FiltraParametros($"Tipo={HdnTipoPSComparar.Value}") + End If + ObjProductosServicios.Dispose() + If HdnTipoPSComparar.Value = "1" Then + LtlNombreModalPS.Text = "Productos y/o servicios complementarios" + ElseIf HdnTipoPSComparar.Value = "2" Then + LtlNombreModalPS.Text = "Productos y/o servicios similares" + End If + + GvPSAdicionales.DataBind() + UpSimilares.Update() + RegistraScript("$('#DivSimilares').modal({backdrop: 'static', keyboard: false });") + End If + + End Sub + + Private Sub BtnAgregarPSSimilar_Click(sender As Object, e As EventArgs) Handles BtnAgregarPSSimilar.Click + If HdnTipoPSComparar.Value.ToEntero() > 0 Then + + If GvPSAdicionales.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("chkPSAdicional").Checked) <= 0 Then + Alert($"Debe seleccionar al menos 1 producto", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + 'VALIDA + For Each Row As GridViewRow In GvPSAdicionales.Rows + If Row.RowType = DataControlRowType.DataRow Then + If Row.FCCheckBox("chkPSAdicional").Checked Then + If Row.FCTextBox("TxtCantidad").Text.ToDecimal() <= 0.00 Then + Alert($"La cantidad del producto y/o servicio {Row.DataKey("CodigoPS")} debe ser mayor a 0", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + End If + Next + + 'AGREGA + For Each Row As GridViewRow In GvPSAdicionales.Rows + If Row.RowType = DataControlRowType.DataRow Then + If Row.FCCheckBox("chkPSAdicional").Checked Then + Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero() + + HdnPS.Value = CvePS.ToString() + DdlPS.SelectedValue = CvePS.ToString() + DdlPS.SelectedText = Row.DataKey("CodigoPS") + + TxtCantidad.Text = Row.FCTextBox("TxtCantidad").Text + + Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + If DrPS IsNot Nothing Then + DdlUnidadMedida.SelectedValueExistInsert(DrPS("CveUnidadMedida").ToString(), DrPS("UnidadMedida").ToString()) + DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS) + + AgregarPS() + End If + End If + + End If + Next + + End If + + HdnTipoPSComparar.Value = "-1" + HdnCvePSComparar.Value = "-1" + End Sub #Region "U S A D O S" From d4d02383d21ba210fae434b97d94426e55ddaf05 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 6 Jun 2024 00:01:04 -0700 Subject: [PATCH 38/44] Grupo Diaz 2024.05.31 --- App_Code/ClsPaginas.vb | 12 + App_Code/ClsVentas.vb | 5 +- General/SaldosMenores.aspx | 298 ++++++++++++++++++++++ General/SaldosMenores.aspx.vb | 459 ++++++++++++++++++++++++++++++++++ 4 files changed, 773 insertions(+), 1 deletion(-) create mode 100644 General/SaldosMenores.aspx create mode 100644 General/SaldosMenores.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5de754c67..bf49e1ed5 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7750,6 +7750,17 @@ Public Class ClsPaginas params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, ImageToBase64(Drawing.Image.FromFile(FirmaAut.FullName), Drawing.Imaging.ImageFormat.Png), ""))) + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197 Then + + Dim ObjProveedor As New ClsCompProveedores + If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then + If ObjProveedor.DtResultados.Rows.Count > 0 Then + params.Add(New ReportParameter("PlazoPago", ObjProveedor.PlazoPago.ToString)) + End If + End If + + End If + If Archivo.Exists Then bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR) Else @@ -10065,6 +10076,7 @@ Public Class ClsPaginas PaginaDict.Add("/General/CatSatListado69B.aspx".ToUpper, 1038) PaginaDict.Add("/General/CatMedidaEquivalencia.aspx".ToUpper(), 773) PaginaDict.Add("/General/RepIndicadorResumen.aspx".ToUpper(), 110) + PaginaDict.Add("/General/SaldosMenores.aspx".ToUpper(), -1) #End Region #Region "GPS" PaginaDict.Add("/GPS/RepTemperatura.aspx".ToUpper(), 681) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index bcddd23b2..a79bf4f32 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4450,7 +4450,8 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepAnticiposNCIXCDetalle(CveCliente As Integer, CveSubProyecto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, ConSaldo As Integer, Tipo As Integer, CveMoneda As Integer, FechaICorte As Date, FechaFCorte As Date, TipoCambio As Integer, TCEspecifico As Double, Optional CveVendedor As Integer = -1) As Boolean + Public Function GetRepAnticiposNCIXCDetalle(CveCliente As Integer, CveSubProyecto As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, ConSaldo As Integer, Tipo As Integer, CveMoneda As Integer, FechaICorte As Date, FechaFCorte As Date, TipoCambio As Integer, TCEspecifico As Double, Optional CveVendedor As Integer = -1, + Optional SaldoMayorA As Decimal = -999999999999, Optional SaldoMenorA As Decimal = 999999999999) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepAnt-NC-IXCDetalle") With SqlAdapter.SelectCommand.Parameters @@ -4467,6 +4468,8 @@ Public Class ClsVentas .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@SaldoMayorA", SqlDbType.Money).Value = SaldoMayorA + .Add("@SaldoMenorA", SqlDbType.Money).Value = SaldoMenorA End With Try SqlAdapter.Fill(Data) diff --git a/General/SaldosMenores.aspx b/General/SaldosMenores.aspx new file mode 100644 index 000000000..c3a4abe04 --- /dev/null +++ b/General/SaldosMenores.aspx @@ -0,0 +1,298 @@ +<%@ Page Title="Saldos Menores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SaldosMenores.aspx.vb" Inherits="General_SaldosMenores" %> + + + + + + + Saldos Menores + + + + +
  • + Generar PDF +
  • +
  • + Exporta Excel +
  • +
  • + Ver Dlls en pesos +
  • +<%-- + +
  • + Otros Ingresos +
  • +
  • + Saldar +
  • +
    +
    --%> +
    + + + + + +
    +
    +
    + + +
    +
    +
    + + <%-- +
    + + +
    --%> + +
    Fecha Ini Doc:
    +
    +
    + + + + + + + + + + +
    +
    +
    Fecha Fin Doc:
    +
    +
    + + + + + + + + + + +
    +
    +
    Saldo Mayor a:
    +
    + + +
    +
    Saldo Menor a:
    +
    + + +
    + +
    +
    +
    + +
    +
    +
    + + + + + + + +
    +
    Fecha:
    +
    +
    + + + + + + + + +
    +
    + +
    Centro Costo:
    +
    + + +
    + +
    Concepto:
    +
    + + + +
    + +
    + +
    + +
    + + + + + + + +
    +
    + + + + + + + +
    + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + + + + + + + + + + + +
    + + + diff --git a/General/SaldosMenores.aspx.vb b/General/SaldosMenores.aspx.vb new file mode 100644 index 000000000..e7e0e5987 --- /dev/null +++ b/General/SaldosMenores.aspx.vb @@ -0,0 +1,459 @@ +Imports System +Imports System.Collections.Generic +Imports System.Data +Imports System.Web.UI.WebControls +Imports Extensiones +Imports Microsoft.Reporting.WebForms + +Partial Public Class General_SaldosMenores + Inherits ClsPaginas + +#Region "PROPIEDADES" + Private Property DtDatos As DataTable + Get + Return DirectCast(ViewState("DtDatos"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtDatos") = value + End Set + End Property + + Private Property Tipo As Integer + Get + Return DirectCast(ViewState("Tipo"), Integer) + End Get + Set(value As Integer) + ViewState("Tipo") = value + End Set + End Property + + Private Property CveMoneda As Integer + Get + Return DirectCast(ViewState("CveMoneda"), Integer) + End Get + Set(value As Integer) + ViewState("CveMoneda") = value + End Set + End Property + + Private Property TCEspecifico As Double + Get + Return DirectCast(ViewState("TCEspecifico"), Double) + End Get + Set(value As Double) + ViewState("TCEspecifico") = value + End Set + End Property + + Private Property TipoCambio As Integer + Get + Return DirectCast(ViewState("TipoCambio"), Integer) + End Get + Set(value As Integer) + ViewState("TipoCambio") = value + End Set + End Property +#End Region + + Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not IsPostBack Then + InicializaDatos() + End If + End Sub + + + +#Region "I X C" + Protected Sub InicializaDatos() + txtFechaI.Text = $"01/01/{Now.Year}" + txtFechaF.Text = DateTime.Today.ToString() + TxtFecha.Text = DateTime.Today.ToString() + + TxtSaldoMayorA.Text = "0" + TxtSaldoMenorA.Text = "1000" + + CargaSucursales() + + Dim CveCliente As Integer = If(Request("CveCliente") Is Nothing, -1, Request("CveCliente").ToString().ToEntero()) + + + CveMoneda = If(Request("CveMoneda") Is Nothing, -1, Request("CveMoneda").ToString().ToEntero()) + txtFechaI.Text = If(Request("FechaI") Is Nothing, NowADS().ToString(), Request("FechaI").ToString()) + txtFechaF.Text = If(Request("FechaF") Is Nothing, NowADS().ToString(), Request("FechaF").ToString()) + TipoCambio = If(Request("TipoCambio") Is Nothing, 1, Request("TipoCambio").ToString().ToEntero()) + TCEspecifico = If(Request("TCEspecifico") Is Nothing, -1, Request("TCEspecifico").ToString().ToDouble()) + RblTipoCambio.SelectedValue = TipoCambio.ToString() + LiEspecifico.InnerText = TCEspecifico.FormatoNumero() + + Dim FechaICorte As DateTime + FechaICorte = If(Request("FechaICorte") Is Nothing, DateTime.MinValue, Request("FechaICorte").ToString().ToDate()) + CargaDatos() + End Sub + + Protected Sub CargaSucursales() + 'DdlSucursal.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) + 'DdlSucursal.DataBind() + 'DdlSucursal.Items.Insert(0, New ListItem("Todos", "-1")) + 'DdlSucursal.SelectedValue = "-1" + DdlSubProyectoSaldar.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) + DdlSubProyectoSaldar.DataBind() + End Sub + + + + 'Protected Sub CargaVendedores() + ' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) + ' DdlVendedor.DataBind() + ' DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) + 'End Sub + + Protected Sub CargaDatos() + If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then + TCEspecifico = TxtEspecifico.Text.ToDouble() + Else + TCEspecifico = -1 + End If + + If TipoCambio <> 1 Then + CveMoneda = -1 + End If + + Dim FechaICorte As DateTime = MinFecha + 'If TxtFechaICorte.Text <> "" Then + ' FechaICorte = TxtFechaICorte.Text.ToDate() + 'Else + ' FechaICorte = DateTime.MinValue + 'End If + + Dim FechaFCorte As DateTime = MaxFecha + 'If TxtFechaFCorte.Text <> "" Then + ' FechaFCorte = TxtFechaFCorte.Text.ToDate() + 'Else + ' FechaFCorte = DateTime.MaxValue + 'End If + + Dim ObjVenta As New ClsVentas() + Dim CveCliente As Integer = -1 + + + + If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, + SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then + GvDatosIXC.DataSource = ObjVenta.DtResultados + DtDatos = ObjVenta.DtResultados + End If + + ObjVenta.Dispose() + GvDatosIXC.DataBind() + UpDatos.Update() + + 'If TxtFechaFCorte.Text <> NowADS().ToShortDateString() AndAlso txtFechaI.Text <> "" Then + ' LnkHabilitarSaldar.Visible = False + ' LnkSaldar.Visible = False + 'Else + 'LnkHabilitarSaldar.Visible = True + ''End If + + 'If LnkSaldar.Visible Then + ' HabilitarCheckbox() + 'End If + + Tipo = -1 + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + + Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click + 'GenerarPDF("EXCEL") + End Sub + + Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click + 'GenerarPDF("PDF") + End Sub + + 'Protected Sub GenerarPDF(Opcion As String) + ' Dim FechaI As String + ' If txtFechaI.Text = "" OrElse txtFechaI.Text = "__/__/____" Then + ' FechaI = "-1" + ' Else + ' FechaI = $" Fecha Inicial: {txtFechaI.Text}" + ' End If + + ' Dim FechaF As String + ' If txtFechaF.Text = "" OrElse txtFechaF.Text = "__/__/____" Then + ' FechaF = "-1" + ' Else + ' FechaF = $" Fecha Final: {txtFechaF.Text}" + ' End If + + ' Dim FechaICorte As String + ' If TxtFechaICorte.Text = "" OrElse TxtFechaICorte.Text = "__/__/____" Then + ' FechaICorte = "" + ' Else + ' FechaICorte = $" Fecha Inicial Corte: {TxtFechaICorte.Text}" + ' End If + + ' Dim FechaFCorte As String + ' If TxtFechaFCorte.Text = "" OrElse TxtFechaFCorte.Text = "__/__/____" Then + ' FechaFCorte = "" + ' Else + ' FechaFCorte = $" Fecha Final Corte: {TxtFechaFCorte.Text}" + ' End If + + ' Dim Sucursal As String + ' If DdlSucursal.SelectedValue <> "-1" Then + ' Sucursal = $" Sucursal: {DdlSucursal.SelectedItem.Text}" + ' Else + ' Sucursal = "" + ' End If + + ' Dim Cliente As String = "" + + ' Dim ConSaldo As String + ' If DdlConSaldo.SelectedValue <> "-1" Then + ' ConSaldo = $" Con Saldo: {DdlConSaldo.SelectedItem.Text}" + ' Else + ' ConSaldo = "" + ' End If + + ' Dim Tipo2 As String + ' If DdlTipo.SelectedValue <> "-1" Then + ' Tipo2 = $" Tipo: {DdlTipo.SelectedItem.Text}" + ' Else + ' Tipo2 = "" + ' End If + + ' If DtDatos.Rows.Count > 0 Then + ' Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + ' Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + ' Dim para As New List(Of ReportParameter) From { + ' New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa), + ' New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre), + ' New ReportParameter("FechaImpresion", NowADS().ToString()), + ' New ReportParameter("Tipo", Tipo.ToString()), + ' New ReportParameter("AgrupadoPor", $"Agrupado Por: {Cliente}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}") + ' } + + ' If Imagen.Exists Then + ' para.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' para.Add(New ReportParameter("LogoPath", "")) + ' End If + + ' ImprimirPDF("Empresas/Grales/Formatos/RepAnt-NC-IXCDetalle.rdlc", DtDatos, para, "Reporte de Anticipos - NCXAplicar - IXC Detalle", Opcion) + ' Else + ' Alert("No hay datos consultados", ModExtensiones.TipoMensaje.MsgAdvertencia) + ' End If + 'End Sub + + Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Dim Css As String = "Texto" + Dim Liga As String = "" + + If e.Row.DataKey("Tipo").ToEntero() < 1 Then + e.Row.CssClass = "SubTotales3" + e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString() + ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then + e.Row.CssClass = "SubTotales2" + Select Case e.Row.DataKey("Tipo").ToEntero() + Case 1 + e.Row.Cells(2).Text = "Anticipos" + Case 2 + e.Row.Cells(2).Text = "NC X Aplicar" + Case 3 + e.Row.Cells(2).Text = "Ingresos X Comprobar" + End Select + ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then + e.Row.CssClass = "Totales" + e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial") + e.Row.Cells(7).Text = "" + ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then + e.Row.CssClass = "SubTotales" + e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio") + e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString() + + 'If DdlTipo.SelectedValue.ToEntero() = 1 Then + ' e.Row.Cells(4).Text = "$" & e.Row.DataKey("SubTotal").FormatoNumero() + 'ElseIf DdlTipo.SelectedValue.ToEntero() = 2 Then + ' e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero() + 'End If + + Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}" + e.Row.Cells(2).Text = $"{e.Row.Cells(2).Text}" + ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then + e.Row.CssClass = "SubTotales" + e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio") + e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString() + e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero() + Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}" + e.Row.Cells(2).Text = $"{e.Row.Cells(2).Text}" + Else + e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion") + e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString() + e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero() + e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero() + e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero() + Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}" + e.Row.Cells(2).Text = $"{e.Row.Cells(2).Text}" + End If + + + If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then + e.Row.FCCheckBox("Chk").Visible = True + End If + + End If + End Sub + +#Region "SALDAR" + + 'Private Sub HabilitarCheckbox() + ' For Each Gv As GridViewRow In GvDatosIXC.Rows + ' If (Gv.DataKey("CveVenta").ToEntero() > 0 OrElse Gv.DataKey("CveIE").ToEntero() > 0) AndAlso (Gv.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then + ' Gv.FCCheckBox("Chk").Visible = True + ' End If + ' Next + 'End Sub + + 'Protected Sub LnkHabilitarSaldar_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldar.Click + ' HabilitarCheckbox() + ' LnkSaldar.Visible = True + ' LnkHabilitarSaldar.Visible = False + ' UpLnkAgregar.Update() + ' UpDatos.Update() + 'End Sub + + Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs) 'Handles LnkSaldar.Click + If Tipo = 1 Then + TxtConcepto.Text = "Cancelación de Anticipos" + ElseIf Tipo = 2 Then + TxtConcepto.Text = "Cancelación de Saldo de Nota de crédito" + ElseIf Tipo = 3 Then + TxtConcepto.Text = "Cancelación de Ingresos por Comprobar" + End If + Upsaldar.Update() + RegistraScript("$('#DivModalSaldar').modal();") + End Sub + + Protected Sub BtnSaldar_Click(sender As Object, e As EventArgs) Handles BtnSaldar.Click + Dim ObjConta As New ClsContabilidad() + ObjConta.IniciaTransacSQL() + Dim CvePrePoliza As Integer = 0, CveVenta As Integer = -1, CveIE As Integer = -1 + Dim Saldo As Decimal = 0 + Dim SaldoAdmin As Decimal = 0 + Dim ImporteTotalGasto As Decimal = 0 + Dim MsgError As String = "" + + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepNCXAplicar", 6, 0, 0, 1, TxtFecha.Text.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3) + Dim tMovto As Boolean = True + Dim tConceptoSaldar As Integer = 78 + + If CvePrePoliza > 0 Then + For Each Gv As GridViewRow In GvDatosIXC.Rows + Dim ConPreP As New ConceptosTipoSaldo() + + If Gv.FCCheckBox("Chk").Checked Then + If Tipo = 2 Then + ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(6, Gv.DataKey("CveMoneda").ToEntero(), False, 2) + ElseIf Tipo = 1 Then + ConPreP.CveConcepto = 3 + End If + + 'If Tipo = 1 OrElse Tipo = 2 Then + If Gv.DataKey("CveVenta").ToEntero() > 0 Then + CveVenta = Gv.DataKey("CveVenta").ToEntero() + Saldo = -Gv.DataKey("Saldo").ToDecimal() + SaldoAdmin = Saldo + + ElseIf Gv.DataKey("CveIE").ToEntero() > 0 Then + 'ElseIf Tipo = 3 Then + ConPreP = ClsPaginas.ObtenerCveConceptoPrePoliza(18, Gv.DataKey("CveMoneda").ToEntero(), True, 2) + CveIE = Gv.DataKey("CveIE").ToEntero() + Saldo = Gv.DataKey("Saldo").ToDecimal() + SaldoAdmin = Saldo + End If + + Saldo = -Saldo ' invertimos el saldo para que se haga negativo para que sea Abono + + ImporteTotalGasto += Saldo + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + Exit For + End If + + If Gv.DataKey("CveMoneda").ToEntero() > 1 Then + Dim ImporteMN As Decimal = (Saldo * Gv.DataKey("TipoCambio").ToDecimal() - Saldo).RoundSQL() + ImporteTotalGasto += ImporteMN + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, ImporteMN, ConPreP.CveConceptoComplementario, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE, CveVenta, CveCliente:=Gv.DataKey("CveCliente").ToEntero(), ImporteME:=Saldo, TipoCambio:=Gv.DataKey("TipoCambio").ToDecimal()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + Exit For + End If + End If + End If + Next + + If ImporteTotalGasto <> 0 Then + ImporteTotalGasto *= -1 ' se invierte el valor, para cuadre de prepoliza + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, ImporteTotalGasto, ImporteTotalGasto, tConceptoSaldar, "", TxtConcepto.Text, CveIE, CveVenta, CveSubProyecto:=DdlSubProyectoSaldar.SelectedValue.ToEntero()) Then + MsgError = "Ocurrio un error al saldar el movimiento" + End If + Else + MsgError = "Poliza no insertada" + End If + End If + + If MsgError = "" Then + ObjConta.Commit() + Dim Msg As String = "Los movimientos se saldaron correctamente." + Msg &= $"

    Ver Póliza   " + Alert(Msg) + Else + ObjConta.RollBack() + Alert(MsgError, ModExtensiones.TipoMensaje.MsgError) + End If + + 'LnkSaldar.Visible = False + 'LnkHabilitarSaldar.Visible = True + CargaDatos() + 'UpLnkAgregar.Update() + ObjConta.Dispose() + 'RegistraScript("$('#DivModalSaldar').modal('hide');") + TxtFecha.Text = DateTime.Today.ToString() + Upsaldar.Update() + End Sub + +#End Region + +#Region "TIPO DE CAMBIO" + + Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click + CargaDatos() + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) + End Sub + + Protected Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged + TipoCambio = RblTipoCambio.SelectedValue.ToEntero() + + If TipoCambio = 3 Then + LiEspecifico.Visible = True + TCEspecifico = GlobalTipoCambio(NowADS()).ToString().ToDouble() + TxtEspecifico.Text = TCEspecifico.ToString() + Else + LiEspecifico.Visible = False + End If + + UpBodyTipoCambio.Update() + End Sub + +#End Region + + +#End Region + +End Class From eec7fb7fff26f231768f460388d49810fb96bf24 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 6 Jun 2024 18:48:27 -0700 Subject: [PATCH 39/44] --FIX. productos adicionales/similares --- Ventas/ProductosServicios.aspx | 2 +- Ventas/Ventas.aspx | 15 +++++---- Ventas/Ventas.aspx.vb | 58 ++++++++++++++++++++++++++++++---- 3 files changed, 60 insertions(+), 15 deletions(-) diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index ce4071fea..8711161f6 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -2350,7 +2350,7 @@
    - Complementario + Adicional Similar
    diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index b348094a2..2c702be69 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8929,7 +8929,7 @@ <%-- MODAL PS ADICIONALES --%> -
    '); - let tdComplementarios = ' select').select2('close');" + '"> Productos complementarios'; + let tdComplementarios = ' select').select2('close');" + '"> '; tr.append(''); - let tdSimilares = ' select').select2('close');" + '"> Productos similares '; + let tdSimilares = ' select').select2('close');" + '"> '; tr.append(''); } diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 8e3a9c230..ecce18717 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23919,7 +23919,7 @@ Partial Class Ventas Dim TienePagos As Boolean = ((Not (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0)) AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0)) OrElse AmortizacionNC > 0 'SI LA VENTA ES NUEVA VALIDAR TAMBIEN LOS PAGOS DE CONTADO - If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ((CveVenta <= 0 OrElse EsCreaApartirDe OrElse TipoDoctoViejo = "Cot") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant")) Then + If (UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.CveEmpresa = 197) AndAlso ((CveVenta <= 0 OrElse EsCreaApartirDe OrElse TipoDoctoViejo = "Cot") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant")) Then If Not PermiteCredito AndAlso Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then If MostrarAlertas Then @@ -33653,18 +33653,47 @@ Partial Class Ventas Private Sub BtnCargarPSAdicionales_Click(sender As Object, e As EventArgs) Handles BtnCargarPSAdicionales.Click Dim CvePS = HdnCvePSComparar.Value.ToEntero() If CvePS > 0 Then + Dim DtPSAdicionales As DataTable = Nothing + Dim ObjProductosServicios As New ClsProductosServicios() If ObjProductosServicios.GetPSAdicionales(CvePS, UsuarioActual.CveEmpresa) Then - GvPSAdicionales.DataSource = ObjProductosServicios.DtResultados.FiltraParametros($"Tipo={HdnTipoPSComparar.Value}") + DtPSAdicionales = ObjProductosServicios.DtResultados.FiltraParametros($"Tipo={HdnTipoPSComparar.Value}") End If ObjProductosServicios.Dispose() - If HdnTipoPSComparar.Value = "1" Then - LtlNombreModalPS.Text = "Productos y/o servicios complementarios" - ElseIf HdnTipoPSComparar.Value = "2" Then - LtlNombreModalPS.Text = "Productos y/o servicios similares" + If DtPSAdicionales IsNot Nothing Then + DtPSAdicionales.Columns.Add(New DataColumn("Precio", GetType(String))) + + For Each Row As DataRow In DtPSAdicionales.Rows + Dim DrPSAdicional As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row("CvePSAdicional").ToString().ToEntero()).FiltroPrimero("") + If DrPSAdicional IsNot Nothing Then + 'SUGIERE PRECIO + Dim PrecioSugerido As Decimal = 0 + Dim tPrecioSugerido As Decimal = 0 + tPrecioSugerido = DrPSAdicional("Precio").ToString().ToDecimal + Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(Row("CvePSAdicional").ToString().ToEntero(), DrPSAdicional("CveClasificacion").ToString().ToEntero()) + + PrecioSugerido = ObjPrecioSugerido.PrecioSugerido + + If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido + + Row("Precio") = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere + End If + Next End If + GvPSAdicionales.DataSource = DtPSAdicionales + + Dim DrPSPadre = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + If DrPSPadre IsNot Nothing Then + If HdnTipoPSComparar.Value = "1" Then + LtlNombreModalPS.Text = $"Productos y/o servicios adicionales. PS:{DrPSPadre("CodigoPS")}" + ElseIf HdnTipoPSComparar.Value = "2" Then + LtlNombreModalPS.Text = $"Productos y/o servicios similares PS:{DrPSPadre("CodigoPS")}" + End If + End If + + GvPSAdicionales.DataBind() UpSimilares.Update() RegistraScript("$('#DivSimilares').modal({backdrop: 'static', keyboard: false });") @@ -33696,13 +33725,21 @@ Partial Class Ventas For Each Row As GridViewRow In GvPSAdicionales.Rows If Row.RowType = DataControlRowType.DataRow Then If Row.FCCheckBox("chkPSAdicional").Checked Then - Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero() + 'LIMPIAR LAS VARIABLES + TxtCantidad.Text = "" + TxtPrecio.Text = "" + HdnPS.Value = "-1" + DdlPS.SelectedValue = "-1" + DdlPS.SelectedText = "-" + + Dim CvePS As Integer = Row.DataKey("CvePSAdicional").ToEntero() HdnPS.Value = CvePS.ToString() DdlPS.SelectedValue = CvePS.ToString() DdlPS.SelectedText = Row.DataKey("CodigoPS") TxtCantidad.Text = Row.FCTextBox("TxtCantidad").Text + TxtPrecio.Text = Row.DataKey("Precio") Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") If DrPS IsNot Nothing Then @@ -33720,6 +33757,13 @@ Partial Class Ventas HdnTipoPSComparar.Value = "-1" HdnCvePSComparar.Value = "-1" + TxtCantidad.Text = "" + TxtPrecio.Text = "" + HdnPS.Value = "-1" + DdlPS.SelectedValue = "-1" + DdlPS.SelectedText = "-" + + RegistraScript("$('#DivSimilares').modal('hide');abrirDdlPS();", "A2") End Sub #Region "U S A D O S" From 8142dbc8f93db91d75a20f57c4b534507519ede0 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 6 Jun 2024 19:10:57 -0700 Subject: [PATCH 40/44] --filtrado de vendedor --- Ventas/RepComisionesSMS.aspx.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Ventas/RepComisionesSMS.aspx.vb b/Ventas/RepComisionesSMS.aspx.vb index 226514bc9..2ed9fb216 100644 --- a/Ventas/RepComisionesSMS.aspx.vb +++ b/Ventas/RepComisionesSMS.aspx.vb @@ -34,7 +34,10 @@ Partial Class Ventas_RepComisionesSMS Private Sub CargaCombos() - + 'If UsuarioActual.TienePermisoProceso(376) Then + ' DdlTecnico.Enabled = False + ' DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario) + 'End If 'If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then ' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue)) 'Else @@ -42,7 +45,10 @@ Partial Class Ventas_RepComisionesSMS 'End If DdlVendedor.DataBind() DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) - + If UsuarioActual.CveVendedor > 0 Then + DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor) + DdlVendedor.Enabled = False + End If DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlMedico.DataBind() From 9628605637d38e9b91e7a65f55dc05043630cbb3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 6 Jun 2024 19:11:42 -0700 Subject: [PATCH 41/44] - mejora --- Contabilidad/ContabilidadElectronica.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index 6774efaa5..b6fca602a 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -178,16 +178,16 @@ Partial Class Contabilidad_ContabilidadElectronica Dim DtCuentas As New DataTable If UsuarioActual.Empresa.TipoContabilidad = 1 Then Dim objconta As New ClsContabilidad - If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, -1, -1, -1, UsuarioActual.CveEmpresa, 0) Then + If objconta.GetBalanzaComprobacion(FechaI, FechaF, 1, 1, -1, -1, UsuarioActual.CveEmpresa, 0) Then DtCuentas = objconta.DtResultados End If objconta.Dispose() If DtCuentas IsNot Nothing Then - Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD") - Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA") + Dim Deudor As Decimal = DtCuentas.SUM("SaldoAD", "Id is null") + Dim Acreedor As Decimal = DtCuentas.SUM("SaldoAA", "Id is null") If Deudor <> Acreedor Then - Alert("los Saldos Actuales no cuadran.", TipoMensaje.MsgError) + Alert("los Saldos Actuales no cuadran. " & Deudor - Acreedor, TipoMensaje.MsgError) Exit Sub End If End If From 9091c191f220ca2ca7eaa697dc113665c5a2b4aa Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 6 Jun 2024 19:11:56 -0700 Subject: [PATCH 42/44] -- cambio alerta --- OS/OrdenesServicios.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 17e266841..1eafe3727 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3072,7 +3072,7 @@ Partial Class OS_OrdenesServicios Exit For Next If Not TieneArchivos Then - Alert("Debe de Agregar Un Documento de Confirmación (hasta 5 maximo).") + Alert("Debe de agregar un documento de confirmación (5 máximo).") Exit Sub End If From 612572abe8be3af6a7d896a6acd0d31bff43f295 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 6 Jun 2024 19:12:48 -0700 Subject: [PATCH 43/44] -- vista SAT --- Contabilidad2/RepBalanzaComprobacion.aspx | 10 +++++++++- Contabilidad2/RepBalanzaComprobacion.aspx.vb | 20 +++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx b/Contabilidad2/RepBalanzaComprobacion.aspx index 9d0440a3a..4decf3c06 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx +++ b/Contabilidad2/RepBalanzaComprobacion.aspx @@ -107,7 +107,15 @@ - + Vista: +
    + + + + +
    diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb index 76372a053..b68186834 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad2/RepBalanzaComprobacion.aspx.vb @@ -123,10 +123,24 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero - If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, 0, DdlNivel.SelectedValue.ToEntero) Then + If TipoReporte = 1 Then + 'mostrar cuales son las cuentas que no tienen asignado el agrupador que sean afectables + + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + Dim dtt As DataTable = ObjConta.DtResultados.FiltraParametros("CveAgrupadorSAT is null and not Codigo like '_%'") + If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then + Dim str As New StringBuilder + For Each dr As DataRow In dtt.Rows + str.AppendFormat(" - {0}
    ", dr("CtaCodigo")) + Next + Alert(str.ToString) + End If + End If + + End If + + If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, DdlTipoCuentas.SelectedValue.ToEntero, TipoReporte, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then DtDatos = ObjConta.DtResultados - - Else DtDatos = Nothing Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError) From c9b47f5ac99673beafd85c52b909b0e5145ca194 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 6 Jun 2024 19:46:21 -0700 Subject: [PATCH 44/44] --GRUPO DIAZ, Asignar la forma de pago segun el importe mayor de los pagaos agregados --- Ventas/Ventas.aspx.vb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ecce18717..d63a41e9e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23892,9 +23892,21 @@ Partial Class Ventas UpPS.Update() End If + If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 Then + Dim ImporteMaximo As Decimal = DtPagos.MAX("Importe").ToDecimal() + Dim RowPagoMaximo As DataRow = DtPagos.FiltroPrimero($"Importe >= {ImporteMaximo}") + If RowPagoMaximo IsNot Nothing Then + Dim CveTipoTransaccion As Integer = RowPagoMaximo("CveTipoMovimiento").ToString().ToEntero() + If CveTipoTransaccion > 0 Then + Dim CveFormaPago = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveFormaPago", RowFilter:=$"CveTipoTransaccion = {CveTipoTransaccion} AND Estatus = 1") + DdlFormaPago33.SelectedValueExist(CveFormaPago) + End If + End If + End If + CargaGridContado() UpContado.Update() - + UPCondicionesPago.Update() End Sub Private Sub RBLPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLPago.SelectedIndexChanged LimpiaEscondeContado()
    Fecha Emisión: -
    +
    From 52a976d9badf679990bd6fbc312cb83e23d2d3b6 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 5 Jun 2024 14:05:46 -0700 Subject: [PATCH 37/44] --Agregar productos similares o complementarios en ventas --- Compras/PopUpVerFactura.aspx.vb | 12 +++- Content/CustomIcons/existencia.svg | 1 + Content/CustomIcons/existencia_verde.svg | 16 +++++ Content/CustomIcons/similar.svg | 1 + Content/CustomIcons/similar_verde.svg | 16 +++++ Content/CustomIcons/sustituir.svg | 1 + Content/CustomIcons/sustituir_azul.svg | 16 +++++ Ventas/CatPS.aspx.vb | 2 +- Ventas/Ventas.aspx | 91 ++++++++++++++++++++++-- Ventas/Ventas.aspx.vb | 82 ++++++++++++++++++++- 10 files changed, 229 insertions(+), 9 deletions(-) create mode 100644 Content/CustomIcons/existencia.svg create mode 100644 Content/CustomIcons/existencia_verde.svg create mode 100644 Content/CustomIcons/similar.svg create mode 100644 Content/CustomIcons/similar_verde.svg create mode 100644 Content/CustomIcons/sustituir.svg create mode 100644 Content/CustomIcons/sustituir_azul.svg diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 76933f943..62058d6e8 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -346,7 +346,7 @@ Partial Class PopUpVerFactura Dim totalPallets As String = "" Dim totalBachas As String = "" Dim dfec As DateTime = fecha.ToDateTime() - Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() + Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0:dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() Dim totalcajas As String = "" Dim TotalBins As String = "" @@ -1589,6 +1589,16 @@ Partial Class PopUpVerFactura ' End If 'End If + If DtCortesVentas.Rows.Count > 0 Then + Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") + + If RowInfo IsNot Nothing Then + Fecha = RowInfo("FechaInicial").ToString + Nombre = RowInfo("Nombre").ToString + End If + + End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0") diff --git a/Content/CustomIcons/existencia.svg b/Content/CustomIcons/existencia.svg new file mode 100644 index 000000000..77da1fa1c --- /dev/null +++ b/Content/CustomIcons/existencia.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/existencia_verde.svg b/Content/CustomIcons/existencia_verde.svg new file mode 100644 index 000000000..1619ab133 --- /dev/null +++ b/Content/CustomIcons/existencia_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/similar.svg b/Content/CustomIcons/similar.svg new file mode 100644 index 000000000..9887ee828 --- /dev/null +++ b/Content/CustomIcons/similar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/similar_verde.svg b/Content/CustomIcons/similar_verde.svg new file mode 100644 index 000000000..17b5b55d7 --- /dev/null +++ b/Content/CustomIcons/similar_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir.svg b/Content/CustomIcons/sustituir.svg new file mode 100644 index 000000000..65e193fb5 --- /dev/null +++ b/Content/CustomIcons/sustituir.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir_azul.svg b/Content/CustomIcons/sustituir_azul.svg new file mode 100644 index 000000000..77a3dd24e --- /dev/null +++ b/Content/CustomIcons/sustituir_azul.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index 4b8a2f3dd..f371962e3 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -333,7 +333,7 @@ Partial Class CatPS End If If Opcion = 1 Then - If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad) Then + If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad, 1) Then Return String.Format("No se registró el producto adicional:{0} no existe en la franquicia: '{1}'", CodigoPS, GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")) End If End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 00999f431..b348094a2 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -758,12 +758,12 @@
    Fecha:
    - + - + - + @@ -1160,7 +1160,9 @@ - + + +
    ' + key + '' + tdExistencia + '' + tdComplementarios + '' + tdSimilares + '' + tdExistencia + '' + tdComplementarios + '' + tdSimilares + '