cancelación de ie, conciliada, pero con fecha del mes siguente.
This commit is contained in:
@@ -1183,7 +1183,7 @@
|
|||||||
<asp:CompareValidator ID="CVFechaCancelacionMin" runat="server" ControlToCompare="TxtFechaDocumento" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpCancelarIE" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaCancelacionMin" runat="server" ControlToCompare="TxtFechaDocumento" ControlToValidate="TxtFechaCancelacion" Display="None" Operator="GreaterThanEqual" Type="Date" ValidationGroup="GrpCancelarIE" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Cancelación''</b>tiene que ser mayor o igual a la fecha del documento."></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaCancelacionMin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:RangeValidator ID="RVTxtFechaCancelacion" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha de cancelacion debe ser apartir del dia 1 del siguiente mes" MaximumValue="9999/12/31" MinimumValue="1900/01/01" ControlToValidate="TxtFechaCancelacion" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVTxtFechaCancelacion" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha de cancelacion debe ser apartir del dia 1 del siguiente mes" MaximumValue="9999/12/31" MinimumValue="1900/01/01" ControlToValidate="TxtFechaCancelacion" Type="Date" ValidationGroup="GrpCancelarIE"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaCancelacion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2845,7 +2845,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'Agregamos el IVA
|
'Agregamos el IVA
|
||||||
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
|
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2853,7 +2853,7 @@ Partial Class Bancos_IE
|
|||||||
'Agregamos complementaria
|
'Agregamos complementaria
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=0) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2869,7 +2869,7 @@ Partial Class Bancos_IE
|
|||||||
'Agregamos complementaria
|
'Agregamos complementaria
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -3561,7 +3561,7 @@ Partial Class Bancos_IE
|
|||||||
'Agregamos complementaria
|
'Agregamos complementaria
|
||||||
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4339,8 +4339,15 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
|
||||||
RegistraScript("$('#DivCancelarIE').modal('hide');")
|
RegistraScript("$('#DivCancelarIE').modal('hide');")
|
||||||
|
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||||
|
|
||||||
|
If Not ExistenComplementosVigentes Then
|
||||||
|
CancelarIE()
|
||||||
|
Else
|
||||||
|
Alert("No se puede cancelar documento con complementos de pago vigentes", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
CancelarIE()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CancelarIE(Optional CancelarComplemento As Boolean = False)
|
Private Sub CancelarIE(Optional CancelarComplemento As Boolean = False)
|
||||||
@@ -4350,8 +4357,8 @@ Partial Class Bancos_IE
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkConciliado.Checked Then
|
If ChkConciliado.Checked AndAlso TxtFechaCancelacion.Text.ToDate < TxtFechaAplicado.Text.ToDate.FirstDayOfMonth.AddMonths(1) Then
|
||||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError)
|
Alert("El documento conciliado, no se puede cancelar con la fecha especificada.", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5973,7 +5980,7 @@ Partial Class Bancos_IE
|
|||||||
'TxtFechaDesconciliado.Text = Now.ToShortDateString
|
'TxtFechaDesconciliado.Text = Now.ToShortDateString
|
||||||
'UpDesconciliar.Update()
|
'UpDesconciliar.Update()
|
||||||
'RegistraScript("$('#DModalDesconciliar').modal()")
|
'RegistraScript("$('#DModalDesconciliar').modal()")
|
||||||
Dim fechaCancelacion As String = DateTime.Now.AddMonths(1).FirstDayOfMonth.ToShortDateString
|
Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString
|
||||||
RVTxtFechaCancelacion.MinimumValue = fechaCancelacion
|
RVTxtFechaCancelacion.MinimumValue = fechaCancelacion
|
||||||
CalendarioCancelacion.StartDate = fechaCancelacion.ToDate
|
CalendarioCancelacion.StartDate = fechaCancelacion.ToDate
|
||||||
UpEliminarCotizacion.Update()
|
UpEliminarCotizacion.Update()
|
||||||
@@ -6451,13 +6458,12 @@ 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
|
If ChkConciliado.Checked Then
|
||||||
Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgAdvertencia)
|
Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
|
|
||||||
CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
|
CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
|
||||||
FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
|
FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
|
||||||
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||||
@@ -6467,8 +6473,6 @@ Partial Class Bancos_IE
|
|||||||
Dim ObjCancelacion As New Timbrado
|
Dim ObjCancelacion As New Timbrado
|
||||||
Dim ObjBanco As New ClsBancos
|
Dim ObjBanco As New ClsBancos
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
|
|
||||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||||
|
|||||||
Reference in New Issue
Block a user