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/11] =?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/11] 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 f48e2966b01e494f1a41a6f05fc5abb5d0a4b4cc Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 12 Apr 2022 09:36:51 -0700 Subject: [PATCH 03/11] Libro diario, mayor, --- App_Code/ClsContabilidad.vb | 47 +++ App_Code/ClsPV.vb | 78 ++-- App_Code/ClsPaginas.vb | 8 +- Contabilidad/LibroDiario.aspx | 2 +- Contabilidad/LibroDiario.aspx.vb | 26 +- Contabilidad/LibroMayor.aspx | 2 +- Contabilidad/LibroMayor.aspx.vb | 40 +- Contabilidad/RepOrigenAplicacion.aspx | 48 +++ Contabilidad/RepOrigenAplicacion.aspx.vb | 51 ++- Contabilidad/RepPolizasCuadre.aspx | 80 ++-- .../RepEstadoResultadosHorizontal.aspx.vb | 2 +- Empresas/141/Formatos/Factura.rdlc | 116 +++--- Inventarios/CartaPorteManual.aspx | 10 +- Inventarios/EntradasSalidas.aspx.vb | 2 +- PV/PVRepCompras.aspx | 180 --------- PV/PVRepCompras.aspx.vb | 307 --------------- PV/PVRepVentas.aspx | 229 ----------- PV/PVRepVentas.aspx.vb | 365 ------------------ PV/PVRepVentasCompras.aspx | 164 -------- PV/PVRepVentasCompras.aspx.vb | 238 ------------ Ventas/Ventas.aspx.vb | 13 - 21 files changed, 348 insertions(+), 1660 deletions(-) delete mode 100644 PV/PVRepCompras.aspx delete mode 100644 PV/PVRepCompras.aspx.vb delete mode 100644 PV/PVRepVentas.aspx delete mode 100644 PV/PVRepVentas.aspx.vb delete mode 100644 PV/PVRepVentasCompras.aspx delete mode 100644 PV/PVRepVentasCompras.aspx.vb diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index c1a58b3fb..07ef0da67 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -6708,6 +6708,53 @@ Public Class ClsContabilidad End Function + + + Public Function GetLibroMayorSIG(CveCuentaPadre As Integer, FechaInicio As Date, FechaFin As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_LibroMayorSIGGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCuentaPadre ", SqlDbType.Int).Value = CveCuentaPadre + .Add("@FechaI", SqlDbType.Date).Value = FechaInicio + .Add("@FechaF", SqlDbType.Date).Value = FechaFin + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de Libro Mayor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + + Public Function GetLibroDiarioSIG(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + DataAdapter("PA_LibroDiarioSIGGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.Date).Value = FechaInicio + .Add("@FechaF", SqlDbType.Date).Value = FechaFin + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de Libro Diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + #Region "IDisposable Support" ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) diff --git a/App_Code/ClsPV.vb b/App_Code/ClsPV.vb index 382f34065..62724f041 100644 --- a/App_Code/ClsPV.vb +++ b/App_Code/ClsPV.vb @@ -152,53 +152,53 @@ Public Class ClsPV End Function 'Reporte de Compras - Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_PV_ComprasGetRep") + 'Public Function GetRepPVCompras(FechaI As String, FechaF As String, CveProveedor As Integer, CveUsuario As Integer, CveMoneda As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_PV_ComprasGetRep") - With SqlAdapter.SelectCommand.Parameters - .Add("@FechaI", SqlDbType.VarChar).Value = FechaI - .Add("@FechaF", SqlDbType.VarChar).Value = FechaF - .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@GPO", SqlDbType.Int).Value = Gpo - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + ' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + ' .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@GPO", SqlDbType.Int).Value = Gpo + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el Reporte de Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function 'Reporte de Ventas VS Compras - Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_PV_VentasComprasGetRep") + 'Public Function GetRepPVVentasCompras(FechaI As String, FechaF As String, CveSubProyecto As Integer, CveEmpresa As Integer, Gpo As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_PV_VentasComprasGetRep") - With SqlAdapter.SelectCommand.Parameters - '.Add("@CveVenta", SqlDbType.Int).Value = CveVenta - .Add("@FechaI", SqlDbType.VarChar).Value = FechaI - .Add("@FechaF", SqlDbType.VarChar).Value = FechaF - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@GPO", SqlDbType.Int).Value = Gpo - End With + ' With SqlAdapter.SelectCommand.Parameters + ' '.Add("@CveVenta", SqlDbType.Int).Value = CveVenta + ' .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + ' .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + ' .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@GPO", SqlDbType.Int).Value = Gpo + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el Reporte de Ventas y Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function #Region "IDisposable Support" diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e3b6570c4..875e14c20 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5538,9 +5538,9 @@ Public Class ClsPaginas PaginaDict.Add("/Proveedores/LogInProveedores.aspx".ToUpper(), -1) 'Punto de Venta - PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270) - PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272) - PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) + 'PaginaDict.Add("/PV/PVRepVentas.aspx".ToUpper(), 270) + 'PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272) + 'PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273) PaginaDict.Add("/Contratos/ContratoObra.aspx".ToUpper(), 911) PaginaDict.Add("/Contratos/RepContratosObraAvances.aspx".ToUpper(), 914) @@ -5999,7 +5999,7 @@ Public Class ClsPaginas Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA - If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") Then + If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") AndAlso Not RutaReporte.Contains("Contabilidad/Reportes/") AndAlso Not RutaReporte.Contains("AC/Reportes/") Then bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "") End If diff --git a/Contabilidad/LibroDiario.aspx b/Contabilidad/LibroDiario.aspx index c1e178af6..1c7f57634 100644 --- a/Contabilidad/LibroDiario.aspx +++ b/Contabilidad/LibroDiario.aspx @@ -3,7 +3,7 @@ diff --git a/Contabilidad/LibroMayor.aspx.vb b/Contabilidad/LibroMayor.aspx.vb index d3df61d1e..d605ab9d5 100644 --- a/Contabilidad/LibroMayor.aspx.vb +++ b/Contabilidad/LibroMayor.aspx.vb @@ -44,9 +44,17 @@ Partial Class Contabilidad_LibroMayor If UsuarioActual.Empresa.UsaAC Then BtnConsultar.Enabled = True Else - Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError) + + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + BtnConsultar.Enabled = True + Else + Alert("La empresa no usa Armonización Contable", TipoMensaje.MsgError) + End If + End If + + End If End Sub @@ -70,13 +78,32 @@ Partial Class Contabilidad_LibroMayor FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha) FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha) - Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then - DtDatos = ObjConta.DtResultados + '140 + Dim CvecuentaPadre As Integer = 57416 '140 + + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + + + Dim ObjConta As New ClsContabilidad + If ObjConta.GetLibroMayorSIG(CvecuentaPadre, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then + DtDatos = ObjConta.DtResultados + Else + DtDatos = Nothing + End If + ObjConta.Dispose() + + Else - DtDatos = Nothing + Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConta.GetLibroMayor(1, FechaInicio, FechaFin, 1) Then + DtDatos = ObjConta.DtResultados + Else + DtDatos = Nothing + End If + ObjConta.Dispose() End If - ObjConta.Dispose() + + If DtDatos IsNot Nothing Then ImgExcel.Visible = True @@ -159,6 +186,7 @@ Partial Class Contabilidad_LibroMayor #Region " IMPRIMIR " #End Region + Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) diff --git a/Contabilidad/RepOrigenAplicacion.aspx b/Contabilidad/RepOrigenAplicacion.aspx index 0d6a3eae7..004174006 100644 --- a/Contabilidad/RepOrigenAplicacion.aspx +++ b/Contabilidad/RepOrigenAplicacion.aspx @@ -235,6 +235,8 @@ + + @@ -275,6 +277,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Contabilidad/RepOrigenAplicacion.aspx.vb b/Contabilidad/RepOrigenAplicacion.aspx.vb index ded0f81d4..12fd1f715 100644 --- a/Contabilidad/RepOrigenAplicacion.aspx.vb +++ b/Contabilidad/RepOrigenAplicacion.aspx.vb @@ -89,6 +89,9 @@ Partial Class Contabilidad_RepOrigenAplicacion TdFI.Visible = False tdTipoReporte.Visible = False + GvOrigenAplicacionSIG.Visible = True + GvDatos.Visible = False + End If End If @@ -162,25 +165,26 @@ Partial Class Contabilidad_RepOrigenAplicacion Dim AnioAnteior As Integer = AnioActual - 1 - GvDatos.Columns(1).Visible = True - GvDatos.Columns(2).Visible = True + GvOrigenAplicacionSIG.Columns(1).Visible = True + GvOrigenAplicacionSIG.Columns(2).Visible = True - GvDatos.Columns(1).HeaderText = AnioAnteior.ToString - GvDatos.Columns(2).HeaderText = AnioActual.ToString + GvOrigenAplicacionSIG.Columns(1).HeaderText = AnioAnteior.ToString + GvOrigenAplicacionSIG.Columns(2).HeaderText = AnioActual.ToString Dim ObjConta As New ClsContabilidad - + 'GvOrigenAplicacionSIG If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then - GvDatos.DataSource = ObjConta.DtResultados + GvOrigenAplicacionSIG.DataSource = ObjConta.DtResultados If ObjConta.DtResultados.Rows.Count > 0 Then LnkExcel.Visible = True End If Else - GvDatos.DataSource = Nothing + GvOrigenAplicacionSIG.DataSource = Nothing End If ObjConta.Dispose() - GvDatos.DataBind() + GvOrigenAplicacionSIG.DataBind() + Else @@ -214,6 +218,31 @@ Partial Class Contabilidad_RepOrigenAplicacion End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + 'Titulo y Sumatoria de cambios + If e.Row.DBCampo("Orden3").ToString.ToEntero = 10 Or e.Row.DBCampo("Orden3").ToString.ToEntero = 30 Then + e.Row.FCLabel("LbNombre").Font.Bold = True + End If + + 'CUENTAS + If e.Row.DBCampo("Orden3").ToString.ToEntero = 20 Then + e.Row.FCLabel("LbNombre").Attributes.Add("style", "padding-left: 20px;") + End If + + 'TOTAL + If e.Row.DBCampo("Nombre").ToString.Trim = "" Then + e.Row.Attributes.Add("style", "border-top: 1px solid; margin-top:10px;") + e.Row.FCLabel("LbNombre").Font.Bold = True + e.Row.FCLabel("LbNombre").Font.Italic = True + e.Row.FCLabel("LbNombre").Text = "TOTAL" + End If + + End If + End Sub + + + Protected Sub GvOrigenAplicacionSIG_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOrigenAplicacionSIG.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then 'Titulo y Sumatoria de cambios @@ -251,6 +280,12 @@ Partial Class Contabilidad_RepOrigenAplicacion End If End Sub + + + + + + #End Region diff --git a/Contabilidad/RepPolizasCuadre.aspx b/Contabilidad/RepPolizasCuadre.aspx index cad8bb655..d5017bbd8 100644 --- a/Contabilidad/RepPolizasCuadre.aspx +++ b/Contabilidad/RepPolizasCuadre.aspx @@ -12,44 +12,50 @@ -
-
-
- -
-
- -
- - -
- - -
- -
- - - - - - - - - - - - - - -
+ + + +
+
+
+ +
+
+
+ +
+ + +
+ +
+ + + + + + + + + + + + + + +
+
+
- -
-
-
+ + + + + + + @@ -87,7 +93,9 @@ <%-- FechaMovto Mensaje CveIE CveCompra CveVenta CvePrePoliza FolioPoliza--%> - + diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index ad1698125..e34b0a8e5 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -1836,7 +1836,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Next Row.Item("Nombre") = "TOTAL INGRESOS " - Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString + Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "NOT CtaMayor in (3,4)") 'TotalActual.ToString Row.Item("PorcentajeActual") = "100.00" Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") 'TotalAnterior.ToString Row.Item("PorcentajeAcumulado") = "100.00" diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index 1b2cda7de..771436235 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -931,7 +931,7 @@ calibri 8pt Normal - #,0.00;(#,0.00);'-' + #,0.00;(#,0.00) @@ -951,7 +951,6 @@ 2pt - true @@ -1811,31 +1810,28 @@ Normal + + - - =Parameters!Fecha.Value - - - - true - true - - - - - VERSION 3.3 - - - - - - - Textbox5 - 2.32303cm - 17.39754cm - 0.6cm - 3.32021cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - true 20.92547cm 0.13424cm - 2.97096cm + 2.25247cm 20.89818cm 42 @@ -3945,8 +3905,44 @@ + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 23.28377cm + 17.70088cm + 0.6cm + 3.32021cm + 45 + + + 2pt + 2pt + 2pt + 2pt + + - 27.70336cm + 27.49699cm diff --git a/vwd.webinfo b/vwd.webinfo index 973bfdedd..accb5b476 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -466,6 +466,8 @@ + + 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 06/11] 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 @@
+