From b0fcaee1395b0e10eb3279ed1ce6875298bb7366 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 8 Apr 2022 14:47:14 -0700 Subject: [PATCH 01/28] =?UTF-8?q?E140.=20Correcci=C3=B3n=20de=20timbrado?= =?UTF-8?q?=20para=20NC=20por=20pronto=20pago?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6625018cb..aba64a680 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8984,7 +8984,6 @@ Partial Class Ventas End If Dim SerieFolioNCProntoPago As String = "" Dim CveVentaNCProntoPago As Integer = -1 - Dim GeneroDescuentoProntoPago As Boolean = False 'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO If ErrorList.Count = 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then @@ -8994,13 +8993,13 @@ Partial Class Ventas If (ImportePagado + ImporteRNC + ObjFactura.DescuentoProntoPago) >= ObjFactura.Total Then Dim RespFacturaProntoPago = GenerarNCProntoPago(ObjVentas.IniciaTransacSQL(), ObjClientes, ObjContPaq, ObjFactura) + If RespFacturaProntoPago.ObjFacturaProntoPago Is Nothing OrElse RespFacturaProntoPago Is Nothing Then ErrorList.Add("No se pudo generar la nota de crédito de pronto pago") Else If RespFacturaProntoPago.Mensaje.CveVenta <= 0 OrElse RespFacturaProntoPago.Mensaje.TieneError Then ErrorList.Add("No se pudo generar la nota de crédito de pronto pago") Else - GeneroDescuentoProntoPago = True CveVentaNCProntoPago = RespFacturaProntoPago.Mensaje.CveVenta SerieFolioNCProntoPago = RespFacturaProntoPago.Mensaje.SerieFolio @@ -33244,9 +33243,6 @@ Partial Class Ventas ObjFacturaProntoPago.FormaPago33 = "Aplicación de anticipos" ObjFacturaProntoPago.FormaPagoSAT33 = "30" - ObjFacturaProntoPago.MetodoPago = "" - ObjFacturaProntoPago.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaProntoPago.CveMetodoPago33}") - ObjFacturaProntoPago.CveSubProyecto = CveSubProyecto ObjFacturaProntoPago.SetSubProyecto() @@ -33279,9 +33275,7 @@ Partial Class Ventas ObjFacturaProntoPago.CveTipoRelacion = 7 ObjFacturaProntoPago.TipoRelacion = "07" - Dim Fol As New List(Of String) - Fol.Add(ObjFactura.FolioFiscal) - ObjFacturaProntoPago.UUIDRelacionados = Fol + ObjFacturaProntoPago.UUIDRelacionados = New List(Of String) Select Case ObjFacturaProntoPago.TipoDocto Case "Ing" @@ -33345,17 +33339,17 @@ Partial Class Ventas ObjFacturaProntoPago.DtVentasNC = DtVentasNC + ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago) + Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta) - ObjFacturaProntoPago.Dispose() + Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago Catch ex As Exception Resp.CveVenta = -1 Resp.TieneError = True OnError("Ocurrio un error al generar la nota de credito de pronto pago", ex) End Try - - Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago Retorno.Mensaje = Resp Return Retorno @@ -33368,7 +33362,7 @@ Partial Class Ventas PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, - CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer) + CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, CodigoObjetoImpuesto As String) Dim Row As DataRow = Nothing Row = TmpDT.NewRow() @@ -33417,6 +33411,7 @@ Partial Class Ventas Row("EntregaDirecta") = EntregaDirecta Row("SATClaveProdServ") = SATClaveProdServ Row("SATClaveUM") = SATClaveUM + Row("CodigoObjetoImpuesto") = CodigoObjetoImpuesto 'Contratos Row("CveContratoDetalle") = CveContratoDetalle @@ -33470,7 +33465,7 @@ Partial Class Ventas DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, CveSubProyecto, "", Cantidad, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1, - DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1) + DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1, DrPS("CodigoObjetoImpuesto").ToString()) Next End Sub @@ -33639,6 +33634,7 @@ Partial Class Ventas TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String)) TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) + TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String)) TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("EsCargo", GetType(Boolean)) From 3b9cd42f809627669486cafb8a6c76a891d5076d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 9 Apr 2022 12:43:19 -0700 Subject: [PATCH 02/28] E140, Solo cuentas de contado para pago en efectivo y cheque, obligar a cancelar remisiones relacionadas al cancelar factura. --- Ventas/Ventas.aspx.vb | 51 +++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5267d6fce..1a58cbab0 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -21744,16 +21744,21 @@ Partial Class Ventas Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) - DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + 'MOSTRAR SOLO CUENTAS DE CONTADO EN BDH + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 0", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + Else + DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + End If If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) Else DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) End If DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) @@ -23723,7 +23728,7 @@ Partial Class Ventas Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia) Exit Sub End If - + MostrarRemisionesCancelar() sb.Append("No encontrado
") sb.Append("Está seguro de cancelar el documento?.") Else @@ -23736,10 +23741,12 @@ Partial Class Ventas sb.AppendFormat("{0}
", Vigencia.EsCancelable) If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then + MostrarRemisionesCancelar() sb.Append("Está seguro de cancelar el documento?.") End If End If Else + MostrarRemisionesCancelar() sb.Append("No encontrado
") sb.Append("Está seguro de cancelar el documento?.") End If @@ -23763,6 +23770,25 @@ Partial Class Ventas End If End Sub + + Private Sub MostrarRemisionesCancelar() + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing") AndAlso DivCanRem.Visible Then + ChkCanRem.Enabled = False + ChkCanRem.Checked = True + ChkCanRem_CheckedChanged(ChkCanRem, EventArgs.Empty) + ChkCanRem.Enabled = False + + If DivGvCancelarRemision.Visible Then + For Each GvRow As GridViewRow In GvCancelarRemisiones.Rows + If GvRow.RowType = DataControlRowType.DataRow Then + GvRow.FCCheckBox("ChkCancelarRemision").Checked = True + GvRow.FCCheckBox("ChkCancelarRemision").Enabled = False + End If + Next + End If + End If + End Sub + Protected Sub ChkDevAlm_CheckedChanged(sender As Object, e As EventArgs) MostrarCondicionesCancelacion() End Sub @@ -34349,22 +34375,5 @@ Partial Class Ventas UpEmitirTransitorio.Update() End Sub #End Region - - - Protected Sub RdTipoPersona_SelectedIndexChanged(sender As Object, e As EventArgs) - - DVRegimenSociedad.Visible = False - DivRazonSocial2.Attributes.Add("class", "col-md-12") - - If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then - - DivRazonSocial2.Attributes.Add("class", "col-md-8") - DVRegimenSociedad.Visible = True - - End If - - UpAgregarCliente.Update() - End Sub - End Class From c8dba82c1fa5ddbc2ff461b2dafe79ac23b1cd6f Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 12 Apr 2022 12:36:16 -0700 Subject: [PATCH 03/28] =?UTF-8?q?--=20para=20ver=20importes,=20se=20activ?= =?UTF-8?q?=C3=B3=20un=20chk,=20para=20que=20sea=20a=20petici=C3=B3n,=20y?= =?UTF-8?q?=20no=20en=20autom=C3=A1tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepRemisiones.aspx | 5 +++ Ventas/RepRemisiones.aspx.vb | 9 +++-- Ventas/RepRemisionesDetalle.aspx | 8 +++-- Ventas/RepRemisionesDetalle.aspx.vb | 52 ++++++++++++++--------------- 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/Ventas/RepRemisiones.aspx b/Ventas/RepRemisiones.aspx index 926acd14c..d765228b8 100644 --- a/Ventas/RepRemisiones.aspx +++ b/Ventas/RepRemisiones.aspx @@ -190,6 +190,11 @@ + +
+ + <%----%> +
diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index 2d67f4de7..3789ff521 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -91,7 +91,7 @@ Partial Class RepRemisiones Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString Dim ObjVentas As New ClsVentas - If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=UsuarioActual.TienePermisoProceso(201)) Then + If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then DtVentas = ObjVentas.DtResultados.Copy() GvDatos.DataSource = DtVentas End If @@ -100,7 +100,7 @@ Partial Class RepRemisiones GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0 End If - GvDatos.Columns(10).Visible = UsuarioActual.TienePermisoProceso(201) + GvDatos.Columns(10).Visible = chkInv.Checked 'solo se visualiza si está selccionada ObjVentas.Dispose() GvDatos.DataBind() @@ -148,6 +148,11 @@ Partial Class RepRemisiones 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) 'End If + If UsuarioActual.TienePermisoProceso(201) Then + divVerInv.Visible = True + End If + + End Sub Private Sub CargaSucursales() diff --git a/Ventas/RepRemisionesDetalle.aspx b/Ventas/RepRemisionesDetalle.aspx index f40f707ca..f8896d644 100644 --- a/Ventas/RepRemisionesDetalle.aspx +++ b/Ventas/RepRemisionesDetalle.aspx @@ -130,11 +130,11 @@
- + <%--
-
+ --%> @@ -187,6 +187,10 @@ +
+ + <%----%> +
<%--
diff --git a/Ventas/RepRemisionesDetalle.aspx.vb b/Ventas/RepRemisionesDetalle.aspx.vb index 9863874e9..190ae7986 100644 --- a/Ventas/RepRemisionesDetalle.aspx.vb +++ b/Ventas/RepRemisionesDetalle.aspx.vb @@ -114,7 +114,7 @@ Partial Class RepRemisionesDetalle If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 Then CveCliente = Request("CveCliente").ToEntero - Dim Cliente = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("NombreComercial", $"CveCliente ={CveCliente}") + Dim Cliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "") If Cliente <> "" Then DdlClientes.SelectedValue = CveCliente.ToString DdlClientes.SelectedText = Cliente @@ -122,14 +122,14 @@ Partial Class RepRemisionesDetalle Else CveCliente = -1 - End If - - If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then - CveContrato = Request("CveContrato").ToEntero - DdlContrato.SelectedValueExist(CveContrato) - Else - CveContrato = -1 - End If + End If + + 'If Request("CveContrato") IsNot Nothing AndAlso IsNumeric(Request("CveContrato")) AndAlso Request("CveContrato").ToEntero > 0 Then + ' CveContrato = Request("CveContrato").ToEntero + ' DdlContrato.SelectedValueExist(CveContrato) + 'Else + CveContrato = -1 + 'End If If Request("CveSubProyecto") IsNot Nothing Then CveSubProyecto = Request("CveSubProyecto").ToString DdlSubProyectos.SelectedValuesIfExistM(CveSubProyecto) @@ -155,10 +155,10 @@ Partial Class RepRemisionesDetalle FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaV = If(IsDate(TxtFechaVencimiento.Text.Trim()), TxtFechaVencimiento.Text.Trim(), "-1") CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) - CveContrato = If(DdlContrato.SelectedValue.ToEntero > 0, DdlContrato.SelectedValue.ToEntero, -1) + 'CveContrato = If(DdlContrato.SelectedValue.ToEntero > 0, DdlContrato.SelectedValue.ToEntero, -1) CveSubProyecto = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString - If ObjVentas.GetRepRemisionesSinFacturarDetalle(FechaI, FechaF, FechaV, CveCliente, CveContrato, CveVenta, UsuarioActual.CveEmpresa, CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=UsuarioActual.TienePermisoProceso(201)) Then + If ObjVentas.GetRepRemisionesSinFacturarDetalle(FechaI, FechaF, FechaV, CveCliente, CveContrato, CveVenta, UsuarioActual.CveEmpresa, CveSubProyecto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then If CveMoneda = 1 Or CveMoneda = 2 Then DtVentas = ObjVentas.DtResultados.FiltraParametros($"CveMoneda = {CveMoneda}") Else @@ -169,13 +169,13 @@ Partial Class RepRemisionesDetalle ObjVentas.Dispose() GvDatos.DataBind() - GvDatos.Columns(8).Visible = UsuarioActual.TienePermisoProceso(201) + GvDatos.Columns(8).Visible = chkInv.Checked UPDatos.Update() End Sub Public Sub CargaCombos() CargaCliente() - CargaContrato() + 'CargaContrato() CargaSucursales() End Sub Private Sub CargaCliente() @@ -191,20 +191,20 @@ Partial Class RepRemisionesDetalle End If End Sub - Private Sub CargaContrato() - Dim ObjContratos As New ClsContratos - DdlContrato.Items.Clear() - If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, -1, -1) Then - If ObjContratos.DtResultados.Rows.Count > 0 Then - DdlContrato.DataSource = ObjContratos.DtResultados - DdlContrato.DataBind() - End If + 'Private Sub CargaContrato() + ' Dim ObjContratos As New ClsContratos + ' DdlContrato.Items.Clear() + ' If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, -1, -1) Then + ' If ObjContratos.DtResultados.Rows.Count > 0 Then + ' DdlContrato.DataSource = ObjContratos.DtResultados + ' DdlContrato.DataBind() + ' End If - End If + ' End If - ObjContratos.Dispose() - DdlContrato.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub + ' ObjContratos.Dispose() + ' DdlContrato.Items.Insert(0, New ListItem("Todos", "-1")) + 'End Sub Private Sub CargaSucursales() DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataBind() @@ -233,7 +233,7 @@ Partial Class RepRemisionesDetalle If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Sucursal: {0}", DdlSubProyectos.GetSelectedText) If DdlClientes.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Cliente: {0}", DdlClientes.SelectedText) - If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Contrato: {0}", DdlContrato.SelectedItem.Text) + 'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Contrato: {0}", DdlContrato.SelectedItem.Text) If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio : {0}", txtFechaI.Text.ToDate.ToShortDateString) If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin : {0}", txtFechaF.Text.ToDate.ToShortDateString) From 01b82be96470e48d2b589fca262489e69066b843 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 13 Apr 2022 08:23:01 -0700 Subject: [PATCH 04/28] --- Contabilidad/RegPrePolizaS.aspx | 591 ++++++++++++++++---------------- Nomina/Nomina.aspx | 6 +- RH/CatPersonal.aspx.vb | 16 + SAT/SolicitudesNominaSat.aspx | 7 +- vwd.webinfo | 2 + 5 files changed, 325 insertions(+), 297 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index f53ec254c..4a679b342 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -1,9 +1,13 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePolizaS.aspx.vb" Inherits="ContabilidadC_RegPrePolizaS" EnableEventValidation="false" %> +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegPrePolizaS.aspx.vb" Inherits="ContabilidadC_RegPrePolizaS" EnableEventValidation="false" %> diff --git a/vwd.webinfo b/vwd.webinfo index 973bfdedd..accb5b476 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -466,6 +466,8 @@ + + From 7b3037d87566a2777607d63063dc0635230c8458 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Apr 2022 10:42:06 -0700 Subject: [PATCH 05/28] =?UTF-8?q?--=20SE=20AGREG=C3=93=20E=20LFILTRO=20POR?= =?UTF-8?q?=20CENTRO=20DE=20COSTO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsVentas.vb | 3 ++- Bancos/RepCortes.aspx.vb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5ba4bc54a..36bf075da 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3297,13 +3297,14 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveEmpresa As Integer) As Boolean + Public Function GetCortesDetalleVentasResumen(CveCorte As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_CortesDetalleVentasResumenGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 3109668a4..7011c1ad2 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -151,11 +151,11 @@ Partial Class Bancos_RepCortes Nombre = gvr.DataKey("Nombre").ToString Dim Vent As New ClsPuntoVenta Dim Vn As New ClsVentas - If Vn.GetCortesDetalleVentasResumen(CveCorte, UsuarioActual.CveEmpresa) Then + If Vn.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvP.DataSource = Vn.DtResultados DtCortesVentasResumen = Vn.DtResultados End If - If Vent.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then + If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvD.DataSource = Vent.DtResultados DtCortesVentas = Vent.DtResultados divDetalle.Visible = True From bebacfd376e7a3031faee40d95c0f0bb526acbc0 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 13 Apr 2022 10:42:17 -0700 Subject: [PATCH 06/28] filtro por subproyecto --- App_Code/ClsInventarios.vb | 4 ++-- Inventarios/RepAlmacenCompras.aspx | 12 ++++++++++-- Inventarios/RepAlmacenCompras.aspx.vb | 6 ++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index d33475899..f941a3f69 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1855,15 +1855,15 @@ Public Class ClsInventarios Return Retorno End Function - Public Function RepAlmacenCompras(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean + Public Function RepAlmacenCompras(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_RepAlmacenCompras") - With SqlAdapter.SelectCommand.Parameters .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/Inventarios/RepAlmacenCompras.aspx b/Inventarios/RepAlmacenCompras.aspx index cf906aac8..f4bf3cd07 100644 --- a/Inventarios/RepAlmacenCompras.aspx +++ b/Inventarios/RepAlmacenCompras.aspx @@ -33,10 +33,18 @@
    +
  • SubProyecto:
  • + <%--SubProyecto--%> +
  • +
    + + +
    +
  • Almacén:
  • - +
  • FechaInicio:
  • @@ -93,7 +101,7 @@ - + diff --git a/Inventarios/RepAlmacenCompras.aspx.vb b/Inventarios/RepAlmacenCompras.aspx.vb index 7b62d23a6..b52d29f6c 100644 --- a/Inventarios/RepAlmacenCompras.aspx.vb +++ b/Inventarios/RepAlmacenCompras.aspx.vb @@ -70,10 +70,12 @@ Partial Class Inventarios_RepAlmacenCompras Private Sub CargaCombos() 'Llena Almacen - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN ( 1, 22, 27)") DdlAlmacen.DataBind() DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) + CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, Nothing) + End Sub #End Region @@ -90,7 +92,7 @@ Partial Class Inventarios_RepAlmacenCompras Dim FechaF As Date = If(TxtFechaFin.Text = "" Or TxtFechaFin.Text = "__/__/____", MaxFecha, TxtFechaFin.Text.ToDate) - If ObjInventarios.RepAlmacenCompras(DdlAlmacen.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CveEmpresa) Then + If ObjInventarios.RepAlmacenCompras(DdlAlmacen.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then DtDatos = ObjInventarios.DtResultados DtAlmacenCompra = ObjInventarios.DtResultados Else From 7583974bc7f5e94f8a42db8ef6c30c71a9237f72 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 13 Apr 2022 15:46:11 -0700 Subject: [PATCH 07/28] E140. Solicitud de descuento por autorizacion --- App_Code/ClsVentas.vb | 3 +- Ventas/CatAutorizacionLimites.aspx | 54 ++- Ventas/CatAutorizacionLimites.aspx.vb | 28 +- Ventas/PV.aspx | 454 +++++++++++++++----------- Ventas/PV.aspx.vb | 90 ++++- 5 files changed, 426 insertions(+), 203 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5ba4bc54a..309a3d465 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5336,7 +5336,7 @@ Public Class ClsVentas #End Region - Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "") As Boolean + Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0, Optional Motivo As String = "", Optional PorcentajeDescuento As Decimal = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_AutorizacionLimitesAdd") With SqlAdapter.SelectCommand.Parameters @@ -5349,6 +5349,7 @@ Public Class ClsVentas .Add("@TipoAutorizacion", SqlDbType.Int).Value = TipoAutorizacion .Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento .Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos + .Add("@PorcentajeDescuento", SqlDbType.Decimal).Value = PorcentajeDescuento .Add("@Motivo", SqlDbType.VarChar).Value = Motivo End With Try diff --git a/Ventas/CatAutorizacionLimites.aspx b/Ventas/CatAutorizacionLimites.aspx index 997f0480f..3660fee70 100644 --- a/Ventas/CatAutorizacionLimites.aspx +++ b/Ventas/CatAutorizacionLimites.aspx @@ -35,7 +35,7 @@
    - +
    @@ -109,15 +109,19 @@ - + + + + + + - - + @@ -172,6 +176,7 @@ +
    @@ -180,6 +185,7 @@ + <%----%>
    @@ -194,14 +200,37 @@
    - -
    - - - - - - +
    +
    + +
    +
    +
    + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + +
    +
    @@ -218,6 +247,7 @@
+