--merge RegPrePolizaS
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()
|
||||
@@ -5727,7 +5737,7 @@ Partial Class Bancos_IE
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DataKey("Tipo") = "Ing" 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-file-code-o""></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"))))
|
||||
|
||||
If e.Row.DataKey("Estatus").Contiene("1", "3") Then
|
||||
@@ -5738,7 +5748,7 @@ Partial Class Bancos_IE
|
||||
|
||||
ElseIf e.Row.DataKey("Tipo") = "Egs" 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=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
|
||||
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-file-code-o""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
|
||||
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=Fact&EXT=pdf&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCde").ToString.Replace("&", "%26%"))))
|
||||
|
||||
GvComplementoPagos.Columns(6).Visible = False
|
||||
|
||||
@@ -596,14 +596,11 @@ Partial Class Bancos_PopIEVentas
|
||||
End If
|
||||
|
||||
CargaTipoTransaccion(TipoTransaccion)
|
||||
CargaCuentas()
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
|
||||
RBLContado.Items(4).Enabled = True
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
|
||||
|
||||
|
||||
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
|
||||
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
|
||||
|
||||
@@ -726,7 +723,7 @@ Partial Class Bancos_PopIEVentas
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaVenta = dr("CveMoneda").ToString.ToEntero
|
||||
CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero
|
||||
NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||
NombreCliente = dr("ClienteNombre").ToString '' GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente))
|
||||
SerieFolio = dr("SerieFolio").ToString
|
||||
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
|
||||
CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero
|
||||
@@ -785,6 +782,14 @@ Partial Class Bancos_PopIEVentas
|
||||
'Cortes de Caja
|
||||
If UsuarioActual.TienePermisoProceso(160) Then
|
||||
CargaCorteCaja()
|
||||
End If
|
||||
|
||||
If RFCCliente.ToUpper <> "XAXX010101000" Then
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then
|
||||
RBLContado.Items(4).Enabled = True
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
End If
|
||||
|
||||
If Not Validada Then
|
||||
|
||||
Reference in New Issue
Block a user