Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1315,7 +1315,8 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1") As Boolean
|
Public Function UpdateBancos_IE(FechaDocumento As DateTime, FechaAplicado As DateTime?, CveIE As Integer, Optional Folio As String = "-1", Optional CveCuentaDeposito As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||||
|
Optional Observaciones As String = "-1") As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Banc_IEUpdate")
|
DataAdapter("PA_Banc_IEUpdate")
|
||||||
@@ -1328,8 +1329,17 @@ Public Class ClsBancos
|
|||||||
Else
|
Else
|
||||||
.Add("@FechaAplicado", SqlDbType.DateTime).Value = FechaAplicado
|
.Add("@FechaAplicado", SqlDbType.DateTime).Value = FechaAplicado
|
||||||
End If
|
End If
|
||||||
|
|
||||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
.Add("@Folio", SqlDbType.VarChar).Value = Folio
|
.Add("@Folio", SqlDbType.VarChar).Value = Folio
|
||||||
|
|
||||||
|
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
|
||||||
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ Public Class ClsContabilidad
|
|||||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
If ex.Message.Contains("50005;") Then
|
If ex.Message.Contains("50015;") Then
|
||||||
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Else
|
Else
|
||||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
@@ -500,7 +500,12 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al eliminar el movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
|
If ex.Message.Contains("50015;") Then
|
||||||
|
OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
Else
|
||||||
|
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -5662,12 +5667,13 @@ Public Class ClsContabilidad
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "VALIDACION POLIZA DESCUADRADA"
|
#Region "VALIDACION POLIZA DESCUADRADA"
|
||||||
Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer) As Boolean
|
Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_PrePoliza_Validacion")
|
DataAdapter("PA_Conta_PrePoliza_Validacion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||||
|
|||||||
@@ -11,17 +11,14 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Ingresos y Egresos"></asp:Literal> <asp:Literal ID="LtlIE" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Ingresos y Egresos"></asp:Literal> <asp:Literal ID="LtlIE" runat="server"></asp:Literal>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HplListaProveedores" runat="server" Style="color: #686868;"><i class="fa fa-list-ul" style="color: #686868;"></i> Listado Facturas Pagadas</asp:HyperLink>
|
<asp:HyperLink ID="HplListaProveedores" runat="server" Style="color: #686868;"><i class="fa fa-list-ul" style="color: #686868;"></i> Listado Facturas Pagadas</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLImprimir" Target="_blank" runat="server" Visible="false" Style="color: #686868;"> <i class="fa fa-print" style="color: #686868;"></i> Imprimir</asp:HyperLink>
|
<asp:HyperLink ID="HLImprimir" Target="_blank" runat="server" Visible="false" Style="color: #686868;"> <i class="fa fa-print" style="color: #686868;"></i> Imprimir</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAccionesComplementos">
|
<asp:UpdatePanel runat="server" ID="UpAccionesComplementos">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
@@ -30,7 +27,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLModalActualizarTC" NavigateUrl="#" runat="server" Visible="false" data-toggle="modal" data-target="#ModalActualizarTC" Style="color: #686868;"><i class="fa fa-usd" style="color:#686868;"></i> Actualizar Tipo Cambio</asp:HyperLink>
|
<asp:HyperLink ID="HLModalActualizarTC" NavigateUrl="#" runat="server" Visible="false" data-toggle="modal" data-target="#ModalActualizarTC" Style="color: #686868;"><i class="fa fa-usd" style="color:#686868;"></i> Actualizar Tipo Cambio</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
@@ -54,7 +50,10 @@
|
|||||||
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplemento" OnClick="LnkCancelarComplemento_Click" runat="server" Visible="false" Style="color: #686868;"><i class="fa fa-ban" style="color: #686868;"></i> Refacturar Complemento</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil" style="color: #686868;"></i> Cancelar Complemento</asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el movimiento y complemento?" data-btn-ok-label="si" Style="color: #686868;"> <i class="fa fa-pencil"></i> Cancelar Complemento</asp:LinkButton>
|
||||||
|
|
||||||
|
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -862,6 +861,7 @@
|
|||||||
<asp:Button ID="BtnCancelar" runat="server" Visible="false" Text="Volver" OnClientClick="javascript:window.location.href='/Bancos/CatBancosIE.aspx';return false;" class="btn btn-danger " />
|
<asp:Button ID="BtnCancelar" runat="server" Visible="false" Text="Volver" OnClientClick="javascript:window.location.href='/Bancos/CatBancosIE.aspx';return false;" class="btn btn-danger " />
|
||||||
<asp:Button ID="BtnImprimir" runat="server" Text="Imprimir" Visible="False" class="btn btn-primary " />
|
<asp:Button ID="BtnImprimir" runat="server" Text="Imprimir" Visible="False" class="btn btn-primary " />
|
||||||
<asp:Button ID="BtnActualizar" runat="server" Text="Actualizar" ValidationGroup="GrpGuardar" Visible="False" class="btn btn-info " />
|
<asp:Button ID="BtnActualizar" runat="server" Text="Actualizar" ValidationGroup="GrpGuardar" Visible="False" class="btn btn-info " />
|
||||||
|
<asp:Button Text="Editar" ID="BtnEditar" OnClick="BtnEditar_Click" CssClass="btn btn-primary" runat="server" Visible ="false" ValidationGroup="GrpGuardar" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
@@ -1228,6 +1228,7 @@
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="CancelarActualizarTC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
<button id="CancelarActualizarTC" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
<asp:Button Text="Actualizar" ID="BtnActualizarTC" OnClick="BtnActualizarTC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalActualizarTC" runat="server" />
|
<asp:Button Text="Actualizar" ID="BtnActualizarTC" OnClick="BtnActualizarTC_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalActualizarTC" runat="server" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -1333,29 +1334,31 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">CancelarComplemetno</h4>
|
<h4 class="modal-title">Cancelar Movimiento y Complemetno</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpModalCancelarComplemetno" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpModalCancelarComplemetno" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<p>¿Cual de las siguientes acciones es la que desea realizar?</p>
|
<%-- <p>¿Cual de las siguientes acciones es la que desea realizar?</p>
|
||||||
|
|
||||||
<asp:RadioButtonList runat="server" ID="RdlCancelarComplemento" OnSelectedIndexChanged="RdlCancelarComplemento_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Horizontal">
|
<asp:RadioButtonList runat="server" ID="RdlCancelarComplemento" OnSelectedIndexChanged="RdlCancelarComplemento_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Horizontal">
|
||||||
<asp:ListItem Value="1" Selected="True">Cancelar Complemento</asp:ListItem>
|
<asp:ListItem Value="1" Selected="True">Cancelar Complemento</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Cancelar Pago y Complemento</asp:ListItem>
|
<asp:ListItem Value="2">Cancelar Pago y Complemento</asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>--%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="DivFechaCancelación" visible="false">
|
<div class="row" runat="server" id="DivFechaCancelación" visible="true">
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
Fecha Cancelación:
|
Fecha Cancelación:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="input-group date date-picker" data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
<div class="input-group date date-picker" data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
|
||||||
<asp:TextBox ID="TxtFechaCancelarComplemento" runat="server" CssClass="form-control input-sm" Width="80px" CausesValidation="true" MaxLength="10" ValidationGroup="GrpCancelarComplemento"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaCancelarComplemento" runat="server" CssClass="form-control input-sm" Width="80px" CausesValidation="true" MaxLength="10" ValidationGroup="GrpCancelarComplemento"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton ID="LnkTxtFechaCancelarComplemento" class="btn default input-sm" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="LnkTxtFechaCancelarComplemento" class="btn default input-sm" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
@@ -1374,11 +1377,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -410,6 +410,21 @@ Partial Class Bancos_IE
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveEstatusIE As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveEstatusIE") Is Nothing Then
|
||||||
|
Return -1
|
||||||
|
Else
|
||||||
|
Return ViewState("CveEstatusIE").ToString.ToEntero
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveEstatusIE") = value
|
||||||
|
End Set
|
||||||
|
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
#Region "CANCELACIÓN COMPLEMENTO MODAL V2"
|
||||||
@@ -630,7 +645,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'08/05/2018 - Se deshabilita opcion Eliminar IE si tiene un complemento de pago relacionado
|
'08/05/2018 - Se deshabilita opcion Eliminar IE si tiene un complemento de pago relacionado
|
||||||
If CveIE = -1 Or (CveIE > 0 AndAlso VerificaComplementos()) Then
|
If CveIE = -1 Or (CveIE > 0 AndAlso VerificaComplementos(False)) Then
|
||||||
LnkEliminar.Visible = False
|
LnkEliminar.Visible = False
|
||||||
If CveIE > 0 Then
|
If CveIE > 0 Then
|
||||||
LnkCancelar.Visible = False
|
LnkCancelar.Visible = False
|
||||||
@@ -674,6 +689,17 @@ Partial Class Bancos_IE
|
|||||||
LnkAjustarMovimiento.Visible = True
|
LnkAjustarMovimiento.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not VerificaComplementos(True) Then
|
||||||
|
|
||||||
|
LnkCancelarComplemento.Visible = False
|
||||||
|
LnkCancelarComplementoImporte.Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
UppEliminarIE.Update()
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -697,7 +723,7 @@ Partial Class Bancos_IE
|
|||||||
CveIEDeposito2 = ObjIE.DtResultados(0)("CveIEDeposito2").ToString.ToEntero
|
CveIEDeposito2 = ObjIE.DtResultados(0)("CveIEDeposito2").ToString.ToEntero
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(99) Then
|
If UsuarioActual.TienePermisoProceso(99) Then
|
||||||
BtnActualizar.Visible = True
|
'BtnActualizar.Visible = True
|
||||||
TxtFechaDocumento.Enabled = True
|
TxtFechaDocumento.Enabled = True
|
||||||
Calendario.Enabled = True
|
Calendario.Enabled = True
|
||||||
End If
|
End If
|
||||||
@@ -749,6 +775,7 @@ Partial Class Bancos_IE
|
|||||||
'ChkAplicaImpuestos.Checked = ObjIE.AplicaImpuestos
|
'ChkAplicaImpuestos.Checked = ObjIE.AplicaImpuestos
|
||||||
'ChkImpreso.Checked = ObjIE.FueImpreso
|
'ChkImpreso.Checked = ObjIE.FueImpreso
|
||||||
ChkConciliado.Checked = ObjIE.FueConciliado
|
ChkConciliado.Checked = ObjIE.FueConciliado
|
||||||
|
|
||||||
DdlEstatusIE.SelectedValue = ObjIE.CveEstatusIE.ToString
|
DdlEstatusIE.SelectedValue = ObjIE.CveEstatusIE.ToString
|
||||||
DdlEstatusIE.Visible = False
|
DdlEstatusIE.Visible = False
|
||||||
LblEstatusIE.Visible = True
|
LblEstatusIE.Visible = True
|
||||||
@@ -843,6 +870,8 @@ Partial Class Bancos_IE
|
|||||||
LblRegistroFecha.Text = ObjIE.FechaIng.ToShortDateString
|
LblRegistroFecha.Text = ObjIE.FechaIng.ToShortDateString
|
||||||
LblRegistroUsuario.Text = ObjIE.Usuario
|
LblRegistroUsuario.Text = ObjIE.Usuario
|
||||||
|
|
||||||
|
CveEstatusIE = ObjIE.CveEstatusIE
|
||||||
|
|
||||||
Select Case ObjIE.CveEstatusIE
|
Select Case ObjIE.CveEstatusIE
|
||||||
Case 1
|
Case 1
|
||||||
If Not ObjIE.FueConciliado Then
|
If Not ObjIE.FueConciliado Then
|
||||||
@@ -942,6 +971,7 @@ Partial Class Bancos_IE
|
|||||||
LnkComplementoPago.Visible = True
|
LnkComplementoPago.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
|
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
|
||||||
'cuando es cheque devuelto
|
'cuando es cheque devuelto
|
||||||
TabCancelacion.Visible = True
|
TabCancelacion.Visible = True
|
||||||
@@ -1044,6 +1074,19 @@ Partial Class Bancos_IE
|
|||||||
Alert("El Documento solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El Documento solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ChkConciliado.Checked Then
|
||||||
|
|
||||||
|
If (Not VerificaComplementos(True)) And UsuarioActual.TienePermisoProceso(99) And ObjIE.CveEstatusIE <> 2 Then
|
||||||
|
BtnEditar.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpGuardar.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If CveIE > 0 Then
|
'If CveIE > 0 Then
|
||||||
@@ -3638,14 +3681,22 @@ Partial Class Bancos_IE
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||||
|
|
||||||
Dim IE As New ClsBancos
|
Dim IE As New ClsBancos
|
||||||
Dim FechaAplicado As DateTime? = Nothing
|
Dim FechaAplicado As DateTime? = Nothing
|
||||||
|
|
||||||
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text) Then
|
|
||||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion)
|
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
||||||
|
|
||||||
|
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||||
|
Observaciones:=TxtObservaciones.Text) Then
|
||||||
|
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
IE.Dispose()
|
IE.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
||||||
@@ -4524,6 +4575,8 @@ Partial Class Bancos_IE
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub RecargaCuentasDepositos()
|
Private Sub RecargaCuentasDepositos()
|
||||||
|
|
||||||
|
|
||||||
If CveProveedor > 0 Then
|
If CveProveedor > 0 Then
|
||||||
|
|
||||||
Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
|
Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
|
||||||
@@ -4534,6 +4587,12 @@ Partial Class Bancos_IE
|
|||||||
CargaCuentasDepositos()
|
CargaCuentasDepositos()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If CveCliente > 0 Then
|
||||||
|
CargaCuentasDepositoClientes()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Recaga CuentasBancarias de Proveedor
|
'Recaga CuentasBancarias de Proveedor
|
||||||
@@ -4720,23 +4779,25 @@ Partial Class Bancos_IE
|
|||||||
#Region " COMPLEMENTOS PAGO "
|
#Region " COMPLEMENTOS PAGO "
|
||||||
Private Sub CargaComplementosPago()
|
Private Sub CargaComplementosPago()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
GvComplementoPagos.Columns(7).Visible = True
|
GvComplementoPagos.Columns(7).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
DVGenerarComplementoModal.Visible = False
|
||||||
|
|
||||||
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
|
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
|
||||||
|
|
||||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||||
If ObjBancos.DtResultados.Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 Then
|
|
||||||
|
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And UsuarioActual.CveRol = 1 And CveEstatusIE <> 2 Then
|
||||||
DVGenerarComplementoModal.Visible = True
|
DVGenerarComplementoModal.Visible = True
|
||||||
Else
|
|
||||||
DVGenerarComplementoModal.Visible = False
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
DVGenerarComplementoModal.Visible = False
|
|
||||||
GvComplementoPagos.DataSource = Nothing
|
GvComplementoPagos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4756,8 +4817,8 @@ Partial Class Bancos_IE
|
|||||||
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
|
Protected Sub GvComplementoPagos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComplementoPagos.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
e.Row.Cells(3).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||||
e.Row.Cells(4).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
e.Row.Cells(4).Text = String.Format("<a class="" texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class="" fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CVECOMPLEMENTOPAGO={1}&CVEIE={2}", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("CveIE"))))
|
||||||
|
|
||||||
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
||||||
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = True
|
||||||
@@ -4785,8 +4846,8 @@ Partial Class Bancos_IE
|
|||||||
If ObjBanco.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, FolioFiscalPadre, EsRegeneracion:=True) Then
|
If ObjBanco.GeneraTimbrePago(CveIE, -1, UsuarioActual, -1, FolioFiscalPadre, EsRegeneracion:=True) Then
|
||||||
ObjBanco.Commit()
|
ObjBanco.Commit()
|
||||||
Str.AppendFormat("Folio: <b>{0}</b> ", ObjBanco.ComplementoSerieFolio)
|
Str.AppendFormat("Folio: <b>{0}</b> ", ObjBanco.ComplementoSerieFolio)
|
||||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
|
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class="" fa fa-file""></i></i></a> ", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
|
||||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
|
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class="" fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
|
||||||
'Str.Append($"<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveID={gvr.DataKey("CveIE")}'>{gvr.DataKey("Folio")}</a> {gvr.DataKey("NombreCliente")}<br>")
|
'Str.Append($"<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveID={gvr.DataKey("CveIE")}'>{gvr.DataKey("Folio")}</a> {gvr.DataKey("NombreCliente")}<br>")
|
||||||
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False)
|
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False)
|
||||||
Alert(Str.ToString, TipoMensaje.MsgInformacion)
|
Alert(Str.ToString, TipoMensaje.MsgInformacion)
|
||||||
@@ -4808,14 +4869,25 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Function VerificaComplementos() As Boolean
|
Private Function VerificaComplementos(Validos As Boolean) As Boolean
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) And ObjBancos.DtResultados.Rows.Count > 0 Then
|
Dim Filtro As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
If Validos Then
|
||||||
|
Filtro = " Estatus IN(1,3) "
|
||||||
|
Else
|
||||||
|
Filtro = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) And ObjBancos.DtResultados.FiltraParametros(Filtro).Rows.Count > 0 Then
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Else
|
Else
|
||||||
Retorno = False
|
Retorno = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
@@ -4828,203 +4900,7 @@ Partial Class Bancos_IE
|
|||||||
Confirmacion("¿Seguro que desea Cancelar el documento por Sustitución?", "", String.Format("document.location.href=""/Ventas/ClientesAbonar.aspx?CveIESustitucion={0}&CveCliente={1}&CveMoneda={2}""", CveIE, CveCliente, CveMoneda), "")
|
Confirmacion("¿Seguro que desea Cancelar el documento por Sustitución?", "", String.Format("document.location.href=""/Ventas/ClientesAbonar.aspx?CveIESustitucion={0}&CveCliente={1}&CveMoneda={2}""", CveIE, CveCliente, CveMoneda), "")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkCancelarComplementoImporte_Click(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
If ChkConciliado.Checked Then
|
|
||||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim FechaCorteIE As Date = Now
|
|
||||||
Dim CveMoneda, CveMonedaFiltro, IDPoliza, IdPolizaNueva, FolioPolizaNueva As Integer
|
|
||||||
Dim FolioIECancelado = ""
|
|
||||||
Dim ErrorCancelar As Boolean
|
|
||||||
Dim ObjBancos As New ClsBancos
|
|
||||||
Dim MensajeError As String = ""
|
|
||||||
|
|
||||||
ObjBancos.IniciaTransacSQL()
|
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
ObjAC.IniciaTransacSQL()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
ComplementoSerieFolio = ObjBancos.DtResultados.FiltroPrimeroValor("FolioFiscal")
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Dim FechaCancelacion As DateTime = now ' = ("2019/05/31 23:50").ToDateTime
|
|
||||||
|
|
||||||
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, EsCancelacion:=True, CFDIRelacionado:=ComplementoSerieFolio) Then
|
|
||||||
If ObjBancos.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjBancos.DtResultados.Rows.Count > 0 Then
|
|
||||||
'FechaCorteIE = ObjBancos.FechaDocumento
|
|
||||||
CveMoneda = ObjBancos.CveMoneda
|
|
||||||
CveMonedaFiltro = CveMoneda
|
|
||||||
IDPoliza = ObjBancos.IDPoliza
|
|
||||||
FolioIECancelado = ObjBancos.Folio
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "GENERAR TIMBRE PAGO"
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA IE CONTABILIZADO
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
|
|
||||||
If (IDPoliza > 0 AndAlso UsuarioActual.Empresa.UsaAC) Then
|
|
||||||
|
|
||||||
If ObjAC Is Nothing Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
Dim dt As DataTable
|
|
||||||
If ObjAC.GetPoliza(IDPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then
|
|
||||||
dt = ObjAC.DtResultados
|
|
||||||
|
|
||||||
' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS)
|
|
||||||
If dt.Rows(0)("FechaPol").ToString.ToDate.Month < TxtFechaDocumento.Text.ToDate.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
|
||||||
IdPolizaNueva = ObjAC.AddPoliza(1, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
|
|
||||||
|
|
||||||
If IdPolizaNueva > 0 Then
|
|
||||||
FolioPolizaNueva = ObjAC.Folio
|
|
||||||
|
|
||||||
'CREA POLIZA NEGATIVA
|
|
||||||
For Each dr As DataRow In dt.Rows
|
|
||||||
If Not ObjAC.AddMovimiento(IdPolizaNueva, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "True", dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), dr("IdSegNeg").ToString.ToEntero, TxtFechaDocumento.Text.ToDate, "") Then
|
|
||||||
MensajeError = "Error CREA POLIZA NEGATIVA "
|
|
||||||
ErrorCancelar = True : Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'AJUSTA POLIZA
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If Not ObjAC.AjustaPoliza(IdPolizaNueva) Then
|
|
||||||
MensajeError = "Error AJUSTA POLIZA "
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA IE
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If Not ObjBancos.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
|
||||||
MensajeError = "CANCELA IE "
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
MensajeError = "Error IdPoliza 0 "
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
'LIMPIA POLIZA PONIENDO IMPORTE EN CEROS
|
|
||||||
For Each dr As DataRow In dt.Rows
|
|
||||||
If Not ObjAC.UpdateMovimiento(dr("Id").ToString.ToEntero, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "1", 0, dr("Referencia").ToString, dr("Concepto").ToString, dr("IdSegNeg").ToString.ToEntero, dr("Fecha").ToString.ToDate) Then
|
|
||||||
MensajeError = "Error LIMPIA POLIZA PONIENDO IMPORTE EN CEROS "
|
|
||||||
ErrorCancelar = True : Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'AJUSTA POLIZA
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
|
||||||
MensajeError = "Error AJUSTA POLIZA "
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'CANCELA IE
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If Not ObjBancos.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
|
||||||
MensajeError = "Error CANCELA IE "
|
|
||||||
ErrorCancelar = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
|
|
||||||
If FechaCorteIE.LastDayOfMonth > TxtFechaDocumento.Text.ToDate.LastDayOfMonth Then
|
|
||||||
'CANCELA IE MES ANTERIOR
|
|
||||||
If Not ObjBancos.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FechaCorteIE) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "Cancelar IE MES ANTERIOR "
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
'CANCELA IE MES ACTUAL
|
|
||||||
If Not ObjBancos.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, TxtFechaDocumento.Text.ToDate) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "Cancelar IE MES ACTUAL "
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
|
|
||||||
Dim CveComplementoPago As Integer = -1
|
|
||||||
|
|
||||||
If ObjBancos.DtResultados.Rows.Count > 0 Then
|
|
||||||
'OBTENEMOS EL UUID DEL COMPLEMENTO A CANCELAR POR SUSTITUCION
|
|
||||||
CFDIRelacionadoSustitucion = ObjBancos.DtResultados.Rows(0)("FolioFiscal").ToString
|
|
||||||
CveComplementoPago = ObjBancos.DtResultados(0)("CveComplementoPago").ToString().ToEntero
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ACTUALIZA FOLIOS CANCELADOS
|
|
||||||
If ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
|
||||||
If Not ObjBancos.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "ACTUALIZA FOLIOS CANCELADOS"
|
|
||||||
Else
|
|
||||||
Dim FolioCancelado = $"{FolioIECancelado}_C_{ObjBancos.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
|
||||||
|
|
||||||
If Not ObjBancos.UpdateFolioCancelado(CveIE.ToEntero, Folio:=FolioCancelado) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "UPDATE FOLIOS CANCELADOS"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2
|
|
||||||
If Not ErrorCancelar And CveComplementoPago > 0 Then
|
|
||||||
If Not ObjBancos.UpdateComplementoPagoCancelado(CveComplementoPago, 2, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa, DateTime.Now) Then
|
|
||||||
ErrorCancelar = True
|
|
||||||
MensajeError = "ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
|
||||||
ObjBancos.Commit()
|
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
|
||||||
Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
|
||||||
|
|
||||||
If IdPolizaNueva > 0 Then Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza de cancelación</a>", IdPolizaNueva)
|
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
|
||||||
ObjBancos.RollBack()
|
|
||||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
|
||||||
GuardaLog(MensajeError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
|
||||||
ObjBancos.Dispose()
|
|
||||||
End Sub
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ACTUALIZAR TIPO CAMBIO PREPOLIZA "
|
#Region " ACTUALIZAR TIPO CAMBIO PREPOLIZA "
|
||||||
@@ -5581,6 +5457,10 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If ChkConciliado.Checked Then
|
||||||
|
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
@@ -5629,44 +5509,123 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Protected Sub BtnModalCancelarComplemento_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnModalCancelarComplemento_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If RdlCancelarComplemento.SelectedValue.ToEntero = 1 Then
|
|
||||||
|
|
||||||
Dim ObjCancelacion As New Timbrado
|
If ChkConciliado.Checked Then
|
||||||
Dim ObjBanco As New ClsBancos
|
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
||||||
|
CancelarIE(True)
|
||||||
|
|
||||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
End Sub
|
||||||
CargaComplementosPago()
|
|
||||||
|
Protected Sub LnkCancelarComplementoImporte_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If ChkConciliado.Checked Then
|
||||||
|
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ObjBancos As New ClsBancos
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
Dim DTComplementos As New DataTable
|
||||||
|
|
||||||
|
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DTComplementos = ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ")
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
|
If DTComplementos.Rows.Count = 1 Then
|
||||||
|
|
||||||
|
CveComplementoPagoCancelar = DTComplementos.Rows(0)("CveComplementoPago").ToString.ToEntero
|
||||||
|
FolioFiscalCancelar = DTComplementos.Rows(0)("FolioFiscal").ToString
|
||||||
|
RFCReceptorCancelar = DTComplementos.Rows(0)("RFCReceptor").ToString
|
||||||
|
CvePACCancelacion = DTComplementos.Rows(0)("CvePAC").ToString.ToEntero
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
||||||
|
DivFechaCancelación.Visible = True
|
||||||
|
UpModalCancelarComplemetno.Update()
|
||||||
|
|
||||||
|
Else
|
||||||
|
If DTComplementos.Rows.Count = 0 Then
|
||||||
|
Alert("No hay complementos vigentes")
|
||||||
|
Else
|
||||||
|
Alert($"Existe mas de un complemento vigente, complementos vigentes: { DTComplementos.Rows.Count }")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnEditar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
BtnActualizar.Visible = True
|
||||||
|
BtnEditar.Visible = False
|
||||||
|
UpGuardar.Update()
|
||||||
|
|
||||||
|
ControlesEdicion(True)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ControlesEdicion(mostrar As Boolean)
|
||||||
|
|
||||||
|
|
||||||
|
If mostrar Then
|
||||||
|
|
||||||
|
DdlTipoTransaccion.Enabled = True
|
||||||
|
LblCuenta.Visible = False
|
||||||
|
DdlCuenta.Enabled = True
|
||||||
|
DdlCuenta.Visible = True
|
||||||
|
TxtFolio.Enabled = True
|
||||||
|
TxtObservaciones.Enabled = True
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
|
CargaCuentasDepositoClientes()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCuentasDepositoClientes()
|
||||||
|
|
||||||
|
If DdlTipoTransaccion.SelectedValue = "9" And CveCliente > 0 Then
|
||||||
|
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Enabled = True
|
||||||
|
|
||||||
|
|
||||||
|
Dim Dep As New ClsGenerales
|
||||||
|
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
|
||||||
|
|
||||||
|
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||||
|
If Dep.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
|
||||||
Alert("El complemento se cancelo correctamente.")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
|
||||||
Alert("Se presento un error al cancelar el complemento.")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjBanco.Dispose()
|
Dep.Dispose()
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
UpCuentaDeposito.Update()
|
||||||
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
|
||||||
CancelarIE(True)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub RdlCancelarComplemento_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
|
|
||||||
If RdlCancelarComplemento.SelectedValue.ToEntero = 1 Then
|
|
||||||
DivFechaCancelación.Visible = False
|
|
||||||
Else
|
|
||||||
DivFechaCancelación.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpModalCancelarComplemetno.Update()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
End Class
|
End Class
|
||||||
Binary file not shown.
Binary file not shown.
@@ -121,6 +121,12 @@ Partial Class General_SaldosIniciales
|
|||||||
Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
If RblFormato.SelectedValue = "1" Then
|
||||||
|
If Not dt.Columns(14).ColumnName = "Es distribuidor" Then
|
||||||
|
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then
|
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then
|
||||||
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
||||||
@@ -489,16 +495,17 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Codigo As String = Row("Codigo").ToString
|
Dim Codigo As String = Row("Codigo").ToString
|
||||||
Dim Descripcion As String = Row("Descripcion").ToString
|
Dim Descripcion As String = Row("Descripcion").ToString
|
||||||
Dim TipoPS As String = Row("Tipo").ToString.Trim.ToUpper
|
Dim TipoPS As String = Row("Tipo").ToString.Trim.ToUpper
|
||||||
Dim CodigoBarras As String = Row("Codigo Barras").ToString
|
Dim CodigoBarras As String = Row("Código Barras").ToString
|
||||||
Dim UnidadMedida As String = Row("Unidad Medida").ToString.Trim
|
Dim UnidadMedida As String = Row("Unidad Medida").ToString.Trim
|
||||||
Dim Clasificacion As String = Row("Clasificacion").ToString.Trim
|
Dim Clasificacion As String = Row("Clasificacion").ToString.Trim
|
||||||
Dim Marca As String = Row("Marca").ToString.Trim
|
Dim Marca As String = Row("Marca").ToString.Trim
|
||||||
Dim RinTamaño As String = Row("Tamaño de Rin").ToString.Trim
|
Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "")
|
||||||
Dim Medida As String = Row("Medida").ToString.Trim
|
Dim Medida As String = If(Row.Table.Columns.Contains("Medida"), Row("Medida").ToString.Trim, "")
|
||||||
Dim SATClavePS As String = Row("Codigo SAT").ToString.Trim
|
Dim SATClavePS As String = Row("Código SAT").ToString.Trim
|
||||||
Dim SATClaveUnidadMedida As String = Row("Clave Unidad").ToString.Trim
|
Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "")
|
||||||
Dim Linea As String = Row("Linea").ToString.Trim
|
Dim Linea As String = If(Row.Table.Columns.Contains("Linea"), Row("Linea").ToString.Trim, "")
|
||||||
Dim Modelo As String = Row("Modelo").ToString.Trim
|
Dim Modelo As String = If(Row.Table.Columns.Contains("Modelo"), Row("Modelo").ToString.Trim, "")
|
||||||
|
Dim Tamaño As String = Row("Tamaño").ToString.Trim
|
||||||
|
|
||||||
Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{Codigo}'").ToString.ToEntero
|
Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{Codigo}'").ToString.ToEntero
|
||||||
|
|
||||||
@@ -506,6 +513,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
|
Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
|
||||||
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}'").ToString.ToEntero
|
Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}'").ToString.ToEntero
|
||||||
Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero
|
Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero
|
||||||
|
Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}'").ToString.ToEntero
|
||||||
|
|
||||||
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
||||||
If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
|
If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
|
||||||
@@ -587,16 +595,20 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||||
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||||
CveModelo:=CveModelo) Then
|
CveModelo:=CveModelo) Then
|
||||||
|
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||||
|
' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then
|
||||||
ErrorPS = True
|
ErrorPS = True
|
||||||
Codigo.GuardaLog
|
Codigo.GuardaLog
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
Else
|
||||||
Contador += 1
|
Contador += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||||
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||||
CveModelo:=CveModelo) <= 0 Then
|
CveModelo:=CveModelo) <= 0 Then
|
||||||
|
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||||
|
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
|
||||||
ErrorPS = True
|
ErrorPS = True
|
||||||
Codigo.GuardaLog
|
Codigo.GuardaLog
|
||||||
Exit For
|
Exit For
|
||||||
@@ -712,6 +724,7 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Contacto As String = Row("Contacto").ToString
|
Dim Contacto As String = Row("Contacto").ToString
|
||||||
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
||||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
||||||
|
Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False)
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
ExisteCliente = True
|
ExisteCliente = True
|
||||||
@@ -724,7 +737,7 @@ Partial Class General_SaldosIniciales
|
|||||||
'End If
|
'End If
|
||||||
Else
|
Else
|
||||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1,
|
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1,
|
||||||
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1) Then
|
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor) Then
|
||||||
ErrorClientes = True
|
ErrorClientes = True
|
||||||
RFC.GuardaLog
|
RFC.GuardaLog
|
||||||
Exit For
|
Exit For
|
||||||
@@ -763,11 +776,11 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Encontrados As Integer = 0
|
Dim Encontrados As Integer = 0
|
||||||
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
Dim RFC As String = ""
|
Dim RFC As String = ""
|
||||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||||
Dim CvePS As Integer = drr("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = drr("CvePS").ToString.ToEntero
|
||||||
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString.ToEntero
|
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString.ToEntero
|
||||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString.ToEntero
|
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString.ToEntero
|
||||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||||
@@ -783,7 +796,7 @@ Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
|||||||
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
|
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
|
||||||
Dim TipoDocto As String = Row("Tipo Documento").ToString
|
Dim TipoDocto As String = Row("Tipo Documento").ToString
|
||||||
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
||||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString)
|
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString)
|
||||||
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
|
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
|
||||||
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
||||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||||
|
|||||||
45
SIGGIT.sln
Normal file
45
SIGGIT.sln
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.25420.1
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost", "http://localhost", "{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}"
|
||||||
|
ProjectSection(WebsiteProperties) = preProject
|
||||||
|
SccProjectName = ""$/localhost", CAAAAAAA"
|
||||||
|
SccAuxPath = ""
|
||||||
|
SccLocalPath = "."
|
||||||
|
SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
|
||||||
|
UseIISExpress = "false"
|
||||||
|
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
|
||||||
|
Debug.AspNetCompiler.VirtualPath = "/localhost"
|
||||||
|
Debug.AspNetCompiler.PhysicalPath = "..\wwwSIG\"
|
||||||
|
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
|
||||||
|
Debug.AspNetCompiler.Updateable = "true"
|
||||||
|
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||||
|
Debug.AspNetCompiler.FixedNames = "false"
|
||||||
|
Debug.AspNetCompiler.Debug = "True"
|
||||||
|
Release.AspNetCompiler.VirtualPath = "/localhost"
|
||||||
|
Release.AspNetCompiler.PhysicalPath = "..\wwwSIG\"
|
||||||
|
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost\"
|
||||||
|
Release.AspNetCompiler.Updateable = "true"
|
||||||
|
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||||
|
Release.AspNetCompiler.FixedNames = "false"
|
||||||
|
Release.AspNetCompiler.Debug = "False"
|
||||||
|
SlnRelativePath = "..\wwwSIG\"
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{82D0C8D1-3CF5-471D-92AF-71A9AE4B4335}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {332C883B-3BAC-495B-9E95-82357599CF89}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -10215,6 +10215,10 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
'ErrorPrepoliza = True
|
'ErrorPrepoliza = True
|
||||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||||
|
|
||||||
@@ -15669,6 +15673,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
|
OcurrioError = True
|
||||||
|
ErrorList.Add(ObjConta.MensajePolizaDescuadre)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
If RegeneracionPolizas(ObjVentas, ObjAC) Then
|
If RegeneracionPolizas(ObjVentas, ObjAC) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -21650,6 +21663,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||||
|
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||||
Dim OcurrioError = False
|
Dim OcurrioError = False
|
||||||
Dim MensajeError = ""
|
Dim MensajeError = ""
|
||||||
|
|
||||||
@@ -21703,6 +21717,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||||
|
OcurrioError = True
|
||||||
|
MensajeError = ObjConta.MensajePolizaDescuadre
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If OcurrioError Then
|
If OcurrioError Then
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
Alert($"{MensajeError}. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert($"{MensajeError}. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
@@ -21721,6 +21744,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
ObjConta.Dispose()
|
||||||
|
ObjCGame.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user