This commit is contained in:
Oscar Irigoyen
2023-03-24 15:27:38 -07:00
41 changed files with 1678 additions and 1747 deletions

View File

@@ -396,10 +396,10 @@
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-2" style="text-align: left">Fecha Desconciliado:</div>
<div class="col-md-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<div class="col-md-3" style="text-align: left">Fecha Desconciliado:</div>
<div class="col-md-3" style="text-align:left">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaDesconciliado" CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaDesconciliado" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
@@ -408,7 +408,9 @@
<asp:RequiredFieldValidator ID="RfvFechaDesconciliado" runat="server" ControlToValidate="TxtFechaDesconciliado" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Desconciliado''</b> es necesario, por favor ingréselo." ValidationGroup="VGMModalDesconciliado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceFechaDesconciliado" runat="server" HighlightCssClass="vco" TargetControlID="RfvFechaDesconciliado"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
<div class="col-md-3">
<asp:CheckBox ID="ChkDejarConciliado" runat="server" Text="Dejar Conciliado" TextAlign="Right" /></div>
</div>
</div>
<div class="modal-footer">

View File

@@ -402,7 +402,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Dim ErrorTrans As Boolean = False
If ModalidadDesconciliar = "D" Then
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario, ChkDejarConciliado.Checked) Then
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIEDesconciliar) Then
ErrorTrans = True
End If
@@ -412,7 +412,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
ElseIf ModalidadDesconciliar = "DT" Then
For Each Gvr As GridViewRow In GvDatos.Rows
If Gvr.FCCheckBox("ChkConciliado").Checked And Not Gvr.FCCheckBox("ChkConciliado").Enabled Then
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario, ChkDejarConciliado.Checked) Then
ErrorTrans = True
Else
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then

View File

@@ -826,15 +826,7 @@
<asp:CheckBox ID="ChkConciliado" runat="server" Text="Conciliado" Enabled="False" />
</td>
</tr>
<tr runat="server" id="TRComplementoSustitucion" visible="false">
<td>Complemento de pago Sustituto de: </td>
<td>
<a id="ARefIESustitucion" runat="server" href="" target='_blank' class='Texto'></a>
</td>
</tr>
</tr>
</table>
</fieldset>
</div>
@@ -1033,10 +1025,7 @@
</ContentTemplate>
</asp:UpdatePanel>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center">
@@ -1053,9 +1042,7 @@
</td>
</tr>
</table>
<br />
<div class="row">
<div class="col-md-12 ">
@@ -1421,16 +1408,8 @@
<asp:BoundField HeaderText="Estatus" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Fecha C" DataField="FechaCancelacion" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
<%-- <asp:TemplateField HeaderText="Regenerar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
<ItemTemplate>
<asp:LinkButton ID="imgRegenerar" OnClick="imgRegenerar_Click" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Regenerar"
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea regenerar?" data-btn-ok-label="si"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-reply-all'></i>" />
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
<asp:TemplateField HeaderText="Motivo" Visible="false" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
<ItemTemplate>
<asp:DropDownList runat="server" ID="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible="false">
</asp:DropDownList>
@@ -1439,9 +1418,9 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
<ItemTemplate>
<asp:LinkButton ID="LnkCancelarComplemetno" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False"
<asp:LinkButton ID="LnkCancelarComplemetno" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False"
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el complemento?" data-btn-ok-label="si"
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-minus'></i>" />
</ItemTemplate>

View File

@@ -1218,16 +1218,16 @@ Partial Class Bancos_IE
UpCancelacion.Update()
'OTROS DATOS - DATOS COMPLEMENTO SUSTITUCION
Dim CveIESustitucion As Integer = ObjIE.DtResultados(0)("CveIESustitucion").ToString.ToEntero
If CveIESustitucion > 0 Then
TRComplementoSustitucion.Visible = True
'Dim CveIESustitucion As Integer = ObjIE.DtResultados(0)("CveIESustitucion").ToString.ToEntero
'If CveIESustitucion > 0 Then
' TRComplementoSustitucion.Visible = True
If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) And ObjIE.DtResultados.Rows.Count > 0 Then
ARefIESustitucion.HRef = String.Format("/Bancos/IE.aspx?CveIE={0}", CveIESustitucion)
ARefIESustitucion.InnerText = ObjIE.Folio
End If
' If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) And ObjIE.DtResultados.Rows.Count > 0 Then
' ARefIESustitucion.HRef = String.Format("/Bancos/IE.aspx?CveIE={0}", CveIESustitucion)
' ARefIESustitucion.InnerText = ObjIE.Folio
' End If
End If
'End If
'DETALLES - MOVIMIENTOS
@@ -2506,25 +2506,16 @@ Partial Class Bancos_IE
End If
Dep.Dispose()
If CveOCSolicitudAnticipo > 0 Then
Dim ObjOC As New ClsOC
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal.Round(2)
SaldoOCAnticipo = ObjOC.DtResultados(0)("Saldo").ToString.ToDecimal.RoundSQL(2)
Else
SaldoOCAnticipo = 0
End If
ObjOC.Dispose()
Dim ImporteComparacion As Decimal = TxtImporte.Text.ToDecimal
'
If ChkPagarPesos.Checked Then
ImporteComparacion = ImporteOriginalDolaras
End If
@@ -5700,44 +5691,32 @@ Partial Class Bancos_IE
If Tipo = "Abono" Then
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
GvComplementoPagos.DataSource = ObjBancos.DtResultados
Else
GvComplementoPagos.DataSource = Nothing
End If
GvComplementoPagos.Columns(7).Visible = False
Else
If CveIE > 0 Then
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
DVGenerarComplementoModal.Visible = True
End If
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
DivCancelarComplemento.Visible = True
GvComplementoPagos.Columns(7).Visible = True
If UsuarioActual.TienePermisoProceso(85) Then GvComplementoPagos.Columns(8).Visible = True
End If
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "Folio", "SerieFolio", "FechaComplemento", "Importe", "RFCReceptor", "StrEstatus", "FechaCancelacion", "Tipo", "Estatus", "CveIE", "CvePAC", "MotivoCancelacion"})
'"CveComplementoPago","FolioFiscal","Folio","SerieFolio","FechaComplemento","Importe","RFCReceptor","StrEstatus","FechaCancelacion","Tipo,Estatus","CveIE","CvePAC"
End If
End If
GvComplementoPagos.Columns(7).Visible = True
End If
ObjBancos.Dispose()
GvComplementoPagos.DataBind()
UpComplementoPagos.Update()
UpEliminarCotizacion.Update() 'Esto se ocupa para mostrar DVmotivoCancelacion
'ObjBancos.Dispose()
@@ -5939,7 +5918,7 @@ Partial Class Bancos_IE
End Sub
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
If ChkConciliado.Checked Then
If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then
'TxtFechaDesconciliado.Text = Now.ToShortDateString
'UpDesconciliar.Update()
'RegistraScript("$('#DModalDesconciliar').modal()")

View File

@@ -295,7 +295,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(98) Then
PermiteModificarImporte = False
End If
Calendario.StartDate = Now.AddMonths(-8)
Calendario.StartDate = Now.AddMonths(-18)
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
If UsuarioActual.TienePermisoProceso(105) Then
Calendario.StartDate = Now
@@ -898,57 +898,58 @@ Partial Class Bancos_ProveedoresAbonar
Else
Dim ImporteME As Decimal = 0
If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago
If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then
ImporteME = tImporteMN
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
End If
ImporteME = tImporteMN
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
End If
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=tImporteMN) Then
MsgError = "No se pudo insertar la póliza"
End If
If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, IdCuentaBancariaComplementaria, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then
MsgError = "No se pudo insertar la póliza"
End If
If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, IdCuentaBancariaComplementaria, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
'If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
' 'fluctuación.
' Dim TCPago = TxtTCDolares.Text.ToDecimal
' Dim ImporteFluctuacion As Decimal = 0 '((ImporteSeleccionado / TCPago) - TxtImporte.Text.ToDecimal)
' Dim DtPrePoliza As DataTable = Nothing
' If ObjMov.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
' DtPrePoliza = ObjMov.DtResultados.Copy
' End If
' Dim PagoProveedoresME = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 312 AND TipoMovto = 0")
' Dim Bancos = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 30 AND TipoMovto = 1")
' Dim BancosComplementaria = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 204 AND TipoMovto = 1")
' DtPrePoliza.Dispose()
' ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria)
' If MsgError = "" AndAlso ImporteFluctuacion.RoundSQL() <> 0 Then
' 'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA
' If ImporteFluctuacion > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
' MsgError = "Ocurrio un error al saldar el movimiento"
' End If
' ElseIf ImporteFluctuacion < 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Referencia, 65, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
' MsgError = "Ocurrio un error al saldar el movimiento"
' End If
' End If
' End If
'End If
End If
'If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
' 'fluctuación.
' Dim TCPago = TxtTCDolares.Text.ToDecimal
' Dim ImporteFluctuacion As Decimal = 0 '((ImporteSeleccionado / TCPago) - TxtImporte.Text.ToDecimal)
' Dim DtPrePoliza As DataTable = Nothing
' If ObjMov.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
' DtPrePoliza = ObjMov.DtResultados.Copy
' End If
' Dim PagoProveedoresME = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 312 AND TipoMovto = 0")
' Dim Bancos = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 30 AND TipoMovto = 1")
' Dim BancosComplementaria = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 204 AND TipoMovto = 1")
' DtPrePoliza.Dispose()
' ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria)
' If MsgError = "" AndAlso ImporteFluctuacion.RoundSQL() <> 0 Then
' 'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA
' If ImporteFluctuacion > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
' MsgError = "Ocurrio un error al saldar el movimiento"
' End If
' ElseIf ImporteFluctuacion < 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Referencia, 65, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
' MsgError = "Ocurrio un error al saldar el movimiento"
' End If
' End If
' End If
'End If
End If
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -2032,7 +2033,7 @@ Partial Class Bancos_ProveedoresAbonar
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-12).ToShortDateString
RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-18).ToShortDateString
RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now