Cambios en ventas para contratos de emd
This commit is contained in:
@@ -25,17 +25,17 @@ Partial Class Contratos_Default
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveTipoContrato As Integer
|
||||
Private Property CveContratoTipo As Integer
|
||||
Get
|
||||
If ViewState("CveTipoContrato") Is Nothing Then
|
||||
If ViewState("CveContratoTipo") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("CveTipoContrato").ToString.ToEntero
|
||||
Return ViewState("CveContratoTipo").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoContrato") = value
|
||||
ViewState("CveContratoTipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveMovimiento As Integer
|
||||
@@ -372,7 +372,7 @@ Partial Class Contratos_Default
|
||||
CargaInventarios()
|
||||
|
||||
'12/04/2018 - Si el tipo de contrato es convenio de precio fijo configura campos
|
||||
If CveTipoContrato = 28 Then
|
||||
If CveContratoTipo = 28 Then
|
||||
CargaConvenioPrecioFijo()
|
||||
End If
|
||||
|
||||
@@ -664,7 +664,11 @@ Partial Class Contratos_Default
|
||||
Private Sub loadComboTipoContrato(venta As Boolean)
|
||||
Try
|
||||
If venta Then
|
||||
DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 1")
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" CveEmpresa = 13")
|
||||
Else
|
||||
DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 1")
|
||||
End If
|
||||
|
||||
Else
|
||||
DdlTipoContrato.DataSource = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros(" TipoMovimiento = 0")
|
||||
@@ -724,11 +728,11 @@ Partial Class Contratos_Default
|
||||
DvTotal.Visible = True
|
||||
|
||||
|
||||
If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then
|
||||
If CveContrato > 0 AndAlso CveContratoTipo <> 25 Then
|
||||
TableDatosCabecera.Visible = True
|
||||
End If
|
||||
|
||||
If CveTipoContrato = 25 Then
|
||||
If CveContratoTipo = 25 Then
|
||||
DvMax.Visible = False
|
||||
DvMin.Visible = False
|
||||
DvTotal.Visible = False
|
||||
@@ -745,11 +749,11 @@ Partial Class Contratos_Default
|
||||
DvTotal.Visible = True
|
||||
'TxtCantidad.Visible = False
|
||||
|
||||
If CveContrato > 0 AndAlso CveTipoContrato <> 25 Then
|
||||
If CveContrato > 0 AndAlso CveContratoTipo <> 25 Then
|
||||
TableDatosCabecera.Visible = True
|
||||
End If
|
||||
|
||||
If CveTipoContrato = 25 Then
|
||||
If CveContratoTipo = 25 Then
|
||||
DvMax.Visible = False
|
||||
DvMin.Visible = False
|
||||
DvTotal.Visible = False
|
||||
@@ -776,13 +780,13 @@ Partial Class Contratos_Default
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Me.CveTipoContrato = DdlTipoContrato.SelectedValue.ToEntero
|
||||
Me.CveContratoTipo = DdlTipoContrato.SelectedValue.ToEntero
|
||||
|
||||
'Dim TipoMov = GlobalDTContratosTipos.FiltroPrimeroValor("TipoMovimiento", $"CveContratoTipo='{CveTipoContrato}'").ToEntero
|
||||
|
||||
If rpCompra.Checked Then
|
||||
|
||||
Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveTipoContrato}")
|
||||
Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveContratoTipo}")
|
||||
'RegistraScript("window.location='/Contratos/Presupuestos.aspx")
|
||||
Else
|
||||
|
||||
@@ -853,7 +857,7 @@ Partial Class Contratos_Default
|
||||
' 'DvObservaciones.Visible = True
|
||||
'End If
|
||||
|
||||
Dim CveTipoContrato = DdlTipoContrato.SelectedValue
|
||||
'Dim CveTipoContrato = DdlTipoContrato.SelectedValue
|
||||
|
||||
'Dim TipoMov = GlobalDTContratosTipos.AsEnumerable().Where(Function(a) a("CveContratoTipo").ToString = CveTipoContrato).FirstOrDefault()("TipoMovimiento")
|
||||
|
||||
@@ -913,9 +917,28 @@ Partial Class Contratos_Default
|
||||
TxtNumeroLicitacion.Text = ObjContratos.NumeroLicitacion
|
||||
TipoContrato = ObjContratos.CveContratoTipo
|
||||
TxtPorcentajeComision.Text = ObjContratos.PorcentajeComision.ToString
|
||||
CveTipoContrato = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||
TxtCorreoNotificacion.Text = ObjContratos.DtResultados.Rows(0)("CorreoNotificacionPedDev").ToString
|
||||
|
||||
If CveContratoTipo = 33 Then
|
||||
TabContratosGastos.Visible = False
|
||||
TabAF.Visible = False
|
||||
TabReporteAvance.Visible = False
|
||||
TabAvanveDocumento.Visible = False
|
||||
TabContratosGastos.Visible = False
|
||||
TabAF.Visible = False
|
||||
TabPed.Visible = False
|
||||
TabAddendum.Visible = False
|
||||
TabFacCiclica.Visible = False
|
||||
|
||||
TabPVInsumos.Visible = False
|
||||
|
||||
thOcCliente.Visible = False
|
||||
tdOcCliente.Visible = False
|
||||
|
||||
thLimitar.Visible = False
|
||||
tdLimitar2.Visible = False
|
||||
End If
|
||||
|
||||
If ObjContratos.CveProveedor > 0 Then
|
||||
TrProveedor.Visible = True
|
||||
@@ -1379,7 +1402,7 @@ Partial Class Contratos_Default
|
||||
If ObjContratos.UpdateContratos(CveContrato, TxtNumeroContrato.Text, TxtDescripcionContrato.Text, TxtNumeroLicitacion.Text.Trim, DdlContratista.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, -1, TxtFechaInicial.Text.ToDate, TxtFechaFinal.Text.ToDate,
|
||||
TxtUbicacion.Text, TxtResponsable.Text, DdlSubProyectoContrato.SelectedValue.ToEntero, TxtPorIVA.Text.ToDouble, TxtPorAnticipo.Text.ToDouble, TxtPorAmortizacionAnticipo.Text.ToDouble,
|
||||
TxtPorGarantia.Text.ToDouble, ArchivoUpdate, "", DdlContratoPadre.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, Minimo, Maximo, Total, DdlMoneda.SelectedValue.ToEntero,
|
||||
ModalidadDetalle, If(UsuarioActual.Empresa.CvePlataforma = 3 OrElse CveTipoContrato = 25, 1, DdlEstatus.SelectedValue.ToEntero), TipoContrato, TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
ModalidadDetalle, If(UsuarioActual.Empresa.CvePlataforma = 3 OrElse CveContratoTipo = 25, 1, DdlEstatus.SelectedValue.ToEntero), TipoContrato, TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
CveAlmacenOrigen:=DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero,
|
||||
TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero,
|
||||
CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked,
|
||||
@@ -1887,7 +1910,7 @@ Partial Class Contratos_Default
|
||||
Gv.DataSource = DtTemp
|
||||
DtPresupuestos = DtTemp
|
||||
Gv.DataBind()
|
||||
If CveTipoContrato = 25 Then
|
||||
If CveContratoTipo = 25 Then
|
||||
Gv.Columns(0).Visible = False
|
||||
Gv.Columns(2).Visible = False
|
||||
Gv.Columns(3).Visible = False
|
||||
@@ -2045,7 +2068,7 @@ Partial Class Contratos_Default
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCLinkButton("imgD").Visible = False
|
||||
End If
|
||||
If CveTipoContrato = 25 Then
|
||||
If CveContratoTipo = 25 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(10)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(250)
|
||||
End If
|
||||
@@ -2474,38 +2497,41 @@ Partial Class Contratos_Default
|
||||
Private Sub CargaDatosAvance()
|
||||
If CveContrato <= 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If CveContratoTipo <> 33 Then
|
||||
TabReporteAvance.Visible = True
|
||||
lbImprimirAvance.Visible = True
|
||||
|
||||
Dim Modalidad = IfNull(Request("Tipo"), 1, 2)
|
||||
|
||||
If Modalidad.ToString.ToEntero = 2 Then
|
||||
Tab.ActiveTabIndex = 2
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetReporteContratosAvancesDetalleCP(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosAvance.DataSource = ObjContratos.DtResultados
|
||||
SumaAvance = ObjContratos.DtResultados.SUM("AvanceImporte", "CveClasificacion IS NULL")
|
||||
SumaUtilidad = ObjContratos.DtResultados.SUM("AvanceUtilidad", "CveClasificacion IS NULL")
|
||||
DtAvance = ObjContratos.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvDatosAvance.DataBind()
|
||||
|
||||
If (GvDatosAvance.Rows.Count > 0) Then
|
||||
GvDatosAvance.UseAccessibleHeader = True
|
||||
GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
|
||||
UpGral.Update()
|
||||
End If
|
||||
|
||||
TabReporteAvance.Visible = True
|
||||
lbImprimirAvance.Visible = True
|
||||
|
||||
Dim Modalidad = IfNull(Request("Tipo"), 1, 2)
|
||||
|
||||
If Modalidad.ToString.ToEntero = 2 Then
|
||||
Tab.ActiveTabIndex = 2
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetReporteContratosAvancesDetalleCP(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosAvance.DataSource = ObjContratos.DtResultados
|
||||
SumaAvance = ObjContratos.DtResultados.SUM("AvanceImporte", "CveClasificacion IS NULL")
|
||||
SumaUtilidad = ObjContratos.DtResultados.SUM("AvanceUtilidad", "CveClasificacion IS NULL")
|
||||
DtAvance = ObjContratos.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvDatosAvance.DataBind()
|
||||
|
||||
If (GvDatosAvance.Rows.Count > 0) Then
|
||||
GvDatosAvance.UseAccessibleHeader = True
|
||||
GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
|
||||
UpGral.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatosAvance_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvance.RowDataBound
|
||||
|
||||
Reference in New Issue
Block a user