Rep Compras Detalle cambio de fecha

This commit is contained in:
Rakcsle Supertramp
2020-12-11 13:56:32 -07:00
parent 9b5d613919
commit 9c6039c77d
3 changed files with 19 additions and 12 deletions

View File

@@ -1015,7 +1015,7 @@ Public Class ClsContratos
#Region "CONTRATOS DETALLE"
Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String,
Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1) As Boolean
Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Con_ContratosDetalleAdd")
@@ -1033,6 +1033,7 @@ Public Class ClsContratos
.Add("@CveRubro", SqlDbType.Int).Value = CveRubro
.Add("@CveActividad", SqlDbType.Int).Value = CveActividad
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
.Add("@Dias", SqlDbType.Int).Value = Dias
'NoIdentificacion
End With

View File

@@ -291,7 +291,10 @@ Partial Class Compras_RepComprasDetalle
FechaICaptura = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
FechaFCaptura = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
Dim AnioMes As String = If(FechaF <> "-1", "-1", IfNull(Request("AnioMes"), "-1").ToString())
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text.ToDouble
Else
@@ -301,7 +304,7 @@ Partial Class Compras_RepComprasDetalle
Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString
If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, IfNull(Request("AnioMes"), "-1").ToString(), IfNull(Request("Fecha"), "-1").ToString(),
If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(),
DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero,
IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString,
SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa,

View File

@@ -595,8 +595,9 @@ Partial Class Contratos_ContratoObra
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("LimitarCantidad", GetType(Integer))
TmpDT.Columns.Add("OCInterna", GetType(String))
TmpDT.Columns.Add("Observacion", GetType(String))
TmpDT.Columns.Add("Observacion", GetType(String))
TmpDT.Columns.Add("CveRubro", GetType(Integer))
TmpDT.Columns.Add("CveActividad", GetType(Integer))
TmpDT.Columns.Add("CveSubTipoActivoFijo", GetType(Integer))
@@ -605,6 +606,8 @@ Partial Class Contratos_ContratoObra
TmpDT.Columns.Add("Actividad", GetType(String))
TmpDT.Columns.Add("SubTipoActivoFijo", GetType(String))
TmpDT.Columns.Add("Dias", GetType(Integer))
End Sub
Protected Sub Limpiar()
@@ -2204,9 +2207,6 @@ Partial Class Contratos_ContratoObra
End If
If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then
GvDatosAvanceControl.DataSource = ObjContratos.DtResultados
@@ -4294,6 +4294,7 @@ Partial Class Contratos_ContratoObra
DTPS.Columns.Add("Rubro", GetType(String))
DTPS.Columns.Add("Actividad", GetType(String))
DTPS.Columns.Add("SubTipoActivoFijo", GetType(String))
DTPS.Columns.Add("Dias", GetType(Integer))
Dim RowNoEncontrados As String = ""
@@ -4327,6 +4328,7 @@ Partial Class Contratos_ContratoObra
Dim Row As DataRow = DTPS.NewRow()
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
Row("CveUM") = CveUM
@@ -4339,9 +4341,6 @@ Partial Class Contratos_ContratoObra
Row("PU") = DrowPS("PU").ToString.ToDouble
Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble
Select Case TipoCargaPresupuesto
Case EnumTipoCargaPresupuesto.Ventas
@@ -4349,6 +4348,7 @@ Partial Class Contratos_ContratoObra
Row("CveRubro") = 1
Row("CveActividad") = -1
Row("CveSubTipoActivoFijo") = -1
Row("Dias") = 0
Exit Select
Case EnumTipoCargaPresupuesto.Control
@@ -4356,11 +4356,13 @@ Partial Class Contratos_ContratoObra
Row("CveRubro") = 2
Row("CveActividad") = -1
Row("CveSubTipoActivoFijo") = -1
Row("Dias") = 0
Exit Select
Case Else
Row("CveTipoPresupuesto") = 1
Row("CveActividad") = -1
Row("CveSubTipoActivoFijo") = -1
Row("Dias") = 0
End Select
@@ -4406,6 +4408,7 @@ Partial Class Contratos_ContratoObra
Row("CveRubro") = 3
Row("CveActividad") = CveActividad
Row("CveSubTipoActivoFijo") = -1
Row("Dias") = DrowPS("Dias").ToString.ToEntero
Row("NoIdentificacion") = ""
Row("OCInterna") = ""
@@ -4432,7 +4435,7 @@ Partial Class Contratos_ContratoObra
If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero,
Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero,
CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero) Then
CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then
If Autorizado Then
Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro"))