diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb
index 7011c1ad2..e47ba73e7 100644
--- a/Bancos/RepCortes.aspx.vb
+++ b/Bancos/RepCortes.aspx.vb
@@ -63,9 +63,9 @@ Partial Class Bancos_RepCortes
Me.Form.DefaultButton = BtnConsultar.UniqueID
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
End If
- End Sub
-
-
+ End Sub
+
+
#Region " C A R G A - D A T O S "
Public Sub CargaDatos()
Dim ObjPuntoVenta As New ClsPuntoVenta
@@ -87,22 +87,22 @@ Partial Class Bancos_RepCortes
e.Row.CssClass = "SubTotales2"
End If
End If
- End Sub
+ End Sub
Protected Sub GvP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("MetodoPago").ToString = "Total" Then
e.Row.CssClass = "SubTotales"
End If
End If
- End Sub
-
+ End Sub
+
Protected Sub GvD_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveVenta").ToString = "" Then
e.Row.CssClass = "Totales"
- End If
- If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then
- e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger"
+ End If
+ If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then
+ e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger"
End If
End If
End Sub
@@ -163,8 +163,8 @@ Partial Class Bancos_RepCortes
If DtCortesVentasResumen.Rows.Count > 0 Or DtCortesVentas.Rows.Count > 0 Then
HplDownPDF.Visible = True
HplDownEXCEL.Visible = True
- HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF")))
- HplDownEXCEL.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "EXCEL")))
+ HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero)))
+ HplDownEXCEL.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "EXCEL", DdlSubProyectos.SelectedValue.ToEntero)))
Else
HplDownPDF.Visible = False
HplDownEXCEL.Visible = False
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 7ab8ce558..70fed873b 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -33,7 +33,7 @@ Partial Class PopUpVerFactura
End Property
Public Property DtDetalle() As DataTable
Get
- Return CType(ViewState("DtDetalle"), DataTable)
+ Return DirectCast(IfNull(ViewState("DtDetalle"), New DataTable, ViewState("DtDetalle")), DataTable)
End Get
Set(value As DataTable)
ViewState("DtDetalle") = value
@@ -834,7 +834,11 @@ Partial Class PopUpVerFactura
If UrlParametros("OP").ToString = "CORT" Then
If UrlParametros("CVECORTE") IsNot Nothing AndAlso UrlParametros("CVECORTE").ToString.ToEntero > 0 Then
- ImprimeCorte(UrlParametros("CVECORTE").ToString.ToEntero, UrlParametros("FORMATO").ToString)
+ Dim CveSubProyecto As Integer = -1
+ If UrlParametros("CVESUBPROYECTO") IsNot Nothing Then
+ CveSubProyecto = UrlParametros("CVESUBPROYECTO").ToString.ToEntero
+ End If
+ ImprimeCorte(UrlParametros("CVECORTE").ToString.ToEntero, UrlParametros("FORMATO").ToString, CveSubProyecto)
End If
End If
@@ -980,25 +984,27 @@ Partial Class PopUpVerFactura
#Region "OP = CORT - IMPRIMIR CORTE"
- Private Sub ImprimeCorte(CveCorte As Integer, Formato As String)
+ Private Sub ImprimeCorte(CveCorte As Integer, Formato As String, Optional CveSubProyecto As Integer = -1)
Dim ObjVenta As New ClsVentas
Dim ObjPuntoVenta As New ClsPuntoVenta
Dim DtCortesVentasResumen As DataTable = Nothing
Dim DtCortesVentas As DataTable = Nothing
Dim Fecha = "", Nombre = ""
- If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, UsuarioActual.CveEmpresa) Then
+ If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
DtCortesVentasResumen = ObjVenta.DtResultados
End If
- 'If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
- ' DtCortesVentas = ObjPuntoVenta.DtResultados
- ' If DtCortesVentas.Rows.Count > 0 Then
- ' Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
- ' Fecha = RowInfo("FechaInicial").ToString
- ' Nombre = RowInfo("Nombre").ToString
- ' End If
- 'End If
+ If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
+ DtCortesVentas = ObjPuntoVenta.DtResultados
+ If DtCortesVentas.Rows.Count > 0 Then
+ Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0")
+
+ Fecha = RowInfo("FechaInicial").ToString
+ Nombre = RowInfo("Nombre").ToString
+ End If
+ End If
+
ObjVenta.Dispose()
ObjPuntoVenta.Dispose()
Dim FechaCorte As String = $" Fecha fin: {Fecha}"
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb
index 44944955e..bbb576de3 100644
--- a/Contabilidad/RegPrePolizaS.aspx.vb
+++ b/Contabilidad/RegPrePolizaS.aspx.vb
@@ -1164,38 +1164,38 @@ Partial Class ContabilidadC_RegPrePolizaS
If MsgError = "" Then
- 'MENSAJE IE
+ 'MENSAJE IE
- 'If CveIE Then
- ' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
- 'Else
- ' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
- 'End If
+ 'If CveIE Then
+ ' Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
+ 'Else
+ ' Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
+ 'End If
- Alert(If(MensajeAlert.ToString = "", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}
" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
+ Alert(If(MensajeAlert.ToString = "", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}
" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePolizaInsertada}""")
- ObjIE.Commit()
- If Conta IsNot Nothing Then Conta.Commit()
+ ObjIE.Commit()
+ If Conta IsNot Nothing Then Conta.Commit()
- UPPDocumento.Update()
+ UPPDocumento.Update()
- TxtConcepto.Text = ""
- 'GvMov.DataBind()
- DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
+ TxtConcepto.Text = ""
+ 'GvMov.DataBind()
+ DdlPlantilla_SelectedIndexChanged(Nothing, Nothing)
- TxtFechaDocumento.Text = ""
+ TxtFechaDocumento.Text = ""
- Else
- Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
- ObjIE.RollBack()
- If Conta IsNot Nothing Then Conta.RollBack()
- End If
-
- ObjIE.Dispose()
- ObjMov.Dispose()
- If Conta IsNot Nothing Then Conta.Dispose()
+ Else
+ Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
+ ObjIE.RollBack()
+ If Conta IsNot Nothing Then Conta.RollBack()
End If
+
+ ObjIE.Dispose()
+ ObjMov.Dispose()
+ If Conta IsNot Nothing Then Conta.Dispose()
+ End If
End Sub
Private Sub ActualizarPrePoliza()
@@ -1297,6 +1297,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
+ Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero
'CargaConceptosContablesE()
'CargaModalConceptoCuentas()
@@ -1338,6 +1339,9 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
DdlVentasE.SelectedValueExist(CveVenta)
+ If CveClasificacion > 0 Then
+ DdlClasificacionesE.SelectedValue = CveClasificacion
+ End If
TxtConceptoE.Text = Concepto
TxtReferenciaE.Text = Referencia
diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx
index 82f7df0c2..f2558f45d 100644
--- a/Ventas/ClientesAbonar.aspx
+++ b/Ventas/ClientesAbonar.aspx
@@ -176,7 +176,7 @@