From a1b2c1271a1f2a22c4ee3fe6fd137df51894500e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 13 Feb 2020 13:37:41 -0700 Subject: [PATCH 01/14] =?UTF-8?q?agregando=202=20nuevos=20campos=20a=20los?= =?UTF-8?q?=20folios=20garantias=20y=20nueva=20validaci=C3=B3n=20en=20punt?= =?UTF-8?q?o=20de=20venta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/CatFoliosGarantia.aspx | 72 ++++++++++++++++++++++++-- Acumuladores/CatFoliosGarantia.aspx.vb | 25 +++++---- App_Code/ClsAcumuladores.vb | 11 ++-- Empresas/141/Formatos/Factura.rdlc | 4 +- Ventas/PV.aspx.vb | 9 +++- 5 files changed, 100 insertions(+), 21 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index a6b8a70b9..3d1962323 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -67,6 +67,42 @@ + + + +
+
+
+ +
+
+
+ +
+ <%-- --%> + + + general + optima + motobateria + +
+ +
+ + + + + +
+
+
+
+
+
+
+
+
@@ -77,12 +113,12 @@ -
+
- + + +   + + + + +   + +   @@ -201,9 +246,9 @@
- +
- +
@@ -216,10 +261,27 @@
  +
+
+   + + general + optima + motobateria + + +
+
+
+ + + + +
<%--
diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index ef5209ca0..795b00dfc 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -38,7 +38,7 @@ Partial Class Acumuladores_CatFoliosGarantia If Not Page.IsPostBack Then CargaSubProyectos() - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") End If End Sub @@ -53,11 +53,11 @@ Partial Class Acumuladores_CatFoliosGarantia DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) End Sub - Private Sub CargadatosGvFolioGarantia() + Private Sub CargadatosGvFolioGarantia(EstatusValor As Integer, tipoFolioValor As String) Dim objAcum As New ClsAcumuladores - If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa) Then + If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=EstatusValor, TipoFolio:=tipoFolioValor) Then GvFolioGarantia.DataSource = objAcum.DtResultados Else GvFolioGarantia.DataSource = Nothing @@ -116,7 +116,7 @@ Partial Class Acumuladores_CatFoliosGarantia If Not Actualizar Then - If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero) Then + If ObjAcum.FoliosGarantiaAdd(TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then TxtFolioGarantia.Text = "" ChkEstatus.Checked = True @@ -125,7 +125,7 @@ Partial Class Acumuladores_CatFoliosGarantia 'TxtCompra.Text = "" 'TxtPuntos.Text = "" - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") UpGral.Update() @@ -135,7 +135,8 @@ Partial Class Acumuladores_CatFoliosGarantia Alert("Ocurrió un error al guardar el Folio de Garantía", TipoMensaje.MsgError) End If Else - If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero) Then + If ObjAcum.FoliosGarantiaUpdate(CveFolioGarantia, TxtFolioGarantia.Text, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, DdlSubProyectos.SelectedValue.ToEntero, + DdlTipoFolioModal.SelectedValue, TxtLimite.Text.ToEntero) Then TxtFolioGarantia.Text = "" ChkEstatus.Checked = True @@ -144,7 +145,7 @@ Partial Class Acumuladores_CatFoliosGarantia 'TxtCompra.Text = "" 'TxtPuntos.Text = "" - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") UpModalFolioGarantia.Update() RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarFolioGarantia"), "jsHideModalFolioGarantia") @@ -171,7 +172,7 @@ Partial Class Acumuladores_CatFoliosGarantia Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia") If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") Alert("Capacitador Eliminó Correctamente ", TipoMensaje.MsgInformacion) Else @@ -180,7 +181,7 @@ Partial Class Acumuladores_CatFoliosGarantia objAcum.Dispose() - CargadatosGvFolioGarantia() + CargadatosGvFolioGarantia(-1, "-1") CveFolioGarantia = -1 @@ -198,6 +199,8 @@ Partial Class Acumuladores_CatFoliosGarantia TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia") ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) + TxtLimite.Text = GvRow.DataKey("Limite") + DdlTipoFolioModal.SelectedValue = GvRow.DataKey("tipoFolio") 'TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00") 'TxtBonificacion.Text = GvRow.DataKey("Bonificacion").ToDecimal.ToString("###,###,###.00") 'TxtCompra.Text = GvRow.DataKey("Compra").ToDecimal.ToString("###,###,###.00") @@ -221,6 +224,8 @@ Partial Class Acumuladores_CatFoliosGarantia #End Region - + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue) + End Sub End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 56eb8028b..0a9418855 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -483,7 +483,7 @@ Public Class ClsAcumuladores #Region " FOLIOS GARANTÍA " - Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean + Public Function FoliosGarantiaGet(CveFolioGarantia As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional TipoFolio As String = "-1") As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -493,6 +493,7 @@ Public Class ClsAcumuladores .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@tipoFolio", SqlDbType.VarChar).Value = TipoFolio End With Try @@ -507,7 +508,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean + Public Function FoliosGarantiaAdd(FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -520,6 +521,8 @@ Public Class ClsAcumuladores .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio + .Add("@Limite", SqlDbType.Int).Value = Limite End With @@ -535,7 +538,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer) As Boolean + Public Function FoliosGarantiaUpdate(CveFolioGarantia As Integer, FolioGarantia As String, Estatus As Integer, CveUsuario As Integer, CveSubProyecto As Integer, TipoFolio As String, Limite As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -548,6 +551,8 @@ Public Class ClsAcumuladores .Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TipoFolio", SqlDbType.VarChar).Value = TipoFolio + .Add("@Limite", SqlDbType.Int).Value = Limite End With diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index 671af6634..98de34936 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -1099,7 +1099,7 @@ - =Fields!PS.Value & " " & Fields!Obs.Value + =Fields!PS.Value & System.Environment.NewLine & IIF(Fields!Obs.Value <> "","Observaciones: ","") & Fields!Obs.Value - 20.5093cm + 20.50931cm - true From 437423b7628a0b8aacc82454ae91804b6ec4bc72 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 17 Feb 2020 12:04:57 -0700 Subject: [PATCH 08/14] agregando descuentos por clasificaciones en bdh --- Ventas/PV.aspx.vb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index cd6baf4c1..2f8e25299 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2882,6 +2882,15 @@ Partial Class PV End If End If + 'Descuento por clasificación + If drPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then + Dim clasificacionesDescuentos As New Dictionary(Of Integer, Double) From { + {20516, 0.23}, 'Descuento para lubricantes LTH + {20515, 0.24} 'Descuento para filtros LTH + } + TxtDescuento.Text = (PrecioSugerido * clasificacionesDescuentos(drPS("CveClasificacion").ToString.ToEntero)).ToString("F2") + End If + If ChkAjuste.Checked Then CalculaMesesUso() UpAjuste.Update() From 229822a3d4166d9044dde52faba9bddf44c692e4 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 17 Feb 2020 15:46:41 -0700 Subject: [PATCH 09/14] =?UTF-8?q?consultando=20los=20BCI=20en=20los=20tama?= =?UTF-8?q?=C3=B1os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 2f8e25299..adfdc2a1d 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5098,7 +5098,7 @@ Partial Class PV Dim ObjGral As New ClsGenerales If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then - e.Row.FCDropDownList("DdlBCIUsado").DataSource = ObjGral.DtResultados + e.Row.FCDropDownList("DdlBCIUsado").DataSource = ObjGral.DtResultados.FiltraParametros(String.Format("CveTamaño = {0}", e.Row.DataKey("CveTamaño"))) End If 'DdlBCIUsado.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlBCIUsado.SelectedValueExist(-1) From 14a7d0ea6e2cdd75489283fdc7f42a7f4446479b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 17 Feb 2020 18:34:33 -0700 Subject: [PATCH 10/14] compras con usados en recepcion almacen,redondeo en aplicacion de NC, ver modulos de cotizaciones --- App_Code/ClsPaginas.vb | 19 +++- Inventarios/RecepcionAlmacen.aspx.vb | 46 +++++++--- Ventas/PV.aspx | 21 +++-- Ventas/Ventas.aspx.vb | 125 ++++++++++++++++++++++++--- 4 files changed, 180 insertions(+), 31 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5ce6ad484..634b55910 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4874,12 +4874,23 @@ Public Class ClsPaginas Case "S" : Retorno = 1203 Case Else : Retorno = 1202 End Select + End If + + If Pagina.ToUpper() = ("/Ventas/Ventas.aspx").ToUpper() Then + Select Case Request("Op") + Case "Cot" : Retorno = 366 + Case "Rem" : Retorno = 2018 + Case Else : Retorno = 6 + End Select + End If + + If Pagina.ToUpper() = ("/Ventas/RepVentas.aspx").ToUpper() Then + Select Case Request("Op") + Case "Cot" : Retorno = 367 + Case Else : Retorno = 9 + End Select End If - ' End If - - - 'PaginaDict = Nothing Return Retorno End Function diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 7906f4e00..ede60a241 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -807,6 +807,8 @@ Partial Class Inventarios_RecepcionAlmacen End If End Sub Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer) + CargaAlmacenes(-1) + Dim ObjCompras As New ClsCompras Dim ObjInventario As New ClsInventarios @@ -838,16 +840,34 @@ Partial Class Inventarios_RecepcionAlmacen CargaAlmacenes(-1, "21,2") End If RecibidaCompleta = False + + Dim CargaSoloUsados As Boolean = False If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + Dim DtRecepcion As DataTable = Nothing + Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero() + Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero() + + 'SI LA COMPRA TIENE PRODUCTOS Y USADOS SOLO MOSTRAR LOS PRODUCTOS + If NumProductos > 0 AndAlso NumUsados > 0 Then + DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False") + 'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES + ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then + CargaSoloUsados = True + DtRecepcion = ObjInventario.DtResultados.Copy() + CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22") + Else + DtRecepcion = ObjInventario.DtResultados.Copy() + End If + DtDatosDetalle = Nothing CreaDtDetalle() DtDatosLoteDetalle = Nothing CreaDtLoteDetalle() - CreaDTInv(ObjInventario.DtResultados) + CreaDTInv(DtRecepcion) BtnGuardar.Visible = True 'cuando están todos los detalles de la compra, nos indica que se va a recibir la totalidad de la compra - If ObjInventario.DtResultados.Rows.Count = ObjInventario.DtResultados.Rows(0)("NumDetalles").ToString.ToEntero Then + If DtRecepcion.Rows.Count = DtRecepcion.Rows(0)("NumDetalles").ToString.ToEntero Then RecibidaCompleta = True End If @@ -869,8 +889,8 @@ Partial Class Inventarios_RecepcionAlmacen LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente" DivAdvertencia.Visible = True EntregaDirecta = True - CveCliente = ObjInventario.DtResultados.Rows(0)("CveCliente").ToString.ToEntero - CveVendedor = ObjInventario.DtResultados.Rows(0)("CveVendedor").ToString.ToEntero + CveCliente = DtRecepcion.Rows(0)("CveCliente").ToString.ToEntero + CveVendedor = DtRecepcion.Rows(0)("CveVendedor").ToString.ToEntero If DtInv.COUNT("EntregaDirecta") <> DtInv.Rows.Count Then @@ -884,7 +904,7 @@ Partial Class Inventarios_RecepcionAlmacen Alert("No hay productos pendientes de surtir de esta compra. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Else - If ObjInventario.DtResultados.Rows(0)("CveVendedor").ToString.ToEntero > 0 And ObjInventario.DtResultados.Rows(0)("CveCliente").ToString.ToEntero > 0 Then + If DtRecepcion.Rows(0)("CveVendedor").ToString.ToEntero > 0 And DtRecepcion.Rows(0)("CveCliente").ToString.ToEntero > 0 Then If DtInv.SUM("EntregaDirecta") > 0 Then ''ENTREGA DIRECTA 'LtAdvertencia.Text = "La mercancía tendra salida inmediata por ser entrega directa al cliente" @@ -892,9 +912,9 @@ Partial Class Inventarios_RecepcionAlmacen 'EntregaDirecta = True Else 'APARTADO - 'If UsuarioActual.CveUsuario.Contiene(100) Or (ObjInventario.DtResultados.Rows(0)("CveUsuarioOC").ToString.ToEntero = 1559 And ObjInventario.DtResultados.Rows(0)("FechaIngOC").ToString.ToDateTime > "2017-04-24 12:00".ToDateTime) Then + 'If UsuarioActual.CveUsuario.Contiene(100) Or (DtRecepcion .Rows(0)("CveUsuarioOC").ToString.ToEntero = 1559 And DtRecepcion .Rows(0)("FechaIngOC").ToString.ToDateTime > "2017-04-24 12:00".ToDateTime) Then If UsuarioActual.Empresa.Funcionalidad(148) = "1" Then - CveAlmacenApartado = ObjInventario.DtResultados.Rows(0)("CveAlmacenApartado").ToString.ToEntero + CveAlmacenApartado = DtRecepcion.Rows(0)("CveAlmacenApartado").ToString.ToEntero DivAdvertencia.Visible = True Apartado = True @@ -903,7 +923,11 @@ Partial Class Inventarios_RecepcionAlmacen LtAdvertencia.Text = "No se puede recibir la mercancía por ser de apartados y no contar con un almacen de apartado." Else LtAdvertencia.Text = "La mercancía sera traspasada ha apartados" - CargaAlmacenes(ObjInventario.DtResultados.Rows(0)("CveSubProyecto").ToString.ToEntero) + If CargaSoloUsados Then + CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22") + Else + CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero) + End If End If End If 'End If @@ -912,19 +936,19 @@ Partial Class Inventarios_RecepcionAlmacen End If - Dim CantidadFaltante As Double = ObjInventario.DtResultados.SUM("CantidadC", "CantidadF > 0") + Dim CantidadFaltante As Double = DtRecepcion.SUM("CantidadC", "CantidadF > 0") If UsuarioActual.Empresa.UsaAC AndAlso CantidadFaltante > 0 Then PnlAC.Visible = True CargaAC() - LbTotalPorDevengar.Text = ObjInventario.DtResultados.SUM("Total", "CantidadF > 0").FormatoNumero + LbTotalPorDevengar.Text = DtRecepcion.SUM("Total", "CantidadF > 0").FormatoNumero End If 'Existencias If TipoMovimiento = 2 Then If ObjInventario.ComprasDevolucionExistenciasGet(CveCompraSurtir) Then - DtExistencias = ObjInventario.DtResultados + DtExistencias = DtRecepcion Else Alert("No se pudieron cargar las existencias del movimiento de entrada, por lo cual no se podra hacer la devolución.", TipoMensaje.MsgError) BtnGuardar.Enabled = False diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 594ad76f0..d60fe016f 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2918,7 +2918,7 @@
- +<%-- --%> <%----%> <%----%> @@ -3019,7 +3019,8 @@ //SI ES MOTOBATERIA if (CveClasificacion = "20517") { - regex = "[*]|" + regex = "[1X]|" + //regex = "[*]|" //SI ES OPTIMA } else if (CveClasificacion = "20511") { regex = "[1X]|" @@ -3064,15 +3065,25 @@ let clasificaciones = ["20517", "20511"] //SI ES MOTOBATERIA - if (clasificaciones.includes(CveClasificacion)) { - var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$"); - arguments.IsValid = re.test(parseInt(arguments.Value)); + if (CveClasificacion = "20517") { + var re = new RegExp("^[X]|[x]|[A-L][0-9][1-9A-Z][A-HJ-M]$"); + arguments.IsValid = re.test(arguments.Value); return; } else { var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$"); arguments.IsValid = re.test(arguments.Value); return; } + //if (clasificaciones.includes(CveClasificacion)) { + // //var re = new RegExp("^[*]|[A-L][0-9][1-9A-Z][A-HJ-M]$"); + // var re = new RegExp("^[X]|[A-L][0-9][1-9A-Z][A-HJ-M]$"); + // arguments.IsValid = re.test(parseInt(arguments.Value)); + // return; + //} else { + // var re = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$"); + // arguments.IsValid = re.test(arguments.Value); + // return; + //} } function CalculaMesesUso() { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9717df420..92e6bd6e0 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6890,7 +6890,7 @@ Partial Class Ventas If ErrorList.Count = 0 Then If ObjFactura.CveVenta > 0 And CveAlmacenExistenciasContrato > 0 And DdlTipoComprobante.SelectedValue = "Ing" Then - If Not RegistraAlmacenConsignacionVenta(ObjInventario, ObjFactura) Then + If Not RegistraAlmacenConsignacionVenta(ObjInventario, ObjConta, ObjFactura, ObjContPaq) Then ErrorList.Add("Ocurrió un error al registrar los movimientos de almacén del contrato de consignación") End If End If @@ -11533,8 +11533,8 @@ Partial Class Ventas HdnTieneAnticiposVinculados.Value = "0" Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, DdlMoneda.SelectedValue.ToEntero) Then - GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}") + If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then + GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}") If ObjMovtos.DtResultados.SUM("Saldo", "Saldo > 0 AND SaldoSubtotal > 0 AND Tipo = 'Ant'") > 0 Then HdnTieneAnticipos.Value = "1" End If @@ -14624,6 +14624,7 @@ Partial Class Ventas TmpDT.Columns.Add("CveConcepto", GetType(Integer)) TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean)) + TmpDT.Columns.Add("EsUsado", GetType(Boolean)) End Sub Private Sub CreaDTmpC() @@ -15711,7 +15712,8 @@ Partial Class Ventas Return Not OcurrioError End Function - Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False) As Integer + Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, + Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False, Optional ObjContPaq As ClsContPAQi = Nothing) As Integer Dim OcurrioError As Boolean = False Dim ContadorMovtosDetalles = 0 @@ -15780,6 +15782,7 @@ Partial Class Ventas 'Agregamos las PrePolizas If Not OcurrioError Then If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then + 'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen) If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then Dim DtCostos = ObjInventario.DtResultados.Copy Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) @@ -15847,6 +15850,99 @@ Partial Class Ventas 'Return Not OcurrioError End Function + Private Function GeneraPrePolizaMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjContPaq As ClsContPAQi, ObjFactura As Modelos.Factura, CvePrePoliza As Integer, CveMovimientoInventario As Integer, CveAlmacen As Integer) As Boolean + Dim OcurrioError As Boolean = False + Dim GenerarPrePolizaNueva As Boolean = False + Try + Dim DtCostos As DataTable = Nothing + Dim DtCostosDistinct As DataTable = Nothing + Dim IdCtaContable As Integer = 0 + Dim CveCuenta As Integer = 0 + Dim ValorInventario As Decimal = 0D + Dim TotalCostoAcumulado As Decimal = 0D + Dim Cont As Integer = 1 + + + If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + DtCostos = ObjInventario.DtResultados.Copy + DtCostosDistinct = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) + Else + OcurrioError = True + End If + + If OcurrioError Then + Return Not OcurrioError + End If + + Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL + + If CvePrePoliza <= 0 Then + GenerarPrePolizaNueva = True + CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GeneraMovimientoAlmacen", ObjFactura.CvePlantillaPoliza, TotalCosto, TotalCosto, ObjFactura.CveMoneda, ObjFactura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, ObjFactura.Cliente.Nombre), ObjFactura.CveUsuario, UsuarioActual.CveEmpresa) + + If CvePrePoliza <= 0 Then + OcurrioError = True + Return Not OcurrioError + End If + End If + + For Each RowInv As DataRow In DtCostosDistinct.Rows + ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL + IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero + CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero + TotalCostoAcumulado += ValorInventario + + 'cuando es el último movimiento y hay diferencias en los importes + If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then + ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) + End If + + Try + 'If ValorInventario <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + OcurrioError = True + Exit For + End If + 'End If + Catch ex As Exception + OcurrioError = True + Alert("Error inesperado (15147). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) + End Try + Cont += 1 + Next + + If Not OcurrioError Then + IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + OcurrioError = True + End If + End If + + If GenerarPrePolizaNueva Then + Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" + + If UsuarioActual.CveEmpresa = 119 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then + AutoConta = False + End If + + If AutoConta Then + If idCuentaContabilizacion > 0 Then + If Not ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then + Alert("Ocurrio un Error al contabilizar la prepoliza de almacen, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) + End If + Else + Alert(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia) + End If + End If + End If + + Catch ex As Exception + OnError("Ocurrió un error al generar la prepoliza del movimiento de almacen", ex) + OcurrioError = True + End Try + + Return Not OcurrioError + End Function Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura) As Boolean Dim OcurrioError As Boolean = False @@ -19661,7 +19757,7 @@ Partial Class Ventas #End Region #Region " CONTRATO DE CONSIGNACION DE VENTA - SURTIDO DE ALMACÉN " - Function RegistraAlmacenConsignacionVenta(ByRef ObjInventario As ClsInventarios, factura As Modelos.Factura) As Boolean + Function RegistraAlmacenConsignacionVenta(ByRef ObjInventario As ClsInventarios, ByRef ObjConta As ClsContabilidad, factura As Modelos.Factura, ObjContPaq As ClsContPAQi) As Boolean If Not (UsuarioActual.Empresa.UsaInventarios AndAlso CveAlmacenExistenciasContrato > 0) Then Return True End If @@ -19738,6 +19834,11 @@ Partial Class Ventas End If Next End If + + 'GENERAR PREPOLIZA + If Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoEntradaGeneral, CveAlmacenOrigenContrato) Then + Return False + End If Else Return False End If @@ -21360,8 +21461,8 @@ Partial Class Ventas For Each Dr As DataRow In DtImpuestosLocal.Rows FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto")) - importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr))).ToDecimal - Dr("ImporteTotal") = importePuTemp.RoundSQL() + importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr).ToDecimal() - TmpDT.SUM("Descuento", FiltroStr).ToDecimal())) + Dr("ImporteTotal") = importePuTemp.RoundSQL(2) Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) @@ -21374,7 +21475,7 @@ Partial Class Ventas 'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) 'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) 'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) - Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) + Dr("ImportePU") = importePuTemp.RoundSQL(6) 'Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) Next @@ -21664,7 +21765,7 @@ Partial Class Ventas Dim AplicaPUEditado As Boolean = UsuarioActual.TienePermisoProceso(253) - Dim DtUsados As DataTable = TmpDT.FiltraParametros("CveClasificacion = 20519") + Dim DtUsados As DataTable = TmpDT.FiltraParametros("EsUsado = True") TmpDT.Clear() For Each Gv As GridViewRow In GvAplicaDevolucion.Rows @@ -24027,9 +24128,11 @@ Partial Class Ventas Else Row("PorcentajeIVA") = DrPS("IVA") End If - Dim TotalCalculableImpuestos = (Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble) - Row("Descuento").ToString.ToDouble + Dim TotalCalculableImpuestos As Decimal = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) - Row("Descuento").ToString.ToDecimal + Dim TotalCalculableImpuestosIVA As Decimal = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString.ToDecimal) + Row("IVA") = Row("PorcentajeIVA").ToString.ToDouble - Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDouble * TotalCalculableImpuestos, NumeroDecimales) + Row("ImporteIVA") = (Row("PorcentajeIVA").ToString.ToDouble * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales) End If Else Row("IVA") = 0 From f589e7dfd0f8ac75867f6374dedb7da1f5e344cc Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 18 Feb 2020 08:50:47 -0700 Subject: [PATCH 11/14] IEPS Por Entidad Federativa --- App_Code/ClsGenerales.vb | 19 +++++ App_Code/ClsPaginas.vb | 1 + General/CATIEPSxEntidadFed.aspx | 118 +++++++++++++++++++++++++++++ General/CATIEPSxEntidadFed.aspx.cs | 98 ++++++++++++++++++++++++ 4 files changed, 236 insertions(+) create mode 100644 General/CATIEPSxEntidadFed.aspx create mode 100644 General/CATIEPSxEntidadFed.aspx.cs diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index bb08cf310..0966d0143 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -133,6 +133,25 @@ Public Class ClsGenerales End With End Sub + Public Function IEPSxEntidadFed(cveEstado As Int32, tasaIEPS As Decimal, fechaInicio As String, fechaFin As String, cveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GralIepsPorEntidadFederativa", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + + .Add("@CveEstado", SqlDbType.Int).Value = (cveEstado) + .Add("@TasaIEPS", SqlDbType.Decimal).Value = (tasaIEPS) + .Add("@FechaInicio", SqlDbType.VarChar).Value = (fechaInicio) + .Add("@FechaFin", SqlDbType.VarChar).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 IEPS por entidad federativa.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function RepConciliacionSatDetalleGET(cveEmpresa As Int32, tipoDocto As String, fechaI As String, fechaF As String, RegistroEn As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_RepConciliacionSatDetalleGET", CommandType.StoredProcedure) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5ce6ad484..731b860f7 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3517,6 +3517,7 @@ Public Class ClsPaginas PaginaDict.Add("/Inicio.aspx".ToUpper(), -1) PaginaDict.Add("/reporteador.aspx".ToUpper(), -1) + PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719) PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718) PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716) diff --git a/General/CATIEPSxEntidadFed.aspx b/General/CATIEPSxEntidadFed.aspx new file mode 100644 index 000000000..59670ee41 --- /dev/null +++ b/General/CATIEPSxEntidadFed.aspx @@ -0,0 +1,118 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CATIEPSxEntidadFed.aspx.cs" Inherits="General_CATIEPSxEntidadFed" %> + + + + + + + + IEPS Por Entidad Federativa + + + + +
  • + Excel +
  • +
    + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + +
    + +
    + + +
    +
    + Fecha Inicio +
    +
    +
    + + + + +
    + + + +
    +
    + Fecha Fin +
    +
    +
    + + + + +
    + + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/General/CATIEPSxEntidadFed.aspx.cs b/General/CATIEPSxEntidadFed.aspx.cs new file mode 100644 index 000000000..66f2eff2b --- /dev/null +++ b/General/CATIEPSxEntidadFed.aspx.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +public partial class General_CATIEPSxEntidadFed : ClsPaginas +{ + #region Propiedades + private int RcveEstado + { + get { return (ViewState["RcveEstado"] == null) ? 0 : Convert.ToInt32(ViewState["RcveEstado"]); } + set { ViewState["RcveEstado"] = value; } + } + private decimal RtasaIEPS + { + get { return (ViewState["RtasaIEPS"] == null) ? 0 : Convert.ToDecimal(ViewState["RtasaIEPS"]); } + set { ViewState["RtasaIEPS"] = value; } + } + private string RfechaInicio + { + get { return (ViewState["RfechaInicio"] == null) ? "-1": (ViewState["RfechaInicio"]).ToString(); } + set { ViewState["RfechaInicio"] = value; } + } + private string RfechaFin + { + get { return (ViewState["RfechaFin"] == null) ? "-1": (ViewState["RfechaFin"]).ToString(); } + set { ViewState["RfechaFin"] = value; } + } + + + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + DdlEstado.DataSource = get_GlobalDTEstado("Mex"); + DdlEstado.DataBind(); + + + DdlEstado.Items.Insert(0, new ListItem("Seleccione", "-1")); + RcveEstado = Request["cveEstado"] == null ? -1 : Request["cveEstado"].ToString().ToEntero(); + RtasaIEPS = Request["tasaIEPS"] == null ? -1 : Request["tasaIEPS"].ToString().ToDecimal(); + RfechaInicio = Request["fechaInicio"] == null ? string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) : Request["fechaInicio"].ToString(); + RfechaFin = Request["fechaFin"] == null ? string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()) : Request["fechaFin"].ToString(); + DdlEstado .SelectedValueExist( RcveEstado.ToString()); + DdlIeps.SelectedValueExist ( RtasaIEPS.ToString()); + TxtIEPSfechaInicio.Text = $"{RfechaInicio:dd/MM/yyyy}"; + TxtIEPSfechaFin.Text = $"{RfechaFin:dd/MM/yyyy}"; + + RfechaInicio = RfechaInicio.ToDate().ToString("yyyy/MM/dd"); + RfechaFin = RfechaFin.ToDate().ToString("yyyy/MM/dd"); + CargaIEPSxEntidadFed(); + } + } + protected void CargaIEPSxEntidadFed() + { + ClsGenerales ObjIEPS = new ClsGenerales(); + ObjIEPS.IEPSxEntidadFed(RcveEstado, RtasaIEPS, RfechaInicio, RfechaFin, 119); + GVIEPSxEntidadFed.DataSource = ObjIEPS.DtResultados; + ObjIEPS.Dispose(); + GVIEPSxEntidadFed.DataBind(); + upDatosIEPS.Update(); + } + + protected void GVIEPSxEntidadFed_RowDataBound(object sender, GridViewRowEventArgs e) + { + if(e.Row.RowType == DataControlRowType.DataRow) + { + int cveGrupo = e.Row.DBCampo("CveGrupo").ToEntero(); + if (cveGrupo == 1) + { + e.Row.CssClass = "Titulos"; + } + if (cveGrupo == 2) + { + e.Row.CssClass = "Totales"; + } + } + } + protected void BtnIEPSFiltrar_Click(object sender, EventArgs e) + { + + RcveEstado = DdlEstado.SelectedValue.ToEntero(); + RtasaIEPS = DdlIeps.SelectedValue.ToDecimal(); + RfechaInicio = TxtIEPSfechaInicio.Text.ToDate().ToString("yyyy/MM/dd") ; + RfechaFin = TxtIEPSfechaFin.Text.ToDate().ToString("yyyy/MM/dd"); + + CargaIEPSxEntidadFed(); + } + + protected void LnkExcel_Click(object sender, EventArgs e) + { + GVIEPSxEntidadFed.ExportToExcelx("IEPS porEntidad Federativa"); + } +} From 49c8fd3cce56bd6ae028f99298fec5cfd0292ce7 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 18 Feb 2020 11:48:44 -0700 Subject: [PATCH 12/14] nuevo filtro de busqueda en depositos caja y modificacion a reporte --- App_Code/ClsBancos.vb | 13 +- Bancos/DepositosCaja.aspx | 19 ++- Bancos/DepositosCaja.aspx.vb | 2 +- Empresas/Grales/Formatos/Traslado.rdlc | 221 ++++++++++++++++++++++++- 4 files changed, 244 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8113ab863..4dbde281c 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -3341,11 +3341,11 @@ Public Class ClsBancos End Try Return Retorno - End Function + End Function #End Region - + #Region "PagosCajaChica" - Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer) As Boolean + Public Function GetPagosCajaChica(FechaI As String, FechaF As String, CveEmpresa As Integer, CveCuenta As Integer, Optional TipoPago As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_BancosCajaChicaPagosGet") @@ -3354,6 +3354,7 @@ Public Class ClsBancos .Add("@FechaF", SqlDbType.VarChar).Value = FechaF .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + .Add("@TipoChequeEfectivo", SqlDbType.Int).Value = TipoPago End With Try @@ -3364,10 +3365,10 @@ Public Class ClsBancos End Try Return Retorno - End Function - + End Function + #End Region - + #Region "ACTIVOS FIJOS" Public Function GetActivosFijosCreditos(CveCredito As Integer, CveActivoFijo As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index db3f0d7a9..830a6df54 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -70,6 +70,15 @@
    + +
    + + + + + +
    +
    @@ -114,7 +123,8 @@ Importe seleccionado: $00.00

    - +
    + @@ -141,6 +151,12 @@ + + + + + + @@ -152,6 +168,7 @@ +
    diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 7898c801c..71e9a4b23 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -41,7 +41,7 @@ Partial Class Bancos_DepositosCaja FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") - ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero) + ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero, DdlTipoPago.SelectedValue.ToEntero) GvFacturas.DataSource = ObjBancos.DtResultados ObjBancos.Dispose() diff --git a/Empresas/Grales/Formatos/Traslado.rdlc b/Empresas/Grales/Formatos/Traslado.rdlc index 626b3516a..d94b0fd55 100644 --- a/Empresas/Grales/Formatos/Traslado.rdlc +++ b/Empresas/Grales/Formatos/Traslado.rdlc @@ -490,6 +490,215 @@ + + 0.44125cm + + + + + true + true + + + + + =Sum(Fields!Cantidad.Value) + + + + + + + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Total Productos + + + + + + + Textbox21 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox37 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox41 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox42 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + @@ -509,13 +718,19 @@ + + + + + + Before DsInventarios 0.07056cm 0.00711cm - 0.73434cm + 1.17559cm 19.56807cm - 0.42708in + 0.68252in