- mejoras

This commit is contained in:
2023-06-20 17:26:11 -07:00
parent 70321b7729
commit 2aba0f0a8e
2 changed files with 15 additions and 7 deletions

View File

@@ -145,7 +145,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveIE" Target="_blank" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Folio" /> <asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveIE" Target="_blank" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Folio" />
<asp:BoundField DataField="FechaDocumento" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaDocumento" ItemStyle-Width="85px" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Observaciones" ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" /> <asp:BoundField DataField="Observaciones" ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" />
<asp:BoundField DataField="Cargo" ItemStyle-HorizontalAlign="Right" HeaderText="Cargo" DataFormatString="{0:N2}" /> <asp:BoundField DataField="Cargo" ItemStyle-HorizontalAlign="Right" HeaderText="Cargo" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Abono" ItemStyle-HorizontalAlign="Right" HeaderText="Abono" DataFormatString="{0:N2}" /> <asp:BoundField DataField="Abono" ItemStyle-HorizontalAlign="Right" HeaderText="Abono" DataFormatString="{0:N2}" />

View File

@@ -102,6 +102,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
ObjBancos.Dispose() ObjBancos.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
UpDatos.Update() UpDatos.Update()
CeFechaAplicado.StartDate = txtFechaI.Text.ToDate
CeFechaAplicado.EndDate = txtFechaF.Text.ToDate
CeFechaDesconciliado.StartDate = txtFechaI.Text.ToDate
CeFechaDesconciliado.EndDate = txtFechaF.Text.ToDate
If GvDatos.Rows.Count > 0 Then RegistraScript("CalculaSeleccionados();", "1") If GvDatos.Rows.Count > 0 Then RegistraScript("CalculaSeleccionados();", "1")
End Sub End Sub
@@ -178,8 +182,9 @@ Partial Class Bancos_ConciliacionesBancariasaspx
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
For Each DrE As DataRow In DtDatosEdoCuenta.Rows For Each DrE As DataRow In DtDatosEdoCuenta.Rows
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Or Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Or
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
ErrorTrans = True ErrorTrans = True
Else Else
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Dr("CveIE").ToString.ToEntero) Then If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Dr("CveIE").ToString.ToEntero) Then
@@ -283,7 +288,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Dim CveIE As Integer = 0 Dim CveIE As Integer = 0
For Each Gvr As GridViewRow In GvDatos.Rows For Each Gvr As GridViewRow In GvDatos.Rows
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Then Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Then
ErrorTrans = True ErrorTrans = True
Else Else
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
@@ -296,8 +302,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Next Next
For Each Gvr As GridViewRow In GvEdoConciliacion.Rows For Each Gvr As GridViewRow In GvEdoConciliacion.Rows
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString, Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then If Not ObjBancos.UpdateConciliacionBancaria(CveIE, FechaConciliado, Gvr.DataKey("CveIEEstadoCuenta").ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
'If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString,
' Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then
ErrorTrans = True ErrorTrans = True
End If End If
End If End If
@@ -382,7 +390,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Protected Sub LnkDesconciliar_Click(sender As Object, e As EventArgs) Protected Sub LnkDesconciliar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
ModalidadDesconciliar = "D" ModalidadDesconciliar = "D"
TxtFechaDesconciliado.Text = Now.ToShortDateString TxtFechaDesconciliado.Text = txtFechaF.Text
CveIEDesconciliar = gvRow.DataKey("CveIE").ToEntero CveIEDesconciliar = gvRow.DataKey("CveIE").ToEntero
UpDesconciliar.Update() UpDesconciliar.Update()
RegistraScript("$('#DModalDesconciliar').modal()") RegistraScript("$('#DModalDesconciliar').modal()")