This commit is contained in:
janeth arvizu
2019-08-29 14:32:27 -07:00
5 changed files with 89 additions and 30 deletions

View File

@@ -2921,6 +2921,23 @@ Public Class ClsCompras
Return Retorno Return Retorno
End Function End Function
Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar la fecha de vencimiento de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "REPORTE PUE SIN PAGO" #Region "REPORTE PUE SIN PAGO"
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean

View File

@@ -1088,6 +1088,7 @@ Partial Class Bancos_IE
'2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente) '2019-08-28 unificados vista de controles complemento (Cancelado, conciliciado, Con complemento vigente, sin complemento vigente)
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True) Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
Dim ExistenComplementos As Boolean = VerificaComplementos(False) Dim ExistenComplementos As Boolean = VerificaComplementos(False)
If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then If Not ChkConciliado.Checked And ObjIE.CveEstatusIE <> 2 Then
If (Not ExistenComplementosVigentes) Then If (Not ExistenComplementosVigentes) Then
@@ -1101,7 +1102,13 @@ Partial Class Bancos_IE
Else Else
BtnEditar.Visible = False If UsuarioActual.TienePermisoProceso(99) Then
BtnEditar.Visible = True
PermisoComplementoVigente = True
Else
BtnEditar.Visible = False
End If
LnkEliminar.Visible = False LnkEliminar.Visible = False
LnkCancelar.Visible = False LnkCancelar.Visible = False
@@ -5647,15 +5654,24 @@ Partial Class Bancos_IE
Private Sub ControlesEdicion() Private Sub ControlesEdicion()
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
If PermisoComplementoVigente Then If PermisoComplementoVigente Then
DdlTipoTransaccion.Enabled = True If ExistenComplementosVigentes Then
LblCuenta.Visible = False TxtFolio.Enabled = True
DdlCuenta.Enabled = True TxtObservaciones.Enabled = True
DdlCuenta.Visible = True Else
TxtFolio.Enabled = True
TxtObservaciones.Enabled = True DdlTipoTransaccion.Enabled = True
LblCuenta.Visible = False
DdlCuenta.Enabled = True
DdlCuenta.Visible = True
TxtFolio.Enabled = True
TxtObservaciones.Enabled = True
End If
UpDatos.Update() UpDatos.Update()
CargaCuentasDepositoClientes() CargaCuentasDepositoClientes()

View File

@@ -654,23 +654,23 @@
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn"> <asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
<Columns> <Columns>
<%-- 0 --%> <%-- 0 --%>
<asp:TemplateField> <asp:TemplateField ItemStyle-Width="15px" >
<ItemTemplate> <ItemTemplate>
<label data-toogle="tooltip" class=' <%# IIf(Eval("CvePS").ToString() = "0", "label label-sm label-danger manita", "")%>'> <label data-toogle="tooltip" class=' <%# IIf(Eval("CvePS").ToString() = "0", "label label-sm label-danger manita", "")%>'>
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%-- 1 --%> <%-- 1 --%>
<asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="45px" />
<%-- 2 --%> <%-- 2 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle" ItemStyle-Width="70px">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LtlUnidadMedida" CssClass="centrarUM" runat="server" Text='<%# Eval("UM") %>'></asp:Label> <asp:Label ID="LtlUnidadMedida" CssClass="centrarUM" runat="server" Text='<%# Eval("UM") %>'></asp:Label>
<asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton> <asp:LinkButton ID="LBAplicarEquivalencia" OnClick="LBAplicarEquivalencia_Click" data-toggle="tooltip" title="Aplicar conversión de equivalencia" Text="" runat="server" Visible="false"> <i class="fa fa-magic"></i></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%-- 3 --%> <%-- 3 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Width="300px">
<ItemTemplate> <ItemTemplate>
<div style="float: left; width: 100%;"> <div style="float: left; width: 100%;">
<span style="width: 100%; border-bottom: 1px solid gray;"> <span style="width: 100%; border-bottom: 1px solid gray;">
@@ -683,9 +683,9 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%-- 4 --%> <%-- 4 --%>
<asp:BoundField DataField="Obs" /> <asp:BoundField DataField="Obs" ItemStyle-Width="350px" />
<%-- 5 --%> <%-- 5 --%>
<asp:TemplateField> <asp:TemplateField ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<span style="width: 145px; border-bottom: 1px solid gray;"> <span style="width: 145px; border-bottom: 1px solid gray;">
<asp:Label ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>' Visible='<%# if(UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2, True, False) %>'></asp:Label> <asp:Label ID="LblProyecto" runat="server" Text='<%# Eval("Proyecto", "{0}<br />") %>' Visible='<%# if(UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2, True, False) %>'></asp:Label>
@@ -694,11 +694,11 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%-- 6 --%> <%-- 6 --%>
<asp:BoundField DataField="TipoGasto" /> <asp:BoundField DataField="TipoGasto" ItemStyle-Width="180px" />
<%-- 7 --%> <%-- 7 --%>
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%-- 8 --%> <%-- 8 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label> <asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -2228,7 +2228,7 @@
</tr> </tr>
<tr> <tr>
<td align="left" style="width: 75px">Fecha Pago:</td> <td align="left" style="width: 75px">Fecha Pago:</td>
<td align="left"> <td align="left" style="width: 100px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy"> <div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ClientIDMode="Static"></asp:TextBox> <asp:TextBox ID="TxtFechaPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ClientIDMode="Static"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
@@ -2248,6 +2248,9 @@
</div> </div>
</td> </td>
<td align="left" >
<asp:LinkButton runat="server" Visible="false" ID="LnkUpdateFechaPago" OnClick="LnkUpdateFechaPago_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea actualizar la fecha de pago de la compra?" data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" ToolTip="Actualizar Fecha de Pago" />
</td>
</tr> </tr>
<tr> <tr>
<td align="left"> <td align="left">

View File

@@ -2634,6 +2634,7 @@ Partial Class Compras_Compras
DdlPS.Enabled = True DdlPS.Enabled = True
TxtObsPS.Enabled = True TxtObsPS.Enabled = True
LbAgregar.Enabled = True LbAgregar.Enabled = True
LnkUpdateFechaPago.Visible = True
End If End If
BtnGuardar.Visible = False BtnGuardar.Visible = False
@@ -9947,18 +9948,18 @@ Partial Class Compras_Compras
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
If e.Row.RowIndex = 0 Then If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(15) 'e.Row.Cells(0).Width = Unit.Pixel(15)
e.Row.Cells(1).Width = Unit.Pixel(45) 'e.Row.Cells(1).Width = Unit.Pixel(45)
e.Row.Cells(2).Width = Unit.Pixel(70) 'e.Row.Cells(2).Width = Unit.Pixel(70)
e.Row.Cells(3).Width = Unit.Pixel(230) 'e.Row.Cells(3).Width = Unit.Pixel(230)
e.Row.Cells(4).Width = Unit.Pixel(202) 'e.Row.Cells(4).Width = Unit.Pixel(202)
e.Row.Cells(5).Width = Unit.Pixel(155) 'e.Row.Cells(5).Width = Unit.Pixel(155)
e.Row.Cells(6).Width = Unit.Pixel(155) 'e.Row.Cells(6).Width = Unit.Pixel(155)
e.Row.Cells(7).Width = Unit.Pixel(50) 'e.Row.Cells(7).Width = Unit.Pixel(50)
e.Row.Cells(8).Width = Unit.Pixel(80) 'e.Row.Cells(8).Width = Unit.Pixel(80)
e.Row.Cells(9).Width = Unit.Pixel(80) 'e.Row.Cells(9).Width = Unit.Pixel(80)
e.Row.Cells(10).Width = Unit.Pixel(43) 'e.Row.Cells(10).Width = Unit.Pixel(43)
e.Row.Cells(11).Width = Unit.Pixel(43) 'e.Row.Cells(11).Width = Unit.Pixel(43)
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0) If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
e.Row.Cells(12).Width = Unit.Pixel(150) e.Row.Cells(12).Width = Unit.Pixel(150)
@@ -18816,4 +18817,26 @@ Partial Class Compras_Compras
AddPS2(EsNoDeducible:=EsNoDeducible) AddPS2(EsNoDeducible:=EsNoDeducible)
End Sub End Sub
Protected Sub LnkUpdateFechaPago_Click(sender As Object, e As EventArgs)
Dim ObjComp As New ClsCompras
Dim FechaPagoAnterior As String = ""
If ObjComp.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
If ObjComp.DtResultados.Rows.Count > 0 Then
FechaPagoAnterior = ObjComp.DtResultados.Rows(0)("FechaVencimiento").ToString.ToDate.ToShortDateString
End If
End If
If FechaPagoAnterior = TxtFechaPago.Text Then
Alert("La fecha de pago seleccionada es igual que la anterior.", TipoMensaje.MsgAdvertencia)
ObjComp.Dispose()
Exit Sub
End If
If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
Alert("Fecha de pago actualizada correctamente.")
End If
ObjComp.Dispose()
End Sub
End Class End Class

View File

@@ -3776,7 +3776,7 @@ Partial Class Ventas
End If End If
TxtTipoCambio.Text = DbRowVenta("TipoCambio").ToString TxtTipoCambio.Text = DbRowVenta("TipoCambio").ToString
If DbRowVenta("TipoCambio").ToString.ToDecimal <> DbRowVenta("TipoCambioValuacion").ToString.ToDecimal Then If DbRowVenta("UltimasFluctuaciones").ToString <> "" Then
LblTCValuacion.Text = String.Format("Ult. Val:{0}", DbRowVenta("UltimasFluctuaciones").ToString) LblTCValuacion.Text = String.Format("Ult. Val:{0}", DbRowVenta("UltimasFluctuaciones").ToString)
LblTCValuacion.Visible = True LblTCValuacion.Visible = True
End If End If