Tipo de cambio en reporte de ingresos
This commit is contained in:
@@ -70,10 +70,31 @@ Partial Class Ventas_RepIngresos
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TipoCambio As Integer
|
||||
Get
|
||||
Return ViewState("TipoCambio").ToString.ToEntero
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TCEspecifico As Decimal
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDecimal
|
||||
End Get
|
||||
|
||||
Set(value As Decimal)
|
||||
ViewState("TCEspecifico") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TCEspecifico = -1
|
||||
TipoCambio = 1
|
||||
CveSubProyecto = -1
|
||||
TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year)
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
@@ -82,17 +103,21 @@ Partial Class Ventas_RepIngresos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
|
||||
Dim ObjRepI As New ClsVentas()
|
||||
|
||||
Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1)
|
||||
Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
|
||||
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
|
||||
|
||||
|
||||
|
||||
ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos)
|
||||
GVRepIngresos.DataSource = ObjRepI.DtResultados
|
||||
DtDatos = ObjRepI.DtResultados
|
||||
Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDecimal
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
Dim ObjRepI As New ClsVentas()
|
||||
If ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then
|
||||
GVRepIngresos.DataSource = ObjRepI.DtResultados
|
||||
DtDatos = ObjRepI.DtResultados
|
||||
End If
|
||||
ObjRepI.Dispose()
|
||||
GVRepIngresos.DataBind()
|
||||
upDatosRepI.Update()
|
||||
@@ -147,9 +172,26 @@ Partial Class Ventas_RepIngresos
|
||||
#End Region
|
||||
Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("ConceptoContable").Contiene("INGRESOS", "ANTICIPOS") Then
|
||||
If e.Row.DBCampo("TipoAmortizacion") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DBCampo("TipoAmortizacion") <> "" AndAlso e.Row.DBCampo("CveConceptoContable") = "-1" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
LnkFiltrar_Click(LnkFiltrar, EventArgs.Empty)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user