diff --git a/App_Code/ClsPuntoVenta.vb b/App_Code/ClsPuntoVenta.vb index 416ba3ef3..6bbffe680 100644 --- a/App_Code/ClsPuntoVenta.vb +++ b/App_Code/ClsPuntoVenta.vb @@ -404,6 +404,25 @@ Public Class ClsPuntoVenta OnError("Ocurrió un error al obtener los Movimientos de Caja del Cortes del Punto de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + End Function + + Public Function GetVta_MovimientosCajasReporte(CveCorte As Integer, TipoMovimiento As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_MovimientosCajasRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCorte", SqlDbType.Int).Value = CveCorte + .Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte de caja del cortes del punto de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno End Function diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 74c40e724..f04019057 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -427,35 +427,54 @@ - - - - - Serie - Folio +
+
+
+ Movimientos del día + + + + + Serie - Folio - - - - - - - - - - - - - - - - - <%----%> - - - - - - + + + + + + + + + + + + + + + + + <%----%> + + + + + + +
+
+
+
+
+ Movimientos de caja + + + + + + + +
+
diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 2dacc1727..ea4d9efb6 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -125,6 +125,13 @@ Partial Class Bancos_RepCortes End If End Sub + Protected Sub GvIngresosRetiros_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvIngresosRetiros.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("CveMovimiento").ToString = "" Then + e.Row.CssClass = "Totales" + End If + End If + End Sub @@ -167,31 +174,39 @@ Partial Class Bancos_RepCortes Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero Fecha = gvr.DataKey("FechaInicial").ToString Nombre = gvr.DataKey("Nombre").ToString - Dim Vent As New ClsPuntoVenta - Dim Vn As New ClsVentas - If Vn.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvP.DataSource = Vn.DtResultados - DtCortesVentasResumen = Vn.DtResultados + Dim ObjPuntoVenta As New ClsPuntoVenta + Dim ObjVentas As New ClsVentas + + If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvP.DataSource = ObjVentas.DtResultados + DtCortesVentasResumen = ObjVentas.DtResultados End If + If UsuarioActual.CveEmpresa.Contiene(190, 192) Then DivIVA.Visible = True - If Vn.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvPorIVA.DataSource = Vn.DtResultados + If ObjVentas.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvPorIVA.DataSource = ObjVentas.DtResultados End If End If - If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso Vn.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvDep.DataSource = Vn.DtResultados - If Vn.DtResultados.Rows.Count > 0 Then + If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVentas.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvDep.DataSource = ObjVentas.DtResultados + If ObjVentas.DtResultados.Rows.Count > 0 Then DivDep.Visible = True End If End If - If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then - GvD.DataSource = Vent.DtResultados - DtCortesVentas = Vent.DtResultados + If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then + DtCortesVentas = ObjPuntoVenta.DtResultados.Copy() + GvD.DataSource = DtCortesVentas + divDetalle.Visible = True End If + + If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then + GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy() + End If + If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then HplDownPDF.Visible = True HplDownEXCEL.Visible = True @@ -201,8 +216,15 @@ Partial Class Bancos_RepCortes HplDownPDF.Visible = False HplDownEXCEL.Visible = False End If - Vn.Dispose() - Vent.Dispose() + ObjVentas.Dispose() + ObjPuntoVenta.Dispose() + + + GvD.DataBind() + GvP.DataBind() + GvDep.DataBind() + GvPorIVA.DataBind() + GvIngresosRetiros.DataBind() GvD.DataBind() diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index ad012761a..519938730 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1570,6 +1570,7 @@ Partial Class PopUpVerFactura Dim DtCortesVentas As DataTable = Nothing Dim DtReporteCorte As DataTable = Nothing Dim DtIngresosRetiros As DataTable = Nothing + Dim DtDepositos As DataTable = Nothing Dim Fecha As String = "", Nombre As String = "" Dim OpcionDetallado As Integer = 1 @@ -1600,6 +1601,10 @@ Partial Class PopUpVerFactura If ObjPuntoVenta.GetVta_MovimientosCajas(CveCorte, -1) Then DtIngresosRetiros = ObjPuntoVenta.DtResultados.Copy() End If + + If Not UsuarioActual.CveEmpresa.Contiene(140, 141) AndAlso ObjVenta.GetCortesDetalleDepositosCaja(CveCorte, -1, UsuarioActual.CveEmpresa) Then + DtDepositos = ObjVenta.DtResultados.Copy() + End If End If ObjVenta.Dispose() @@ -1625,7 +1630,7 @@ Partial Class PopUpVerFactura Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt"))) params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}")) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) @@ -1748,6 +1753,24 @@ Partial Class PopUpVerFactura Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = DtIngresosRetiros} lrds.Add(rds5) + + If UsuarioActual.CveEmpresa = 193 Then + + Dim CveCuenta As Integer = 186367 + Using ObjConta As New ClsContabilidad + If ObjConta.GetAnexoCatalogo(CveCuenta, Fecha.ToDate(), Fecha.ToDate(), -1, -1, -1, UsuarioActual.CveEmpresa, 1) Then + Dim rdsConta As New ReportDataSource With {.Name = "DsContabilidad", .Value = ObjConta.DtResultados} + lrds.Add(rdsConta) + End If + End Using + + If DtDepositos IsNot Nothing Then + Dim rdsDepositos As New ReportDataSource With {.Name = "DsDepositos", .Value = DtDepositos} + lrds.Add(rdsDepositos) + End If + + End If + 'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString())) 'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString())) 'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString())) diff --git a/Empresas/193/Formatos/RepCortes.rdlc b/Empresas/193/Formatos/RepCortes.rdlc index 3d72d3b77..0310acaab 100644 --- a/Empresas/193/Formatos/RepCortes.rdlc +++ b/Empresas/193/Formatos/RepCortes.rdlc @@ -196,7 +196,7 @@ - Detalles de Pagos + Detalles de pago + + + + + true + true + + + + + Movimientos del día + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.73022cm + + + 2.09811cm + + + 2.28714cm + + + + + 0.47879cm + + + + + true + true + + + + + Tipo de deposito + + + + + + + Textbox4 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox16 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox18 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.45234cm + + + + + true + + + + + =Fields!TipoTransaccion.Value + + + + + + + MetodoPago + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!FolioPago.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + ImportePagado + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DsDepositos + 2.30548cm + 0.06614cm + 0.93113cm + 7.11547cm + 10 + + + + + + true + true + + + + + Depositos de caja + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.06748cm + + + 2.51199cm + + + 2.28714cm + + + 2.40196cm + + + 2.15604cm + + + + + 0.47879cm + + + + + true + true + + + + + Código + + + + + + + Textbox4 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Textbox16 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cargos + + + + + + + Textbox18 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Abonos + + + + + + + Textbox43 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo + + + + + + + Textbox47 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.45234cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + MetodoPago + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Nombre.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cargos.Value + + + + + + + ImportePagado + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Abonos.Value + + + + + + + Abonos + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =(Fields!Cargos.Value - Fields!Abonos.Value) + + + + + + + Abonos1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsContabilidad + 2.30548cm + 7.358cm + 0.93113cm + 11.42461cm + 12 + + + + + + true + true + + + + + Estado contable de la caja + + + + + + 2pt + 2pt + 2pt + 2pt + + - 1.71028in + 2.5632in