activación al saldar. poner fecha, obs
This commit is contained in:
@@ -145,6 +145,22 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" id="DVSaldar" runat="server" visible="false">
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha:
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaSaldar" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioSaldar" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaSaldar" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaSaldar" PopupButtonID="ImgCalendarioSaldar" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaSaldar" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaSaldar" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
</div>
|
||||
<div class="col-lg-1">
|
||||
Concepto:
|
||||
</div>
|
||||
@@ -185,7 +201,7 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, TipoCambio, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto,Folio, CveTipoProveedor" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<asp:GridView ID="GvESC" runat="server" DataKeyNames="CveIE, Saldo, TipoCambio, FechaDocumento, CveMoneda, CveConceptoContable, CveProveedor, CvePersonal,CveSubProyecto,Folio, CveTipoProveedor" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Egresos sin Comprobar de Proveedores" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -94,21 +94,9 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
e.Row.FCHyperLink("Hpl").NavigateUrl = ""
|
||||
e.Row.FCHyperLink("Hpl").Font.Bold = True
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(520)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(100)
|
||||
End If
|
||||
|
||||
'Sustituido 3-5 lineas mas abajo
|
||||
'If e.Row.DBCampo("FechaDocumento") = "" Then e.Row.BackColor = Drawing.Color.LightGray
|
||||
|
||||
'CUANDO ES SUBTITULO
|
||||
End If
|
||||
|
||||
'CUANDO ES SUBTITULO
|
||||
If e.Row.DBCampo("CveIE") = "" Then
|
||||
|
||||
If e.Row.DBCampo("CveMoneda") = "" Then
|
||||
@@ -118,7 +106,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
e.Row.FCLiteral("LtMoneda").Visible = True
|
||||
e.Row.FCHyperLink("Hpl").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'LINK A IE
|
||||
@@ -126,9 +113,8 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
e.Row.FCHyperLink("HLFolio").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red
|
||||
' e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&CveMoneda={4}&Serie={5}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), DdlUsuarioProgramo.SelectedValue, e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("Serie"))
|
||||
|
||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -181,7 +167,8 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtConcepto.Text = "Saldo de Egresos por comprobar"
|
||||
TxtConcepto.Text = "Saldado de Egresos por comprobar"
|
||||
TxtFechaSaldar.Text = Now.ToShortDateString
|
||||
DVSaldar.Visible = True
|
||||
UpSaldar.Update()
|
||||
|
||||
@@ -200,7 +187,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
@@ -213,7 +199,6 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL())
|
||||
|
||||
@@ -223,9 +208,9 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
Dim MsgError As String = ""
|
||||
Try
|
||||
|
||||
|
||||
If Contador > 0 Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, Now,
|
||||
Dim tFecha As Date = TxtFechaSaldar.Text.ToDate
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, tFecha,
|
||||
TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim ImporteSaldoGral As Decimal = 0
|
||||
Dim TipoMovtoConcepto As Boolean = True
|
||||
@@ -243,9 +228,22 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
End If
|
||||
If gr.DataKey("CveMoneda").ToEntero > 1 Then
|
||||
|
||||
Dim ImporteMN As Decimal = (ImporteSaldo * gr.DataKey("TipoCambio").ToDecimal - ImporteSaldo).RoundSQL
|
||||
Dim TCValuacion As Decimal = gr.DataKey("TipoCambio").ToDecimal
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" Then
|
||||
Dim tFechaUltimaFluctuacion As Date
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
If UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
|
||||
tFechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
|
||||
TCValuacion = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
If gr.DataKey("FechaDocumento").ToDate < tFechaUltimaFluctuacion Then TCValuacion = TCValuacion
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ImporteMN As Decimal = (ImporteSaldo * TCValuacion - ImporteSaldo).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, ImporteMN, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, gr.DataKey("Folio"), TxtConcepto.Text, -1,
|
||||
CveIE:=gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||
CveIE:=gr.DataKey("CveIE").ToEntero, TipoCambio:=TCValuacion, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
|
||||
ImporteME:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
|
||||
Reference in New Issue
Block a user