Contratos, flujo ventas, contratos estado de cuenta
This commit is contained in:
@@ -2748,10 +2748,7 @@
|
||||
<td>Contrato:</td>
|
||||
<td><asp:DropDownList ID="DdlContrato" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" CssClass="select2me" ></asp:DropDownList></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DVEstimacionesObra" visible="false">
|
||||
<td> Estimacion:</td>
|
||||
<td><asp:DropDownList ID="DdlEstimacionesObra" runat="server" AppendDataBoundItems="true" Width="350px" AutoPostBack="true" DataTextField="NumeroEstimacion" DataValueField="CveEstimacion" CssClass="select2me"></asp:DropDownList></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
@@ -2793,13 +2790,22 @@
|
||||
|
||||
<div id="ContratoDetalles" class="row" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-1">
|
||||
<asp:Label runat="server" Text="Contrato:"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" />
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
|
||||
<div class="col-md-6">
|
||||
<table>
|
||||
<tr>
|
||||
<td><asp:Label runat="server" Text="Contrato:"></asp:Label></td>
|
||||
<td><asp:DropDownList runat="server" ID="DdlContratosModal" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="400px" DataTextField="ContratoCompleto" DataValueField="CveContrato" /></td>
|
||||
</tr>
|
||||
<tr runat="server" id="DVEstimacionesObra" visible="false">
|
||||
<td> Estimacion:</td>
|
||||
<td> <asp:DropDownList ID="DdlEstimacionesObra" runat="server" AppendDataBoundItems="true" Width="400px" AutoPostBack="true" DataTextField="NumeroEstimacion" DataValueField="CveEstimacion" CssClass="select2me"></asp:DropDownList> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6 display4 bold" style="font-size: 16px;">
|
||||
Saldo: $<asp:Literal Text="" ID="LtContratoImporteSaldo" runat="server" />
|
||||
</div>
|
||||
@@ -2813,6 +2819,7 @@
|
||||
<asp:ListItem Text="Venta" Value="2" Selected="True" />
|
||||
<asp:ListItem Text="Suministro" Value="1" />
|
||||
<%--<asp:ListItem Text="Consignación" Value="3" Enabled="false" />--%>
|
||||
<asp:ListItem Text="Obra" Value="4" />
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -4307,7 +4314,7 @@
|
||||
<asp:RadioButtonList ID="RblOpcionContrato" runat="server" CssClass="rbl" RepeatDirection="Horizontal" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Si" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Obra" Value="3"></asp:ListItem>
|
||||
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<asp:LinkButton ID="BtnIniciarContrato" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
|
||||
@@ -3031,21 +3031,7 @@ Partial Class Ventas
|
||||
LnkOCs.Visible = True
|
||||
UpnTools.Update()
|
||||
|
||||
ElseIf RblOpcionContrato.SelectedValue = "3" Then
|
||||
|
||||
DivEstimaciones.Visible = True
|
||||
DVEstimacionesObra.Visible = True
|
||||
|
||||
DdlContrato.DataSource = DtContratos.FiltraParametros("CveContrato > 0", "NumeroContrato", DistinctColumns:={"CveContrato", "NumeroContrato"})
|
||||
DdlContrato.DataBind()
|
||||
DdlContrato.Items.Insert(0, New ListItem("Seleccione", "0"))
|
||||
|
||||
|
||||
BtnEstimacion.Visible = False
|
||||
GvEst.Visible = False
|
||||
|
||||
|
||||
UPEstimaciones.Update()
|
||||
|
||||
Else
|
||||
BtnEstimacion.Visible = True
|
||||
@@ -3234,6 +3220,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Cot"))
|
||||
End If
|
||||
|
||||
DVEstimacionesObra.Visible = False
|
||||
Select Case RBLTipoContrato.SelectedValue.ToEntero()
|
||||
Case 1
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido", "Ped"))
|
||||
@@ -3246,7 +3233,35 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Insert(0, New ListItem("Pedido de Consignación", "PeC"))
|
||||
DdlTipoComprobante.SelectedValue = "PeC"
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
Case 4
|
||||
|
||||
TabGenerales.Enabled = True
|
||||
DVEstimacionesObra.Visible = True
|
||||
DdlEstimacionesObra.Items.Clear()
|
||||
Dim Con As New ClsContratos
|
||||
If Con.GetContratosAvanceEstimacionVentas(DdlContratosModal.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
DdlEstimacionesObra.DataSource = Con.DtResultados
|
||||
Else
|
||||
DdlEstimacionesObra.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Con.Dispose()
|
||||
|
||||
DdlEstimacionesObra.DataBind()
|
||||
DdlEstimacionesObra.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
BtnCargarContratoDetalles.Visible = False
|
||||
BtnCancelarContratoDetalles.Visible = False
|
||||
BtnCalcularTotalesContrato.Visible = False
|
||||
|
||||
BtnEstimacion.Visible = False
|
||||
GvEst.Visible = False
|
||||
GvContratoDetalles.Visible = False
|
||||
|
||||
End Select
|
||||
UPEstimaciones.Update()
|
||||
Updatetabs.Update()
|
||||
|
||||
ChkPSOC.Checked = False
|
||||
CambiaTipoDocto()
|
||||
@@ -3580,6 +3595,7 @@ Partial Class Ventas
|
||||
UpContratos.Update()
|
||||
End Sub
|
||||
Private Sub DdlContratoModalSelectIndex()
|
||||
|
||||
If Not DdlContratosModal.SelectedValue.ToEntero() > 0 Then
|
||||
GvContratoDetalles.DataBind()
|
||||
UpContratos.Update()
|
||||
@@ -8757,6 +8773,13 @@ Partial Class Ventas
|
||||
ObjFactura.CveCorte = CveCorte
|
||||
ObjFactura.CveMesa = -1
|
||||
ObjFactura.NumeroPersonas = 0
|
||||
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Then
|
||||
CveContrato = DdlContratosModal.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
|
||||
@@ -10511,7 +10534,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If ErrorList.Count = 0 AndAlso RblOpcionContrato.SelectedValue = "3" And DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
||||
If ErrorList.Count = 0 AndAlso RBLTipoContrato.SelectedValue = "4" And DdlEstimacionesObra.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If Not ObjContr.UpdateContratosAvanceEstimacionVentas(DdlEstimacionesObra.SelectedValue.ToEntero, ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar la estimación")
|
||||
@@ -18104,19 +18127,19 @@ Partial Class Ventas
|
||||
BtnEstimacion.Visible = True
|
||||
End If
|
||||
|
||||
If RblOpcionContrato.SelectedValue = "3" Then
|
||||
'If RblOpcionContrato.SelectedValue = "3" Then
|
||||
|
||||
|
||||
GvEst.DataSource = Nothing
|
||||
GvEst.DataBind()
|
||||
BtnEstimacion.Visible = False
|
||||
' GvEst.DataSource = Nothing
|
||||
' GvEst.DataBind()
|
||||
' BtnEstimacion.Visible = False
|
||||
|
||||
BtnCargarContratoDetalles.Visible = False
|
||||
BtnCancelarContratoDetalles.Visible = False
|
||||
' BtnCargarContratoDetalles.Visible = False
|
||||
' BtnCancelarContratoDetalles.Visible = False
|
||||
|
||||
UPEstimaciones.Update()
|
||||
' UPEstimaciones.Update()
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatosEstimaciones(CveCliente As Integer)
|
||||
@@ -18127,29 +18150,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
|
||||
If RblOpcionContrato.SelectedValue = "3" Then
|
||||
|
||||
DdlEstimacionesObra.Items.Clear()
|
||||
|
||||
If Con.GetContratosAvanceEstimacionVentas(DdlContrato.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DdlEstimacionesObra.DataSource = Con.DtResultados
|
||||
DdlEstimacionesObra.DataBind()
|
||||
DdlEstimacionesObra.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
Else
|
||||
|
||||
DdlEstimacionesObra.DataSource = Nothing
|
||||
DdlEstimacionesObra.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
UPEstimaciones.Update()
|
||||
|
||||
Else
|
||||
|
||||
If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||
If Con.GetEstimacionesPorFacturar(-1, CveCliente, DdlContrato.SelectedValue.ToEntero(), 0, UsuarioActual.CveEmpresa) Then
|
||||
GvEst.DataSource = Con.DtResultados
|
||||
If Con.DtResultados.Rows.Count > 0 Then
|
||||
'BtnEstimacion.Visible = True
|
||||
@@ -18165,7 +18168,7 @@ Partial Class Ventas
|
||||
DdlContrato.DataBind()
|
||||
GvEst.DataBind()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user