Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -155,14 +155,16 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("Mail") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveIESustitucion As Integer
|
||||
Get
|
||||
Return ViewState("CveIESustitucion").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveIESustitucion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property CveIESustitucion As Integer
|
||||
' Get
|
||||
' Return ViewState("CveIESustitucion").ToString.ToEntero
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' ViewState("CveIESustitucion") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property CFDIRelacionadoSustitucion As String
|
||||
Get
|
||||
If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then
|
||||
@@ -244,9 +246,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
FechaCorteIE = DateTime.Now
|
||||
|
||||
If CveIESustitucion > 0 Then
|
||||
CargaIESustituir()
|
||||
End If
|
||||
'If CveIESustitucion > 0 Then
|
||||
' CargaIESustituir()
|
||||
'End If
|
||||
|
||||
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
|
||||
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
|
||||
@@ -334,7 +336,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
Retorno = True
|
||||
CargaCuentas()
|
||||
CargaTipoTransaccion()
|
||||
TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString
|
||||
|
||||
'TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString
|
||||
TxtFechaDocumento.Text = Now.ToShortDateString.ToString
|
||||
|
||||
TxtAboneA.Enabled = False
|
||||
LbEncabezado.Text = String.Format("<a href='/Ventas/Clientes.aspx?CveCliente={0}' target='_blank' class='Texto'>{1}</a>", CveCliente, ObjCliente.NombreComercial)
|
||||
@@ -372,10 +376,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim FechaI As String = IfNull(Request("FechaI"), "-1")
|
||||
Dim FechaF As String = IfNull(Request("FechaF"), "-1")
|
||||
|
||||
Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
|
||||
'Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate
|
||||
Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate
|
||||
|
||||
Dim SumDescuentoProntoPago As Double = 0.0
|
||||
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
|
||||
'If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then
|
||||
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then
|
||||
Dim TmpCxCAux As DataTable
|
||||
TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago")
|
||||
@@ -385,6 +391,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
CveMoneda = pCveMoneda
|
||||
|
||||
End If
|
||||
|
||||
TxtImporte.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
If SumDescuentoProntoPago > 0.0 Then
|
||||
@@ -701,12 +708,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
|
||||
Dim ErrorCancelarIE As Boolean = False
|
||||
|
||||
If CveIESustitucion > 0 Then
|
||||
ErrorCancelarIE = CancelarIE()
|
||||
If ErrorCancelarIE Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
'If CveIESustitucion > 0 Then
|
||||
' ErrorCancelarIE = CancelarIE()
|
||||
' If ErrorCancelarIE Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
@@ -761,7 +768,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
End If
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario)
|
||||
'CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario)
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=-1, CveProveedorIntermediario:=CveProvIntermediario)
|
||||
Else
|
||||
If RblTipoPago.SelectedValue.Contiene("3") Then
|
||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
||||
@@ -1726,16 +1734,18 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
'BITACORA
|
||||
If MsgError = "" Then
|
||||
If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
||||
MsgError = "Ocurrió un error al agregar la bitacora"
|
||||
End If
|
||||
If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
MsgError = "Ocurrió un error al agregar la bitacora"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'If MsgError = "" Then
|
||||
|
||||
' If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then
|
||||
' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio <a href='/Bancos/IE.aspx?CveIE={CveIE}' target='_blank' class='Texto'>{TxtFolio.Text}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then
|
||||
' MsgError = "Ocurrió un error al agregar la bitacora"
|
||||
' End If
|
||||
' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de <a href='/Bancos/IE.aspx?CveIE={CveIESustitucion}' target='_blank' class='Texto'>{FolioIECancelado}</a>", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
' MsgError = "Ocurrió un error al agregar la bitacora"
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgError = "Ocurrió un error al guardar el movimiento"
|
||||
@@ -2269,7 +2279,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
DdlCuenta.SelectedValue = "-1"
|
||||
DdlTipoTransaccion.SelectedValue = "-1"
|
||||
|
||||
CveIESustitucion = "-1"
|
||||
'CveIESustitucion = "-1"
|
||||
CFDIRelacionadoSustitucion = "-1"
|
||||
FechaCorteIE = DateTime.Now.ToDate
|
||||
IDPoliza = -1
|
||||
@@ -2500,7 +2510,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
|
||||
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
|
||||
'If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then
|
||||
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
|
||||
ObjBancos.Dispose()
|
||||
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2512,7 +2523,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
ObjBancos.IniciaTransacSQL()
|
||||
|
||||
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
||||
|
||||
'If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then
|
||||
If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=False) Then
|
||||
ObjBancos.Commit()
|
||||
ComplementoSustitucionGenerado = True
|
||||
|
||||
@@ -2883,183 +2896,185 @@ Partial Class Ventas_ClientesAbonar
|
||||
#End Region
|
||||
|
||||
#Region "COMPLEMENTO DE PAGO - ELIMINAR POR SUSTITUCION"
|
||||
Protected Sub CargaIESustituir()
|
||||
Dim ObjIE As New ClsBancos()
|
||||
If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
FechaCorteIE = ObjIE.FechaDocumento
|
||||
CveMoneda = ObjIE.CveMoneda
|
||||
CveMonedaFiltro = CveMoneda
|
||||
IDPoliza = ObjIE.IDPoliza
|
||||
FolioIECancelado = ObjIE.Folio
|
||||
End If
|
||||
End If
|
||||
ObjIE.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Function CancelarIE() As Boolean
|
||||
Dim ErrorCancelar = False
|
||||
|
||||
If Not IsDate(TxtFechaDocumento.Text.ToDate) Then
|
||||
Alert("El campo fecha cancelación es incorrecto. Por favor verifique y vuelva a intentar")
|
||||
Return True
|
||||
End If
|
||||
'Protected Sub CargaIESustituir()
|
||||
' Dim ObjIE As New ClsBancos()
|
||||
' If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
' FechaCorteIE = ObjIE.FechaDocumento
|
||||
' CveMoneda = ObjIE.CveMoneda
|
||||
' CveMonedaFiltro = CveMoneda
|
||||
' IDPoliza = ObjIE.IDPoliza
|
||||
' FolioIECancelado = ObjIE.Folio
|
||||
' End If
|
||||
' End If
|
||||
' ObjIE.Dispose()
|
||||
' UpDatos.Update()
|
||||
'End Sub
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
Banc.IniciaTransacSQL()
|
||||
'Function CancelarIE() As Boolean
|
||||
' Dim ErrorCancelar = False
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
' If Not IsDate(TxtFechaDocumento.Text.ToDate) Then
|
||||
' Alert("El campo fecha cancelación es incorrecto. Por favor verifique y vuelva a intentar")
|
||||
' Return True
|
||||
' End If
|
||||
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
' Dim Banc As New ClsBancos
|
||||
' Banc.IniciaTransacSQL()
|
||||
|
||||
Try
|
||||
'CANCELA IE CONTABILIZADO
|
||||
If IDPoliza > 0 Then
|
||||
If ObjAC Is Nothing Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
' Dim ObjAC As ClsContPAQi = Nothing
|
||||
' If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
|
||||
' ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ObjAC.IniciaTransacSQL()
|
||||
' 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
|
||||
' Dim IdPolizaNueva = -1
|
||||
' Dim FolioPolizaNueva = -1
|
||||
|
||||
' 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(3, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
|
||||
' Try
|
||||
' 'CANCELA IE CONTABILIZADO
|
||||
' If IDPoliza > 0 Then
|
||||
' If ObjAC Is Nothing Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
|
||||
If IdPolizaNueva > 0 Then
|
||||
FolioPolizaNueva = ObjAC.Folio
|
||||
' 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
|
||||
|
||||
'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
|
||||
ErrorCancelar = True : Exit For
|
||||
End If
|
||||
Next
|
||||
' ' 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(3, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate)
|
||||
|
||||
'AJUSTA POLIZA
|
||||
If Not ErrorCancelar Then
|
||||
If Not ObjAC.AjustaPoliza(IdPolizaNueva) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' If IdPolizaNueva > 0 Then
|
||||
' FolioPolizaNueva = ObjAC.Folio
|
||||
|
||||
'CANCELA IE
|
||||
If Not ErrorCancelar Then
|
||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' '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
|
||||
' ErrorCancelar = True : Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
' 'AJUSTA POLIZA
|
||||
' If Not ErrorCancelar Then
|
||||
' If Not ObjAC.AjustaPoliza(IdPolizaNueva) Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
' 'CANCELA IE
|
||||
' If Not ErrorCancelar Then
|
||||
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
'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
|
||||
ErrorCancelar = True : Exit For
|
||||
End If
|
||||
Next
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
|
||||
'AJUSTA POLIZA
|
||||
If Not ErrorCancelar Then
|
||||
If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' Else
|
||||
|
||||
'CANCELA IE
|
||||
If Not ErrorCancelar Then
|
||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' '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
|
||||
' ErrorCancelar = True : Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
End If
|
||||
' 'AJUSTA POLIZA
|
||||
' If Not ErrorCancelar Then
|
||||
' If Not ObjAC.AjustaPoliza(IDPoliza) Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
' 'CANCELA IE
|
||||
' If Not ErrorCancelar Then
|
||||
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
||||
'CANCELA IE MES ANTERIOR
|
||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
Else
|
||||
'CANCELA IE MES ACTUAL
|
||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
|
||||
End If
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
If Banc.GetComplementoPagos(-1, CveIESustitucion, -1, UsuarioActual.CveEmpresa) Then
|
||||
' If FechaCorteIE.Month < TxtFechaDocumento.Text.ToDate.Month Or FechaCorteIE.Year < TxtFechaDocumento.Text.ToDate.Year Then
|
||||
' 'CANCELA IE MES ANTERIOR
|
||||
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' Else
|
||||
' 'CANCELA IE MES ACTUAL
|
||||
' If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIESustitucion, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaDocumento.Text.ToDate) > 0 Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Dim CveComplementoPago As Integer = -1
|
||||
' End If
|
||||
|
||||
If Banc.DtResultados.Rows.Count > 0 Then
|
||||
'OBTENEMOS EL UUID DEL COMPLEMENTO A CANCELAR POR SUSTITUCION
|
||||
CFDIRelacionadoSustitucion = Banc.DtResultados.Rows(0)("FolioFiscal")
|
||||
CveComplementoPago = Banc.DtResultados(0)("CveComplementoPago").ToString().ToEntero
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' If Banc.GetComplementoPagos(-1, CveIESustitucion, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
'ACTUALIZA FOLIOS CANCELADOS
|
||||
If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
||||
If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
||||
ErrorCancelar = True
|
||||
Else
|
||||
Dim FolioCancelado = $"{FolioIECancelado}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
' Dim CveComplementoPago As Integer = -1
|
||||
|
||||
If Not Banc.UpdateFolioCancelado(CveIESustitucion.ToEntero, Folio:=FolioCancelado) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' If Banc.DtResultados.Rows.Count > 0 Then
|
||||
' 'OBTENEMOS EL UUID DEL COMPLEMENTO A CANCELAR POR SUSTITUCION
|
||||
' CFDIRelacionadoSustitucion = Banc.DtResultados.Rows(0)("FolioFiscal")
|
||||
' CveComplementoPago = Banc.DtResultados(0)("CveComplementoPago").ToString().ToEntero
|
||||
' End If
|
||||
|
||||
'ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2
|
||||
If Not ErrorCancelar And CveComplementoPago > 0 Then
|
||||
If Not Banc.UpdateComplementoPagoCancelado(CveComplementoPago, 2, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa, DateTime.Now) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorCancelar = True
|
||||
OnError("Ocurrió un error al cancelar el IE", ex)
|
||||
End Try
|
||||
' 'ACTUALIZA FOLIOS CANCELADOS
|
||||
' If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
||||
' If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
||||
' ErrorCancelar = True
|
||||
' Else
|
||||
' Dim FolioCancelado = $"{FolioIECancelado}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
Banc.Commit()
|
||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||
' If Not Banc.UpdateFolioCancelado(CveIESustitucion.ToEntero, Folio:=FolioCancelado) Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
Msg.Append("El movimiento bancario quedó cancelado exitosamente.")
|
||||
' 'ACTUALIZA ESTATUS DE COMPLEMENTO DE PAGO A CANCELADO = 2
|
||||
' If Not ErrorCancelar And CveComplementoPago > 0 Then
|
||||
' If Not Banc.UpdateComplementoPagoCancelado(CveComplementoPago, 2, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa, DateTime.Now) Then
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' ErrorCancelar = True
|
||||
' OnError("Ocurrió un error al cancelar el IE", ex)
|
||||
' End Try
|
||||
|
||||
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
|
||||
Banc.RollBack()
|
||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||
Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
' If Not ErrorCancelar Then
|
||||
' Banc.Commit()
|
||||
' If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||
|
||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
Banc.Dispose()
|
||||
Return ErrorCancelar
|
||||
End Function
|
||||
' 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
|
||||
' Banc.RollBack()
|
||||
' If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||
' Alert("El movimiento bancario no se pudo cancelar. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
' Banc.Dispose()
|
||||
' Return ErrorCancelar
|
||||
'End Function
|
||||
|
||||
Private Sub BtnVincularIntermediario_Click(sender As Object, e As EventArgs) Handles BtnVincularIntermediario.Click
|
||||
RegistraScript("$('#ModalVincularIntermediario').modal('hide')", "hidemodal")
|
||||
|
||||
@@ -2178,6 +2178,40 @@
|
||||
|
||||
<asp:Literal ID="LtlScripts" runat="server"></asp:Literal>
|
||||
<%-- FIN MODAL PS ADICIONALES --%>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPModalMensaje" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivModalMensaje" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header-warning">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblModalMensaje" runat="server" ClientIDMode="Static" Text="Atención"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:Label ID="LblModalMensajeCuerpo" runat="server" ClientIDMode="Static" Text="Atención"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnmodalMensajeOK" runat="server" Text="Guardar" CssClass="btn btn-sm blue" OnClick="BtnmodalMensajeOK_Click" />
|
||||
<asp:Button ID="BtnCerrarModalMensace" runat="server" Text="Corregir" CssClass="btn btn-sm green" data-dismiss="modal" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -148,6 +148,29 @@ Partial Class ProductosyServicios
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Material peligroso"
|
||||
|
||||
Property ValidaMaterialPeligrosoMensaje As Boolean
|
||||
Get
|
||||
|
||||
If ViewState("ValidaMaterialPeligroso") Is Nothing Then
|
||||
ViewState("ValidaMaterialPeligroso") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("ValidaMaterialPeligroso").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ValidaMaterialPeligroso") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -1213,6 +1236,15 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
If DdlSATPS.txtValue.Value.ToEntero > 0 Then
|
||||
If Not ValidaMaterialPeligrosoMensaje Then
|
||||
ValidaMaterialPeligroso(DdlSATPS.txtValue.Value.ToEntero)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If DdlSATPS.SelectedValue.Contiene("46920", "0", "-1") AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158, 72, 80, 145) Then
|
||||
Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -3045,4 +3077,76 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Sub ValidaMaterialPeligroso(CveSATPS As Integer)
|
||||
|
||||
Dim EsPeligroso As Boolean = False
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
|
||||
|
||||
If ObjGrales.GetSATProductosServicios(CveSATPS:=CveSATPS) Then
|
||||
|
||||
Dim DTDatos As New DataTable
|
||||
DTDatos = ObjGrales.DtResultados.FiltraParametros($" CveSATPS= {CveSATPS}")
|
||||
|
||||
|
||||
|
||||
'Es material Peligros
|
||||
If DTDatos.Rows(0)("EsPeligroso").ToString.ToEntero = 1 Then
|
||||
|
||||
If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 And DdlEmbalaje.txtValue.Value.ToEntero > 0 And TxtPesoKg.Text.Trim.Length > 0 Then
|
||||
ValidaMaterialPeligrosoMensaje = True
|
||||
Else
|
||||
|
||||
RegistraScript("$('#DivModalMensaje').modal('show');")
|
||||
ValidaMaterialPeligrosoMensaje = False
|
||||
LblModalMensajeCuerpo.Text = "El producto servicio del SAT seleccionado esta clasificado como material peligroso, favor de llenar los datos de la sección carta porte en la pestaña Contabilidad - Inventarios."
|
||||
UPModalMensaje.Update()
|
||||
End If
|
||||
|
||||
Else
|
||||
'No es matgerial peligroso
|
||||
|
||||
If DdlMaterialPeligroso.txtValue.Value.ToEntero > 0 Or DdlEmbalaje.txtValue.Value.ToEntero > 0 Or TxtPesoKg.Text.Trim.Length > 0 Then
|
||||
RegistraScript("$('#DivModalMensaje').modal('show');")
|
||||
ValidaMaterialPeligrosoMensaje = False
|
||||
LblModalMensajeCuerpo.Text = "El producto servicio del SAT seleccionado no esta clasificado como material peligroso, favor de limpiar los datos de la sección carta porte en la pestaña Contabilidad - Inventarios, el incluir estos datos en un material no peligroso generara errores al timbrar traslados."
|
||||
UPModalMensaje.Update()
|
||||
|
||||
Else
|
||||
ValidaMaterialPeligrosoMensaje = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjGrales.Dispose()
|
||||
|
||||
|
||||
|
||||
'Return Respuesta
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnmodalMensajeOK_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ValidaMaterialPeligrosoMensaje = True
|
||||
RegistraScript("$('#DivPersonalizar').modal('hide');")
|
||||
|
||||
BtnGuardar_Click(Nothing, Nothing)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -36,25 +36,25 @@
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes Por Respuesta</span>
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Facturas Pendientes Por Respuesta</span>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||
@@ -84,25 +84,24 @@
|
||||
<div id="DivRefacturar" runat="server" visible="false" class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes Por Refacturar</span>
|
||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Facturas Pendientes de cancelar provenientes de refacturación</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvRefacturaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRefacturaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCCliente,FolioFiscalSustitucion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
@@ -114,11 +113,9 @@
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Mon" DataField="Abreviatura" ItemStyle-Width="30px" />
|
||||
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="160px" />
|
||||
<asp:BoundField HeaderText="Fecha Cancelacion" DataField="FechaCancelacion" ItemStyle-Width="160px" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
||||
<asp:BoundField HeaderText="Serie Folio Nuevo" DataField="SerieFolioSustitucion" ItemStyle-Width="25%" />
|
||||
<asp:BoundField HeaderText="Folio Sustitucion" DataField="FolioFiscalSustitucion" ItemStyle-Width="25%" />
|
||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||
<asp:HyperLinkField HeaderText="Folio Sustitución" DataTextField="SerieFolioSustitucion" DataNavigateUrlFields="CveVentaSustitucion" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkValidarRefac" runat="server" OnClick="BtnValidarRefacturacion_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
@@ -129,7 +126,6 @@
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Refacturación" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -456,20 +456,20 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0)
|
||||
{
|
||||
e.Row.Cells[14].Text = "";
|
||||
}
|
||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0)
|
||||
//{
|
||||
// e.Row.Cells[14].Text = "";
|
||||
//}
|
||||
|
||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
}
|
||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
//{
|
||||
// e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
//}
|
||||
|
||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23 && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
//e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user