mejoras
This commit is contained in:
@@ -2860,7 +2860,9 @@ Partial Class Bancos_IE
|
||||
|
||||
'Agregamos el IVA
|
||||
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) Then
|
||||
Dim CveConIVA As Integer = 61
|
||||
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, 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."
|
||||
End If
|
||||
End If
|
||||
@@ -4502,16 +4504,18 @@ Partial Class Bancos_IE
|
||||
If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al desbloquear prepoliza."
|
||||
Else
|
||||
'CANCELA IE MES ACTUAL
|
||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
||||
If CvePrePolizaCancelacion <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||
End If
|
||||
End If
|
||||
'CANCELA IE MES ACTUAL
|
||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
||||
If CvePrePolizaCancelacion <= 0 Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
|
||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then
|
||||
ErrorCancelar = True
|
||||
@@ -4577,7 +4581,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorCancelarComplemento Then
|
||||
If Not ErrorCancelarComplemento AndAlso Not ErrorCancelar Then
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||
Banc.Commit()
|
||||
@@ -5698,24 +5702,30 @@ Partial Class Bancos_IE
|
||||
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
|
||||
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
|
||||
If Tipo = "Abono" Then
|
||||
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados
|
||||
|
||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then
|
||||
DVGenerarComplementoModal.Visible = True
|
||||
End If
|
||||
Else
|
||||
GvComplementoPagos.DataSource = Nothing
|
||||
End If
|
||||
Else
|
||||
GvComplementoPagos.DataSource = Nothing
|
||||
End If
|
||||
If CveIE > 0 Then
|
||||
If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
GvComplementoPagos.DataBind()
|
||||
UpComplementoPagos.Update()
|
||||
|
||||
'If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||
' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"})
|
||||
'End If
|
||||
|
||||
'ObjBancos.Dispose()
|
||||
'GvComplementoPagos.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user