--ajustes de cortes
This commit is contained in:
@@ -79,11 +79,11 @@ Partial Class Bancos_RepCortes
|
||||
Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha)
|
||||
Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then
|
||||
DtCortes = ObjPuntoVenta.DtResultados.Copy()
|
||||
Dim ObjVenta As New ClsVentas
|
||||
If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then
|
||||
DtCortes = ObjVenta.DtResultados.Copy()
|
||||
End If
|
||||
ObjPuntoVenta.Dispose()
|
||||
ObjVenta.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
@@ -110,7 +110,18 @@ Partial Class Bancos_RepCortes
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
If DtCortes IsNot Nothing Then
|
||||
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
If e.Row.DBCampo("VentasCorte").ToDecimal.RoundSQL <> e.Row.DBCampo("VentaTotalIngreso").ToDecimal + e.Row.DBCampo("VentaTotalRemision").ToDecimal.RoundSQL Then
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
e.Row.Cells(2).ToolTip = (e.Row.DBCampo("VentasCorte").ToDecimal - (e.Row.DBCampo("VentaTotalIngreso").ToDecimal + e.Row.DBCampo("VentaTotalRemision").ToDecimal)).ToString
|
||||
End If
|
||||
If e.Row.DBCampo("VentasCorte").ToDecimal.RoundSQL <> e.Row.DBCampo("VentasContado").ToDecimal + e.Row.DBCampo("VentasCredito").ToDecimal.RoundSQL Then
|
||||
e.Row.Cells(6).ForeColor = Drawing.Color.Red
|
||||
e.Row.Cells(6).ToolTip = (e.Row.DBCampo("VentasCorte").ToDecimal - (e.Row.DBCampo("VentasContado").ToDecimal + e.Row.DBCampo("VentasCredito").ToDecimal)).ToString
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -181,8 +192,8 @@ Partial Class Bancos_RepCortes
|
||||
CveCorte = gvr.DataKey("CveCorte").ToString.ToEntero
|
||||
Dim Finalizado As Integer = gvr.DataKey("Finalizado").ToString.ToEntero
|
||||
Fecha = gvr.DataKey("FechaInicial").ToString
|
||||
Nombre = gvr.DataKey("Nombre").ToString
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
Nombre = gvr.DataKey("Nombre").ToString
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
@@ -204,15 +215,15 @@ Partial Class Bancos_RepCortes
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
DtCortesVentas = ObjPuntoVenta.DtResultados.Copy()
|
||||
If ObjVentas.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
DtCortesVentas = ObjVentas.DtResultados.Copy()
|
||||
GvD.DataSource = DtCortesVentas
|
||||
|
||||
divDetalle.Visible = True
|
||||
End If
|
||||
|
||||
If ObjPuntoVenta.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||
GvIngresosRetiros.DataSource = ObjPuntoVenta.DtResultados.Copy()
|
||||
If ObjVentas.GetVta_MovimientosCajasReporte(CveCorte, -1) Then
|
||||
GvIngresosRetiros.DataSource = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then
|
||||
@@ -224,10 +235,10 @@ Partial Class Bancos_RepCortes
|
||||
HplDownPDF.Visible = False
|
||||
HplDownEXCEL.Visible = False
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
ObjPuntoVenta.Dispose()
|
||||
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
|
||||
GvD.DataBind()
|
||||
GvP.DataBind()
|
||||
GvDep.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user