--Cambios en reporte de cortes
This commit is contained in:
@@ -427,35 +427,52 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta" ToolTip="Reporte de Cortes" CssClass="table table-striped table-advance table-hover Widthall" Style="position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
Serie - Folio
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun corte" DataKeyNames="CveVenta" ToolTip="Reporte de Cortes" CssClass="table table-striped table-advance table-hover Widthall" Style="position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>
|
||||
Serie - Folio
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LBDescripcion" runat="server" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Fac.Rem.Anterior" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFacRemisionAnterior" runat="server" Text='<%# Eval("FacturaRemisionAnteriorTexto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTotal" Text='<%# Eval("ImportePagado", "{0:N2}") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Total" DataField="ImportePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LBDescripcion" runat="server" Text='<%# Eval("SerieFolio") %>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Fac.Rem.Anterior" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFacRemisionAnterior" runat="server" Text='<%# Eval("FacturaRemisionAnteriorTexto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTotal" Text='<%# Eval("ImportePagado", "{0:N2}") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Total" DataField="ImportePagado" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<br />
|
||||
<b>Ingresos/Retiros</b>
|
||||
<asp:GridView ID="GvIngresosRetiros" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoMovimiento" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -167,31 +167,38 @@ 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 Vn.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDep.DataSource = Vn.DtResultados
|
||||
If Vn.DtResultados.Rows.Count > 0 Then
|
||||
If 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
|
||||
GvD.DataSource = ObjPuntoVenta.DtResultados
|
||||
DtCortesVentas = ObjPuntoVenta.DtResultados
|
||||
divDetalle.Visible = True
|
||||
End If
|
||||
|
||||
If ObjPuntoVenta.GetVta_MovimientosCajas(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,14 +208,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()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 193 AndAlso UsuarioActual.CveRol = 1 Then
|
||||
DivAnexo.Visible = True
|
||||
|
||||
@@ -1653,23 +1653,28 @@ Partial Class PopUpVerFactura
|
||||
TipoTabla = 2
|
||||
Case "VentasCorte"
|
||||
rowData("Columna") = "Total Ventas"
|
||||
Orden = 2
|
||||
Orden = 1
|
||||
TipoTabla = 1
|
||||
Case "NotasCredito"
|
||||
rowData("Columna") = "N.C."
|
||||
Orden = 3
|
||||
Orden = 2
|
||||
TipoTabla = 1
|
||||
Case "VentasCredito"
|
||||
rowData("Columna") = "Ventas Crédito"
|
||||
Orden = 3
|
||||
TipoTabla = 1
|
||||
Case "VentasContado"
|
||||
rowData("Columna") = "Ventas Contado"
|
||||
Orden = 4
|
||||
TipoTabla = 1
|
||||
|
||||
Case "VentaTotalIngreso"
|
||||
rowData("Columna") = "Ventas Ingreso"
|
||||
Orden = 4
|
||||
Orden = 5
|
||||
TipoTabla = 1
|
||||
Case "VentaTotalRemision"
|
||||
rowData("Columna") = "Ventas Remisiones"
|
||||
Orden = 4
|
||||
Orden = 6
|
||||
TipoTabla = 1
|
||||
'Case "TotalEfectivo"
|
||||
' rowData("Columna") = "Total Efectivo"
|
||||
@@ -1726,13 +1731,13 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim TotalCredito As Decimal = DtCortesVentasResumen.SUMD("Importe", "MetodoPago = 'Crédito'")
|
||||
'Dim TotalCredito As Decimal = DtCortesVentasResumen.SUMD("Importe", "MetodoPago = 'Crédito'")
|
||||
|
||||
Dim rowCredito = DtDatosVentas.NewRow()
|
||||
rowCredito("Columna") = "Crédito"
|
||||
rowCredito("Importe") = TotalCredito
|
||||
rowCredito("Orden") = 4
|
||||
DtDatosVentas.Rows.Add(rowCredito)
|
||||
'Dim rowCredito = DtDatosVentas.NewRow()
|
||||
'rowCredito("Columna") = "Crédito"
|
||||
'rowCredito("Importe") = TotalCredito
|
||||
'rowCredito("Orden") = 4
|
||||
'DtDatosVentas.Rows.Add(rowCredito)
|
||||
|
||||
Dim rds3 As New ReportDataSource With {.Name = "DataSet3", .Value = DtDatosVentas.FiltraParametros("Orden > 0", "Orden")}
|
||||
lrds.Add(rds3)
|
||||
|
||||
Reference in New Issue
Block a user