Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1162,6 +1162,8 @@ Public Class ClsContPAQi
|
|||||||
StrSQL.AppendLine("")
|
StrSQL.AppendLine("")
|
||||||
StrSQL.AppendLine(" BEGIN TRY")
|
StrSQL.AppendLine(" BEGIN TRY")
|
||||||
StrSQL.AppendLine("")
|
StrSQL.AppendLine("")
|
||||||
|
StrSQL.AppendLine(" SET ARITHABORT ON; ")
|
||||||
|
StrSQL.AppendLine("")
|
||||||
StrSQL.AppendLine(" CREATE TABLE #TablaContable (")
|
StrSQL.AppendLine(" CREATE TABLE #TablaContable (")
|
||||||
StrSQL.AppendLine(" Id INT,")
|
StrSQL.AppendLine(" Id INT,")
|
||||||
StrSQL.AppendLine(" IdPoliza INT,")
|
StrSQL.AppendLine(" IdPoliza INT,")
|
||||||
|
|||||||
@@ -1171,13 +1171,14 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer) As Boolean
|
Public Function ContabilizaDesContabilizaPrePoliza(CvePrePoliza As Integer, Contabilizar As Boolean, CveEmpresa As Integer, Optional Folio As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
|
DataAdapter("PA_Conta_PrePolizasContabilizarDescontabilizar")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
.Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
|
.Add("@Contabilizar", SqlDbType.Bit).Value = Contabilizar
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -723,7 +723,8 @@ Public Class ClsMovimientos
|
|||||||
|
|
||||||
Public Function GetCxPPeriodo(CveProveedor As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveUsuarioResponsable As Integer,
|
Public Function GetCxPPeriodo(CveProveedor As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveUsuarioResponsable As Integer,
|
||||||
CveUsuarioRegistro As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveSucursal As Integer,
|
CveUsuarioRegistro As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveSucursal As Integer,
|
||||||
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer) As Boolean
|
TipoCambio As Integer, TCEspecifico As Double, FechaCorte As Date, CveUsuarioConsulta As Integer, CveTipoProveedor As Integer,
|
||||||
|
Optional TipoDocto As String = "-1", Optional CveMoneda As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_RepCxPPeriodo")
|
DataAdapter("PA_Comp_RepCxPPeriodo")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -740,6 +741,8 @@ Public Class ClsMovimientos
|
|||||||
.Add("@FechaCorte", SqlDbType.Date).Value = FechaCorte
|
.Add("@FechaCorte", SqlDbType.Date).Value = FechaCorte
|
||||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
|
||||||
|
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -3238,6 +3238,43 @@ Public Class ClsNominas
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetLayoutAltaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_LayoutAltaBanorteGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetDispersionNominaBanorte(CvePeriodo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Nom_DispersionNominaBanorteGet", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el layout de nominas Banorte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Public Class ClsOC
|
|||||||
Public Property CveIEAnticipo As Integer
|
Public Property CveIEAnticipo As Integer
|
||||||
Public Property CveProveedorAnticipo As Integer
|
Public Property CveProveedorAnticipo As Integer
|
||||||
Public Property FolioIEAnticipo As Integer
|
Public Property FolioIEAnticipo As Integer
|
||||||
Public Property ImporteAnticipo As Double
|
Public Property ImporteAnticipo As Decimal
|
||||||
|
|
||||||
Public Property FolioAdicional As String
|
Public Property FolioAdicional As String
|
||||||
Public Property EntregaDirecta As Boolean
|
Public Property EntregaDirecta As Boolean
|
||||||
@@ -79,16 +79,16 @@ Public Class ClsOC
|
|||||||
Public Property RFC As String
|
Public Property RFC As String
|
||||||
Public Property LugarEntrega As String
|
Public Property LugarEntrega As String
|
||||||
Public Property Cancelacion As String
|
Public Property Cancelacion As String
|
||||||
Public Property PorcentajeIVA As Double
|
Public Property PorcentajeIVA As Decimal
|
||||||
Public Property CveCliente As Integer
|
Public Property CveCliente As Integer
|
||||||
Public Property CveVendedor As Integer
|
Public Property CveVendedor As Integer
|
||||||
Public Property PrioridadObservacion As String
|
Public Property PrioridadObservacion As String
|
||||||
Public Property SubTotal As Double
|
Public Property SubTotal As Decimal
|
||||||
Public Property IVA As Double
|
Public Property IVA As Decimal
|
||||||
Public Property RetIVA As Double
|
Public Property RetIVA As Decimal
|
||||||
Public Property RetISR As Double
|
Public Property RetISR As Decimal
|
||||||
Public Property IEPS As Double
|
Public Property IEPS As Decimal
|
||||||
Public Property Total As Double
|
Public Property Total As Decimal
|
||||||
Public Property CvePresupuestoEgreso As Integer
|
Public Property CvePresupuestoEgreso As Integer
|
||||||
Public Property RequiereCotizacion As Boolean
|
Public Property RequiereCotizacion As Boolean
|
||||||
Public Property CveActivoFijo As Integer
|
Public Property CveActivoFijo As Integer
|
||||||
@@ -98,8 +98,8 @@ Public Class ClsOC
|
|||||||
Public Property SubProyecto As String
|
Public Property SubProyecto As String
|
||||||
Public Property UsuarioSolicito As String
|
Public Property UsuarioSolicito As String
|
||||||
Public Property UsuarioAutorizo As String
|
Public Property UsuarioAutorizo As String
|
||||||
Public Property Descuento As Double
|
Public Property Descuento As Decimal
|
||||||
Public Property Pendiente As Double
|
Public Property Pendiente As Decimal
|
||||||
Public Property NombreCliente As String
|
Public Property NombreCliente As String
|
||||||
Public Property SucCalle As String
|
Public Property SucCalle As String
|
||||||
Public Property SucNoExt As String
|
Public Property SucNoExt As String
|
||||||
@@ -274,7 +274,7 @@ Public Class ClsOC
|
|||||||
Extension = Data.Rows(0)("Extension").ToString
|
Extension = Data.Rows(0)("Extension").ToString
|
||||||
Usuario = Data.Rows(0)("Usuario").ToString
|
Usuario = Data.Rows(0)("Usuario").ToString
|
||||||
Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
||||||
Me.Total = Data.Rows(0)("Total").ToString.ToDouble
|
Me.Total = Data.Rows(0)("Total").ToString.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
||||||
@@ -416,7 +416,7 @@ Public Class ClsOC
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Double, pCantidad As Double, pCveUM As Integer, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean
|
Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Decimal, pCantidad As Decimal, pCveUM As Integer, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_CotizacionesDetalleAdd")
|
DataAdapter("PA_OC_CotizacionesDetalleAdd")
|
||||||
@@ -425,9 +425,9 @@ Public Class ClsOC
|
|||||||
.Add("@CveCotizacion", SqlDbType.Int).Value = pCveCotizacion
|
.Add("@CveCotizacion", SqlDbType.Int).Value = pCveCotizacion
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||||
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
.Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad
|
||||||
.Add("@CveUM", SqlDbType.Int).Value = pCveUM
|
.Add("@CveUM", SqlDbType.Int).Value = pCveUM
|
||||||
.Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir
|
.Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir
|
||||||
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
||||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
||||||
@@ -452,14 +452,14 @@ Public Class ClsOC
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Double, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String) As Boolean
|
Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Decimal, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_CotizacionesDetalleUpdate")
|
DataAdapter("PA_OC_CotizacionesDetalleUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
.Add("@PU", SqlDbType.Money).Value = pPrecioUnitario
|
||||||
.Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir
|
.Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir
|
||||||
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
.Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega
|
||||||
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
.Add("@Observacion", SqlDbType.VarChar).Value = pObservacion
|
||||||
.Add("@CveCotizacionDetalle", SqlDbType.Int).Value = pCveCotizacionDetalle
|
.Add("@CveCotizacionDetalle", SqlDbType.Int).Value = pCveCotizacionDetalle
|
||||||
@@ -546,107 +546,6 @@ Public Class ClsOC
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'Public Function GetEstatusCompra(ByVal CveEstatusCompra As Integer, ByVal EstatusCompra As String) As Boolean
|
|
||||||
' Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
' DataAdapter("PA_OC_EstatusOrdenCompraGet")
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
|
|
||||||
' If Data.Rows.Count = 1 Then
|
|
||||||
' _CveEstatusCompra = Data.Rows(0)("CveEstatusCompra").ToString().ToEntero()
|
|
||||||
' _EstatusCompra = Data.Rows(0)("EstatusCompra").ToString()
|
|
||||||
' _Estatus = Data.Rows(0)("Estatus").ToString = "True"
|
|
||||||
' _FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate()
|
|
||||||
' _CveUsuario = Data.Rows(0)("CveUsuario").ToString().ToEntero()
|
|
||||||
' _NombreUsuario = Data.Rows(0)("Nombre").ToString()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As Exception
|
|
||||||
' OnError("Ocurrió un error al obtener el Catálogo de Estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Public Function AddEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveUsuario As Integer) As Boolean
|
|
||||||
' Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
' DataAdapter("PA_OC_EstatusOrdenCompraAdd")
|
|
||||||
|
|
||||||
' With SqlAdapter.SelectCommand.Parameters
|
|
||||||
' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion
|
|
||||||
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
' End With
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As SqlException
|
|
||||||
' If ex.Number = 2627 Then
|
|
||||||
' Alert("La Clave o Descripción del EstatusCompra ya existe.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Else
|
|
||||||
' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End If
|
|
||||||
' Catch ex As Exception
|
|
||||||
' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Public Function UpdateEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveEstatusCompra As Integer, ByVal CveUsuario As Integer) As Boolean
|
|
||||||
' Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
' DataAdapter("PA_OC_EstatusOrdenCompraUpdate")
|
|
||||||
|
|
||||||
' With SqlAdapter.SelectCommand.Parameters
|
|
||||||
' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion
|
|
||||||
' '.Add("@pCveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
' .Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
|
||||||
' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra
|
|
||||||
' End With
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As SqlException
|
|
||||||
' If ex.Number = 2627 Then
|
|
||||||
' Alert("La Clave o Descripción del Estatus de Compra ya existe.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Else
|
|
||||||
' OnError("Ocurrió un error al guardar los cambios en el estatus de compra", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End If
|
|
||||||
' Catch ex As Exception
|
|
||||||
' OnError("Ocurrió un error al guardar los cambios en el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
'Public Function RemoveEstatusCompra(ByVal CveEstatusCompra As Integer) As Boolean
|
|
||||||
' Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
' DataAdapter("PA_OC_EstatusOrdenCompraRemove")
|
|
||||||
|
|
||||||
' With SqlAdapter.SelectCommand.Parameters
|
|
||||||
' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra
|
|
||||||
' End With
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' SqlAdapter.Fill(Data)
|
|
||||||
|
|
||||||
' Retorno = True
|
|
||||||
' Catch ex As Exception
|
|
||||||
' OnError("Ocurrió un error al eliminar el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' Return Retorno
|
|
||||||
'End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "O R D E N E S - D E - C O M P R A S"
|
#Region "O R D E N E S - D E - C O M P R A S"
|
||||||
Public Function GetOC(ObjOrdenCompra As Modelos.OrdenCompra) As Boolean
|
Public Function GetOC(ObjOrdenCompra As Modelos.OrdenCompra) As Boolean
|
||||||
@@ -707,7 +606,7 @@ Public Class ClsOC
|
|||||||
_Folio = dr("Folio").ToString.ToEntero
|
_Folio = dr("Folio").ToString.ToEntero
|
||||||
_CveIEAnticipo = dr("CveIEAnticipo").ToString.ToEntero
|
_CveIEAnticipo = dr("CveIEAnticipo").ToString.ToEntero
|
||||||
_FolioIEAnticipo = dr("FolioIEAnticipo").ToString.ToEntero
|
_FolioIEAnticipo = dr("FolioIEAnticipo").ToString.ToEntero
|
||||||
_ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDouble
|
_ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDecimal
|
||||||
_CveProveedorAnticipo = dr("CveProveedorAnticipo").ToString.ToEntero
|
_CveProveedorAnticipo = dr("CveProveedorAnticipo").ToString.ToEntero
|
||||||
_CveEmpresa = dr("CveEmpresa").ToString.ToEntero
|
_CveEmpresa = dr("CveEmpresa").ToString.ToEntero
|
||||||
_CveProyecto = dr("CveProyecto").ToString.ToEntero
|
_CveProyecto = dr("CveProyecto").ToString.ToEntero
|
||||||
@@ -752,32 +651,15 @@ Public Class ClsOC
|
|||||||
Me.SucursalTelefono = If(Not IsDBNull(dr("TelefonoSucursal")), dr("TelefonoSucursal").ToString, "")
|
Me.SucursalTelefono = If(Not IsDBNull(dr("TelefonoSucursal")), dr("TelefonoSucursal").ToString, "")
|
||||||
ProveedorContacto = dr("ContactoNombre").ToString
|
ProveedorContacto = dr("ContactoNombre").ToString
|
||||||
|
|
||||||
PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDouble
|
PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||||
SubTotal = dr("SubTotal").ToString.ToDouble
|
SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||||
Descuento = dr("Descuento").ToString.ToDouble
|
Descuento = dr("Descuento").ToString.ToDecimal
|
||||||
IVA = dr("IVA").ToString.ToDouble
|
IVA = dr("IVA").ToString.ToDecimal
|
||||||
RetIVA = dr("RetIVA").ToString.ToDouble
|
RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||||
RetISR = dr("RetISR").ToString.ToDouble
|
RetISR = dr("RetISR").ToString.ToDecimal
|
||||||
IEPS = dr("IEPS").ToString.ToDouble
|
IEPS = dr("IEPS").ToString.ToDecimal
|
||||||
Total = dr("Total").ToString.ToDouble
|
Total = dr("Total").ToString.ToDecimal
|
||||||
Pendiente = dr("Pendiente").ToString.ToDouble
|
Pendiente = dr("Pendiente").ToString.ToDecimal
|
||||||
'If Not IsDBNull(dr("SubTotal")) Then
|
|
||||||
' SubTotal = dr("SubTotal").ToString.ToDouble
|
|
||||||
' If IVA <= 0 Then
|
|
||||||
' _IVA = _SubTotal * dr("PorcentajeIVA").ToString.ToDouble
|
|
||||||
' End If
|
|
||||||
' _Total = _SubTotal + _IVA - _Descuento - _RetIVA - _RetISR
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'_CveSupervisara = dr("CveSupervisara").ToString.ToEntero
|
|
||||||
'_CveAutoriza = dr("CveAutoriza").ToString.ToEntero
|
|
||||||
'_CveAutorizara = dr("CveAutorizara").ToString.ToEntero
|
|
||||||
|
|
||||||
'_NombreSupervisa = dr("NombreSupervisa").ToString
|
|
||||||
|
|
||||||
'_NombreAutoriza = dr("NombreAutoriza").ToString
|
|
||||||
'_FechaSupervisa = dr("FechaSupervisa").ToString.ToDate
|
|
||||||
'_FechaAutoriza = dr("FechaAutoriza").ToString.ToDate
|
|
||||||
|
|
||||||
'RequiereCotizacion = CType(dr("RequiereCotizacion"), Boolean)
|
'RequiereCotizacion = CType(dr("RequiereCotizacion"), Boolean)
|
||||||
SubProyecto = dr("SubProyecto").ToString
|
SubProyecto = dr("SubProyecto").ToString
|
||||||
@@ -820,9 +702,9 @@ Public Class ClsOC
|
|||||||
pFechaEstimadaEntrega As String, pLugarEntrega As String, pCveUsuario As Integer, pCveEmpresa As Integer, pCvePresupuestoEgreso As Integer,
|
pFechaEstimadaEntrega As String, pLugarEntrega As String, pCveUsuario As Integer, pCveEmpresa As Integer, pCvePresupuestoEgreso As Integer,
|
||||||
Optional pCveProveedor As Integer = -1, Optional pCveProveedorSucursal As Integer = -1, Optional IDPoliza As Integer = -1, Optional RequiereCotizacion As Boolean = False, Optional CveUsuarioAsignado As Integer = -1,
|
Optional pCveProveedor As Integer = -1, Optional pCveProveedorSucursal As Integer = -1, Optional IDPoliza As Integer = -1, Optional RequiereCotizacion As Boolean = False, Optional CveUsuarioAsignado As Integer = -1,
|
||||||
Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||||
Optional PorcentajeIVA As Double = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
Optional PorcentajeIVA As Decimal = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Double = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean
|
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||||
@@ -971,7 +853,7 @@ Public Class ClsOC
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Double, CveUsuarioModifico As Integer) As Boolean
|
Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Decimal, CveUsuarioModifico As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_OrdenesCompraDetalleAjusteUpdate")
|
DataAdapter("PA_OC_OrdenesCompraDetalleAjusteUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -1028,7 +910,7 @@ Public Class ClsOC
|
|||||||
pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||||
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
||||||
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
||||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Double = 0.16) As Boolean
|
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
||||||
@@ -1266,18 +1148,18 @@ Public Class ClsOC
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveOrdenCompra", SqlDbType.Int).Value = pCveOrdenCompra
|
.Add("@CveOrdenCompra", SqlDbType.Int).Value = pCveOrdenCompra
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
.Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad
|
||||||
.Add("@Descuento", SqlDbType.Float).Value = Descuento
|
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
|
||||||
.Add("@Importe", SqlDbType.Float).Value = pImporte
|
.Add("@Importe", SqlDbType.Float).Value = pImporte
|
||||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||||
@@ -1290,16 +1172,16 @@ Public Class ClsOC
|
|||||||
.Add("@vCveOrdenCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@vCveOrdenCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
||||||
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
||||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||||
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
|
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
|
||||||
.Add("@RetISR", SqlDbType.Float).Value = RetISR
|
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
|
||||||
.Add("@Total", SqlDbType.Float).Value = Total
|
.Add("@Total", SqlDbType.Decimal).Value = Total
|
||||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
|
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
|
||||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
|
||||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
|
||||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
|
||||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
|
||||||
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||||
@@ -1322,11 +1204,11 @@ Public Class ClsOC
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateOrdenCompraDetalle(pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
Public Function UpdateOrdenCompraDetalle(pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer,
|
||||||
pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0,
|
pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||||
Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0,
|
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0,
|
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||||
Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveTipoGastoObra As Integer = -1) As Integer
|
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveTipoGastoObra As Integer = -1) As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_OC_OrdenesCompraDetalleUpdate")
|
DataAdapter("PA_OC_OrdenesCompraDetalleUpdate")
|
||||||
@@ -1336,8 +1218,8 @@ Public Class ClsOC
|
|||||||
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
.Add("@Cantidad", SqlDbType.Float).Value = pCantidad
|
||||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
.Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
.Add("@CvePS", SqlDbType.Int).Value = pCvePS
|
||||||
.Add("@Descuento", SqlDbType.Float).Value = Descuento
|
.Add("@Descuento", SqlDbType.Decimal).Value = Descuento
|
||||||
.Add("@Importe", SqlDbType.Float).Value = pImporte
|
.Add("@Importe", SqlDbType.Decimal).Value = pImporte
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = pCveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = pCveSubProyecto
|
||||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle
|
||||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = pCveActivoFijo
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = pCveActivoFijo
|
||||||
@@ -1346,16 +1228,16 @@ Public Class ClsOC
|
|||||||
.Add("@CveUsuario", SqlDbType.Int).Value = pCveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = pCveUsuario
|
||||||
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
.Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS
|
||||||
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
.Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA
|
||||||
.Add("@IVA", SqlDbType.Float).Value = IVA
|
.Add("@IVA", SqlDbType.Decimal).Value = IVA
|
||||||
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
|
.Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA
|
||||||
.Add("@RetISR", SqlDbType.Float).Value = RetISR
|
.Add("@RetISR", SqlDbType.Decimal).Value = RetISR
|
||||||
.Add("@Total", SqlDbType.Float).Value = Total
|
.Add("@Total", SqlDbType.Decimal).Value = Total
|
||||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
.Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje
|
.Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje
|
||||||
.Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje
|
.Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje
|
||||||
.Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje
|
.Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje
|
||||||
.Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje
|
.Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje
|
||||||
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje
|
.Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje
|
||||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -2412,7 +2294,7 @@ Public Class ClsOC
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Double, CveEmpresa As Integer) As Boolean
|
Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Decimal, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_OC_SolicitudAnticipoAdd")
|
DataAdapter("PA_OC_SolicitudAnticipoAdd")
|
||||||
|
|
||||||
@@ -2496,16 +2378,16 @@ Public Class ClsOC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region " OC DETALLE - SALDOS [ SURTIDO INV | VINCULADO COMP ]"
|
#Region " OC DETALLE - SALDOS [ SURTIDO INV | VINCULADO COMP ]"
|
||||||
Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Double, CveCompraDetalle As Integer, CantidadVinculada As Double) As Boolean
|
Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Decimal, CveCompraDetalle As Integer, CantidadVinculada As Decimal) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("OC_OrdenesCompraDetalleSaldosInvCompraAdd")
|
DataAdapter("OC_OrdenesCompraDetalleSaldosInvCompraAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
|
.Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle
|
||||||
.Add("@CveInvDetalle", SqlDbType.Int).Value = CveInvDetalle
|
.Add("@CveInvDetalle", SqlDbType.Int).Value = CveInvDetalle
|
||||||
.Add("@CantidadSurtida", SqlDbType.Float).Value = CantidadSurtida
|
.Add("@CantidadSurtida", SqlDbType.Decimal).Value = CantidadSurtida
|
||||||
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
||||||
.Add("@CantidadVinculada", SqlDbType.Float).Value = CantidadVinculada
|
.Add("@CantidadVinculada", SqlDbType.Decimal).Value = CantidadVinculada
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -7171,8 +7171,11 @@ Public Class ClsPaginas
|
|||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(15) Then
|
||||||
|
params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'params.Add(New ReportParameter("CP", UsuarioActual.Empresa.CP.ToString))
|
|
||||||
params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
|
params.Add(New ReportParameter("Observaciones", Vta.Observaciones))
|
||||||
params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
|
params.Add(New ReportParameter("CveVendedor", Vta.CveVendedor.ToString))
|
||||||
params.Add(New ReportParameter("Status", Vta.EstatusFactura))
|
params.Add(New ReportParameter("Status", Vta.EstatusFactura))
|
||||||
|
|||||||
@@ -838,7 +838,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateEstatusVenta(CveVenta As Integer, CveEstatusFactura As Integer, CveEmpresa As Integer, Optional Num2 As Integer = -1) As Boolean
|
Public Function UpdateEstatusVenta(CveVenta As Integer, CveEstatusFactura As Integer, CveEmpresa As Integer, Optional Num2 As Integer = -1, Optional CveEstatusRefacturacion As Integer = -1, Optional CveMotivoCancelacion As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasEstatusUpdate")
|
DataAdapter("PA_Vta_VentasEstatusUpdate")
|
||||||
@@ -848,6 +848,8 @@ Public Class ClsVentas
|
|||||||
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Num2", SqlDbType.Float).Value = Num2
|
.Add("@Num2", SqlDbType.Float).Value = Num2
|
||||||
|
.Add("@CveEstatusRefacturacion", SqlDbType.Int).Value = CveEstatusRefacturacion
|
||||||
|
.Add("@CveMotivoCancelacion", SqlDbType.Int).Value = CveMotivoCancelacion
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4845,7 +4845,8 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI YA ESTA TIMBRADA, NUEVO PROCESO REFACTURACION, ASIGNA LA CANCELACION PENDIENTE
|
'SI YA ESTA TIMBRADA, NUEVO PROCESO REFACTURACION, ASIGNA LA CANCELACION PENDIENTE
|
||||||
If EsRefacturacion AndAlso Me.CveEstatusFactura = 3 AndAlso CveMotivoCancelacion > 0 Then
|
'EL ESTATUS REFACTURACION 4 ES PARA LAS QUE NO SE PUDIERON CANCELAR, DEBE OBLIGAR A CANCELAR ANTE EL SAT
|
||||||
|
If EsRefacturacion AndAlso Me.CveEstatusFactura = 3 AndAlso CveMotivoCancelacion > 0 AndAlso CveEstatusRefacturacion <> 4 Then
|
||||||
CveEstatusFacturaAsignado = 23
|
CveEstatusFacturaAsignado = 23
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -761,6 +761,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim cveclienteclasificacion = IfNull(context.Request("cveclienteclasificacion"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
Dim usuario As Usuario = UsuarioActual(context)
|
Dim usuario As Usuario = UsuarioActual(context)
|
||||||
Dim CveEmpresa As String
|
Dim CveEmpresa As String
|
||||||
If IsNothing(usuario) Then
|
If IsNothing(usuario) Then
|
||||||
@@ -772,7 +774,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
If context.Application(AppNombre) Is Nothing Then
|
If context.Application(AppNombre) Is Nothing Then
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1) Then
|
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, Estatus:=-1, CveClienteClasificacion:=cveclienteclasificacion) Then
|
||||||
context.Application(AppNombre) = ObjClientes.DtResultados
|
context.Application(AppNombre) = ObjClientes.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|||||||
@@ -104,7 +104,8 @@
|
|||||||
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
|
<asp:ListItem Value="13" Text="Efectivo"></asp:ListItem>
|
||||||
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
|
<asp:ListItem Value="3" Text="Cheque"></asp:ListItem>
|
||||||
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
|
<asp:ListItem Value="11" Text="Tarjeta de Debito"></asp:ListItem>
|
||||||
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
<asp:ListItem Value="12" Text="Tarjeta de Crédito"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="-2" Text="Tarjetas"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|
||||||
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" Visible="false" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="40px">
|
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" Visible="false" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="40px">
|
||||||
@@ -281,9 +282,10 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorNotas(this)">
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="ChkFactura" runat="server"/>
|
<asp:CheckBox ID="ChkFactura" CssClass="CssSelector" runat="server"/>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Factura">
|
<asp:TemplateField HeaderText="Factura">
|
||||||
@@ -560,8 +562,8 @@
|
|||||||
function txtSumaTntermediario(txt) {
|
function txtSumaTntermediario(txt) {
|
||||||
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||||
if (comision2 > ValorTotalSeleccionado) {
|
if (comision2 > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtComisionIntermediario').val(ComisionIntermediario);
|
//$('#C_TxtComisionIntermediario').val(ComisionIntermediario);
|
||||||
alert("No es posible poner un importe superior a lo seleccionado");
|
//alert("No es posible poner un importe superior a lo seleccionado");
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
|
saldo = ValorTotalSeleccionado - descuento + comision - comision2 - IVA;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
@@ -653,6 +655,32 @@
|
|||||||
ComisionIntermediario = 0;
|
ComisionIntermediario = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function SelectorNotas(Chk) {
|
||||||
|
|
||||||
|
|
||||||
|
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||||
|
|
||||||
|
if (Chk.checked) {
|
||||||
|
|
||||||
|
if (! $(this).prop('checked')) {
|
||||||
|
$(this).click();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if ($(this).prop('checked')) {
|
||||||
|
$(this).click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -215,6 +215,19 @@
|
|||||||
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El campo <b>''Folio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
|
<div runat="server" id="DvFolioACCondiciones" visible="false">
|
||||||
|
|
||||||
|
<ajax:FilteredTextBoxExtender runat="server" ID="FTEFolio" TargetControlID="TxtFolio" FilterType="Custom" ValidChars="0123456789" />
|
||||||
|
<asp:RangeValidator ID="RvTxtFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="El Folio debe de tener un valor de entre 1 y 2147483647" Type="Integer" MinimumValue="1" MaximumValue="2147483647" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RvTxtFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
<label class="col-md-1 control-label text-right">Importe:</label>
|
<label class="col-md-1 control-label text-right">Importe:</label>
|
||||||
|
|||||||
@@ -843,6 +843,9 @@ Partial Class Bancos_IE
|
|||||||
DdlMotivoCancelacion.DataBind()
|
DdlMotivoCancelacion.DataBind()
|
||||||
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlMotivoCancelacion.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
DvFolioACCondiciones.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -861,6 +864,8 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
||||||
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
||||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||||
@@ -4554,15 +4559,24 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Dim TipoMovimiento As Integer = 1
|
Dim TipoMovimiento As Integer = 1
|
||||||
|
|
||||||
|
Dim CveTipoTransaccionCancelacion As Integer = DdlTipoTransaccionCancelacion.SelectedValue.ToEntero
|
||||||
|
|
||||||
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
|
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
|
||||||
GeneraCancelacionEnCero = False
|
GeneraCancelacionEnCero = False
|
||||||
TipoMovimiento = 2
|
TipoMovimiento = 2
|
||||||
|
|
||||||
|
If DdlTipoTransaccionCancelacion.SelectedValue.ToEntero = -1 Then
|
||||||
|
CveTipoTransaccionCancelacion = 16 'Validacion manual para solo enviar el correcto
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePolizaCancelacion As Integer = 0
|
Dim CvePrePolizaCancelacion As Integer = 0
|
||||||
|
|
||||||
If Not GeneraCancelacionEnCero Then
|
If Not GeneraCancelacionEnCero Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento,
|
||||||
|
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
|
||||||
If CvePrePolizaCancelacion <= 0 Then
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||||
@@ -4577,7 +4591,8 @@ Partial Class Bancos_IE
|
|||||||
MensajeError = "Error al desbloquear prepoliza."
|
MensajeError = "Error al desbloquear prepoliza."
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero)
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate,
|
||||||
|
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
|
||||||
If CvePrePolizaCancelacion <= 0 Then
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||||
@@ -4792,7 +4807,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'siempre se hace una cancelación
|
'siempre se hace una cancelación
|
||||||
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) <= 0 Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2, 16) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,10 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
<ul class="list-inline text-size-12">
|
<ul class="list-inline text-size-12">
|
||||||
<li>Cliente:
|
<li>Cliente:
|
||||||
<asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
<%-- <asp:DropDownList ID="DdlClientes" onclick="CargaClientes();" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="form-control input-sm" Style="width: 240px !important; display: inline-block;">
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>--%>
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 240px;"></ADS:Dropdownlost>
|
||||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargaClientes" Style="display: none;" />
|
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargaClientes" Style="display: none;" />
|
||||||
</li>
|
</li>
|
||||||
<li> F.I.:
|
<li> F.I.:
|
||||||
|
|||||||
@@ -27,8 +27,17 @@ Partial Class Bancos_RepIngresosPorComprobar
|
|||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
'DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
|
||||||
'DdlProveedores.DataBind()
|
|
||||||
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
|
If EsWS Then
|
||||||
|
DdlClientes.setEsWebService(True)
|
||||||
|
Else
|
||||||
|
DdlClientes.setEsWebService(False)
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(91) Then
|
If UsuarioActual.TienePermisoProceso(91) Then
|
||||||
@@ -58,15 +67,16 @@ Partial Class Bancos_RepIngresosPorComprobar
|
|||||||
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
|
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
|
||||||
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
|
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
|
||||||
|
|
||||||
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||||
|
|
||||||
If Mov.GetIngresosPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
If Mov.GetIngresosPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||||
DtDatos = Mov.DtResultados
|
DtDatos = Mov.DtResultados
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
If Mov.GetIngresosAnticiposPorComprobar(FechaI, FechaF, CveCliente, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa) Then
|
||||||
DtAnticipos = Mov.DtResultados
|
DtAnticipos = Mov.DtResultados
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
UpAnt.Update()
|
UpAnt.Update()
|
||||||
@@ -77,13 +87,26 @@ Partial Class Bancos_RepIngresosPorComprobar
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
|
Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
|
||||||
DdlClientes.CssClass += " select2me"
|
|
||||||
DdlClientes.Items.Clear()
|
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
DdlClientes.DataBind()
|
|
||||||
DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
DdlClientes.Attributes.Remove("onclick")
|
If EsWS Then
|
||||||
|
DdlClientes.setEsWebService(True)
|
||||||
|
Else
|
||||||
|
DdlClientes.setEsWebService(False)
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'DdlClientes.CssClass += " select2me"
|
||||||
|
'DdlClientes.Items.Clear()
|
||||||
|
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
'DdlClientes.DataBind()
|
||||||
|
'DdlClientes.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
'DdlClientes.Attributes.Remove("onclick")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -2149,18 +2149,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Private Sub CargaRetIVAConcepto(Optional Cambio As Boolean = False)
|
Private Sub CargaRetIVAConcepto(Optional Cambio As Boolean = False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If TrRetIVA.Visible Then
|
If TrRetIVA.Visible Then
|
||||||
TdRetIVAConcepto.Visible = True
|
TdRetIVAConcepto.Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Cambio Then
|
If Cambio Then
|
||||||
@@ -2174,15 +2164,12 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4"))
|
||||||
|
''If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then
|
'DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
||||||
DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5"))
|
''End If
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -3380,6 +3367,47 @@ Partial Class Compras_Compras
|
|||||||
DdlRetIVAConcepto.SelectedValueExist("2") ' flete pf
|
DdlRetIVAConcepto.SelectedValueExist("2") ' flete pf
|
||||||
DdlRetIVAConcepto.SelectedValueExist("3") ' fletes pm
|
DdlRetIVAConcepto.SelectedValueExist("3") ' fletes pm
|
||||||
DdlRetISRConcepto.SelectedValueExist("1") ' honorarios
|
DdlRetISRConcepto.SelectedValueExist("1") ' honorarios
|
||||||
|
ElseIf ObjProveedor.DIOTCveTipoOperacion = 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
If CveFactura > 0 Then
|
||||||
|
|
||||||
|
If RetIVAOriginal > 0 Then
|
||||||
|
Dim CalRetIVAPor As Decimal = (RetIVAOriginal * 1 / SubTotal2Original).RoundAD(6).ToDecimal
|
||||||
|
|
||||||
|
If (CalRetIVAPor).RoundAD(6) = 0.106667 Then
|
||||||
|
DdlRetIVAConcepto.SelectedValueExist("1") '10.66 servicios profecionales
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (CalRetIVAPor).RoundAD(2) = 0.04 Then '4 Fletes
|
||||||
|
|
||||||
|
If RFCProv.Length = 13 Then
|
||||||
|
DdlRetIVAConcepto.SelectedValueExist("2")
|
||||||
|
Else
|
||||||
|
DdlRetIVAConcepto.SelectedValueExist("3")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RetISROriginal > 0 Then
|
||||||
|
|
||||||
|
Dim CalRetISRPor As Decimal = (RetISROriginal * 1 / SubTotal2Original).RoundAD(5).ToDecimal
|
||||||
|
|
||||||
|
If (CalRetISRPor).RoundAD(1) = 0.1 Then '10 Sercviios profecionales
|
||||||
|
DdlRetISRConcepto.SelectedValueExist("1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If (CalRetISRPor).RoundAD(4) = 0.0125 Then '1.25 Recico regimen simplificado confianza
|
||||||
|
DdlRetISRConcepto.SelectedValueExist("3")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LbAgregar.Enabled = True
|
LbAgregar.Enabled = True
|
||||||
@@ -4013,9 +4041,7 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
'If Not AjustaCombustibles() Then
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'------------------ INICIA VALIDACIONES ------------------
|
'------------------ INICIA VALIDACIONES ------------------
|
||||||
|
|
||||||
@@ -4437,6 +4463,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'------------------TERMINA VALIDACIONES------------------
|
'------------------TERMINA VALIDACIONES------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'si hay necesidad de actualizar el globaldtps
|
'si hay necesidad de actualizar el globaldtps
|
||||||
If RegeneraPS Then
|
If RegeneraPS Then
|
||||||
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
|
||||||
@@ -5219,7 +5249,7 @@ Partial Class Compras_Compras
|
|||||||
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
||||||
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||||
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDouble) Then
|
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal) Then
|
||||||
ErrorSaldosInvComp = True
|
ErrorSaldosInvComp = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5894,7 +5924,10 @@ Partial Class Compras_Compras
|
|||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
|
Dim Concepto As String = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreProveedor, $"{TxtSerie.Text}-{TxtFolio.Text}", If(TxtDocumentoFolio.Visible, TxtDocumentoFolio.Text, If(TxtDocumentoFolioCaja.Visible, TxtDocumentoFolioCaja.Text, ConceptoPersonal)))
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
|
||||||
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
|
|
||||||
|
|
||||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
CveConceptoOriginal = ConceptoContable
|
CveConceptoOriginal = ConceptoContable
|
||||||
@@ -8939,7 +8972,7 @@ Partial Class Compras_Compras
|
|||||||
IdCtaContable = 0
|
IdCtaContable = 0
|
||||||
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
Dim PorcentajeImpuesto As Decimal = 0
|
||||||
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text)
|
||||||
|
|
||||||
@@ -10558,7 +10591,7 @@ Partial Class Compras_Compras
|
|||||||
Dim importeMovimiento As Decimal = 0
|
Dim importeMovimiento As Decimal = 0
|
||||||
Dim IdCtaContable As Integer = 0
|
Dim IdCtaContable As Integer = 0
|
||||||
Dim importeMN As Decimal = 0
|
Dim importeMN As Decimal = 0
|
||||||
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1)
|
Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, -1, 1)
|
||||||
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
Dim Referencia As String = $"{TxtSerie.Text}-{TxtFolio.Text}" ' concatenation interpolation
|
||||||
|
|
||||||
Select Case ConceptoContable
|
Select Case ConceptoContable
|
||||||
@@ -10775,7 +10808,7 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
'AGREGA MOVIMIENTO
|
'AGREGA MOVIMIENTO
|
||||||
If importeMovimiento <> 0 Then
|
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
|
|||||||
@@ -1198,14 +1198,17 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Usuario As String = $" <b>Usuario:</b> {Nombre}"
|
Dim Usuario As String = $" <b>Usuario:</b> {Nombre}"
|
||||||
If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then
|
If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
|
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}"))
|
params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}"))
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
@@ -1311,7 +1314,7 @@ Partial Class PopUpVerFactura
|
|||||||
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer)
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim Dr As DataRow = Nothing
|
Dim Dr As DataRow = Nothing
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
@@ -1345,7 +1348,9 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
params.Add(New ReportParameter("Utilidad", $"$ {(SumaUtilidad - SumaGasto).ToString.FormatoNumero()}"))
|
params.Add(New ReportParameter("Utilidad", $"$ {(SumaUtilidad - SumaGasto).ToString.FormatoNumero()}"))
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
@@ -1493,14 +1498,9 @@ Partial Class PopUpVerFactura
|
|||||||
If Dt.Rows.Count > 0 Then
|
If Dt.Rows.Count > 0 Then
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
|
|
||||||
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||||
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
@@ -1920,7 +1920,7 @@ Partial Class PopUpVerFactura
|
|||||||
If DtConceptos.Rows.Count > 0 Then
|
If DtConceptos.Rows.Count > 0 Then
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
@@ -3437,8 +3437,15 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("NombreEntrego", Personal))
|
params.Add(New ReportParameter("NombreEntrego", Personal))
|
||||||
params.Add(New ReportParameter("Responsable", Personal))
|
params.Add(New ReportParameter("Responsable", Personal))
|
||||||
params.Add(New ReportParameter("NombreRecibio", Capturo.ToUpper))
|
params.Add(New ReportParameter("NombreRecibio", Capturo.ToUpper))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
|
|
||||||
If DtMovimientos.COUNT("Serie") > 0 Then
|
If DtMovimientos.COUNT("Serie") > 0 Then
|
||||||
params.Add(New ReportParameter("MostrarSerieLote", "1"))
|
params.Add(New ReportParameter("MostrarSerieLote", "1"))
|
||||||
Else
|
Else
|
||||||
@@ -3523,8 +3530,14 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("NombreEntrego", Capturo.ToUpper))
|
params.Add(New ReportParameter("NombreEntrego", Capturo.ToUpper))
|
||||||
params.Add(New ReportParameter("Responsable", Personal))
|
params.Add(New ReportParameter("Responsable", Personal))
|
||||||
params.Add(New ReportParameter("NombreRecibio", Personal))
|
params.Add(New ReportParameter("NombreRecibio", Personal))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
If Imagen.Exists Then
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
|
Else
|
||||||
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
|
End If
|
||||||
If DtMovimientos.COUNT("Serie") > 0 Then
|
If DtMovimientos.COUNT("Serie") > 0 Then
|
||||||
params.Add(New ReportParameter("MostrarSerieLote", "1"))
|
params.Add(New ReportParameter("MostrarSerieLote", "1"))
|
||||||
Else
|
Else
|
||||||
@@ -4962,7 +4975,8 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not ReporteEmpresa.Exists Then
|
If Not ReporteEmpresa.Exists Then
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
@@ -4970,7 +4984,8 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
@@ -5166,10 +5181,9 @@ Partial Class PopUpVerFactura
|
|||||||
ObjAF.Dispose()
|
ObjAF.Dispose()
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
@@ -6257,7 +6271,9 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("CodigoTD", CodigoTD))
|
params.Add(New ReportParameter("CodigoTD", CodigoTD))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
@@ -6315,7 +6331,7 @@ Partial Class PopUpVerFactura
|
|||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim DtDatos As New DataTable
|
Dim DtDatos As New DataTable
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -6394,7 +6410,9 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("CodigoTD", CodigoTD))
|
params.Add(New ReportParameter("CodigoTD", CodigoTD))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -713,18 +713,36 @@ Partial Class Compras_Proveedores
|
|||||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
|
||||||
|
|
||||||
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
|
||||||
Dim Version As String = ValorXml(nodo, "Version")
|
Dim Version As String = ValorXml(nodo, "Version")
|
||||||
|
|
||||||
|
|
||||||
|
If Version = "3.2" Then
|
||||||
|
Prefijo = "cfd"
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||||
|
ElseIf Version = "3.3" Then
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||||
|
|
||||||
|
Else ' se considera que es la version 4.0
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
||||||
|
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim node As XmlNode
|
Dim node As XmlNode
|
||||||
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
|
node = XMLDoc.SelectSingleNode(String.Format("//{0}:Emisor", Prefijo), namespaces)
|
||||||
If node IsNot Nothing Then
|
If node IsNot Nothing Then
|
||||||
TxtRFC.Text = ValorXml(node, "rfc")
|
TxtRFC.Text = ValorXml(node, "rfc")
|
||||||
|
|
||||||
If Version = "3.3" Then
|
If Version = "3.3" Or Version = "4.0" Then
|
||||||
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
TxtRazonSocial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||||
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
TxtNombreComercial.Text = HttpUtility.HtmlDecode(ValorXml(node, "Nombre"))
|
||||||
ChkEstado.Checked = True
|
ChkEstado.Checked = True
|
||||||
|
|||||||
@@ -48,9 +48,7 @@
|
|||||||
<div class="row text-size-12">
|
<div class="row text-size-12">
|
||||||
<div class="col-md-1"><span>Proveedor: </span></div>
|
<div class="col-md-1"><span>Proveedor: </span></div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="select2me" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Width="100%">
|
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%; selected2me" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1"><span>Clasificación:</span></div>
|
<div class="col-md-1"><span>Clasificación:</span></div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
@@ -126,6 +124,16 @@
|
|||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-1"><span>Tipo Docto:</span></div>
|
||||||
|
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||||
|
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||||
|
<asp:ListItem Selected="True" Value="Fac" Text="Factura"></asp:ListItem>
|
||||||
|
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||||
|
<asp:ListItem Selected="True" Value="NC" Text="Nota Crédito"></asp:ListItem>
|
||||||
|
<asp:ListItem Selected="True" Value="ExC" Text="Egresos X Comp"></asp:ListItem>
|
||||||
|
<asp:ListItem Selected="True" Value="DEV" Text="Devolución"></asp:ListItem>
|
||||||
|
</asp:ListBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,8 +44,28 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
|||||||
TipoCambio = 1;
|
TipoCambio = 1;
|
||||||
TCEspecifico = -1;
|
TCEspecifico = -1;
|
||||||
|
|
||||||
DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
|
||||||
DdlProveedor.DataBind();
|
|
||||||
|
|
||||||
|
//DdlProveedor.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||||
|
//DdlProveedor.DataBind();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (UsuarioActual.Empresa.Funcionalidad(105) == "1") {
|
||||||
|
DdlProveedor.setEsWebService(true);
|
||||||
|
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||||
|
DdlProveedor.SelectedText = "Todos";
|
||||||
|
DdlProveedor.SelectedValue = "-1";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
DdlProveedor.setEsWebService(false);
|
||||||
|
DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||||
|
DdlProveedor.ddl.DataBind();
|
||||||
|
DdlProveedor.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}").FiltraParametros("ProveedoresResponsables > 0");
|
DdlUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}").FiltraParametros("ProveedoresResponsables > 0");
|
||||||
DdlUsuarioResponsable.DataBind();
|
DdlUsuarioResponsable.DataBind();
|
||||||
@@ -72,10 +92,16 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||||
|
|
||||||
|
|
||||||
|
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||||
|
|
||||||
|
string TipoDocto = (DdlTipoDocto.GetSelectedValuesM() == "") ? "-1" : DdlTipoDocto.GetSelectedValuesM();
|
||||||
|
|
||||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||||
if (ObjMov.GetCxPPeriodo(DdlProveedor.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),DdlProveedoresClasificaciones.SelectedValue.ToEntero(),
|
if (ObjMov.GetCxPPeriodo(CveProveedor, DdlSubProyecto.SelectedValue.ToEntero(),DdlProveedoresClasificaciones.SelectedValue.ToEntero(),
|
||||||
DdlUsuarioResponsable.SelectedValue.ToEntero(),DdlUsuarioRegistro.SelectedValue.ToEntero(),DdlEstatusCompra.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa,
|
DdlUsuarioResponsable.SelectedValue.ToEntero(),DdlUsuarioRegistro.SelectedValue.ToEntero(),DdlEstatusCompra.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa,
|
||||||
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,DdlTipoProveedor.SelectedValue.ToEntero()))
|
DdlGrupo.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),TipoCambio,TCEspecifico,txtCorteA.Text.ToDate(),UsuarioActual.CveUsuario,
|
||||||
|
DdlTipoProveedor.SelectedValue.ToEntero(), TipoDocto: TipoDocto))
|
||||||
{
|
{
|
||||||
GvDatos.DataSource = ObjMov.DtResultados;
|
GvDatos.DataSource = ObjMov.DtResultados;
|
||||||
DtDatos = ObjMov.DtResultados;
|
DtDatos = ObjMov.DtResultados;
|
||||||
@@ -234,7 +260,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas
|
|||||||
if (DdlGrupo.SelectedValue != "-1")
|
if (DdlGrupo.SelectedValue != "-1")
|
||||||
StrFiltro.AppendFormat(" <b>Grupo</b>: {0}", DdlGrupo.SelectedItem.Text);
|
StrFiltro.AppendFormat(" <b>Grupo</b>: {0}", DdlGrupo.SelectedItem.Text);
|
||||||
if (DdlProveedor.SelectedValue != "-1")
|
if (DdlProveedor.SelectedValue != "-1")
|
||||||
StrFiltro.AppendFormat(" <b>Proveedor</b>: {0}", DdlProveedor.SelectedItem.Text);
|
StrFiltro.AppendFormat(" <b>Proveedor</b>: {0}", DdlProveedor.ddl.SelectedItem.Text);
|
||||||
if (DdlProveedoresClasificaciones.SelectedValue != "-1")
|
if (DdlProveedoresClasificaciones.SelectedValue != "-1")
|
||||||
StrFiltro.AppendFormat(" <b>Clasificación Proveedor</b>: {0}", DdlProveedoresClasificaciones.SelectedItem.Text);
|
StrFiltro.AppendFormat(" <b>Clasificación Proveedor</b>: {0}", DdlProveedoresClasificaciones.SelectedItem.Text);
|
||||||
if (DdlTipoProveedor.SelectedValue != "-1")
|
if (DdlTipoProveedor.SelectedValue != "-1")
|
||||||
|
|||||||
@@ -1581,7 +1581,10 @@ Partial Class Compras_eFacturas
|
|||||||
swTiempo.AppendFormat("espera: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
swTiempo.AppendFormat("espera: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
swmili = sw.ElapsedMilliseconds
|
swmili = sw.ElapsedMilliseconds
|
||||||
sw.Start()
|
sw.Start()
|
||||||
VerificaCorreo(True)
|
|
||||||
|
If VerificaCorreo(True) Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
sw.Stop()
|
sw.Stop()
|
||||||
swTiempo.AppendFormat("Verifica En la app: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
swTiempo.AppendFormat("Verifica En la app: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
@@ -1695,6 +1698,9 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalFacturas"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
'Alert(String.Format("Se cargaron {0} Facturas", Arreglo.Count), TipoMensaje.MsgInformacion)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -2847,6 +2853,37 @@ Partial Class Compras_eFacturas
|
|||||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||||
|
|
||||||
Dim Prefijo As String = ""
|
Dim Prefijo As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim DTDocumentosRelacionados As New DataTable
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Serie")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
||||||
|
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
||||||
|
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
||||||
|
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If IO.File.Exists(Archivo) Then
|
If IO.File.Exists(Archivo) Then
|
||||||
|
|
||||||
|
|
||||||
@@ -2913,30 +2950,7 @@ Partial Class Compras_eFacturas
|
|||||||
UUIDPago = ValorXML(nodeTFD, "UUID")
|
UUIDPago = ValorXML(nodeTFD, "UUID")
|
||||||
LblUUID.Text = UUIDPago
|
LblUUID.Text = UUIDPago
|
||||||
|
|
||||||
Dim DTDocumentosRelacionados As New DataTable
|
|
||||||
DTDocumentosRelacionados.Columns.Add("Serie")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("SerieFolio")
|
|
||||||
|
|
||||||
DTDocumentosRelacionados.Columns.Add("IdDocumento")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("Folio", GetType(Integer))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("MonedaDR")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("MetodoDePagoDR")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("ImpPagado", GetType(Decimal))
|
|
||||||
|
|
||||||
DTDocumentosRelacionados.Columns.Add("CveFactura", GetType(Integer))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("CveCompra", GetType(Integer))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("CveIE", GetType(Integer))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("Fecha", GetType(Date))
|
|
||||||
|
|
||||||
DTDocumentosRelacionados.Columns.Add("FolioPago")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("ImportePago", GetType(Decimal))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("FechaPago", GetType(Date))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("CveMetodoPago", GetType(Integer))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("SerieFolioCompra")
|
|
||||||
DTDocumentosRelacionados.Columns.Add("CvePrePolizaDetalle", GetType(Integer))
|
|
||||||
|
|
||||||
DTDocumentosRelacionados.Columns.Add("Tipo", GetType(String))
|
|
||||||
DTDocumentosRelacionados.Columns.Add("Manual", GetType(Boolean))
|
|
||||||
|
|
||||||
|
|
||||||
Dim nodePagosN As XmlNodeList
|
Dim nodePagosN As XmlNodeList
|
||||||
@@ -3140,7 +3154,9 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
|
|
||||||
'saco la información de lo vinculado en el ie
|
'saco la información de lo vinculado en el ie
|
||||||
ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
'ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe")
|
||||||
|
ImporteIES = DTDocumentosRelacionados.FiltraParametros("CveIE > 0").SUM("ImportePago")
|
||||||
|
|
||||||
|
|
||||||
DiferenciaImportes = Monto - ImporteIES
|
DiferenciaImportes = Monto - ImporteIES
|
||||||
ObjCompras.Dispose()
|
ObjCompras.Dispose()
|
||||||
|
|||||||
@@ -88,9 +88,9 @@
|
|||||||
|
|
||||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" Visible="true"><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -156,8 +156,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-group input-small ">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
<asp:TextBox CssClass="form-control" ID="TxtFolio" runat="server" MaxLength="15" Enabled="false" Width="100%"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton runat="server" ID="LnkFolioManual" CssClass="blue" Visible="false"> <i class="fa fa-pencil" aria-hidden="true"></i></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -710,6 +716,8 @@
|
|||||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" class="btn btn-danger" />
|
||||||
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
<asp:Button ID="BtnContabilizar" runat="server" Text="Contabilizar" CssClass="btn btn-primary green" Visible="false" />
|
||||||
|
<asp:Button ID="BtnDescontabilizar" runat="server" Text="Descontabilizar" CssClass="btn btn-primary" Visible="false"
|
||||||
|
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -277,6 +277,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ValidaCrearAPartirDe()
|
ValidaCrearAPartirDe()
|
||||||
DvPlantilla.Visible = False
|
DvPlantilla.Visible = False
|
||||||
UPPDocumento.Visible = False
|
UPPDocumento.Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
|
||||||
|
If Folio.ToEntero > 0 Then
|
||||||
|
BtnDescontabilizar.Visible = True
|
||||||
|
LnkFolioManual.Visible = False
|
||||||
|
Else
|
||||||
|
BtnDescontabilizar.Visible = False
|
||||||
|
LnkFolioManual.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|
||||||
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then
|
||||||
@@ -2695,22 +2710,51 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
|
||||||
End If
|
If Folio.ToEntero = 0 Then
|
||||||
|
|
||||||
|
Dim FolioManual As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, True, UsuarioActual.CveEmpresa, Folio:=FolioManual) Then
|
||||||
|
|
||||||
|
Alert($"Contabilizado Correctamente Folio <b>{ ObjConta.ContaFolio.ToString()}.</b>", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
TxtFolio.Text = ObjConta.ContaFolio.ToString()
|
||||||
|
LnkFolioManual.Visible = False
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
|
||||||
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio: <b>{0}</b> ", ObjConta.FolioPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
|
||||||
|
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
|
||||||
|
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime()) Then
|
||||||
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
|
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio: <b>{0}</b> ", ObjConta.FolioPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Alert($"Ocurrio un error al contabilizar {ObjConta.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -3159,13 +3203,38 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Handles BtnDescontabilizar.Click
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
|
|
||||||
|
If ObjConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Descontabilizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
TxtFolio.Text = ""
|
||||||
|
LnkFolioManual.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LnkFolioManual_Click(sender As Object, e As EventArgs) Handles LnkFolioManual.Click
|
||||||
|
|
||||||
|
TxtFolio.Enabled = True
|
||||||
|
TxtFolio.Focus()
|
||||||
|
UpPoliza.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,28 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
|
||||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
|
||||||
</li>
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpAcciones" runat="server" >
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||||
|
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="20px" Height="20px" /> --%>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||||
|
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||||
|
<asp:PostBackTrigger ControlID="BtnImprimir" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
Balanza de Comprobación
|
Balanza de Comprobación
|
||||||
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
<asp:Label runat="server" ID="LbTitulo"></asp:Label>
|
||||||
|
|||||||
@@ -228,10 +228,15 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
|||||||
GenerarPDFCrystal("EXCEL")
|
GenerarPDFCrystal("EXCEL")
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
'If UsuarioActual.CveUsuario = 100 Then
|
||||||
|
' Alert(String.Format("{0}Contabilidad/Reportes/RepBalanzaComprobacion.rpt", Server.MapPath("~")))
|
||||||
|
' End If
|
||||||
|
' Exit Sub
|
||||||
|
|
||||||
If Not IsNothing(DtDatos) Then
|
If Not IsNothing(DtDatos) Then
|
||||||
'Dim dr As DataRow = DtCxC.Rows(0)
|
'Dim dr As DataRow = DtCxC.Rows(0)
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista = New List(Of CrystalParametro)
|
||||||
@@ -245,7 +250,9 @@ Partial Class Contabilidad_RepBalanzaComprobacion
|
|||||||
lista.Add(New CrystalParametro("pImg", ""))
|
lista.Add(New CrystalParametro("pImg", ""))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DtDatos, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
Dim DTTemp As DataTable = DtDatos.Copy
|
||||||
|
|
||||||
|
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Contabilidad/Reportes/RepBalanzaComprobacion.rpt"), DTTemp, lista, "Balanza de Comprobación", Formato), "Balanza de Comprobación", Formato)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
Alert("No se tienen registrados movimientos", TipoMensaje.MsgAdvertencia)
|
||||||
|
|||||||
Binary file not shown.
@@ -910,8 +910,13 @@ Partial Class RepCxCDetalle
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
|
Dim logouri As String = ""
|
||||||
|
If Imagen.Exists Then
|
||||||
|
logouri = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||||
|
|||||||
@@ -117,7 +117,8 @@
|
|||||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||||
<asp:ListItem Selected="True" Value="Egs" Text="Egresos"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="Egs" Text="Egresos"></asp:ListItem>
|
||||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
|
||||||
|
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||||
</asp:ListBox>
|
</asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
|
|||||||
@@ -39,13 +39,18 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void InicializaValores()
|
private void InicializaValores()
|
||||||
{
|
{
|
||||||
TipoCambio = 1;
|
TipoCambio = 1;
|
||||||
TCEspecifico = -1;
|
TCEspecifico = -1;
|
||||||
|
|
||||||
//CargaClientes
|
//CargaClientes
|
||||||
if (UsuarioActual.CveEmpresa == 119) {
|
if (UsuarioActual.Empresa.Funcionalidad(105) == "1")
|
||||||
|
{
|
||||||
DdlClientesWS.setEsWebService(true);
|
DdlClientesWS.setEsWebService(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -93,8 +98,11 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
|||||||
|
|
||||||
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||||
|
|
||||||
|
|
||||||
|
int CveCliente = DdlClientesWS.SelectedValue.ToEntero() > 0 ? DdlClientesWS.SelectedValue.ToEntero() : -1;
|
||||||
|
|
||||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||||
if (ObjMov.GetCxCPeriodo(DdlClientesWS.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),DdlVendedor.SelectedValue.ToEntero(),DdlUsuario.SelectedValue.ToEntero(),
|
if (ObjMov.GetCxCPeriodo(CveCliente, DdlSubProyecto.SelectedValue.ToEntero(),DdlVendedor.SelectedValue.ToEntero(),DdlUsuario.SelectedValue.ToEntero(),
|
||||||
-1,"-1",UsuarioActual.CveEmpresa,DdlGrupo.SelectedValue.ToEntero(),DdlResponsable.SelectedValue.ToEntero(),TipoCambio,TCEspecifico, TipoDocto,txtCorteA.Text.ToDate(),
|
-1,"-1",UsuarioActual.CveEmpresa,DdlGrupo.SelectedValue.ToEntero(),DdlResponsable.SelectedValue.ToEntero(),TipoCambio,TCEspecifico, TipoDocto,txtCorteA.Text.ToDate(),
|
||||||
DdlEstatusCliente.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, DdlCobranzaEstatus.SelectedValue.ToEntero(), DdlClienteClasificacion.SelectedValue.ToEntero())){
|
DdlEstatusCliente.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, DdlCobranzaEstatus.SelectedValue.ToEntero(), DdlClienteClasificacion.SelectedValue.ToEntero())){
|
||||||
GvDatos.DataSource = ObjMov.DtResultados;
|
GvDatos.DataSource = ObjMov.DtResultados;
|
||||||
@@ -107,13 +115,34 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas
|
|||||||
|
|
||||||
private void CargaClientes()
|
private void CargaClientes()
|
||||||
{
|
{
|
||||||
if (UsuarioActual.CveEmpresa != 119)
|
|
||||||
|
if (UsuarioActual.Empresa.Funcionalidad(105) == "1")
|
||||||
|
{
|
||||||
|
DdlClientesWS.setEsWebService(true);
|
||||||
|
|
||||||
|
if( DdlClienteClasificacion.SelectedValue.ToEntero() > 0)
|
||||||
|
{
|
||||||
|
DdlClientesWS.ddlWS.Attributes.Add("data-cveclienteclasificacion", DdlClienteClasificacion.SelectedValue);
|
||||||
|
DdlClientesWS.txtValue.Value = "";
|
||||||
|
DdlClientesWS.txtText.Value = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DdlClientesWS.ddlWS.Attributes.Add("data-cveclienteclasificacion", "-1");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
DdlClientesWS.ddl.Items.Clear();
|
DdlClientesWS.ddl.Items.Clear();
|
||||||
DdlClientesWS.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero()} OR {DdlClienteClasificacion.SelectedValue.ToEntero()} = -1");
|
DdlClientesWS.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero()} OR {DdlClienteClasificacion.SelectedValue.ToEntero()} = -1");
|
||||||
DdlClientesWS.DataBind();
|
DdlClientesWS.DataBind();
|
||||||
DdlClientesWS.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
DdlClientesWS.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UPFiltros.Update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DdlClienteClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
protected void DdlClienteClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -768,15 +768,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value xml:space="preserve"> </Value>
|
<Value>=Parameters!CP.Value</Value>
|
||||||
<Style>
|
|
||||||
<FontFamily>Calibri</FontFamily>
|
|
||||||
<FontSize>8pt</FontSize>
|
|
||||||
<FontWeight>Bold</FontWeight>
|
|
||||||
</Style>
|
|
||||||
</TextRun>
|
|
||||||
<TextRun>
|
|
||||||
<Value>83140</Value>
|
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -3193,7 +3185,19 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>Regímen: Regímen General de Ley Personas Morales 601; Método de Pago: </Value>
|
<Value>Regímen: Regímen General de Ley Personas Morales 601</Value>
|
||||||
|
<Style>
|
||||||
|
<FontFamily>calibri</FontFamily>
|
||||||
|
<FontSize>7pt</FontSize>
|
||||||
|
</Style>
|
||||||
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
|
<TextRun>
|
||||||
|
<Value>Método de Pago: </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
@@ -3206,15 +3210,20 @@
|
|||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
</TextRuns>
|
||||||
|
<Style />
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph>
|
||||||
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>; Num. Cta Pago:</Value>
|
<Value>Forma de pago: </Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value)</Value>
|
<Value>=Parameters!FormaPago.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>calibri</FontFamily>
|
<FontFamily>calibri</FontFamily>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
@@ -3227,7 +3236,7 @@
|
|||||||
<rd:DefaultName>Textbox62</rd:DefaultName>
|
<rd:DefaultName>Textbox62</rd:DefaultName>
|
||||||
<Top>0.83682in</Top>
|
<Top>0.83682in</Top>
|
||||||
<Left>1.59827in</Left>
|
<Left>1.59827in</Left>
|
||||||
<Height>0.29498in</Height>
|
<Height>0.40038in</Height>
|
||||||
<Width>6.31865in</Width>
|
<Width>6.31865in</Width>
|
||||||
<ZIndex>9</ZIndex>
|
<ZIndex>9</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -3257,9 +3266,9 @@
|
|||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Paragraphs>
|
</Paragraphs>
|
||||||
<rd:DefaultName>Textbox63</rd:DefaultName>
|
<rd:DefaultName>Textbox63</rd:DefaultName>
|
||||||
<Top>1.1747in</Top>
|
<Top>1.2372in</Top>
|
||||||
<Left>2.35328in</Left>
|
<Left>2.35328in</Left>
|
||||||
<Height>0.25in</Height>
|
<Height>0.23611in</Height>
|
||||||
<Width>3.69856in</Width>
|
<Width>3.69856in</Width>
|
||||||
<ZIndex>10</ZIndex>
|
<ZIndex>10</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
@@ -3379,7 +3388,6 @@
|
|||||||
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
|
<rd:FormatSymbolCulture>es-MX</rd:FormatSymbolCulture>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
<rd:Selected>true</rd:Selected>
|
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
</TablixCells>
|
</TablixCells>
|
||||||
@@ -4074,13 +4082,13 @@
|
|||||||
<TablixBody>
|
<TablixBody>
|
||||||
<TablixColumns>
|
<TablixColumns>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>0.74104in</Width>
|
<Width>0.73688in</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>0.57756in</Width>
|
<Width>0.5734in</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
<TablixColumn>
|
<TablixColumn>
|
||||||
<Width>0.67516in</Width>
|
<Width>0.671in</Width>
|
||||||
</TablixColumn>
|
</TablixColumn>
|
||||||
</TablixColumns>
|
</TablixColumns>
|
||||||
<TablixRows>
|
<TablixRows>
|
||||||
@@ -4329,9 +4337,9 @@
|
|||||||
</TablixRowHierarchy>
|
</TablixRowHierarchy>
|
||||||
<DataSetName>DataSet3</DataSetName>
|
<DataSetName>DataSet3</DataSetName>
|
||||||
<Top>0.26817in</Top>
|
<Top>0.26817in</Top>
|
||||||
<Left>5.86887in</Left>
|
<Left>5.88134in</Left>
|
||||||
<Height>0.34081in</Height>
|
<Height>0.34081in</Height>
|
||||||
<Width>1.99376in</Width>
|
<Width>1.98129in</Width>
|
||||||
<ZIndex>3</ZIndex>
|
<ZIndex>3</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
@@ -4362,6 +4370,14 @@
|
|||||||
<Value>Moneda </Value>
|
<Value>Moneda </Value>
|
||||||
<Style />
|
<Style />
|
||||||
</TextRun>
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value>=Parameters!MonedaAbreviatura.Value</Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
|
<TextRun>
|
||||||
|
<Value xml:space="preserve"> </Value>
|
||||||
|
<Style />
|
||||||
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!Moneda.Value</Value>
|
<Value>=Parameters!Moneda.Value</Value>
|
||||||
<Style />
|
<Style />
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -169,17 +169,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-3"></asp:Label>
|
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-2"></asp:Label>
|
||||||
<div class="col-md-9" style="padding-left: 5px;">
|
<div class="col-md-9" style="padding-left: 5px;">
|
||||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-3">Fecha:</label>
|
<label class="col-md-2">Fecha:</label>
|
||||||
<div class="col-md-3" style="padding-left: 5px;">
|
<div class="col-md-3" style="padding-left: 5px;">
|
||||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||||
@@ -202,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row rowpadding" id="divEmitir" runat="server">
|
<div class="row rowpadding" id="divEmitir" runat="server">
|
||||||
<label class="col-md-3">Emitir:</label>
|
<label class="col-md-2">Emitir:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -216,32 +214,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<label class="col-md-3">Chofer:</label>
|
<label class="col-md-2">Chofer:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-6">
|
||||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="ChoferLicencia" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1" style="text-align:left!important">
|
||||||
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
|
<asp:LinkButton ID="LnkAgregarChofer" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Chofer" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row rowpadding">
|
<div class="row rowpadding">
|
||||||
<label class="col-md-3">Unidad:</label>
|
<label class="col-md-2">Unidad:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-6">
|
||||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlUnidadCamionActivoFijo_SelectedIndexChanged" ></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1" style="text-align:left!important">
|
||||||
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
|
<asp:LinkButton ID="LnkAgregarUnidad" runat="server" CssClass="btn btn-primary btn-sm" Text="+" CommandArgument="Agregar Unidad" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
<div class="row rowpadding" runat="server" id="DvConfiguracionVeiculo" visible="false">
|
||||||
<label class="col-md-3">Configuración:</label>
|
<label class="col-md-2">Configuración:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-6">
|
||||||
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
<%--<asp:DropDownList runat="server" ID="DropDownList1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion"></asp:DropDownList>--%>
|
||||||
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="CveConfigAutoTransporte" Style="padding: 0px">
|
<asp:DropDownList ID="DdlConfigAuto" CssClass="form-control input-sm select2me" Width="100%" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlConfigAuto_SelectedIndexChanged" CausesValidation="true" DataTextField="ClaveConfigAutoTransporteDescripcion" DataValueField="CveConfigAutoTransporte" Style="padding: 0px">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -251,16 +249,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
<div class="row rowpadding" runat="server" id="DvRemolque1" visible="false">
|
||||||
<label class="col-md-3">Remolque 1:</label>
|
<label class="col-md-6">Remolque 1:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-6">
|
||||||
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlRemolque1" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" OnSelectedIndexChanged="DdlRemolque1_SelectedIndexChanged"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
<div class="row rowpadding" runat="server" id="DvRemolque2" visible="false">
|
||||||
<label class="col-md-3">Remolque 2:</label>
|
<label class="col-md-2">Remolque 2:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-6">
|
||||||
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlRemolque2" AutoPostBack="true" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="CamionPlaca" ></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1777,7 +1777,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
|
If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
|
||||||
TipoMovtoOtro = Not TipoMovtoAlmacen
|
TipoMovtoOtro = Not TipoMovtoAlmacen
|
||||||
|
|
||||||
Dim CveConceptoContable As Integer = 78
|
Dim CveConceptoContable As Integer = 260
|
||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Select Case DdlConcepto.SelectedValue.ToEntero
|
Select Case DdlConcepto.SelectedValue.ToEntero
|
||||||
Case 28, 31
|
Case 28, 31
|
||||||
|
|||||||
@@ -533,11 +533,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1)
|
Private Sub CargaAlmacenes(CveSubProyecto As Integer, Optional CveTiposAlmacen As String = "", Optional CveTipoCompra As Integer = -1)
|
||||||
Dim StrAlmacenes As String = ""
|
Dim StrAlmacenes As String = ""
|
||||||
|
|
||||||
If UsuarioActual.CveSubProyecto = 8804 Then 'AGS
|
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14,19")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
||||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,12,15")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
|
||||||
Else
|
|
||||||
StrAlmacenes = $"CveTipoAlmacen IN ({If(CveTiposAlmacen.Length > 0, CveTiposAlmacen, "1,2,15,14")}) {If(CveSubProyecto > 0, $"And CveSubProyecto = {CveSubProyecto}", "")}"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveTipoCompra = 10 Then
|
If CveTipoCompra = 10 Then
|
||||||
StrAlmacenes = $"Modalidad = 0"
|
StrAlmacenes = $"Modalidad = 0"
|
||||||
@@ -3693,7 +3689,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDouble, -1, -1) Then
|
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDecimal, -1, -1) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -230,7 +230,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkOpenProrrateo" OnClick="LnkOpenProrrateo_Click" runat="server"><i class="fa fa-percent"></i> Prorrateo</asp:LinkButton>
|
<asp:LinkButton ID="LnkOpenProrrateo" OnClick="LnkOpenProrrateo_Click" runat="server"><i class="fa fa-percent"></i> Prorrateo</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkLayoutContable" Visible="false" OnClick="LnkLayoutContable_Click" runat="server"><i class="fa fa-university" aria-hidden="true"></i>Layout banco</asp:LinkButton>
|
<asp:LinkButton ID="LnkLayoutContable" Visible="false" OnClick="LnkLayoutContable_Click" runat="server"><i class="fa fa-university" aria-hidden="true"></i>Layout banco</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -286,8 +286,7 @@
|
|||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
<asp:PostBackTrigger ControlID="LnkListaRaya" />
|
||||||
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
|
||||||
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
<asp:PostBackTrigger ControlID="LnkLayoutContable" />
|
||||||
|
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
@@ -4213,6 +4212,67 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="ModalLayoutBancos" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel ID="UpModalBancosLayout" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Layout banco</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <div class="form-group form-md-line-input">
|
||||||
|
<asp:RadioButtonList runat="server" ID="RBLModalBancosLayout" RepeatDirection="Horizontal" CssClass=" form-control input-sm" >
|
||||||
|
<asp:ListItem Value="1" Selected="True">Generar Layout</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Altas Nomina</asp:ListItem>
|
||||||
|
</asp:RadioButtonList>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="RBLModalBancosLayout">Tipo Operacóon:</asp:Label>
|
||||||
|
</div>--%>
|
||||||
|
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:DropDownList ID="DdlModalBancosLayout" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Seleccione Uno</asp:ListItem>
|
||||||
|
<asp:ListItem Value="1">Bancomer</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2">Banorte</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:Label runat="server" AssociatedControlID="DdlModalBancosLayout">Banco:</asp:Label>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlModalBancosLayout" runat="server" CssClass="help-block errorimput" Display="none" InitialValue="-1" ControlToValidate="DdlModalBancosLayout"
|
||||||
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalBancoLayout">
|
||||||
|
</asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CERfvDdlModalBancosLayout" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalBancosLayout" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<%-- <asp:UpdatePanel ID="UpModalBancosLayoutBotones" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>--%>
|
||||||
|
<button id="BtnModalBancosLayoutCerrar" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
<asp:Button Text="Generar" ID="BtnModalBancosProcesar" OnClick="BtnModalBancosProcesar_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalBancoLayout" runat="server" />
|
||||||
|
<%-- </ContentTemplate>
|
||||||
|
</asp:UpdatePanel>--%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="BtnModalBancosProcesar" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtCvePeriodo" CssClass="TxtCvePeriodo hidden" runat="server"></asp:TextBox>
|
||||||
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtCvePersonal" CssClass="TxtCvePersonal hidden" runat="server"></asp:TextBox>
|
||||||
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
<asp:Button ID="BtnGeneratepdf" CssClass="BtnGeneratepdf hidden" OnClick="BtnGeneratepdf_Click" UseSubmitBehavior="false" runat="server" Text="Button" />
|
||||||
|
|||||||
@@ -1298,8 +1298,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
string RFCReceptor = Nom.RFC;
|
string RFCReceptor = Nom.RFC;
|
||||||
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
||||||
string SerieFolio = Nom.SerieFolio;
|
string SerieFolio = Nom.SerieFolio;
|
||||||
string SerieFolioFiniquito = string.Format ("{0}F-{1}", nrow["Serie"], nrow["Folio"]);
|
string SerieFolioFiniquito = string.Format("{0}F-{1}", nrow["Serie"], nrow["Folio"]);
|
||||||
bool SeTimbroFiniquito = nrow["SeTimbroFiniquito"].ToString().ToUpper().Contiene(new string[] {"1","TRUE"});
|
bool SeTimbroFiniquito = nrow["SeTimbroFiniquito"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||||
string FolioFiscalFiniquito = nrow["FolioFiscalFiniquito"].ToString();
|
string FolioFiscalFiniquito = nrow["FolioFiscalFiniquito"].ToString();
|
||||||
//SeTimbroFiniquito,N.FolioFiscalFiniquito
|
//SeTimbroFiniquito,N.FolioFiscalFiniquito
|
||||||
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
DataRow rowc = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveMotivoCancelacion={0}", DdlMotivoCancelacion.SelectedValue));
|
||||||
@@ -1341,33 +1341,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscalFiniquito, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
reultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscalFiniquito, Total, RFCReceptor, RFCEmisor, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
||||||
if (reultado.Verificado)//,CveSATMotivoCancelacion:=
|
if (reultado.Verificado)//,CveSATMotivoCancelacion:=
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
string ruta = string.Format("{0}XML\\Nomina\\", UsuarioActual.Empresa.Ruta);
|
try
|
||||||
string archivo = string.Format("{0}{1}.xml", ruta, SerieFolioFiniquito);
|
|
||||||
int contador = 1;
|
|
||||||
string archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
|
||||||
while (System.IO.File.Exists(archivonew))
|
|
||||||
{
|
{
|
||||||
archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
string ruta = string.Format("{0}XML\\Nomina\\", UsuarioActual.Empresa.Ruta);
|
||||||
|
string archivo = string.Format("{0}{1}.xml", ruta, SerieFolioFiniquito);
|
||||||
|
int contador = 1;
|
||||||
|
string archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
||||||
|
while (System.IO.File.Exists(archivonew))
|
||||||
|
{
|
||||||
|
archivonew = string.Format("{0}{1}_{2}.xml", ruta, SerieFolioFiniquito, contador++);
|
||||||
|
}
|
||||||
|
File.Move(archivo, archivonew);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
Alert("Ocurrió un error al mover el archivo fiscal cancelado");
|
||||||
}
|
}
|
||||||
File.Move(archivo, archivonew);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
Alert("Ocurrió un error al mover el archivo fiscal cancelado");
|
|
||||||
}
|
|
||||||
|
|
||||||
secancelo12 = true;
|
secancelo12 = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string.Format("Error al cancelar nomina {0}", FolioFiscalFiniquito).GuardaLog();
|
string.Format("Error al cancelar nomina {0}", FolioFiscalFiniquito).GuardaLog();
|
||||||
//ObjTimbrado.MensajeErrorCFDI.GuardaLog();
|
//ObjTimbrado.MensajeErrorCFDI.GuardaLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (secancelo11 && secancelo12)
|
if (secancelo11 && secancelo12)
|
||||||
@@ -1375,7 +1375,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
|
|
||||||
Nom.UpdateEstatusNomNominas(2, UsuarioActual.Empresa.CvePAC, "", ("01/01/2000").ToDate(), ("01/01/2000").ToDate(), CveNomina);
|
Nom.UpdateEstatusNomNominas(2, UsuarioActual.Empresa.CvePAC, "", ("01/01/2000").ToDate(), ("01/01/2000").ToDate(), CveNomina);
|
||||||
Alert($"La nómina con folio fiscal '{FolioFiscal}' fue cancelada ante el SAT", TipoMensaje.MsgInformacion);
|
Alert($"La nómina con folio fiscal '{FolioFiscal}' fue cancelada ante el SAT", TipoMensaje.MsgInformacion);
|
||||||
}else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Alert($"no se pudo cancelar el folio fiscal<br>{ObjTimbrado.MensajeErrorCFDI}", TipoMensaje.MsgAdvertencia);
|
Alert($"no se pudo cancelar el folio fiscal<br>{ObjTimbrado.MensajeErrorCFDI}", TipoMensaje.MsgAdvertencia);
|
||||||
|
|
||||||
@@ -5636,7 +5637,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
ChkEstatus.Checked = true;
|
ChkEstatus.Checked = true;
|
||||||
UpMovtosPermanentesModal.Update();
|
UpMovtosPermanentesModal.Update();
|
||||||
RegistraScript("$('#ModalMovtoPermanente').modal()");
|
RegistraScript("$('#ModalMovtoPermanente').modal()");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
protected void LnkAddMovto_Click(object sender, EventArgs e)
|
||||||
@@ -5718,7 +5719,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
this.Alert("Se ha eliminadó el movimiento permanente");
|
this.Alert("Se ha eliminadó el movimiento permanente");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
protected void LnkEditarMovtoPermanente_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
@@ -7662,108 +7663,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
}
|
}
|
||||||
loadtablas();
|
loadtablas();
|
||||||
}
|
}
|
||||||
private void CrearLayout(DataTable DTNomina)
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
StringBuilder SbErrores = new StringBuilder();
|
|
||||||
bool ErroresValidaciones = false;
|
|
||||||
|
|
||||||
|
|
||||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
|
||||||
|
|
||||||
foreach (DataRow dRow in DTNomina.Rows)
|
|
||||||
{
|
|
||||||
string RFC = dRow["RFC"].ToString();
|
|
||||||
string Nombre = dRow["Nombre"].ToString();
|
|
||||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
|
||||||
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (RFC.Trim().Length == 0)
|
|
||||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
|
||||||
|
|
||||||
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
|
||||||
if (!Coincidencia.Success)
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
|
||||||
ErroresValidaciones = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (BancoNumCuenta.Trim().Length != 10)
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
|
||||||
ErroresValidaciones = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (Importe <= 0)
|
|
||||||
{
|
|
||||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
|
||||||
ErroresValidaciones = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ErroresValidaciones = false;
|
|
||||||
|
|
||||||
if (!ErroresValidaciones)
|
|
||||||
{
|
|
||||||
int Count = 1;
|
|
||||||
foreach (DataRow dRow in DTNomina.Rows)
|
|
||||||
{
|
|
||||||
StringBuilder SbLinea = new StringBuilder();
|
|
||||||
|
|
||||||
string RFC = dRow["RFC"].ToString();
|
|
||||||
string Nombre = dRow["Nombre"].ToString();
|
|
||||||
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
|
||||||
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
|
||||||
|
|
||||||
SbLinea.Append(Count.ToString("000000000"));
|
|
||||||
SbLinea.Append(RFC.Trim().PadRight(16));
|
|
||||||
SbLinea.Append("03");
|
|
||||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
|
||||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
|
||||||
|
|
||||||
|
|
||||||
if (Nombre.Trim().Length > 40)
|
|
||||||
Nombre = Nombre.Substring(0, 40);
|
|
||||||
|
|
||||||
SbLinea.Append(Nombre.Trim().PadRight(40));
|
|
||||||
|
|
||||||
SbLinea.Append("012");
|
|
||||||
SbLinea.Append("000");
|
|
||||||
|
|
||||||
sb.AppendLine(SbLinea.ToString());
|
|
||||||
|
|
||||||
|
|
||||||
Count = Count + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Response.Clear();
|
|
||||||
Response.ClearHeaders();
|
|
||||||
Response.AppendHeader("Content-Length", sb.ToString());
|
|
||||||
Response.ContentType = "text/plain";
|
|
||||||
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
|
||||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
|
||||||
Response.Write(sb.ToString());
|
|
||||||
Response.End();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
|
||||||
}
|
|
||||||
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
|
||||||
{
|
|
||||||
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
CrearLayout(objnom.DtResultados);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
protected void LnkAsistenciaIncidencias_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -8204,4 +8106,760 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
this.Alert("El Vacaciones_Empresas Se ha Eliminado");
|
this.Alert("El Vacaciones_Empresas Se ha Eliminado");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
#region Layouts
|
||||||
|
|
||||||
|
protected void LnkLayoutContable_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// RBLModalBancosLayout.SelectedValue = "1";
|
||||||
|
DdlModalBancosLayout.SelectedValueExist("-1");
|
||||||
|
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
|
||||||
|
UpModalBancosLayout.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void RBLModalBancosLayout_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//if (RBLModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
|
//{
|
||||||
|
if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
|
{
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
if (objnom.GetDispersionnomina(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
CrearLayoutNominaBancomer(objnom.DtResultados);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
|
{
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
if (objnom.GetDispersionNominaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
CrearLayoutNominaBanorte(objnom.DtResultados, "1234");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
//else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
|
//{
|
||||||
|
// if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1)
|
||||||
|
// {
|
||||||
|
// //Sin Alta
|
||||||
|
// }
|
||||||
|
// else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2)
|
||||||
|
// {
|
||||||
|
// //Banorte
|
||||||
|
|
||||||
|
// using (ClsNominas objnom = new ClsNominas())
|
||||||
|
// {
|
||||||
|
// if (objnom.GetLayoutAltaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||||
|
// {
|
||||||
|
// CrearLayoutAltaBanorte(objnom.DtResultados, " 04539871", "12345", UsuarioActual.Empresa.Empresa);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CrearLayoutNominaBancomer(DataTable DTNomina)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
StringBuilder SbErrores = new StringBuilder();
|
||||||
|
bool ErroresValidaciones = false;
|
||||||
|
|
||||||
|
|
||||||
|
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||||
|
|
||||||
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
{
|
||||||
|
string RFC = dRow["RFC"].ToString();
|
||||||
|
string Nombre = dRow["Nombre"].ToString();
|
||||||
|
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (RFC.Trim().Length == 0)
|
||||||
|
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>");
|
||||||
|
|
||||||
|
System.Text.RegularExpressions.Match Coincidencia = System.Text.RegularExpressions.Regex.Match(RFC, @"/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/");
|
||||||
|
if (!Coincidencia.Success)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>");
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (BancoNumCuenta.Trim().Length != 10)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>"); // Bancomer 10 caracteres
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Importe <= 0)
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}"); // importe mayot a 0
|
||||||
|
ErroresValidaciones = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ErroresValidaciones = false;
|
||||||
|
|
||||||
|
if (!ErroresValidaciones)
|
||||||
|
{
|
||||||
|
int Count = 1;
|
||||||
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
{
|
||||||
|
StringBuilder SbLinea = new StringBuilder();
|
||||||
|
|
||||||
|
string RFC = dRow["RFC"].ToString();
|
||||||
|
string Nombre = dRow["Nombre"].ToString();
|
||||||
|
string BancoNumCuenta = dRow["BancoNumCuenta"].ToString();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal().RoundSQL(2);
|
||||||
|
|
||||||
|
SbLinea.Append(Count.ToString("000000000"));
|
||||||
|
SbLinea.Append(RFC.Trim().PadRight(16));
|
||||||
|
SbLinea.Append("03");
|
||||||
|
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20));
|
||||||
|
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||||
|
|
||||||
|
|
||||||
|
if (Nombre.Trim().Length > 40)
|
||||||
|
Nombre = Nombre.Substring(0, 40);
|
||||||
|
|
||||||
|
SbLinea.Append(Nombre.Trim().PadRight(40));
|
||||||
|
|
||||||
|
SbLinea.Append("012");
|
||||||
|
SbLinea.Append("000");
|
||||||
|
|
||||||
|
sb.AppendLine(SbLinea.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
Count = Count + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Response.Clear();
|
||||||
|
Response.ClearHeaders();
|
||||||
|
Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
Response.ContentType = "text/plain";
|
||||||
|
//Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina {DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
Response.Write(sb.ToString());
|
||||||
|
this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||||
|
Response.Flush();
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//private void CrearLayoutAltaBanorte(DataTable DTNomina, string Promotor, string NIE, string RazonSocial)
|
||||||
|
//{
|
||||||
|
// StringBuilder sb = new StringBuilder();
|
||||||
|
// StringBuilder SbErrores = new StringBuilder();
|
||||||
|
|
||||||
|
// char Cero = '0';
|
||||||
|
// char Espacio = ' ';
|
||||||
|
|
||||||
|
// bool ErrorProceso = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Promotor = Promotor.Trim();
|
||||||
|
// NIE = NIE.Trim();
|
||||||
|
// RazonSocial = RazonSocial.Trim();
|
||||||
|
|
||||||
|
// //SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (DTNomina.Rows.Count > 0)
|
||||||
|
// {
|
||||||
|
|
||||||
|
// //Tip oRegistro 1 1-1
|
||||||
|
// //Clave servicio 2 2-3
|
||||||
|
// sb.Append($"HNE");
|
||||||
|
|
||||||
|
|
||||||
|
// //Promotor 8 4-11
|
||||||
|
// if (Promotor.Length > 0 && Promotor.Length <= 8)
|
||||||
|
// {
|
||||||
|
// sb.Append(Promotor.PadLeft(8, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"Promotor {Promotor} debe de tener una logitud de entre 1 y 8<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //NIE 5 12-26
|
||||||
|
// if (ErrorProceso == false && NIE.Length > 0 && NIE.Length <= 5)
|
||||||
|
// {
|
||||||
|
// sb.Append(NIE.PadLeft(5, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"NIE {NIE} debe de tener una logitud de entre 1 y 8<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Nombre de Empresa ó Razón Social 40 17-56
|
||||||
|
// if (ErrorProceso == false && RazonSocial.Length > 0 && RazonSocial.Length <= 40)
|
||||||
|
// {
|
||||||
|
// sb.Append(RazonSocial.PadLeft(40, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"RazonSocial {RazonSocial} debe de tener una logitud de entre 1 y 40<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //57-58consecutivo 1
|
||||||
|
// sb.Append("1");
|
||||||
|
|
||||||
|
|
||||||
|
// //Número de registros N 6 59-64
|
||||||
|
// sb.Append(DTNomina.Rows.ToString().PadRight(6, Espacio));
|
||||||
|
|
||||||
|
// //Filler A 283 65-347
|
||||||
|
// sb.Append(DTNomina.Rows.ToString().PadLeft(283, Espacio));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (!ErrorProceso)
|
||||||
|
// {
|
||||||
|
// foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
// {
|
||||||
|
|
||||||
|
|
||||||
|
// string CodigoEmpleado = dRow["Codigo"].ToString().Trim();
|
||||||
|
// string Nombres = dRow["Nombres"].ToString().Trim();
|
||||||
|
// string APaterno = dRow["APaterno"].ToString().Trim();
|
||||||
|
// string Amaterno = dRow["AMaterno"].ToString().Trim();
|
||||||
|
// string CodigoNacionalOperacion = dRow["CodigoNacionalOperacion"].ToString().Trim();
|
||||||
|
// string NombreCorto = dRow["NombreCorto"].ToString().Trim();
|
||||||
|
// string TipoDeVia = dRow["TipoDeVia"].ToString().Trim();
|
||||||
|
// string Direccion = dRow["Direccion"].ToString().Trim();
|
||||||
|
// string NumExt = dRow["NumExt"].ToString().Trim();
|
||||||
|
// string TipoDeVivienda = dRow["TipoDeVivienda"].ToString().Trim();
|
||||||
|
// string Colonia = dRow["Colonia"].ToString().Trim();
|
||||||
|
// string DelegacionMunicipio = dRow["DelegacionMunicipio"].ToString().Trim();
|
||||||
|
// string ClaveEstado = dRow["ClaveEstado"].ToString().Trim();
|
||||||
|
// string CP = dRow["CP"].ToString().Trim();
|
||||||
|
// string Sexo = dRow["Sexo"].ToString().Trim();
|
||||||
|
// DateTime FechaNacimiento = dRow["FechaNacimiento"].ToString().ToDate();
|
||||||
|
// string Nacionalidad = dRow["Nacionalidad"].ToString().Trim();
|
||||||
|
// string EstadoCivil = dRow["EstadoCivil"].ToString().Trim();
|
||||||
|
// string Escolaridad = dRow["Escolaridad"].ToString().Trim();
|
||||||
|
// string TipoEmpleado = dRow["TipoEmpleado"].ToString().Trim();
|
||||||
|
// string RFC = dRow["RFC"].ToString().Trim();
|
||||||
|
// string TipoAlta = dRow["TipoAlta"].ToString().Trim();
|
||||||
|
// string TipoDeTarjeta = dRow["TipoDeTarjeta"].ToString().Trim();
|
||||||
|
// string CodigoDeBanco = dRow["CodigoDeBanco"].ToString().Trim();
|
||||||
|
// string TipoCuenta = dRow["TipoCuenta"].ToString().Trim();
|
||||||
|
// string Cuenta = dRow["Cuenta"].ToString().Trim();
|
||||||
|
// string ImpresionContrato = dRow["ImpresionContrato"].ToString().Trim();
|
||||||
|
|
||||||
|
|
||||||
|
// //Tipo de registro A 1 1-1
|
||||||
|
// sb.AppendLine("D");
|
||||||
|
|
||||||
|
|
||||||
|
// //CodigoEmpleado A 10 2-11
|
||||||
|
// if (ErrorProceso == false && CodigoEmpleado.Length > 0 && CodigoEmpleado.Trim().Length <= 10)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoEmpleado.PadLeft(10, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"Codigo {CodigoEmpleado} debe de tener una logitud de entre 1 y 10<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Nombres A 20 12-31
|
||||||
|
// if (ErrorProceso == false && Nombres.Length > 0 && Nombres.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(Nombres.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nombre {Nombres} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Apellido Paterno A 20 32-51
|
||||||
|
// if (ErrorProceso == false && APaterno.Length > 0 && APaterno.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(APaterno.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Apellido Paterno {APaterno} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Aperllido Materno A 20 52-71
|
||||||
|
// if (ErrorProceso == false && Amaterno.Length > 0 && Amaterno.Trim().Length <= 20)
|
||||||
|
// {
|
||||||
|
// sb.Append(Amaterno.PadRight(20, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Apellido Materno {Amaterno} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Dependencia A 5 72-76
|
||||||
|
// sb.Append(string.Empty.PadRight(5, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //CodigoNacionalOperacion N 2 77-78 Anexo 1
|
||||||
|
// if (ErrorProceso == false && CodigoNacionalOperacion.Length > 0 && CodigoNacionalOperacion.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoNacionalOperacion.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo Nacional de Operación {CodigoNacionalOperacion} debe de tener una logitud de entre 1 y 20<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //NombreCorto A 19 79-97
|
||||||
|
// if (ErrorProceso == false && NombreCorto.Length > 0 && NombreCorto.Trim().Length <= 19)
|
||||||
|
// {
|
||||||
|
// sb.Append(NombreCorto.PadRight(19, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nombre Corto{NombreCorto} debe de tener una logitud de entre 1 y 19<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //TipoDeVia A 2 98-99 Anexo 2
|
||||||
|
// if (ErrorProceso == false && TipoDeVia.Length > 0 && TipoDeVia.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoDeVia.PadRight(2, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo De Via {TipoDeVia} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //Calle A 24 100-123
|
||||||
|
// if (ErrorProceso == false && Direccion.Length > 0 && Direccion.Trim().Length <= 24)
|
||||||
|
// {
|
||||||
|
// sb.Append(Direccion.PadRight(24, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Calle {Direccion} debe de tener una logitud de entre 1 y 24<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //Numero A 7 124-130
|
||||||
|
// if (ErrorProceso == false && NumExt.Length > 0 && NumExt.Trim().Length <= 7)
|
||||||
|
// {
|
||||||
|
// sb.Append(NumExt.PadRight(7, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo De Via {NumExt} debe de tener una logitud de entre 1 y 7<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //TipoDeVivienda N 2 131-132
|
||||||
|
// if (ErrorProceso == false && TipoDeVivienda.Length > 0 && TipoDeVivienda.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoDeVivienda.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo de Vivienda {TipoDeVivienda} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Entrada A 2 133-134
|
||||||
|
// sb.Append(string.Empty.PadRight(2, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Piso A 5 135-136
|
||||||
|
// sb.Append(string.Empty.PadRight(2, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Deparatmento A 4 137-140
|
||||||
|
// sb.Append(string.Empty.PadRight(4, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Colonia A 40 141-180
|
||||||
|
// if (ErrorProceso == false && Colonia.Length > 0 && Colonia.Trim().Length <= 40)
|
||||||
|
// {
|
||||||
|
// sb.Append(Colonia.PadRight(40, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Colonia Municipio {Colonia} debe de tener una logitud de entre 1 y 40<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //DelegacionMunicipio N 3 181-183
|
||||||
|
// if (ErrorProceso == false && DelegacionMunicipio.Length > 0 && DelegacionMunicipio.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(DelegacionMunicipio.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Delegacion Municipio {DelegacionMunicipio} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //ClaveEstado N 2 184-185
|
||||||
|
// if (ErrorProceso == false && ClaveEstado.Length > 0 && ClaveEstado.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(ClaveEstado.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Clave Estado {ClaveEstado} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Codigo Postal N 5 186-190
|
||||||
|
// if (ErrorProceso == false && CP.Length > 0 && CP.Trim().Length <= 5)
|
||||||
|
// {
|
||||||
|
// sb.Append(CP.PadLeft(5, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo Postal {CP} debe de tener una logitud de entre 1 y 5<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Telefono A 12 191-202
|
||||||
|
// sb.Append(string.Empty.PadRight(12, Espacio)); // No requerido
|
||||||
|
|
||||||
|
// //Sexo A 1 203-203
|
||||||
|
// sb.Append(Sexo); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Fecha Nacimiento A N 204-211
|
||||||
|
// sb.Append(FechaNacimiento.ToString("yyyyMMdd"));
|
||||||
|
|
||||||
|
// //Nacionalidad N 3 212-214 Anexo 6
|
||||||
|
// if (ErrorProceso == false && Nacionalidad.Length > 0 && Nacionalidad.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(Nacionalidad.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Nacionalidad {Nacionalidad} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Estado Civil N 3 215-215 Anexo 7
|
||||||
|
// if (ErrorProceso == false && EstadoCivil.Length > 0 && EstadoCivil.Trim().Length <= 1)
|
||||||
|
// {
|
||||||
|
// sb.Append(EstadoCivil);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Estado Civil {EstadoCivil} debe de tener una logitud de 1<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Regimen Matrimonial A 1 216-216
|
||||||
|
// sb.Append(string.Empty.PadRight(1, Espacio)); // No requerido Anexo 8
|
||||||
|
|
||||||
|
|
||||||
|
// //Escolaridad N 3 217-219 Anexo 9
|
||||||
|
// if (ErrorProceso == false && Escolaridad.Length > 0 && Escolaridad.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(Escolaridad.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Escolaridad {Escolaridad} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Titulo Profecional N 5 220-223
|
||||||
|
// sb.Append(string.Empty.PadLeft(3, Cero)); // No requerido Anexo 10
|
||||||
|
|
||||||
|
|
||||||
|
// //RFC N 13 225-237
|
||||||
|
// if (ErrorProceso == false && RFC.Length > 0 && RFC.Trim().Length <= 13)
|
||||||
|
// {
|
||||||
|
// sb.Append(RFC.PadRight(13, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} RFC {RFC} debe de tener una logitud de entre 1 y 13<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Curp A 18 238-255
|
||||||
|
// sb.Append(string.Empty.PadLeft(18, Espacio)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Tipo de Alta N 2 256-257
|
||||||
|
// if (ErrorProceso == false && TipoAlta.Length > 0 && TipoAlta.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoAlta.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo de Alta {TipoAlta} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //TipoDeTarjeta N 1 258-258
|
||||||
|
// sb.Append(TipoDeTarjeta);
|
||||||
|
|
||||||
|
|
||||||
|
// //Número de Tarjeta de Débito N 16 259-274
|
||||||
|
// sb.Append(string.Empty.PadLeft(16, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Clave del Producto de la Cuenta N 4 275-278
|
||||||
|
// sb.Append(string.Empty.PadLeft(4, Cero)); // No requerido
|
||||||
|
|
||||||
|
|
||||||
|
// //Código de Banco de la Cuenta N 3 279-281
|
||||||
|
// if (ErrorProceso == false && CodigoDeBanco.Length > 0 && CodigoDeBanco.Trim().Length <= 3)
|
||||||
|
// {
|
||||||
|
// sb.Append(CodigoDeBanco.PadLeft(3, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Codigo De Banco {CodigoDeBanco} debe de tener una logitud de entre 1 y 3<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //Tipo Cuenta N 2 282-283
|
||||||
|
// if (ErrorProceso == false && TipoCuenta.Length > 0 && TipoCuenta.Trim().Length <= 2)
|
||||||
|
// {
|
||||||
|
// sb.Append(TipoCuenta.PadLeft(2, Cero));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Tipo Cuenta {TipoCuenta} debe de tener una logitud de entre 1 y 2<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// //Numero cuenta 18 284-301
|
||||||
|
// if (ErrorProceso == false && Cuenta.Length > 0 && Cuenta.Trim().Length <= 18)
|
||||||
|
// {
|
||||||
|
// sb.Append(Cuenta.PadRight(18, Espacio));
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// SbErrores.AppendLine($"{CodigoEmpleado} Numero cuenta {Cuenta} debe de tener una logitud de entre 1 y 18<br/>");
|
||||||
|
// ErrorProceso = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// //CR Chequera N 4 302-305
|
||||||
|
// sb.Append(string.Empty.PadLeft(4, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Impresion Contrato A 1 306-306
|
||||||
|
// sb.Append("S");
|
||||||
|
|
||||||
|
// //Sueldo N 15 307-321
|
||||||
|
// sb.Append(string.Empty.PadLeft(15, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Numero targeta N 16 307-321
|
||||||
|
// sb.Append(string.Empty.PadLeft(16, Cero)); // No requerido
|
||||||
|
|
||||||
|
// //Filler A 10 338-347
|
||||||
|
// sb.Append(string.Empty.PadLeft(10, Cero)); // Relleno
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if (!ErrorProceso)
|
||||||
|
// {
|
||||||
|
// Response.Clear();
|
||||||
|
// Response.ClearHeaders();
|
||||||
|
// Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
// Response.ContentType = "text/plain";
|
||||||
|
// //Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina{DateTime.Now.ToString("yyyyMMddhhmmss").ToString()}.txt\"");
|
||||||
|
// Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Alta_Banorte_{DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
// Response.Write(sb.ToString());
|
||||||
|
// this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||||
|
// Response.Flush();
|
||||||
|
// Response.End();
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// this.Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// #endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
StringBuilder SbErrores = new StringBuilder();
|
||||||
|
|
||||||
|
char Cero = '0';
|
||||||
|
char Espacio = ' ';
|
||||||
|
|
||||||
|
bool ErrorProceso = false;
|
||||||
|
|
||||||
|
if (DTNomina.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
//Tipo Registro A 1 1-1
|
||||||
|
sb.Append("H");
|
||||||
|
//Cleve de Servicio A 2 2-3
|
||||||
|
sb.Append("NE");
|
||||||
|
//Emisora N 5 4-8
|
||||||
|
sb.Append(Emisora.PadLeft(5, Cero));
|
||||||
|
//FechaProceso N 8 9-16
|
||||||
|
sb.Append(DateTime.Now.ToString("yyyyMMdd"));
|
||||||
|
//Conmsecutivo N 2 17-18
|
||||||
|
sb.Append("01");
|
||||||
|
//Numero Total de Registros N 6 19-24
|
||||||
|
sb.Append(DTNomina.Rows.Count.ToString().PadLeft(6, Cero));
|
||||||
|
|
||||||
|
//Importe Total de Registros N 15 25-39
|
||||||
|
sb.Append(DTNomina.SUMD("Importe").ToString("0000000000000.00").Replace(".", ""));
|
||||||
|
|
||||||
|
//Numero Total altas N 6 40-45
|
||||||
|
sb.Append("000000");
|
||||||
|
//Importe Total altas N 15 46-60
|
||||||
|
sb.Append("000000000000000");
|
||||||
|
//Numero Total Bajas N 6 61-66
|
||||||
|
sb.Append("000000");
|
||||||
|
//Importe Total Bajas N 15 67-81
|
||||||
|
sb.Append("000000000000000");
|
||||||
|
//Numero Total de cuentas a verificar N 6 82-87
|
||||||
|
sb.Append("000000");
|
||||||
|
//Accion N 1 88-88
|
||||||
|
sb.Append("0");
|
||||||
|
//filler 77 89-165
|
||||||
|
sb.Append(string.Empty.PadLeft(77, Espacio));
|
||||||
|
|
||||||
|
if (!ErrorProceso)
|
||||||
|
{
|
||||||
|
foreach (DataRow dRow in DTNomina.Rows)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Codigo ReferenciaDelServicio ReferenciaLeyendaDelOrdenante Importe NumeroBancoReceptor TipoCuenta NumeroCuenta TipoMovimiento Accion ImporteIvaOperacion
|
||||||
|
string Codigo = dRow["Codigo"].ToString().Trim();
|
||||||
|
string ReferenciaDelServicio = dRow["ReferenciaDelServicio"].ToString().Trim();
|
||||||
|
string ReferenciaLeyendaDelOrdenante = dRow["ReferenciaLeyendaDelOrdenante"].ToString().Trim();
|
||||||
|
decimal Importe = dRow["Importe"].ToString().ToDecimal();
|
||||||
|
string NumeroBancoReceptor = dRow["NumeroBancoReceptor"].ToString().Trim();
|
||||||
|
string TipoCuenta = dRow["TipoCuenta"].ToString().Trim();
|
||||||
|
string NumeroCuenta = dRow["NumeroCuenta"].ToString().Trim();
|
||||||
|
string TipoMovimiento = dRow["TipoMovimiento"].ToString().Trim();
|
||||||
|
string Accion = dRow["Accion"].ToString().Trim();
|
||||||
|
string ImporteIvaOperacion = dRow["ImporteIvaOperacion"].ToString().Trim();
|
||||||
|
|
||||||
|
|
||||||
|
//Tipo de registro A 1 1-1
|
||||||
|
sb.AppendLine("D");
|
||||||
|
//Fecha Aplicacion N 8 2-9
|
||||||
|
sb.Append(DateTime.Now.ToString("yyyyMMdd"));
|
||||||
|
|
||||||
|
//CodigoEmpleado A 10 10-19
|
||||||
|
if (ErrorProceso == false && Codigo.Length > 0 && Codigo.Trim().Length <= 10)
|
||||||
|
{
|
||||||
|
sb.Append(Codigo.PadLeft(10, Cero));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SbErrores.AppendLine($"{Codigo} Codigo {Codigo} debe de tener una logitud de entre 1 y 10<br/>");
|
||||||
|
ErrorProceso = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//ReferenciaDelServicio A 40 20-29
|
||||||
|
sb.Append(ReferenciaDelServicio.PadLeft(40, Espacio));
|
||||||
|
//ReferenciaLeyendaDelOrdenante A 40 60-99
|
||||||
|
sb.Append(ReferenciaLeyendaDelOrdenante.PadLeft(40, Espacio));
|
||||||
|
//Importe N 15 100-114
|
||||||
|
sb.Append(Importe.ToString("0000000000000.00").Replace(".", ""));
|
||||||
|
//NumeroBancoReceptor N 3 115-117
|
||||||
|
sb.Append(NumeroBancoReceptor.PadLeft(3, Cero));
|
||||||
|
//TipoCuenta N 2 118-119
|
||||||
|
sb.Append(TipoCuenta.PadLeft(2, Cero));
|
||||||
|
//NumeroCuenta N 18 120-137
|
||||||
|
sb.Append(NumeroCuenta.PadLeft(18, Cero));
|
||||||
|
//Tipo movimiento N 1 138-138
|
||||||
|
sb.Append(TipoCuenta.PadLeft(1, Cero));
|
||||||
|
//Accion N 1 139-139
|
||||||
|
sb.Append(Accion.PadLeft(1, Espacio));
|
||||||
|
//ImporteIvaOperacion 140-147
|
||||||
|
sb.Append(ImporteIvaOperacion.PadLeft(8, Cero));
|
||||||
|
//filler 18 148-165
|
||||||
|
sb.Append(string.Empty.PadLeft(77, Espacio));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!ErrorProceso)
|
||||||
|
{
|
||||||
|
Response.Clear();
|
||||||
|
Response.ClearHeaders();
|
||||||
|
Response.AppendHeader("Content-Length", sb.ToString());
|
||||||
|
Response.ContentType = "text/plain";
|
||||||
|
Response.AppendHeader("Content-Disposition", $"attachment;filename=\"Nomina_Banorte_{DdlPeriodo.SelectedItem.Text }.txt\"");
|
||||||
|
Response.Write(sb.ToString());
|
||||||
|
this.RegistraScript("$('#ModalLayoutBancos').modal('hide');");
|
||||||
|
Response.Flush();
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Alert($"Errores {SbErrores.ToString()}", TipoMensaje.ToastAdventencia);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
456
OC/OC.aspx.vb
456
OC/OC.aspx.vb
File diff suppressed because it is too large
Load Diff
@@ -294,158 +294,158 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script>
|
<script>
|
||||||
function Ir() {
|
function Ir() {
|
||||||
try {
|
try {
|
||||||
parent.CargaDatosCotizaciones();
|
parent.CargaDatosCotizaciones();
|
||||||
parent.tb_remove();
|
parent.tb_remove();
|
||||||
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.log(ex.message);
|
console.log(ex.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientValidateFechaEntrega(source, arguments) {
|
function ClientValidateFechaEntrega(source, arguments) {
|
||||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||||
|
|
||||||
if (txtCantidadSurtir.value == 0) {
|
if (txtCantidadSurtir.value == 0) {
|
||||||
arguments.IsValid = false;
|
arguments.IsValid = false;
|
||||||
} else {
|
} else {
|
||||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||||
{ arguments.IsValid = false; }
|
{ arguments.IsValid = false; }
|
||||||
else
|
else
|
||||||
{ arguments.IsValid = true; }
|
{ arguments.IsValid = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ClientValidatePU(source, arguments) {
|
function ClientValidatePU(source, arguments) {
|
||||||
|
|
||||||
arguments.IsValid = true
|
arguments.IsValid = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNumeric(n) {
|
function isNumeric(n) {
|
||||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CalculaImporte(Cant, tPU, Imp) {
|
function CalculaImporte(Cant, tPU, Imp) {
|
||||||
var Cantidad = ToDouble(Cant.value);
|
var Cantidad = ToDouble(Cant.value);
|
||||||
var PU = ToDouble(tPU.value);
|
var PU = ToDouble(tPU.value);
|
||||||
var Importe = Cantidad * PU;
|
var Importe = Cantidad * PU;
|
||||||
|
|
||||||
Imp.value = ToDouble(Importe);
|
Imp.value = ToDouble(Importe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function validacionRow(objControl, tipo) {
|
function validacionRow(objControl, tipo) {
|
||||||
|
|
||||||
var eRow;
|
var eRow;
|
||||||
|
|
||||||
if (tipo == 1) {
|
if (tipo == 1) {
|
||||||
eRow = $(objControl).parent().parent();
|
eRow = $(objControl).parent().parent();
|
||||||
} else if (tipo == 2) {
|
} else if (tipo == 2) {
|
||||||
eRow = $(objControl).parent().parent().parent();
|
eRow = $(objControl).parent().parent().parent();
|
||||||
}
|
}
|
||||||
|
|
||||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||||
var activarValidadores = false;
|
var activarValidadores = false;
|
||||||
var ControlConValor = "";
|
var ControlConValor = "";
|
||||||
|
|
||||||
var controleslen = arregloControles.length;
|
var controleslen = arregloControles.length;
|
||||||
var validadoreslen = arregloValidadores.length;
|
var validadoreslen = arregloValidadores.length;
|
||||||
|
|
||||||
for (var i = 0; i < controleslen; i++) {
|
for (var i = 0; i < controleslen; i++) {
|
||||||
|
|
||||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||||
|
|
||||||
controlName = controlName.replace("'", "")
|
controlName = controlName.replace("'", "")
|
||||||
|
|
||||||
if ($(controlName).val().length > 0) {
|
if ($(controlName).val().length > 0) {
|
||||||
|
|
||||||
activarValidadores = true;
|
activarValidadores = true;
|
||||||
$(controlName).IsValid = false;
|
$(controlName).IsValid = false;
|
||||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$(controlName).IsValid = true;
|
$(controlName).IsValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activarValidadores) {
|
if (activarValidadores) {
|
||||||
|
|
||||||
for (var v = 0; v < validadoreslen; v++) {
|
for (var v = 0; v < validadoreslen; v++) {
|
||||||
|
|
||||||
var ValidatorName = arregloValidadores[v];
|
var ValidatorName = arregloValidadores[v];
|
||||||
var procesoCorrecto = true;
|
var procesoCorrecto = true;
|
||||||
|
|
||||||
ValidatorName = ValidatorName.replace("'", "");
|
ValidatorName = ValidatorName.replace("'", "");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
document.getElementById(ValidatorName).disabled = false;
|
document.getElementById(ValidatorName).disabled = false;
|
||||||
ValidatorEnable($get(ValidatorName), true);
|
ValidatorEnable($get(ValidatorName), true);
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
||||||
console.log(ValidatorName + " - " + err.message);
|
console.log(ValidatorName + " - " + err.message);
|
||||||
procesoCorrecto = false;
|
procesoCorrecto = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procesoCorrecto) {
|
if (procesoCorrecto) {
|
||||||
console.log('validadores activados');
|
console.log('validadores activados');
|
||||||
} else {
|
} else {
|
||||||
console.log('Error al activar validadores');
|
console.log('Error al activar validadores');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for (var v = 0; v < validadoreslen; v++) {
|
for (var v = 0; v < validadoreslen; v++) {
|
||||||
|
|
||||||
var ValidatorName = arregloValidadores[v];
|
var ValidatorName = arregloValidadores[v];
|
||||||
var procesoCorrecto = true;
|
var procesoCorrecto = true;
|
||||||
|
|
||||||
ValidatorName = ValidatorName.replace("'", "");
|
ValidatorName = ValidatorName.replace("'", "");
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
document.getElementById(ValidatorName).disabled = true;
|
document.getElementById(ValidatorName).disabled = true;
|
||||||
ValidatorEnable($get(ValidatorName), false);
|
ValidatorEnable($get(ValidatorName), false);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(ValidatorName + " - " + err.message);
|
console.log(ValidatorName + " - " + err.message);
|
||||||
procesoCorrecto = false;
|
procesoCorrecto = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procesoCorrecto) {
|
if (procesoCorrecto) {
|
||||||
console.log('Validadores desactivados');
|
console.log('Validadores desactivados');
|
||||||
} else {
|
} else {
|
||||||
console.log('Error al desactivar validadores');
|
console.log('Error al desactivar validadores');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function FechaActualddMMyyy() {
|
function FechaActualddMMyyy() {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var dd = today.getDate();
|
var dd = today.getDate();
|
||||||
var mm = today.getMonth() + 1;
|
var mm = today.getMonth() + 1;
|
||||||
var yyyy = today.getFullYear();
|
var yyyy = today.getFullYear();
|
||||||
if (dd < 10) {
|
if (dd < 10) {
|
||||||
dd = '0' + dd;
|
dd = '0' + dd;
|
||||||
}
|
}
|
||||||
if (mm < 10) {
|
if (mm < 10) {
|
||||||
mm = '0' + mm;
|
mm = '0' + mm;
|
||||||
}
|
}
|
||||||
return today = dd + '/' + mm + '/' + yyyy;
|
return today = dd + '/' + mm + '/' + yyyy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -208,8 +208,8 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dr As GridViewRow In GvDC.Rows
|
For Each dr As GridViewRow In GvDC.Rows
|
||||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
|
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal,
|
||||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
|
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal,
|
||||||
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
||||||
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||||
If TieneError = True Then Exit For
|
If TieneError = True Then Exit For
|
||||||
@@ -230,12 +230,12 @@ Partial Class PopOCCotizacionesDetalle
|
|||||||
|
|
||||||
For Each dr As GridViewRow In GvDC.Rows
|
For Each dr As GridViewRow In GvDC.Rows
|
||||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
||||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||||
Else
|
Else
|
||||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||||
|
|
||||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
||||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1215,7 +1215,9 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) {
|
|||||||
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'),
|
||||||
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa'),
|
||||||
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
cvemarca: (!(DdlWS.data('cvemarca')) || DdlWS.data('cvemarca') == '') ? -1 : DdlWS.data('cvemarca'),
|
||||||
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor')
|
esdistribuidor: (!(DdlWS.data('esdistribuidor')) || DdlWS.data('esdistribuidor') == '') ? -1 : DdlWS.data('esdistribuidor'),
|
||||||
|
cveclienteclasificacion: (!(DdlWS.data('cveclienteclasificacion')) || DdlWS.data('cveclienteclasificacion') == '') ? -1 : DdlWS.data('cveclienteclasificacion')
|
||||||
|
|
||||||
|
|
||||||
//Metodo: metodo
|
//Metodo: metodo
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||||
<div style="margin-right: 15px">
|
<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;" />
|
<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>
|
<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>
|
||||||
@@ -49,12 +49,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet-body rowpadding">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
<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,RFCReceptor"
|
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCReceptor"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton runat="server" OnClick="BtnValidar_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>
|
<asp:LinkButton runat="server" OnClick="BtnValidar_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>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||||
<div style="margin-right: 15px">
|
<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;" />
|
<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>
|
<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>
|
||||||
@@ -96,14 +96,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet-body rowpadding">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvRefacturaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
<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,FolioFiscalSustitucion,CveEstatusFactura,RFCReceptor"
|
DataKeyNames="CveVenta,CveCliente,SerieFolio,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,CveEstatusFactura,RFCReceptor,CveEstatusRefacturacion,CveVentaSustitucion,TotalSustitucion,RFCReceptorSustitucion,CveClienteSustitucion,FolioFiscalSustitucion,SerieFolioSustitucion"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
|
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="160px" />
|
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="160px" />
|
||||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
||||||
<asp:HyperLinkField HeaderText="Folio Sustitución" DataTextField="SerieFolioSustitucion" DataNavigateUrlFields="CveVentaSustitucion" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
<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:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||||
<ItemTemplate>
|
<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>
|
<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>
|
||||||
@@ -123,10 +123,19 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Cancelar">
|
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Cancelar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<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>
|
<div class="row" style="padding-bottom:3px;">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-check'> Factura Pendiente</i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:LinkButton ID="LnkCancelarFolioSustitucion" Visible="false" runat="server" OnClick="LnkCancelarFolioSustitucion_Click" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-check'> Folio Sustitucion</i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField HeaderText="Refacturar" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
<asp:HyperLinkField HeaderText="Refacturar" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
|
|||||||
@@ -68,9 +68,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
ObjVentas.Dispose();
|
ObjVentas.Dispose();
|
||||||
GvDatos.DataSource = DtVentas.FiltraParametros("(CveEstatusFactura = 20 AND CveEstatusRefacturacion = 0)");
|
GvDatos.DataSource = DtVentas.FiltraParametros("(CveEstatusFactura = 20 AND CveEstatusRefacturacion IN (0,4))");
|
||||||
|
|
||||||
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3) OR (CveEstatusFactura = 20 AND CveEstatusRefacturacion > 0) OR CveEstatusFactura = 23");
|
var DtRefacturar = DtVentas.FiltraParametros("CveEstatusRefacturacion IN (1,3) OR (CveEstatusFactura = 20 AND CveEstatusRefacturacion IN (1,2,3)) OR CveEstatusFactura = 23");
|
||||||
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
if (DtRefacturar != null && DtRefacturar.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DivRefacturar.Visible = true;
|
DivRefacturar.Visible = true;
|
||||||
@@ -177,9 +177,25 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
string Nombre = GvRow.DataKey("Nombre");
|
string Nombre = GvRow.DataKey("Nombre");
|
||||||
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||||
|
|
||||||
|
int CveMotivoCancelacion = -1;
|
||||||
|
int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero();
|
||||||
|
|
||||||
|
//SI NO SE PUDO CANCELAR, CANCELAR CON EL 02
|
||||||
|
if (CveEstatusRefacturacion == 4)
|
||||||
|
{
|
||||||
|
FolioSustitucion = "";
|
||||||
|
//CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
||||||
|
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CveEstatusRefacturacion = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CveVenta > 0 && Uuid != "")
|
if (CveVenta > 0 && Uuid != "")
|
||||||
{
|
{
|
||||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: 2);
|
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion);
|
||||||
|
|
||||||
if (!respCancelacion.HuboError)
|
if (!respCancelacion.HuboError)
|
||||||
{
|
{
|
||||||
@@ -463,7 +479,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
retorno.Mensaje = sb.ToString();
|
retorno.Mensaje = sb.ToString();
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = 0)
|
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = 0, int CveMotivoCancelacion = 0)
|
||||||
{
|
{
|
||||||
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
||||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
||||||
@@ -480,12 +496,22 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
factura.CveEstatusRefacturacion = CveEstatusRefacturacion;
|
factura.CveEstatusRefacturacion = CveEstatusRefacturacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CveMotivoCancelacion > 0)
|
||||||
|
{
|
||||||
|
factura.CveMotivoCancelacion = CveMotivoCancelacion;
|
||||||
|
}
|
||||||
|
|
||||||
int CveEstatusFactura = -1;
|
int CveEstatusFactura = -1;
|
||||||
//SI LA FACTURA YA ESTA CANCELADA, LA ASIGNA YA COMO CANCELADA
|
//SI LA FACTURA YA ESTA CANCELADA, LA ASIGNA YA COMO CANCELADA
|
||||||
if (CveEstatus == 5)
|
if (CveEstatus == 5)
|
||||||
{
|
{
|
||||||
CveEstatusFactura = CveEstatus;
|
CveEstatusFactura = CveEstatus;
|
||||||
}
|
}
|
||||||
|
//NO DEBE DE ASIGNAR ESTATUS
|
||||||
|
if (CveEstatus == -2)
|
||||||
|
{
|
||||||
|
CveEstatusFactura = -1;
|
||||||
|
}
|
||||||
|
|
||||||
retorno = factura.CancelarPorRefacturacion(factura.CveMotivoCancelacion, factura.MotivoCancelacion, FolioSustitucion: FolioSustitucion, CveEstatusFacturaAsignado: CveEstatusFactura);
|
retorno = factura.CancelarPorRefacturacion(factura.CveMotivoCancelacion, factura.MotivoCancelacion, FolioSustitucion: FolioSustitucion, CveEstatusFacturaAsignado: CveEstatusFactura);
|
||||||
}
|
}
|
||||||
@@ -561,6 +587,11 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 0 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23 && e.Row.DBCampo("CveVentaSustitucion").ToEntero() > 0)
|
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("LnkCancelar").Visible = true;
|
||||||
|
//SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA
|
||||||
|
if (e.Row.DBCampo("CveEstatusRefacturacion").ToString().ToEntero() != 4 && e.Row.DBCampo("CveEstatusFacturaSustitucion").ToString().ToEntero() == 3)
|
||||||
|
{
|
||||||
|
e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -708,40 +739,127 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void LnkCancelarFolioSustitucion_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//this.HdnLigaRefacturar.Value = "";
|
||||||
|
this.CveVenta = -1;
|
||||||
|
|
||||||
//protected void BtnAcuse_Click(object sender, EventArgs e)
|
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
//{
|
this.CveVenta = GvRow.DataKey("CveVentaSustitucion").ToEntero();
|
||||||
// GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
|
||||||
// string UsuarioServicio = "rene.molina@adsistemas.mx";
|
|
||||||
// string ClaveServicio = "rene2018";
|
|
||||||
// string UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL";
|
|
||||||
|
|
||||||
// this.CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
int CveCliente = GvRow.DataKey("CveClienteSustitucion").ToEntero();
|
||||||
|
string Total = GvRow.DataKey("TotalSustitucion");
|
||||||
|
string RFCReceptor = GvRow.DataKey("RFCReceptorSustitucion");
|
||||||
|
string TipoDocto = GvRow.DataKey("TipoDocto");
|
||||||
|
string Nombre = GvRow.DataKey("Nombre");
|
||||||
|
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||||
|
string SerieFolioSustitucion = GvRow.DataKey("SerieFolioSustitucion");
|
||||||
|
|
||||||
// string Uuid = GvRow.DataKey("FolioFiscal");
|
int CveVentaOriginal = GvRow.DataKey("CveVenta").ToEntero();
|
||||||
// decimal Total = GvRow.DataKey("Total").ToDecimal();
|
string SerieFolioOriginal = GvRow.DataKey("SerieFolio");
|
||||||
// string RFCCliente = GvRow.DataKey("RFCCliente");
|
|
||||||
// string FolioFiscalSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
|
||||||
// Cancelacion2022.AcuseSat resp = new Cancelacion2022.AcuseSat();
|
|
||||||
// GoFac.GoCfdi a = new GoFac.GoCfdi();
|
|
||||||
// a.ObtenerAcuse(UrlServicio, UsuarioActual.Empresa.RFC, UsuarioServicio, ClaveServicio, Uuid);
|
|
||||||
|
|
||||||
// if (a.CodigoError != 0)
|
//CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
||||||
// {
|
int CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
// //no se pudo obtener, la mandamos cancelar
|
|
||||||
// Timbrado ObjCancelacion = new Timbrado();
|
|
||||||
|
|
||||||
// if (ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Uuid, Total, RFCCliente, UsuarioActual.Empresa.RFC, 4, ValidaFactura:false, CveSATMotivoCancelacion: 1, FolioSustitucion: FolioFiscalSustitucion ))
|
if (CveVenta > 0 && FolioSustitucion != "")
|
||||||
// {
|
{
|
||||||
// string b = ObjCancelacion.CancelacionAcuse;
|
var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||||
// //falta actualizar
|
|
||||||
// Alert("Se regeneró la solicitud de cancelación");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
if (!respCancelacion.HuboError)
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
var EnviarAcuse = false;
|
||||||
|
if (respCancelacion.CveEstatus > 0)
|
||||||
|
{
|
||||||
|
if (respCancelacion.CveEstatus.Contiene(5, 20))
|
||||||
|
{
|
||||||
|
EnviarAcuse = true;
|
||||||
|
}
|
||||||
|
|
||||||
// }
|
var CveEstatus = respCancelacion.CveEstatus;
|
||||||
|
var ObjVentas = new ClsVentas();
|
||||||
|
if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
if (respCancelacion.CveEstatus == 20)
|
||||||
|
{
|
||||||
|
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a 'Cancelación en proceso'.");
|
||||||
|
sb.Append("El documento se canceló correctamente.");
|
||||||
|
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
|
}
|
||||||
|
else if (respCancelacion.CveEstatus == 23)
|
||||||
|
{
|
||||||
|
sb.Append("La solicitud de cancelación no la aplicó el SAT, intente cancelar de nuevo.");
|
||||||
|
}
|
||||||
|
else if (respCancelacion.CveEstatus == 5)
|
||||||
|
{
|
||||||
|
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a 'Cancelada'.");
|
||||||
|
sb.Append("El documento se canceló correctamente.");
|
||||||
|
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
|
}
|
||||||
|
|
||||||
//}
|
if (respCancelacion.CveEstatus.Contiene(5,20))
|
||||||
|
{
|
||||||
|
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion:4, CveMotivoCancelacion: CveMotivoCancelacion))
|
||||||
|
{
|
||||||
|
sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sb.Append("Ocurrió un error al cambiar el estatus de la factura.");
|
||||||
|
}
|
||||||
|
ObjVentas.Dispose();
|
||||||
|
|
||||||
|
if (respCancelacion.CveEstatus == 23)
|
||||||
|
{
|
||||||
|
var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||||
|
if (resp != null)
|
||||||
|
{
|
||||||
|
sb.AppendFormat("<br/> Folio Fiscal: {0} <br/>", FolioSustitucion);
|
||||||
|
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||||
|
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||||
|
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||||
|
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||||
|
if (resp != null)
|
||||||
|
{
|
||||||
|
sb.AppendFormat("Folio Fiscal: {0} <br/>", FolioSustitucion);
|
||||||
|
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||||
|
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||||
|
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||||
|
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append(respCancelacion.Mensaje);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EnviarAcuse)
|
||||||
|
{
|
||||||
|
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||||
|
Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert(sb.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert(respCancelacion.Mensaje, TipoMensaje.MsgError);
|
||||||
|
}
|
||||||
|
|
||||||
|
CargaDatos();
|
||||||
|
}
|
||||||
|
UPDatos.Update();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class MRespuestaSAT
|
public class MRespuestaSAT
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3853,7 +3853,7 @@
|
|||||||
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
|
<asp:Button ID="BtnGeneraAutorizacion" runat="server" Text="Generar Autorización" OnClick="BtnGeneraAutorizacion_Click" Visible="false" ValidationGroup="GrpEmitirImprimir" CssClass="btn myventasbutton btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea generar la autorización?" data-btn-ok-label="si" />
|
||||||
|
|
||||||
<%--<asp:Button ID="Button2" runat="server" Text="Button" />--%>
|
<%--<asp:Button ID="Button2" runat="server" Text="Button" />--%>
|
||||||
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<asp:Button ID="BtnGenerarPoliza" runat="server" Text="GenerarPoliza" OnClick="BtnGenerarPoliza_Click" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<asp:Button ID="BtnGenerarOS" runat="server" Text="Generar OS" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
|
||||||
<asp:Button ID="BtnEditarCotizacion" runat="server" Text="Actualizar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
<asp:Button ID="BtnEditarCotizacion" runat="server" Text="Actualizar" Visible="false" CssClass="btn myventasbutton btn-primary" />
|
||||||
|
|||||||
@@ -1266,6 +1266,14 @@ Partial Class Ventas
|
|||||||
ViewState("CveEstatusRefacturacion") = value
|
ViewState("CveEstatusRefacturacion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property RefacturarCancelada As Boolean
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("RefacturarCancelada")), False, CBool(ViewState("RefacturarCancelada")))
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("RefacturarCancelada") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property CveEstadoCancelacion As Integer
|
Private Property CveEstadoCancelacion As Integer
|
||||||
Get
|
Get
|
||||||
@@ -4393,10 +4401,13 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
If Not CveEstatus.Contiene(4, 5, 12, 13, 20, 23) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
If (Not CveEstatus.Contiene(4, 5, 12, 13, 20, 23) OrElse (CveEstatus = 5 AndAlso DbRowVenta("CveEstatusRefacturacion").ToString().ToEntero() = 4)) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Ant") AndAlso UsuarioActual.TienePermisoProceso(159) Then
|
||||||
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||||
If TienePermiso <> "" Then
|
If TienePermiso <> "" Then
|
||||||
LkRefacturacion.Visible = True
|
LkRefacturacion.Visible = True
|
||||||
|
If (CveEstatus = 5 AndAlso DbRowVenta("CveEstatusRefacturacion").ToString().ToEntero() = 4) Then
|
||||||
|
RefacturarCancelada = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9106,6 +9117,15 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'MARCAR LA FACTURA ANTERIOR
|
||||||
|
If (Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1) Then
|
||||||
|
If Me.ObjFacturaNC IsNot Nothing Then
|
||||||
|
If Me.ObjFacturaNC.CveEstatusRefacturacion = 4 AndAlso Not ObjVentas.UpdateEstatusVenta(ObjFacturaNC.CveVenta, ObjFacturaNC.CveEstatusFactura, UsuarioActual.CveEmpresa, CveEstatusRefacturacion:=5) Then
|
||||||
|
ErrorList.Add("No se actualizó el estatus de la factura anterior.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
||||||
ObjVentas.Commit()
|
ObjVentas.Commit()
|
||||||
|
|
||||||
@@ -9124,6 +9144,10 @@ Partial Class Ventas
|
|||||||
AutoConta = False
|
AutoConta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
AutoConta = True
|
||||||
|
End If
|
||||||
|
|
||||||
If AutoConta Then
|
If AutoConta Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
If idCuentaContabilizacion > 0 Then
|
||||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||||
@@ -9134,13 +9158,14 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas), TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
|
|
||||||
|
|
||||||
'RMF, cuando es pedido, se manda autorización.
|
'RMF, cuando es pedido, se manda autorización.
|
||||||
If ObjFactura.TipoDocto.Contiene("PA") Then
|
If ObjFactura.TipoDocto.Contiene("PA") Then
|
||||||
|
|
||||||
@@ -9156,9 +9181,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||||
|
|
||||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||||
@@ -9167,7 +9189,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
GVAnticipos.DataBind()
|
GVAnticipos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
Dim DirectoriArchivoXML As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto) ' System.IO.Path.Combine()
|
||||||
If Not Directory.Exists(DirectoriArchivoXML) Then
|
If Not Directory.Exists(DirectoriArchivoXML) Then
|
||||||
@@ -9268,7 +9289,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'CANCELAR FACTURA ANTERIOR
|
'CANCELAR FACTURA ANTERIOR
|
||||||
If SeTimbro AndAlso (Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1) Then
|
If SeTimbro AndAlso (Me.CveDevolucion > 0 AndAlso Me.NuevaFactura = 1) Then
|
||||||
If Me.ObjFacturaNC IsNot Nothing Then
|
If Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.CveEstatusFactura <> 5 Then
|
||||||
Me.ObjFacturaNC.CveEstatusRefacturacion = 2 'MARCAR COMO REFACTURADA
|
Me.ObjFacturaNC.CveEstatusRefacturacion = 2 'MARCAR COMO REFACTURADA
|
||||||
MsgCancelacionRefacturacion = Me.ObjFacturaNC.CancelarPorRefacturacion(Me.ObjFacturaNC.CveMotivoCancelacion, Me.ObjFacturaNC.MotivoCancelacion, FolioFiscalFactura)
|
MsgCancelacionRefacturacion = Me.ObjFacturaNC.CancelarPorRefacturacion(Me.ObjFacturaNC.CveMotivoCancelacion, Me.ObjFacturaNC.MotivoCancelacion, FolioFiscalFactura)
|
||||||
End If
|
End If
|
||||||
@@ -11975,8 +11996,13 @@ Partial Class Ventas
|
|||||||
factura.Alfa3 = "DEV"
|
factura.Alfa3 = "DEV"
|
||||||
factura.DevolucionImportePagado = ObjFacturaNC.Total / ObjFacturaNC.PagadoBancos 'falta tomar el dato
|
factura.DevolucionImportePagado = ObjFacturaNC.Total / ObjFacturaNC.PagadoBancos 'falta tomar el dato
|
||||||
End If
|
End If
|
||||||
|
Dim tCvePlantillaPoliza As Integer = factura.CvePlantillaPoliza
|
||||||
|
|
||||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
If UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
tCvePlantillaPoliza = 1 ' que sea siempre ingreso.
|
||||||
|
End If
|
||||||
|
|
||||||
|
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", tCvePlantillaPoliza, factura.Total, factura.Total, factura.CveMoneda, factura.Fecha, If(CveEmpresaCRM > 0, LblEmpresaCRM.Text, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
||||||
|
|
||||||
Dim RFCReceptor As String = ""
|
Dim RFCReceptor As String = ""
|
||||||
|
|
||||||
@@ -12162,9 +12188,33 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'Si es devolucion se agregan a la tabla de Vta_VentasDetalleDevolucion
|
'Si es devolucion se agregan a la tabla de Vta_VentasDetalleDevolucion
|
||||||
If factura.AplicaDevolucion Then
|
If factura.AplicaDevolucion Then
|
||||||
If Not ObjVentas.AddVentaDetalleDevolucion(Row("CveVentaDetalle").ToString().ToEntero(), ObjVentas.CveVentaDetalle, Row("Cantidad").ToString().ToDouble) Then
|
Try
|
||||||
|
Dim EsCargo As Integer = If(Row("EsCargo").ToString() = "True", 1, 0)
|
||||||
|
If EsCargo = 1 Then
|
||||||
|
If Me.ObjFacturaNC IsNot Nothing Then
|
||||||
|
Dim CveVentaDetalleUsado As Integer = -1
|
||||||
|
For Each RowIng As DataRow In Me.ObjFacturaNC.DtDetalle.Rows
|
||||||
|
If RowIng("Cantidad").ToString().ToDecimal() = Row("Cantidad").ToString().ToDecimal() AndAlso RowIng("CvePS").ToString().ToEntero() = Row("CvePS").ToString().ToEntero() Then
|
||||||
|
CveVentaDetalleUsado = RowIng("CveVentaDetalle").ToString().ToEntero()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If CveVentaDetalleUsado > 0 Then
|
||||||
|
If Not ObjVentas.AddVentaDetalleDevolucion(CveVentaDetalleUsado, ObjVentas.CveVentaDetalle, Row("Cantidad").ToString().ToDouble) Then
|
||||||
|
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjVentas.AddVentaDetalleDevolucion(Row("CveVentaDetalle").ToString().ToEntero(), ObjVentas.CveVentaDetalle, Row("Cantidad").ToString().ToDouble) Then
|
||||||
|
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||||
End If
|
End Try
|
||||||
|
|
||||||
If ErrorList.Count = 0 Then
|
If ErrorList.Count = 0 Then
|
||||||
If Not ObjEventos.AddEventoBitacora(String.Format("Se aplicó una devolución en Folio: <a href=""/Ventas/Ventas.aspx?CveVenta={0}"" target=""_blank"">{1}</a>", factura.CveVenta, factura.SerieFolio), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaDevolucion) Then
|
If Not ObjEventos.AddEventoBitacora(String.Format("Se aplicó una devolución en Folio: <a href=""/Ventas/Ventas.aspx?CveVenta={0}"" target=""_blank"">{1}</a>", factura.CveVenta, factura.SerieFolio), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaDevolucion) Then
|
||||||
ErrorList.Add("Ocurrió un error al agregar la bitacora de devolución.")
|
ErrorList.Add("Ocurrió un error al agregar la bitacora de devolución.")
|
||||||
@@ -20881,129 +20931,134 @@ Partial Class Ventas
|
|||||||
'End Sub
|
'End Sub
|
||||||
Private Sub BtnNuevaFactura_Click(sender As Object, e As EventArgs) Handles LkRefacturacion.Click
|
Private Sub BtnNuevaFactura_Click(sender As Object, e As EventArgs) Handles LkRefacturacion.Click
|
||||||
'Nos vamos a la nueva factura
|
'Nos vamos a la nueva factura
|
||||||
Dim script As String = ""
|
If RefacturarCancelada Then
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
Response.Redirect($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
|
||||||
Dim sb As New StringBuilder()
|
Else
|
||||||
|
Dim script As String = ""
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||||
|
Dim sb As New StringBuilder()
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(FolioFiscal) AndAlso Not (UsuarioActual.Empresa.Funcionalidad(529) = "1") Then
|
If Not String.IsNullOrEmpty(FolioFiscal) AndAlso Not (UsuarioActual.Empresa.Funcionalidad(529) = "1") Then
|
||||||
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
sb.Append("La factura se encuentra en el siguiente estatus del SAT:<br/>")
|
||||||
|
|
||||||
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
Dim TotalT As Decimal = TxtTotal.Text.ToDecimal
|
||||||
Dim RFCReceptor As String = LblRFC.Text.Trim
|
Dim RFCReceptor As String = LblRFC.Text.Trim
|
||||||
|
|
||||||
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
'SI SE FACTURO LA SUCURSAL DEL CLIENTE TOMA EL RFC DE ESTA
|
||||||
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
If FacturarSucursal AndAlso Me.ClienteSucursal IsNot Nothing Then
|
||||||
RFCReceptor = Me.ClienteSucursal.RFC
|
RFCReceptor = Me.ClienteSucursal.RFC
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SWatch As New Stopwatch
|
Dim SWatch As New Stopwatch
|
||||||
SWatch.Start()
|
SWatch.Start()
|
||||||
|
|
||||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||||
SWatch.Stop()
|
SWatch.Stop()
|
||||||
|
|
||||||
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
||||||
SegundosRespuesta = SegundosRespuesta.ToEntero
|
SegundosRespuesta = SegundosRespuesta.ToEntero
|
||||||
|
|
||||||
If SegundosRespuesta >= 5 Then
|
If SegundosRespuesta >= 5 Then
|
||||||
Alert($"Los servicios de validacion del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastError, "")
|
Alert($"Los servicios de validacion del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastError, "")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Vigencia IsNot Nothing Then
|
If Vigencia IsNot Nothing Then
|
||||||
|
|
||||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
|
|
||||||
DivRelacionadasRefacturacion.Visible = True
|
DivRelacionadasRefacturacion.Visible = True
|
||||||
BtnMotivoRefacturacion.Visible = False
|
BtnMotivoRefacturacion.Visible = False
|
||||||
DivMotivoRefacturacionTexto.Visible = False
|
DivMotivoRefacturacionTexto.Visible = False
|
||||||
|
|
||||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||||
If Relacionados IsNot Nothing Then
|
If Relacionados IsNot Nothing Then
|
||||||
Dim sbExtra As New StringBuilder()
|
Dim sbExtra As New StringBuilder()
|
||||||
If Relacionados.Codigo = 500 Then
|
If Relacionados.Codigo = 500 Then
|
||||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||||
Else
|
Else
|
||||||
sbExtra.Append(Relacionados.Mensaje)
|
sbExtra.Append(Relacionados.Mensaje)
|
||||||
|
|
||||||
Dim SbHijos = New StringBuilder()
|
Dim SbHijos = New StringBuilder()
|
||||||
Dim SbPadres = New StringBuilder()
|
Dim SbPadres = New StringBuilder()
|
||||||
|
|
||||||
'If Relacionados.RelacionadosHijo IsNot Nothing Then
|
'If Relacionados.RelacionadosHijo IsNot Nothing Then
|
||||||
' For Each hijo In Relacionados.RelacionadosHijo
|
' For Each hijo In Relacionados.RelacionadosHijo
|
||||||
' SbHijos.AppendFormat("{0};", hijo.Uuid)
|
' SbHijos.AppendFormat("{0};", hijo.Uuid)
|
||||||
' Next
|
' Next
|
||||||
' If SbHijos.Length > 0 Then
|
' If SbHijos.Length > 0 Then
|
||||||
' SbHijos.Remove(SbHijos.Length - 1, 1)
|
' SbHijos.Remove(SbHijos.Length - 1, 1)
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
|
||||||
For Each padre In Relacionados.RelacionadosPadre
|
|
||||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
|
||||||
Next
|
|
||||||
If SbPadres.Length > 0 Then
|
|
||||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Using ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
'If SbHijos.Length > 0 Then
|
|
||||||
' If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbHijos.ToString(), UsuarioActual.CveEmpresa) Then
|
|
||||||
' GvFacturasHijosCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If SbPadres.Length > 0 Then
|
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
For Each padre In Relacionados.RelacionadosPadre
|
||||||
GvFacturasPadreRefacturar.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||||
|
Next
|
||||||
|
If SbPadres.Length > 0 Then
|
||||||
|
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Using
|
Using ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
'If SbHijos.Length > 0 Then
|
||||||
|
' If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbHijos.ToString(), UsuarioActual.CveEmpresa) Then
|
||||||
|
' GvFacturasHijosCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
|
If SbPadres.Length > 0 Then
|
||||||
|
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||||
|
GvFacturasPadreRefacturar.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'GvFacturasHijosCancelar.DataBind()
|
||||||
|
GvFacturasPadreRefacturar.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sbExtra.Length > 0 Then
|
||||||
|
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||||
|
End If
|
||||||
|
|
||||||
'GvFacturasHijosCancelar.DataBind()
|
|
||||||
GvFacturasPadreRefacturar.DataBind()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sbExtra.Length > 0 Then
|
|
||||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
If Vigencia.EsCancelable = "Cancelable sin aceptación" Then
|
||||||
'script = "BtnRefacturacionConfirmarAceptacion();"
|
'script = "BtnRefacturacionConfirmarAceptacion();"
|
||||||
Me.CveEstadoCancelacion = 1
|
Me.CveEstadoCancelacion = 1
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||||
sb.Append("Está seguro de realizar la refacturación?.")
|
sb.Append("Está seguro de realizar la refacturación?.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
If Vigencia.EsCancelable = "Cancelable con aceptación" OrElse String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||||
'script = "BtnRefacturacionConfirmar();"
|
'script = "BtnRefacturacionConfirmar();"
|
||||||
Me.CveEstadoCancelacion = 2
|
Me.CveEstadoCancelacion = 2
|
||||||
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
sb.AppendFormat("<b>{0}</b> <br/>", "Cancelable con aceptación")
|
||||||
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
sb.Append("Está seguro de cancelar el documento para realizar la refacturación?.")
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'If Not UsuarioActual.Empresa.FacturaProduccion Then
|
||||||
|
' script = "BtnRefacturacionConfirmar();"
|
||||||
|
'End If
|
||||||
|
sb.Append("<b>No encontrado</b> <br/>")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'If Not UsuarioActual.Empresa.FacturaProduccion Then
|
'sb.Append("¿Desea realizar la refacturación?<br/>")
|
||||||
' script = "BtnRefacturacionConfirmar();"
|
script = "BtnRefacturacionConfirmarAceptacion();"
|
||||||
'End If
|
|
||||||
sb.Append("<b>No encontrado</b> <br/>")
|
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
'sb.Append("¿Desea realizar la refacturación?<br/>")
|
LblEstatusRefacturacion.Text = sb.ToString()
|
||||||
script = "BtnRefacturacionConfirmarAceptacion();"
|
UpMotivoRefac.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#DivMotivoRefacturacion').modal({ backdrop: 'static', keyboard: false });", "R1")
|
||||||
|
'Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:=script, TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LblEstatusRefacturacion.Text = sb.ToString()
|
|
||||||
UpMotivoRefac.Update()
|
|
||||||
|
|
||||||
RegistraScript("$('#DivMotivoRefacturacion').modal({ backdrop: 'static', keyboard: false });", "R1")
|
|
||||||
'Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:=script, TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BtnMotivoRefacturacion_Click(sender As Object, e As System.EventArgs) Handles BtnMotivoRefacturacion.Click
|
Private Sub BtnMotivoRefacturacion_Click(sender As Object, e As System.EventArgs) Handles BtnMotivoRefacturacion.Click
|
||||||
@@ -21753,7 +21808,7 @@ Partial Class Ventas
|
|||||||
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero())))
|
||||||
Else
|
Else
|
||||||
@@ -29656,6 +29711,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(572) = "1" AndAlso Not TbDescuentosRNC.Visible Then
|
||||||
|
TbDescuentosRNC.Visible = True
|
||||||
|
LnkDescuentosRNC.Visible = UsuarioActual.TienePermisoProceso(328)
|
||||||
|
End If
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
UPPDescuento.Update()
|
UPPDescuento.Update()
|
||||||
UPObservaciones.Update()
|
UPObservaciones.Update()
|
||||||
@@ -31529,6 +31589,11 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||||
|
|
||||||
|
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||||
|
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
If (FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
If (FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
|
||||||
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -34374,5 +34439,38 @@ Partial Class Ventas
|
|||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
||||||
|
CreaObjetosVenta()
|
||||||
|
Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
Dim Msgok As New StringBuilder
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
|
||||||
|
|
||||||
|
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFactura)
|
||||||
|
|
||||||
|
If IDPoliza.IdPoliza > 0 Then
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.UpdateVentaPrePoliza(IDPoliza.IdPoliza, IDPoliza.FolioPoliza, CvePrePoliza, CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
'Si se facturó la cotización hay que vincular la venta
|
||||||
|
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'Si se facturó la cotización hay que vincular la venta
|
||||||
|
Msgok.AppendFormat("Abono Registrado Correctamente.<br/><br/> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", IDPoliza)
|
||||||
|
|
||||||
|
Else
|
||||||
|
ErrorList.Add("Ocurrió un error al generar A.C. en la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Msgok.Append("Movimiento Registrado Correctamente.<br/><br/> ")
|
||||||
|
End If
|
||||||
|
ObjAC.dispose
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user