Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1008,7 +1008,18 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!pFirma1.Value</Value>
|
||||
<Value>C.P Vera Guadalupe Tarazon Moreno</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Director Administrativo</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -2942,7 +2942,18 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!pFirma1.Value</Value>
|
||||
<Value>C.P Vera Guadalupe Tarazon Moreno</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Director Administrativo</Value>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -1404,7 +1404,7 @@ Public Class ClsBancos
|
||||
NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "") As Integer
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "") As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1439,6 +1439,7 @@ Public Class ClsBancos
|
||||
.Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario
|
||||
.Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado
|
||||
.Add("@MesesSinIntereses", SqlDbType.Int).Value = MesesSinIntereses
|
||||
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||
|
||||
.Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output
|
||||
@@ -3122,6 +3123,13 @@ Public Class ClsBancos
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un registro con el mismo Folio", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar El movimiento Bancario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
@@ -6,8 +6,8 @@ Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
|
||||
Public Class ClsGenerales
|
||||
Implements IDisposable
|
||||
|
||||
Implements IDisposable
|
||||
|
||||
#Region "Campos"
|
||||
Private _CveColectiva As Integer
|
||||
|
||||
@@ -48,9 +48,9 @@ Public Class ClsGenerales
|
||||
Get
|
||||
DtResultados = Data
|
||||
End Get
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
Return SqlTransacc
|
||||
@@ -89,9 +89,9 @@ Public Class ClsGenerales
|
||||
End With
|
||||
Data = New DataTable
|
||||
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
End Sub
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
Try
|
||||
@@ -124,9 +124,9 @@ Public Class ClsGenerales
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub DataCommand(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -209,7 +209,7 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#Region " I N D I C A D O R E S Y G R A F I C A S"
|
||||
Public Function GetIndicadores(CveEmpresa As Integer) As DataSet
|
||||
'Dim Retorno As Boolean = False
|
||||
@@ -231,10 +231,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return ds
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " D I A S I N H A B I L E S "
|
||||
Public Function DiasInhabiles_Add(CveEmpresa As Integer, CveUsuario As Integer, DiaInhabil As String, Descripcion As String, Estatus As Integer, FechaInhabil As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -317,9 +317,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " P A Q U E T E R I A S"
|
||||
Public Function GetGralPaqueterias(Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -453,11 +453,11 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al actualizar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "P L A N T I L L A S C O N T R A T O S"
|
||||
|
||||
|
||||
Public Function ContratoPlantillaAdd(CveEmpresa As Integer, CveUsuario As Integer, NombrePlantilla As String, URL As String, Tipo As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_ContratoPlantillaAdd")
|
||||
@@ -534,10 +534,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " E S T A D O S"
|
||||
Public Function GetGralEstados() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -550,9 +550,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " M U N I C I P I O S"
|
||||
Public Function GetGralMunicipios() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -565,9 +565,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " P A I S E S"
|
||||
Public Function GetGralPaises() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -580,9 +580,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " P O B L A C I O N E S"
|
||||
Public Function GetGralPoblaciones() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -595,9 +595,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "E S C O L A R I D A D"
|
||||
Public Function GetEscolaridades() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -687,9 +687,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C A T E G O R I A S"
|
||||
Public Function GetCategorias(Optional CveEmpresa As Integer = -1, Optional Tipo As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -786,9 +786,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "M O D E L O S"
|
||||
Public Function GetModelos(CveEmpresa As Integer, Optional CveModelo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -882,9 +882,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "R I M T A M A N I O S"
|
||||
Public Function GetRimTamanios(CveEmpresa As Integer, Optional CveRinTamaño As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -976,9 +976,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "M E D I D A S"
|
||||
Public Function GetMedidas(CveEmpresa As Integer, Optional CveMedida As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1058,9 +1058,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O L E C T I V A S"
|
||||
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1216,10 +1216,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O L E C T I V A S - D E T A L L E S"
|
||||
Public Function GetColectivasDetalles(CveColectiva As Integer, Tipo As String, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -1337,9 +1337,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "S u b i r I m a g e n e s"
|
||||
Public Function ImagenUpload(pCveOpcion As Integer, pCveClave As Integer, pCveUsuario As Integer, IMEI As String, pCveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
@@ -1363,20 +1363,22 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
' IDisposable
|
||||
|
||||
' IDisposable
|
||||
|
||||
#Region "G E N E R A L E S - C U E N T A S B A N C A R I A S "
|
||||
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean
|
||||
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
|
||||
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1389,8 +1391,9 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
||||
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
|
||||
Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
|
||||
Optional ConceptoCIE As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosAdd")
|
||||
@@ -1417,6 +1420,7 @@ Public Class ClsGenerales
|
||||
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||
|
||||
End With
|
||||
|
||||
@@ -1435,6 +1439,7 @@ Public Class ClsGenerales
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1461,7 +1466,8 @@ Public Class ClsGenerales
|
||||
|
||||
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
|
||||
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
|
||||
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
|
||||
Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
|
||||
Optional ConceptoCIE As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosUpdate")
|
||||
@@ -1487,6 +1493,7 @@ Public Class ClsGenerales
|
||||
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||
|
||||
End With
|
||||
|
||||
@@ -1506,7 +1513,7 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer, BBVAAlias As String) As Boolean
|
||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Integer, CveSATBanco As Integer, BBVAAlias As String, Referencia As String, ConceptoCIE As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1514,21 +1521,17 @@ Public Class ClsGenerales
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Int).Value = EstatusPagoElectronicoGrupos
|
||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
||||
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||
.Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
@@ -1638,11 +1641,11 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C l a s i f i c a c i o n e s C a r a c t e r i s t i c a s"
|
||||
|
||||
|
||||
Public Function AddClasificacionesCaracteristicas(CaracteristicaClasificacion As String, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_CaracteristicasClasificacionesAdd")
|
||||
@@ -1723,12 +1726,12 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C a r a c t e r í s t i c a s"
|
||||
|
||||
|
||||
Public Function GetCaracteristicasModulos() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_CaracteristicasModuloGet")
|
||||
@@ -1982,9 +1985,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O p c i o n e s"
|
||||
Public Function AddCaracteristicasOpciones(CaracteristicaOpcion As String, CveCaracteristica As Integer, Orden As Integer, Estatus As Boolean, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2085,9 +2088,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "T I P O C U E N T A S E Q U I P O S"
|
||||
Public Function AddTipoCuentaEquipo(TipoCuentaEquipo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2174,9 +2177,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C U E N T A S E Q U I P O S"
|
||||
Public Function AddCuentaEquipo(CveCliente As Integer, CveTipoCuentaEquipo As Integer, CuentaEquipo As String, NoSerie As String, CveClienteSucursal As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCuentaEquipo As Integer = -1, Optional CveCuentaEquipoRelacionado As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2349,11 +2352,11 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Bitacora"
|
||||
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
|
||||
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
|
||||
@@ -2447,9 +2450,9 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SAT PRODUCTOS SERVICIOS Y UNIDAD DE MEDIDA"
|
||||
Public Function GetSATProductosServicios() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2505,10 +2508,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SAT CFDI COMERCIO EXTERIOR"
|
||||
Public Function GetSATClavePedimento() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -2650,10 +2653,10 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al obtener las colonias del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Function JAMComparativo(Opcion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_JAM_Comparativo")
|
||||
@@ -2816,11 +2819,12 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetEntregasPorRealizar(CveEmpresa As Integer) As Boolean
|
||||
Public Function GetEntregasPorRealizar(CveEmpresa As Integer, Optional CveTick As Long = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_EntregasPorRealizarGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -2832,12 +2836,13 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer) As Boolean
|
||||
Public Function AsignarEntregasPorRealizar(CvePaqueteriaGuia As Integer, CvePersonal As Integer, Optional CveTick As Long = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveTick", SqlDbType.BigInt).Value = CveTick
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -3003,11 +3008,11 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CLASIFICACIONES PORCENTAJE"
|
||||
|
||||
|
||||
Public Function GetClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasificacionPorcentaje As Integer = -1,
|
||||
Optional CveClasificacion As Integer = -1, Optional PorcentajeIVA As Double = -1,
|
||||
Optional Opcion As Integer = 1) As Boolean
|
||||
@@ -3083,11 +3088,11 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al eliminar la clasificacion del porcentaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
@@ -3103,9 +3108,9 @@ Public Class ClsGenerales
|
||||
' TODO: Establecer campos grandes como Null.
|
||||
End If
|
||||
disposedValue = True
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "CRUD_Edoc_DocumentacionTipo"
|
||||
Public Function GetEdoc_DocumentacionTipo(CveDocumentacionTipo As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional EsCatalogo As Integer = 0, Optional Modulo As Integer = 1) As Boolean
|
||||
|
||||
@@ -3186,21 +3191,21 @@ Public Class ClsGenerales
|
||||
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " IDisposable Support "
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " P O L I Z A V I R T U A L "
|
||||
Public Function ModelosAutosGet(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -3260,7 +3265,7 @@ Public Class ClsGenerales
|
||||
OnError("Ocurrió un error al obtener los BCI de Usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -2421,7 +2421,8 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer) As Boolean
|
||||
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer,
|
||||
Optional CveSeccionAlmacen As Integer = -1, Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_InventarioFisicoDetalleAdd")
|
||||
@@ -2433,6 +2434,9 @@ Public Class ClsInventarios
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||
.Add("@Lote", SqlDbType.NVarChar).Value = Lote
|
||||
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||
.Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
|
||||
@@ -442,6 +442,34 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTProveedoresCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim P As New ClsGenerales
|
||||
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
End If
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||
If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente)
|
||||
If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ")
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
|
||||
|
||||
GlobalDTCuentasDepositosClientes = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion-{0}", CveEmpresa)
|
||||
@@ -7231,7 +7259,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("TipoCambio", TipoCambio))
|
||||
params.Add(New ReportParameter("NombreSolicito", dtOC(0)("UsuarioSolicito").ToString)) 'drSol("Nombre").ToString))
|
||||
params.Add(New ReportParameter("PuestoSolicito", PuestoSol)) 'drPuestoSol("Puesto").ToString
|
||||
params.Add(New ReportParameter("NombreAutorizo", nombreautorizo))
|
||||
params.Add(New ReportParameter("NombreAutorizo", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("PuestoAutorizo", PuestoAut)) 'drPuestoAut("Puesto").ToString
|
||||
params.Add(New ReportParameter("TipoOC", If(ObjOC.Tipo = "OC", "Orden de Compra", "Requisición")))
|
||||
params.Add(New ReportParameter("UsoCFDI", ObjOC.UsoCFDI))
|
||||
@@ -7254,7 +7282,7 @@ Public Class ClsPaginas
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales()
|
||||
If ObjCuentasBancos.GetCuentasDepositos(ObjOC.CveProveedor) Then
|
||||
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
|
||||
Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'")
|
||||
Dim CuentasStr As New StringBuilder("")
|
||||
For Each CuentasBancarios As DataRow In CuentasActivas.Rows
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
|
||||
Public Class ClsSisMail
|
||||
Public Class ClsSisMail
|
||||
|
||||
Public Shared Function IsMailShared(ByVal Mail As String) As Boolean
|
||||
Dim Resultado As Boolean = False
|
||||
'cambio para que acepte multiples correos, separados por ;
|
||||
Dim RegularExpression As String = "(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))+" ' "^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" & "\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" & ".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
|
||||
Dim RegExp As New Regex(RegularExpression)
|
||||
|
||||
If RegExp.IsMatch(Mail) Then
|
||||
Resultado = True
|
||||
Else
|
||||
Resultado = False
|
||||
End If
|
||||
|
||||
Return Resultado
|
||||
End Function
|
||||
|
||||
Private Function IsMail(ByVal Mail As String) As Boolean
|
||||
Dim Resultado As Boolean = False
|
||||
|
||||
@@ -573,6 +573,7 @@ Partial Class Bancos_IE
|
||||
CveCredito = IfNull(Request("CveCredito"), "-1").ToString.ToEntero
|
||||
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
|
||||
LtlTitulo.Text = "Pago de Créditos"
|
||||
CveIE = -1
|
||||
|
||||
DVInteresMoratorio.Visible = True
|
||||
|
||||
@@ -4642,7 +4643,7 @@ Partial Class Bancos_IE
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue = "9" And CveIE = Nothing Then
|
||||
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
|
||||
@@ -4653,7 +4654,7 @@ Partial Class Bancos_IE
|
||||
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE = Nothing Then
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
||||
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
@@ -4685,7 +4686,7 @@ Partial Class Bancos_IE
|
||||
|
||||
Else
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE = Nothing Then
|
||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
|
||||
|
||||
BtnGuardar.Enabled = False
|
||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -4742,7 +4743,7 @@ Partial Class Bancos_IE
|
||||
If CveProveedor > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
|
||||
@@ -151,7 +151,7 @@ Partial Class Bancos_MovimientosBancarios
|
||||
If GvProveedores.Rows(i).FCCheckBox("CheckAgregar").Checked = True Then
|
||||
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = {0}", GvProveedores.Rows(i).DataKey("CveProveedor")))
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos(21109) Then
|
||||
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21109) Then
|
||||
DTProveedorBancos = ObjCuentasBancos.DtResultados
|
||||
RowBanco = DTProveedorBancos.Rows(0)
|
||||
Else
|
||||
@@ -319,7 +319,7 @@ Partial Class Bancos_MovimientosBancarios
|
||||
|
||||
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = 21114"))
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos(21114) Then
|
||||
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21114) Then
|
||||
DTProveedorBancos = ObjCuentasBancos.DtResultados
|
||||
RowBanco = DTProveedorBancos.Rows(0)
|
||||
Else
|
||||
|
||||
@@ -1979,7 +1979,7 @@ Partial Class Bancos_PagoElectronico
|
||||
'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero
|
||||
'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar
|
||||
|
||||
' Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@
|
||||
<asp:BoundField HeaderText="Banco" DataField="BancoNombre" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Cuenta" DataField="Cuenta" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clabe" DataField="CLABEDestino" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="CLABE" DataField="CLABE" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Banco" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px">
|
||||
@@ -855,19 +855,20 @@
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas2" visible=" false">
|
||||
<p> Cuentas Interbancarias <asp:LinkButton runat="server" ID="LnkDescargaCuentas2" OnClick="LnkDescargaCuentas2_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas3" visible=" false">
|
||||
<p> Cuentas Convennios CIE <asp:LinkButton runat="server" ID="LnkDescargaCuentas3" OnClick="LnkDescargaCuentas3_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaReporte" visible=" false">
|
||||
<p> <asp:LinkButton runat="server" ID="LnkDescargaReporte" OnClick="LnkDescargaReporte_Click" CssClass="Texto" Text="Descargar Reporte"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescarga" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas1" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas2" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas3" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -202,6 +202,16 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property NombreArchivoCIE As String
|
||||
Get
|
||||
Return ViewState("NombreArchivoCIE").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NombreArchivoCIE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DTSATBancos As DataTable
|
||||
Get
|
||||
If ViewState("DTSATBancos") Is Nothing Then
|
||||
@@ -260,7 +270,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Property DTFoliosPrefijos As DataTable
|
||||
Get
|
||||
If ViewState("DTFoliosPrefijos") Is Nothing Then
|
||||
Return Crate_DTFoliosPrefijos()
|
||||
Crate_DTFoliosPrefijos()
|
||||
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
|
||||
Else
|
||||
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
|
||||
End If
|
||||
@@ -300,16 +311,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function Crate_DTFoliosPrefijos() As DataTable
|
||||
Private Sub Crate_DTFoliosPrefijos()
|
||||
|
||||
Dim DTFolios As New DataTable
|
||||
DTFolios.Columns.Add("CveIE", GetType(Integer))
|
||||
DTFolios.Columns.Add("Folio", GetType(String))
|
||||
DTFolios.AcceptChanges()
|
||||
|
||||
Return DTFolios
|
||||
ViewState("DTFoliosPrefijos") = DTFolios.Copy
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
@@ -480,6 +493,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
|
||||
If File.Exists(path) Then
|
||||
|
||||
File.Delete(path)
|
||||
|
||||
End If
|
||||
|
||||
Dim fs As FileStream = File.Create(path)
|
||||
|
||||
' Add text to the file.
|
||||
@@ -690,9 +710,16 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
NombreArchivoBancomer = ""
|
||||
NombreArchivoInterbancario = ""
|
||||
NombreArchivoCIE = ""
|
||||
|
||||
DVDescargaCuentas1.Visible = False
|
||||
DVDescargaCuentas2.Visible = False
|
||||
DVDescargaCuentas3.Visible = False
|
||||
|
||||
NombreArchivo = ""
|
||||
|
||||
Dim RegistrosAltaBancomer As New StringBuilder
|
||||
Dim RegistrosAltaBancomerCIE As New StringBuilder
|
||||
Dim RegistrosAltaInterbancario As New StringBuilder
|
||||
Dim SBErrores As New StringBuilder
|
||||
|
||||
@@ -711,12 +738,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
DtCuentasPendientesTemp.CaseSensitive = False
|
||||
|
||||
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
|
||||
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
|
||||
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND CveBanco = '012' AND LEN(CIE) = 0) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||
Dim DtCuentasPendientesCIE As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND LEN(CIE) > 0 AND CveBanco = '012') ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
|
||||
|
||||
|
||||
'Dim ObjGrales As New ClsGenerales
|
||||
|
||||
'Cuentas bancomer
|
||||
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
|
||||
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
|
||||
|
||||
@@ -775,10 +803,60 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
NombreArchivoBancomer = NombreArchivo
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Cuentas bancomer CIE
|
||||
If DtCuentasPendientesCIE.Rows.Count > 0 Then
|
||||
For Each dRow As DataRow In DtCuentasPendientesCIE.Rows
|
||||
|
||||
Dim SBTmpBancomerCIE As New StringBuilder
|
||||
Dim SBErroresBancomerCIE As New StringBuilder
|
||||
Dim ErrorLineaBancomerCIE As Boolean = False
|
||||
|
||||
SBErroresBancomerCIE.Append($"{dRow("RazonSocial").ToString } ")
|
||||
SBErroresBancomerCIE.Append($"Cuenta: {dRow("Cuenta").ToString } ")
|
||||
|
||||
SBTmpBancomerCIE.Append("CV")
|
||||
SBTmpBancomerCIE.Append(dRow("CIE").ToString.PadLeft(18, CeroRelleno))
|
||||
|
||||
If dRow("Abreviatura").ToString.Length = 3 Then
|
||||
SBTmpBancomerCIE.Append(dRow("Abreviatura"))
|
||||
Else
|
||||
SBErroresBancomerCIE.Append("El tamaño de la divisa es incorrecto, ")
|
||||
ErrorLineaBancomerCIE = True
|
||||
End If
|
||||
|
||||
SBTmpBancomerCIE.Append("0999999999999.99")
|
||||
|
||||
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
|
||||
SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
Else
|
||||
SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||
End If
|
||||
|
||||
'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
|
||||
SBTmpBancomerCIE.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
|
||||
|
||||
SBTmpBancomerCIE.Append(vbCrLf)
|
||||
|
||||
If Not ErrorLineaBancomerCIE Then
|
||||
RegistrosAltaBancomerCIE.Append(SBTmpBancomerCIE.ToString)
|
||||
Else
|
||||
SBErroresBancomerCIE.Append("<br>")
|
||||
SBErrores.AppendLine(SBErroresBancomerCIE.ToString)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
TextoCompleto = RegistrosAltaBancomerCIE.ToString
|
||||
|
||||
If CreaArchivo(2, True) Then
|
||||
NombreArchivoCIE = NombreArchivo
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then
|
||||
@@ -867,17 +945,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
|
||||
If NombreArchivoBancomer.Trim.Length > 0 Then
|
||||
|
||||
DVDescargaCuentas1.Visible = True
|
||||
' Mensaje.Append($"Cuentas Bancomer <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoBancomer}' download > Descarga Archivo cuentas Bancomer</a> <br><br>")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If NombreArchivoInterbancario.Trim.Length > 0 Then
|
||||
DVDescargaCuentas2.Visible = True
|
||||
'Mensaje.Append($"Cuentas Interbancarias <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoInterbancario}' download >Descarga Archivo cuentas Bancomer</a> <br><br>")
|
||||
|
||||
End If
|
||||
If NombreArchivoCIE.Trim.Length > 0 Then
|
||||
DVDescargaCuentas3.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -888,21 +962,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Mensaje.Append("</div>")
|
||||
End If
|
||||
|
||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
|
||||
|
||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Or NombreArchivoCIE.Length > 0 Then
|
||||
|
||||
LnkDescargaCuentas1.Text = NombreArchivoBancomer
|
||||
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
|
||||
LnkDescargaCuentas3.Text = NombreArchivoCIE
|
||||
|
||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
UpModalDescarga.Update()
|
||||
|
||||
|
||||
Else
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
@@ -1068,6 +1139,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
'Alert("Hola")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub FormarTexto(Registros As Integer)
|
||||
'''''' LLENADO HEADER
|
||||
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
|
||||
@@ -1118,7 +1190,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim RegistrosPago As New StringBuilder
|
||||
Dim MENSAJEError As New StringBuilder
|
||||
|
||||
|
||||
Dim EsCIE As Boolean = False
|
||||
Dim CeroRelleno As Char = "0"c
|
||||
Dim EspacioRelleno As Char = Chr(32)
|
||||
Dim ErrorLayout = False
|
||||
@@ -1132,40 +1204,53 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
MENSAJEError.AppendLine($"Error al generar pago <br>")
|
||||
MENSAJEError.AppendLine($" Proveedor: {drow("RazonSocial").ToString} detalle: { drow("Observaciones").ToString} <br>")
|
||||
|
||||
'CveBanco = '012'
|
||||
If drow("CveBanco").ToString.Trim = "012" Then
|
||||
If drow("CIE").ToString.Trim.Length > 0 Then 'cuenta bancomer Con convenio CIE
|
||||
EsCIE = True
|
||||
If drow("CIE").ToString.Trim.Length > 0 Then
|
||||
RegistrosPago.Append("CIL")
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR en tamaño de CIE")
|
||||
End If
|
||||
Else
|
||||
RegistrosPago.Append("PTC") 'cuenta bancomer
|
||||
End If
|
||||
|
||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
||||
RegistrosPago.Append("PTC")
|
||||
Else
|
||||
RegistrosPago.Append("PSC")
|
||||
End If
|
||||
|
||||
|
||||
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||
Exit For
|
||||
End If
|
||||
If EsCIE Then
|
||||
|
||||
If drow("ConceptoCIE").ToString.Length <= 30 Then
|
||||
RegistrosPago.Append(drow("ConceptoCIE").ToString.PadRight(30, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR Tamaño de ConceptoCIE.")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
If drow("CIE").ToString.Length < 5 Or drow("CIE").ToString.Length > 7 Then
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR Tamaño de CIE (rango 5-7).")
|
||||
Exit For
|
||||
Else
|
||||
RegistrosPago.Append(drow("CIE").ToString.PadLeft(7, CeroRelleno))
|
||||
End If
|
||||
|
||||
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
|
||||
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||
|
||||
|
||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||
|
||||
|
||||
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
||||
@@ -1185,7 +1270,78 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If drow("Referencia").ToString.Trim.Length > 20 Then
|
||||
RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 20))
|
||||
Else
|
||||
RegistrosPago.Append(drow("Referencia").ToString.PadRight(20, EspacioRelleno))
|
||||
End If
|
||||
|
||||
|
||||
ElseIf drow("CveBanco").ToString.Trim = "012" And drow("CIE").ToString.Trim.Length = 0 Then
|
||||
|
||||
'cuentas Inicio
|
||||
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||
Exit For
|
||||
End If
|
||||
'cuentas Fin
|
||||
|
||||
|
||||
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||
|
||||
|
||||
If drow("Observaciones").ToString.Trim.Length = 0 Then
|
||||
|
||||
If drow("RazonSocial").ToString.Trim.Length > 30 Then
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.Substring(0, 30))
|
||||
Else
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
End If
|
||||
Else
|
||||
|
||||
If drow("Observaciones").ToString.Trim.Length > 30 Then
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30))
|
||||
Else
|
||||
RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ElseIf drow("CveBanco").ToString <> "012" Then 'I N T E R B A N C A R I O
|
||||
|
||||
'cuentas Inicio
|
||||
If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
|
||||
RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||
Exit For
|
||||
End If
|
||||
'cuentas Fin
|
||||
|
||||
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||
|
||||
If drow("RazonSocial").ToString.Length <= 30 Then
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
@@ -1217,8 +1373,14 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
RegistrosPago.Append("H")
|
||||
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("Parametros incorrecots")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ErrorLayout Then
|
||||
Alert(MENSAJEError.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
@@ -1300,6 +1462,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
DVDescargaPagos.Visible = True
|
||||
DVDescargaCuentas1.Visible = False
|
||||
DVDescargaCuentas2.Visible = False
|
||||
DVDescargaCuentas3.Visible = False
|
||||
DVDescargaReporte.Visible = True
|
||||
|
||||
DT_PagosReporte = DTPendientesTemp.Copy
|
||||
@@ -1934,7 +2097,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
|
||||
DTProveedores = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (12,13)")
|
||||
Else
|
||||
DTProveedores = Nothing
|
||||
DTProveedores = New DataTable
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
@@ -2052,20 +2215,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Usted puede pasar a recorger el cheque en las oficinas administrativas.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Usted puede pasar a recorger el cheque en las oficinas administrativas.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Se notifica el envío de transferencia de pago.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
strBody.Append(" </tr> ")
|
||||
' End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
@@ -2599,7 +2762,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco"})
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco", "CLABE"})
|
||||
|
||||
GvCuentasModal.DataSource = DTGvCuentasPendientes
|
||||
GvCuentasModal.DataBind()
|
||||
@@ -2642,7 +2805,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim DdlSatBanco As DropDownList = GvRow.FCDropDownList("DdlSatBanco")
|
||||
|
||||
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text) Then
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, If(ChkCuentasEstatus.Checked, 1, 0), DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text, "-1", "-1") Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -2789,7 +2952,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim ObjBanco As New ClsBancos
|
||||
'ObjBanco.IniciaTransacSQL()
|
||||
ObjBanco.IniciaTransacSQL()
|
||||
|
||||
Dim CveLayoutEnvioDetalle As Integer = GvRow.DataKey("CveLayoutEnvioDetalle").ToEntero
|
||||
Dim CveLayoutEnvio As Integer = GvRow.DataKey("CveLayoutEnvio").ToEntero
|
||||
@@ -2797,24 +2960,29 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim NotificarA As String = GvRow.DataKey("NotificarA")
|
||||
|
||||
Dim FOrigen As String = $"{UsuarioActual.Empresa.Ruta}..\Temp\{Comprobante}"
|
||||
Dim FDestino As String = $"{UsuarioActual.Empresa.Ruta}\IE\{Comprobante}"
|
||||
|
||||
|
||||
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
|
||||
ErrorProceso = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
DTFoliosPrefijos.Clear()
|
||||
|
||||
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
||||
If RowGV.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim nRow As DataRow = DTFoliosPrefijos.NewRow
|
||||
Dim nRow As DataRow
|
||||
nRow = DTFoliosPrefijos.NewRow
|
||||
|
||||
nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero
|
||||
nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim
|
||||
nRow("CveIE") = RowGV.DataKey("CveIE").ToEntero
|
||||
nRow("Folio") = RowGV.FCTextBox("TxtFolio").Text.Trim
|
||||
|
||||
DTFoliosPrefijos.Rows.Add(nRow)
|
||||
DTFoliosPrefijos.Rows.Add(nRow)
|
||||
|
||||
End If
|
||||
Next
|
||||
DTFoliosPrefijos.AcceptChanges()
|
||||
|
||||
@@ -2828,10 +2996,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
If Comprobante <> "-1" And Not ErrorProceso Then
|
||||
|
||||
Try
|
||||
|
||||
Dim FOrigen As String = $"{UsuarioActual.Empresa.Ruta}..\Temp\{Comprobante}"
|
||||
Dim FDestino As String = $"{UsuarioActual.Empresa.Ruta}\IE\{Comprobante}"
|
||||
|
||||
If File.Exists(FDestino) Then
|
||||
File.Delete(FDestino)
|
||||
End If
|
||||
@@ -2850,12 +3014,19 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Else
|
||||
ObjBanco.Commit()
|
||||
Alert("Confirmado Correctamente")
|
||||
NotificacionPago(CveIE, NotificarA)
|
||||
|
||||
If Comprobante = "-1" Then
|
||||
FDestino = ""
|
||||
End If
|
||||
|
||||
NotificacionPago(CveIE, NotificarA, FDestino)
|
||||
|
||||
CargaEnviados()
|
||||
|
||||
For Each RowGV As GridViewRow In GvEnviadas.Rows
|
||||
RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}")
|
||||
If RowGV.RowType = DataControlRowType.DataRow Then
|
||||
RowGV.FCTextBox("TxtFolio").Text = DTFoliosPrefijos.FiltroPrimeroValor("Folio", $"CveIE = {RowGV.DataKey("CveIE").ToEntero}")
|
||||
End If
|
||||
Next
|
||||
|
||||
UpEnviados.Update()
|
||||
@@ -3077,12 +3248,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkDescarga_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim FileName As String = NombreArchivo
|
||||
@@ -3106,8 +3271,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.End()
|
||||
End Sub
|
||||
Protected Sub LnkDescargaCuentas2_Click(sender As Object, e As EventArgs)
|
||||
Dim FileName As String = NombreArchivo
|
||||
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivo}"
|
||||
Dim FileName As String = NombreArchivoInterbancario
|
||||
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivoInterbancario}"
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
|
||||
@@ -3115,6 +3280,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.End()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescargaCuentas3_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim FileName As String = NombreArchivoCIE
|
||||
Dim FilePath As String = $"{UsuarioActual.Empresa.Ruta}Layout\{NombreArchivoCIE}"
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/octet-stream"
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
|
||||
Response.TransmitFile(FilePath)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -3123,14 +3299,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
' Dim DT_PagosReporte As New DataTable
|
||||
DT_PagosReporte = DT_PagosReporte.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
||||
|
||||
'DT_PagosReporte.Columns(7).ColumnName = "Proveedor"
|
||||
'DT_PagosReporte.Columns(2).ColumnName = "Importe"
|
||||
'DT_PagosReporte.Columns(22).ColumnName = "Moneda"
|
||||
|
||||
|
||||
DT_PagosReporte = DT_PagosReporte.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If Archivo.Exists Then
|
||||
@@ -3160,33 +3330,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String, RutaComprobante As String)
|
||||
|
||||
'If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
'Dim Param As New List(Of String)
|
||||
|
||||
'Param.Add(CorreoNotificarA) 'Para
|
||||
'Param.Add("Notificaciones de pago") 'Asunto
|
||||
'Param.Add(GeneraCorreo(CveIE)) 'Body
|
||||
'Param.Add(CveIE.ToString) 'CveIE
|
||||
Dim Body As String = GeneraCorreo(CveIE)
|
||||
'Dim Comprobante As String = ""
|
||||
|
||||
'Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
||||
Dim Comprobante As String = ""
|
||||
Dim File As Byte() = Nothing
|
||||
'If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
'End If
|
||||
|
||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, RutaComprobante, File))
|
||||
Hilo.Start()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
@@ -3202,7 +3359,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim separador As Char() = {";"c, ","c}
|
||||
Dim strArray As String() = Para.Split(separador)
|
||||
|
||||
Para = ""
|
||||
|
||||
For Each sCorreo As String In strArray
|
||||
If ClsSisMail.IsMailShared(sCorreo) And sCorreo.Trim.Length > 0 Then
|
||||
Para = $"{Para}{sCorreo};"
|
||||
End If
|
||||
Next
|
||||
|
||||
Para = Para.Substring(0, Para.Length - 1)
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos, Displayname:=$"SIG Notificaciones: Pago de {UsuarioActual.Empresa.Empresa}") Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
@@ -3210,6 +3380,9 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
@@ -3290,17 +3463,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
'End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
@@ -3422,4 +3595,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -191,11 +191,17 @@
|
||||
</div>
|
||||
<div class="row" id="TrReferenciaCIE" runat="server" visible="False">
|
||||
<label class="col-md-2 control-label">Referencia:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtReferenciaCIE" Text="" runat="server" CssClass="form-control input-sm" Width="400px" />
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtReferenciaCIE" Text="" runat="server" CssClass="form-control input-sm" MaxLength="20" Width="200px" />
|
||||
<asp:RequiredFieldValidator ID="RFVReferenciaCIE" runat="server" ControlToValidate="TxtReferenciaCIE" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Referencia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEReferenciaCIE" runat="server" HighlightCssClass="vco" TargetControlID="RFVReferenciaCIE" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-2 control-label">Concepto:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtConceptoCIE" Text="" runat="server" CssClass="form-control input-sm" Width="200px" MaxLength="30" />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtReferenciaCIE" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Referencia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RFVReferenciaCIE" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -283,6 +283,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ViewState("CodigoProgramacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
@@ -293,6 +294,26 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Property
|
||||
|
||||
|
||||
Private Property OriReferenciaCIE As String
|
||||
Get
|
||||
Return ViewState("OriReferenciaCIE").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("OriReferenciaCIE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property OriConceptoCIE As String
|
||||
Get
|
||||
Return ViewState("OriConceptoCIE").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("OriConceptoCIE") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -835,12 +856,29 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveIE As Integer = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1))
|
||||
Dim CveIE As Integer = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), ConceptoCIE:=TxtConceptoCIE.Text)
|
||||
|
||||
If CveIE > 0 Then
|
||||
|
||||
|
||||
ComprobanteIE = $"{CveIE}.{Comprobante}"
|
||||
|
||||
|
||||
If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
If TxtReferenciaCIE.Text <> OriReferenciaCIE Or TxtConceptoCIE.Text <> OriConceptoCIE Then
|
||||
|
||||
Dim ObjGrales As New ClsGenerales(ObjIE.IniciaTransacSQL)
|
||||
|
||||
If Not ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(DdlCuentaDeposito.SelectedValue.ToEntero, -1, -1, "-1", TxtReferenciaCIE.Text.Trim, TxtConceptoCIE.Text.Trim) Then
|
||||
|
||||
MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito."
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'guardo el archivo
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta))
|
||||
@@ -2508,6 +2546,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
End If
|
||||
|
||||
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||
@@ -2522,7 +2561,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnIEGuardar.ToolTip = ""
|
||||
Else
|
||||
@@ -2546,9 +2588,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
DdlCuentaDeposito.DataBind()
|
||||
|
||||
|
||||
If DdlCuentaDeposito.Items.Count > 1 Then
|
||||
DdlCuentaDeposito.SelectedIndex = 1
|
||||
End If
|
||||
'If DdlCuentaDeposito.Items.Count > 1 Then
|
||||
' DdlCuentaDeposito.SelectedIndex = 1
|
||||
'End If
|
||||
|
||||
|
||||
Else
|
||||
@@ -2608,17 +2650,27 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CargaCuentasDepositos()
|
||||
End Sub
|
||||
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
|
||||
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
|
||||
TrReferenciaCIE.Visible = True
|
||||
|
||||
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString
|
||||
TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
|
||||
|
||||
OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString
|
||||
OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
|
||||
|
||||
Else
|
||||
TrReferenciaCIE.Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
Dep.Dispose()
|
||||
UpCuentaDeposito.Update()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -472,6 +472,13 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME ENTREGAS POR REALIZAR
|
||||
If UrlParametros("OP").ToString = "ENTREGAS" Then
|
||||
If UrlParametros("CVETICK") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then
|
||||
ImprimeEntregasPorRealziar(UrlParametros("CVETICK").ToString, UrlParametros("USUARIOENTREGA").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function Parametros(Cadena As String) As Hashtable
|
||||
@@ -3978,7 +3985,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
|
||||
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
|
||||
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString))
|
||||
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString.ToDate.ToShortDateString))
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
@@ -4162,7 +4169,23 @@ Partial Class PopUpVerFactura
|
||||
Else
|
||||
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = ENTREGAS - Entregas por realizar"
|
||||
Public Sub ImprimeEntregasPorRealziar(pCveTick As String, pUsuarioEntregar As String)
|
||||
Dim CveTick As Long = pCveTick.ToLong()
|
||||
Dim ObjGeneral As New ClsGenerales
|
||||
If ObjGeneral.GetEntregasPorRealizar(UsuarioActual.CveEmpresa, CveTick) Then
|
||||
Dim DtPaqueteriasGuias As DataTable = ObjGeneral.DtResultados
|
||||
Dim RepParams As New List(Of ReportParameter)
|
||||
RepParams.Add(New ReportParameter("Fecha", DateTime.Today.ToString()))
|
||||
RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar))
|
||||
RepParams.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1944,7 +1944,7 @@
|
||||
<div runat="server">
|
||||
|
||||
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" runat="server"
|
||||
DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,RefCrediProveedor,CveMoneda,Estatus,Correo,BBVAAlias,EstatusPagoElectronico,EstatusPagoElectronicoGrupos,CveSATBanco,ConceptoCIE" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
|
||||
<Columns>
|
||||
@@ -3568,11 +3568,19 @@
|
||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
|
||||
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">CIE:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtReferencia" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtReferencia" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
|
||||
<label for="<%= TxtReferencia.ClientID.ToString()%>">Referencia:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConceptoCIE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilAlfanumerico" runat="server" TargetControlID="TxtConceptoCIE" FilterType="UppercaseLetters,LowercaseLetters,Numbers" />
|
||||
<label for="<%= TxtReferencia.ClientID.ToString()%>">Concepto CIE:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRefCrediProveedor" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<label for="<%= TxtRefCrediProveedor.ClientID.ToString()%>">Credito Proveedor:</label>
|
||||
|
||||
@@ -3111,30 +3111,53 @@ Partial Class Compras_Proveedores
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD MINIMA DE 5
|
||||
If TxtConvenioCIE.Text.Trim.Length <> 0 And TxtConvenioCIE.Text.Trim.Length < 5 Then
|
||||
Alert("El Convenio CIE debe tener una longitud de al menos 5 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ChkPagoElectronicoGrupos.Checked Then
|
||||
|
||||
If TxtConvenioCIE.Text.Trim.Length > 0 Then
|
||||
|
||||
If TxtConvenioCIE.Text.Trim.Length < 5 Then
|
||||
Alert("El campo CIE debe de tener una tamaño mininmo 5 caracteres.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DdlSatBanco.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Se debe de especificar el banco.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim Estatus As Boolean
|
||||
If ChkEstatus.Checked = True Then Estatus = True Else Estatus = False
|
||||
|
||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferencia.Text.Trim, TxtRefCrediProveedor.Text.Trim,
|
||||
DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, Estatus, TxtCorreoCuenta.Text.Trim, TxtBBVAAlias.Text, ChkPagoElectronico.Checked, ChkPagoElectronicoGrupos.Checked, DdlSatBanco.SelectedValue.ToEntero)
|
||||
DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, Estatus, TxtCorreoCuenta.Text.Trim, TxtBBVAAlias.Text, ChkPagoElectronico.Checked, ChkPagoElectronicoGrupos.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtConceptoCIE.Text)
|
||||
End Sub
|
||||
|
||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String,
|
||||
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer)
|
||||
CveMoneda As Integer, Moneda As String, Estatus As Boolean, Correo As String, BBVAAlias As String, EstatusPagoElectronico As Boolean, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer,
|
||||
ConceptoCIE As String)
|
||||
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If Modalidad = "A" Then
|
||||
|
||||
If CveProveedor > 0 Then
|
||||
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor,
|
||||
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco) Then
|
||||
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
|
||||
@@ -3163,6 +3186,7 @@ Partial Class Compras_Proveedores
|
||||
Row("Estatus") = "True"
|
||||
Row("Correo") = Correo
|
||||
Row("CveSATBanco") = CveSATBanco
|
||||
Row("ConceptoCIE") = ConceptoCIE
|
||||
|
||||
TempDTCuentasBancos.Rows.Add(Row)
|
||||
|
||||
@@ -3177,7 +3201,8 @@ Partial Class Compras_Proveedores
|
||||
If CveProveedor > 0 Then
|
||||
|
||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor,
|
||||
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco) Then
|
||||
False, Estatus, CveMoneda, Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco,
|
||||
ConceptoCIE:=ConceptoCIE) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
||||
@@ -3206,6 +3231,7 @@ Partial Class Compras_Proveedores
|
||||
Row("Estatus") = Estatus
|
||||
Row("Correo") = Correo
|
||||
Row("CveSATBanco") = CveSATBanco
|
||||
Row("ConceptoCIE") = ConceptoCIE
|
||||
|
||||
TempDTCuentasBancos.AcceptChanges()
|
||||
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
||||
@@ -3227,6 +3253,7 @@ Partial Class Compras_Proveedores
|
||||
TxtNumeroCuenta.Text = ""
|
||||
TxtConvenioCIE.Text = ""
|
||||
TxtReferencia.Text = ""
|
||||
TxtConceptoCIE.Text = ""
|
||||
TxtRefCrediProveedor.Text = ""
|
||||
TxtCorreoCuenta.Text = ""
|
||||
TxtBBVAAlias.Text = ""
|
||||
@@ -4691,6 +4718,7 @@ Partial Class Compras_Proveedores
|
||||
TxtPlaza.Text = ""
|
||||
TxtConvenioCIE.Text = ""
|
||||
TxtReferencia.Text = ""
|
||||
TxtConceptoCIE.Text = ""
|
||||
TxtRefCrediProveedor.Text = ""
|
||||
DdlMoneda.SelectedIndex = 0
|
||||
TxtCorreoCuenta.Text = ""
|
||||
@@ -4721,6 +4749,7 @@ Partial Class Compras_Proveedores
|
||||
TxtPlaza.Text = GvRow.DataKey("Plaza")
|
||||
TxtConvenioCIE.Text = GvRow.DataKey("CIE")
|
||||
TxtReferencia.Text = GvRow.DataKey("Referencia")
|
||||
TxtConceptoCIE.Text = GvRow.DataKey("ConceptoCIE")
|
||||
TxtRefCrediProveedor.Text = GvRow.DataKey("RefCrediProveedor")
|
||||
TxtCorreoCuenta.Text = GvRow.DataKey("Correo")
|
||||
TxtBBVAAlias.Text = GvRow.DataKey("BBVAAlias")
|
||||
|
||||
@@ -122,7 +122,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo")
|
||||
UpGral.Update()
|
||||
|
||||
Ejercicio = -1
|
||||
Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
|
||||
@@ -138,15 +138,14 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
||||
|
||||
UpGral.Update()
|
||||
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||
Ejercicio = -1
|
||||
Actualizar = False
|
||||
Else
|
||||
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
|
||||
Alert(String.Format("No se puede bloquear el periodo por: <br/>{0} ", mensajeAlerta), TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
Ejercicio = -1
|
||||
Actualizar = False
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -114,10 +114,11 @@
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px">
|
||||
<%-- <asp:ListItem Selected="False" Text="Seleccione" Value="-1"></asp:ListItem>--%>
|
||||
<asp:ListItem Selected="True" Text="En Proceso" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Confirmado por Proveedor" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Pendiente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="En Proceso" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Entregado" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Confirmado por Cliente" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Reasignar Nueva Entrega" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Selected="False" Text="Directo a Clientes" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVDdlEstatus" runat="server" ControlToValidate="DdlEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario." InitialValue="-1" ValidationGroup="GrpCrearGuia"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDdlEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlEstatus" Width="250px"></ajax:ValidatorCalloutExtender>--%>
|
||||
@@ -200,7 +201,7 @@
|
||||
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="TrTipo" align="left" visible ="false">
|
||||
<tr runat="server" id="TrTipo" align="left" visible="false">
|
||||
<td class="text-right" align="left" valign="top" style="width: 140px; padding-top: 4px;"><b>Tipo:</b></td>
|
||||
<td align="left" valign="top" style="width: 200px;">
|
||||
<asp:DropDownList ID="DdlPaqueteriaGuiaTipo" runat="server" AppendDataBoundItems="true" DataTextField="PaqueteriaGuiaTipo" DataValueField="CvePaqueteriaGuiaTipo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>
|
||||
|
||||
@@ -194,7 +194,13 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
protected void CargaPaqueterias()
|
||||
{
|
||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias;
|
||||
if (UsuarioActual.CveRol == 1339)
|
||||
{
|
||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias.FiltraParametros("TipoPaqueteria = 0");
|
||||
}else
|
||||
{
|
||||
DdlPaqueterias.DataSource = GlobalDTPaqueterias;
|
||||
}
|
||||
DdlPaqueterias.DataBind();
|
||||
DdlPaqueterias.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
|
||||
@@ -216,12 +222,19 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
protected void CargaEstatus()
|
||||
{
|
||||
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlEstatus.Items.Insert(1, new ListItem("En Proceso ", "1"));
|
||||
DdlEstatus.Items.Insert(2, new ListItem("Confirmado por Proveedor ", "2"));
|
||||
DdlEstatus.Items.Insert(3, new ListItem("Entregado ", "3"));
|
||||
DdlEstatus.Items.Insert(4, new ListItem("Confirmado por Cliente", "4"));
|
||||
DdlEstatus.SelectedValue = "1";
|
||||
if (UsuarioActual.CveRol == 1339)
|
||||
{
|
||||
DdlEstatus.Items.Insert(0, new ListItem("En Proceso ", "2"));
|
||||
}else
|
||||
{
|
||||
DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
DdlEstatus.Items.Insert(1, new ListItem("Pendiente ", "1"));
|
||||
DdlEstatus.Items.Insert(2, new ListItem("En Proceso ", "2"));
|
||||
DdlEstatus.Items.Insert(3, new ListItem("Entregado ", "3"));
|
||||
DdlEstatus.Items.Insert(4, new ListItem("Reasignar Nueva Entrega ", "4"));
|
||||
DdlEstatus.Items.Insert(5, new ListItem("Directo a Clientes ", "5"));
|
||||
DdlEstatus.SelectedValue = "-1";
|
||||
}
|
||||
|
||||
DdlEstatusEditar.Items.Insert(0, new ListItem("Seleccione ", "-1"));
|
||||
DdlEstatusEditar.Items.Insert(1, new ListItem("En Proceso ", "1"));
|
||||
@@ -238,9 +251,17 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
|
||||
private void CargaUsuarios()
|
||||
{
|
||||
DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa);
|
||||
DdlUsuarios.DataBind();
|
||||
DdlUsuarios.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
if (UsuarioActual.CveRol == 1339)
|
||||
{
|
||||
DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa:UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveRol = {0}",UsuarioActual.CveRol));
|
||||
DdlUsuarios.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlUsuarios.DataBind();
|
||||
DdlUsuarios.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void InicializaFechas()
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,CveUM,CvePS,PU,CveMovimientoDetalle,CveAlmacen" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="tabla_correcto grides Widthall ScrollAD" data-height="400" data-freezerows="-1" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" DataKeyNames="No,CveUM,CvePS,PU,CveMovimientoDetalle,CveAlmacen,SeccionAlmacen,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="tabla_correcto grides Widthall ScrollAD" data-height="400" data-freezerows="-1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField ItemStyle-Width="150px" DataField="Almacen" />
|
||||
<asp:TemplateField HeaderText="Cantidad Devolucion" Visible="false">
|
||||
|
||||
@@ -100,6 +100,7 @@ Partial Class Inventarios_Consignaciones
|
||||
dt.Columns.Add("EstatusExistencia")
|
||||
dt.Columns.Add("CveMovimientoDetalle")
|
||||
|
||||
dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
|
||||
dt.Columns.Add("SeccionAlmacen")
|
||||
dt.Columns.Add("Serie", Type.GetType("System.String"))
|
||||
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
||||
@@ -158,6 +159,9 @@ Partial Class Inventarios_Consignaciones
|
||||
Else
|
||||
DdlProducto.Visible = False
|
||||
End If
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -590,6 +594,7 @@ Partial Class Inventarios_Consignaciones
|
||||
Dim PSCodigo = ""
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
Dim SeccionAlmacen As String = DdlSeccionAlmacen.SelectedItem.Text
|
||||
Dim Serie As String = If(TxtSerie.Text = "", "-1", TxtSerie.Text)
|
||||
Dim Lote As String = If(TxtLote.Text = "", "-1", TxtLote.Text)
|
||||
Dim Caducidad As String = If(TxtCaducidad.Text = "", "-1", TxtCaducidad.Text)
|
||||
@@ -617,6 +622,7 @@ Partial Class Inventarios_Consignaciones
|
||||
registro.Item("PU") = TxtPU.Text.ToDouble
|
||||
registro.Item("PUExtranjero") = TxtPU.Text.ToDouble
|
||||
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||
registro.Item("SeccionAlmacen") = SeccionAlmacen
|
||||
registro.Item("Serie") = Serie
|
||||
registro.Item("Lote") = Lote
|
||||
registro.Item("FechaCaducidad") = Caducidad
|
||||
@@ -711,7 +717,7 @@ Partial Class Inventarios_Consignaciones
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If CveMovimiento > 0 Then
|
||||
For Each Dr As DataRow In DtMovimientos.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=TxtSerie.Text, Lote:=TxtLote.Text, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos"
|
||||
Exit For
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAccionesComplementos">
|
||||
<%--<asp:UpdatePanel runat="server" ID="UpAccionesComplementos">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimir" runat="server" OnClick="LnkImprimir_Click" Style="color: #686868;" Text="<i class='fa fa-pdf' style='color:#686868;'></i> Imprimir"/>
|
||||
@@ -31,7 +31,7 @@
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimir"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -89,7 +89,7 @@
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
|
||||
@@ -41,13 +41,17 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
GridViewRowCollection Grid = GvPaqueteriasGuias.Rows;
|
||||
|
||||
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
||||
long CveTick = DateTime.Now.Ticks;
|
||||
string Usuario = DdlUsuario.SelectedValue.ToEntero() > 0 ? DdlUsuario.SelectedItem.Text : "Todos";
|
||||
|
||||
string LigaPopUpVerFactura = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", ModExtensiones.Encripta(String.Format("OP=ENTREGAS&CVETICK={0}&USUARIOENTREGA={1}", CveTick, Usuario)));
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
if (row.FCCheckBox("ChkAsigna").Checked)
|
||||
{
|
||||
int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||
|
||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal)){
|
||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal, CveTick)){
|
||||
TieneError = true;
|
||||
}else
|
||||
{
|
||||
@@ -67,11 +71,11 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!TieneError)
|
||||
{
|
||||
ObjGeneral.Commit();
|
||||
Alert("Entregas asignadas correctamente");
|
||||
Alert(String.Format("Entregas asignadas correctamente <br/><br/><a style='color:#23527c' href='{0}'>Imprimir Reporte de Entregas Asignadas</a>", LigaPopUpVerFactura));
|
||||
CargarEntregas();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<label class="col-md-4">Código.Barras</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtCodigoBarras"></asp:TextBox>
|
||||
<asp:TextBox runat="server" ID="TxtCodigoBarras" OnTextChanged="TxtCodigoBarras_Change" AutoPostBack="true"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
@@ -241,6 +241,24 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;" runat="server" id="divSeccionAlmacen" visible="false">
|
||||
<label class="col-md-4">Sección Almacén</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" ></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;" runat="server" id="divLote" visible="false">
|
||||
<label class="col-md-4">Lote</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtLote"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;" runat="server" id="divFechaCaducidad" visible="false">
|
||||
<label class="col-md-4">Fecha Caducidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCaducidad"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 5px;">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
<asp:Button ID="BtnGuardar" runat="server" ValidationGroup="GrpIngresar" Text="Ingresar" class="btn btn-primary" Enabled="false" />
|
||||
@@ -304,7 +322,10 @@
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -325,7 +346,10 @@
|
||||
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -89,6 +89,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
|
||||
Select Case CveEstatus
|
||||
@@ -181,7 +184,11 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
|
||||
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
|
||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
|
||||
GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
|
||||
|
||||
GvIFDUltimoRegistrado.Columns(4).Visible = ObjInventario.DtResultados.Rows(0)("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
GvIFDUltimoRegistrado.Columns(6).Visible = ObjInventario.DtResultados.Rows(0)("Lote").ToString <> ""
|
||||
GvIFDUltimoRegistrado.Columns(7).Visible = ObjInventario.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
Else
|
||||
GvIFDUltimoRegistrado.DataSource = Nothing
|
||||
End If
|
||||
@@ -223,6 +230,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Dim Inventario As New ClsInventarios
|
||||
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
|
||||
If Inventario.DtResultados.Rows.Count > 0 Then
|
||||
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen") > 0
|
||||
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
|
||||
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
|
||||
Else
|
||||
GvIFD.DataSource = Nothing
|
||||
@@ -248,8 +258,12 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Dim CveProducto As Integer = -1
|
||||
Dim CveUnidadMedida As Integer
|
||||
Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
|
||||
Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
|
||||
Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
|
||||
Dim SeccionAlmacen As String = If(DdlSeccionAlmacen.SelectedValue.ToEntero > -1, DdlSeccionAlmacen.SelectedItem.Text, "")
|
||||
Dim CveSeccionAlmacen As Integer = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
|
||||
Dim SerieLote As String = TxtCodigoSerie.Text.Trim
|
||||
Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1")
|
||||
Dim FechaCaducidad As String = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
|
||||
Dim CveMetodoInv As Integer = -1
|
||||
Dim Cantidad = TxtCantidadProducto.Text.ToDouble
|
||||
|
||||
@@ -283,14 +297,22 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
Dim Consulto As Boolean = False
|
||||
Using Inventarios As New ClsInventarios
|
||||
|
||||
If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario) Then
|
||||
If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario,
|
||||
CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
|
||||
If GvIFDUltimoRegistrado.Rows.Count > 0 Then
|
||||
GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0
|
||||
GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1"
|
||||
GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900"
|
||||
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = TxtCodigoSerie.Text.Trim
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCantidadProducto.Text.Trim
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad
|
||||
GvIFDUltimoRegistrado.Rows(0).Cells(8).Text = TxtCantidadProducto.Text.Trim
|
||||
Else
|
||||
Consulto = True
|
||||
If Inventarios.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario) Then
|
||||
@@ -308,6 +330,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
TxtCodigoSerie.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
TxtCantidadProducto.Text = "1"
|
||||
DdlSeccionAlmacen.SelectedValue = "-1"
|
||||
TxtLote.Text = ""
|
||||
TxtFechaCaducidad.Text = ""
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
Else
|
||||
TxtCodigoSerie.Text = ""
|
||||
@@ -320,6 +345,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
TxtCodigoBarras.Text = ""
|
||||
TxtCodigoSerie.Text = ""
|
||||
TxtCodigo.Text = ""
|
||||
DdlSeccionAlmacen.SelectedValue = "-1"
|
||||
TxtLote.Text = ""
|
||||
TxtFechaCaducidad.Text = ""
|
||||
Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
@@ -491,4 +519,17 @@ Partial Class Inventarios_InventarioFisicoDetalle
|
||||
' UsuarioActual.CveUsuario
|
||||
'
|
||||
End Sub
|
||||
|
||||
Protected Sub TxtCodigoBarras_Change(sender As Object, e As EventArgs)
|
||||
Dim Producto As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoBarras.Text}'")
|
||||
|
||||
Dim AplicaSeccion As Boolean = Producto("AplicaSeccion") = "1"
|
||||
Dim AplicaCaducidad As Boolean = Producto("AplicaCaducidad") = "1"
|
||||
Dim AplicaLote As Boolean = Producto("AplicaLote") = "1"
|
||||
|
||||
divSeccionAlmacen.Visible = AplicaSeccion
|
||||
divLote.Visible = AplicaLote
|
||||
divFechaCaducidad.Visible = AplicaCaducidad
|
||||
UPAgregarPro.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -77,11 +77,12 @@ Partial Class RepTraspasoAlmacen
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||
DtInventarios = ObjInventarios.DtResultados
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -2,7 +2,13 @@
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using Extensiones;
|
||||
using Extensiones;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Web.Services;
|
||||
using System.Web.Services.Protocols;
|
||||
using GemBox.Spreadsheet;
|
||||
using System.Data;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
@@ -33,11 +39,148 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
context.Response.End();
|
||||
//ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", CveEmpresa, cveTareaProgramada, CveTareaProgramadaHistorial, Metodo), "Tareas Programadas");
|
||||
}
|
||||
public bool EjecutaThalamus(int CveEmpresa)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
private bool EjecutaThalamus(int CveEmpresa)
|
||||
{
|
||||
|
||||
|
||||
string RutaArchivoVentas = $@"C:\Temp\Ventas{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||
var DTVentas = new DataTable();
|
||||
DTVentas.Columns.Add("systemId");
|
||||
DTVentas.Columns.Add("Branch");
|
||||
DTVentas.Columns.Add("Code");
|
||||
DTVentas.Columns.Add("Sale Date");
|
||||
DTVentas.Columns.Add("Quantity");
|
||||
DTVentas.Columns.Add("Amount");
|
||||
DTVentas.Columns.Add("Transaction ID");
|
||||
for (int x = 0; x <= 50; x++)
|
||||
{
|
||||
DataRow dr = DTVentas.NewRow();
|
||||
dr[0] = $"systemId {x}";
|
||||
dr[1] = $"Branch {x}";
|
||||
dr[2] = $"{x}";
|
||||
dr[3] = $"{ DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||
dr[4] = $"{x}";
|
||||
dr[5] = $"{x}.00";
|
||||
dr[6] = $"{x}";
|
||||
DTVentas.Rows.Add(dr);
|
||||
}
|
||||
|
||||
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||
var workbook = new ExcelFile();
|
||||
var worksheet = workbook.Worksheets.Add("Ventas");
|
||||
worksheet.InsertDataTable(DTVentas, new InsertDataTableOptions()
|
||||
{
|
||||
ColumnHeaders = true,
|
||||
StartRow = 0
|
||||
});
|
||||
workbook.Save(RutaArchivoVentas);
|
||||
string FTPServer = "ftp://127.0.0.1/";
|
||||
string TFPUsr = "Toor";
|
||||
string FTPPass = "agj-3500";
|
||||
var FInfo = new FileInfo(RutaArchivoVentas);
|
||||
bool Carga = CargarArchivos(FInfo.FullName, FTPServer, TFPUsr, FTPPass);
|
||||
if (Carga)
|
||||
{
|
||||
Carga = VerificarArchivo(FInfo.Name, FInfo.Length, FTPServer, TFPUsr, FTPPass);
|
||||
}
|
||||
|
||||
return Carga;
|
||||
|
||||
}
|
||||
|
||||
|
||||
private bool CargarArchivos(string RutaArchivo, string FTPServer, string FTPUsr, string FTPPass)
|
||||
{
|
||||
bool Respuesta;
|
||||
var FInfo = new FileInfo(RutaArchivo);
|
||||
if (FInfo.Exists)
|
||||
{
|
||||
FtpWebRequest request = (FtpWebRequest)WebRequest.Create($"{FTPServer}/{FInfo.Name}");
|
||||
request.Method = WebRequestMethods.Ftp.UploadFile;
|
||||
int tamanio = 1024;
|
||||
var buffer = new byte[tamanio + 1];
|
||||
int byteRead = 0;
|
||||
bool Conected = false;
|
||||
request.Credentials = new NetworkCredential(FTPUsr, FTPPass);
|
||||
try
|
||||
{
|
||||
request.GetResponse();
|
||||
Conected = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
if (Conected)
|
||||
{
|
||||
Stream ftpStream;
|
||||
FileStream f;
|
||||
ftpStream = request.GetRequestStream();
|
||||
f = File.OpenRead(FInfo.FullName);
|
||||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
byteRead = f.Read(buffer, 0, tamanio);
|
||||
ftpStream.Write(buffer, 0, byteRead);
|
||||
}
|
||||
while (byteRead != 0);
|
||||
Respuesta = true;
|
||||
}
|
||||
// validar si existe archivo si coincide en tamaño
|
||||
catch (Exception ex)
|
||||
{
|
||||
Respuesta = false;
|
||||
}
|
||||
|
||||
if (f is object)
|
||||
{
|
||||
f.Close();
|
||||
}
|
||||
|
||||
if (ftpStream is object)
|
||||
{
|
||||
ftpStream.Close();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Respuesta = false;
|
||||
// no se conecto al ftp probablemente credenciales erroneas
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Respuesta = false;
|
||||
// El archivo no existe en el disco local
|
||||
}
|
||||
|
||||
return Respuesta;
|
||||
}
|
||||
|
||||
|
||||
private bool VerificarArchivo(string Archivo, long Tamanio, string FTPServer, string FTPUsr, string FTPPass)
|
||||
{
|
||||
bool Respuesta = false;
|
||||
FtpWebRequest reqSize = (FtpWebRequest)FtpWebRequest.Create(new Uri(FTPServer + Archivo));
|
||||
reqSize.Credentials = new NetworkCredential(FTPUsr, FTPPass);
|
||||
reqSize.Method = WebRequestMethods.Ftp.GetFileSize;
|
||||
reqSize.UseBinary = true;
|
||||
FtpWebResponse loginresponse = (FtpWebResponse)reqSize.GetResponse();
|
||||
FtpWebResponse respSize = (FtpWebResponse)reqSize.GetResponse();
|
||||
respSize = (FtpWebResponse)reqSize.GetResponse();
|
||||
long size = respSize.ContentLength;
|
||||
respSize.Close();
|
||||
if (Tamanio == size)
|
||||
{
|
||||
Respuesta = true;
|
||||
}
|
||||
|
||||
return Respuesta;
|
||||
}
|
||||
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
|
||||
134
TareasProgramadas/Tareas72.ashx
Normal file
134
TareasProgramadas/Tareas72.ashx
Normal file
@@ -0,0 +1,134 @@
|
||||
<%@ WebHandler Language="C#" Class="Tareas72" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Data;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Extensiones;
|
||||
using System.IO;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text;
|
||||
public class Tareas72 : IHttpHandler
|
||||
{
|
||||
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
context.Response.Write("Hello World");
|
||||
|
||||
bool retorno = false;
|
||||
string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"];
|
||||
switch (Metodo)
|
||||
{
|
||||
case "ActualizarProcesoPaqueterias":
|
||||
retorno = ActualizarProcesoPaqueterias();
|
||||
break;
|
||||
}
|
||||
|
||||
context.Response.Write(retorno);
|
||||
context.Response.End();
|
||||
}
|
||||
|
||||
private bool ActualizarProcesoPaqueterias()
|
||||
{
|
||||
bool retorno = true;
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
ClsClientes ObjClientes = new ClsClientes();
|
||||
ClsVentas ObjVentas = new ClsVentas();
|
||||
ClsVtaVendedores ObjVendedores = new ClsVtaVendedores();
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
|
||||
ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas();
|
||||
Empresa Empresa = new Empresa();
|
||||
if (ObjEmpresa.GetEmpresas(72, "-1", "-1", "-1", "-1"))
|
||||
{
|
||||
Empresa = ObjEmpresa.Empresa;
|
||||
}
|
||||
try
|
||||
{
|
||||
if (ObjGenerales.GetPaqueteriasGuias(-1, -1, 7, 1, -1, 72, "-1", "01/01/1990", "01/01/2100"))
|
||||
{
|
||||
DataRowCollection GuiasPendientes = ObjGenerales.DtResultados.Rows;
|
||||
foreach (DataRow Guia in GuiasPendientes)
|
||||
{
|
||||
int CvePaqueteriaGuia = Guia["CvePaqueteriaGuia"].ToString().ToEntero();
|
||||
string GuiaConsultar = Guia["Guia"].ToString();
|
||||
|
||||
//CONSULTAMOS CADA GUIA EN LA SIGUIENTE API
|
||||
string uriConsultaGuia = string.Format("https://cc.paquetexpress.com.mx/ptxws/rest/api/v2/guia/historico/ultimoevento/{0}/@1@2@3@4@5", GuiaConsultar);
|
||||
HttpClient Client = new HttpClient();
|
||||
HttpResponseMessage ResponseMessage = Client.GetAsync(uriConsultaGuia).Result;
|
||||
string JsonString = ResponseMessage.Content.ReadAsStringAsync().Result;
|
||||
string JsonStringFormat = JsonString.Replace("Resultado(", "{\"Resultado\":").Replace(")", "}");
|
||||
DataSet dataSet = JsonConvert.DeserializeObject<DataSet>(JsonStringFormat);
|
||||
DataTable dataTable = dataSet.Tables["Resultado"];
|
||||
if (dataTable.Rows[0]["eventoId"].ToString() == "Hdc")
|
||||
{
|
||||
int EstatusEntregado = 3;
|
||||
|
||||
//MANDAMOS A ACTUALIZAR CON ESTATUS DE ENTREGADO
|
||||
if (ObjGenerales.UpdatePaqueteriasGuias(CvePaqueteriaGuia, -1, -1, -1, EstatusEntregado, "-1", "", "", -1, -1, "-1", "-1", ""))
|
||||
{
|
||||
#region 'MANDAR CORREOS'
|
||||
int CveCliente = Guia["CveCliente"].ToString().ToEntero();
|
||||
int CveVenta = Guia["CveAgrupador"].ToString().ToEntero();
|
||||
StringBuilder correos = new StringBuilder("");
|
||||
|
||||
if (ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1))
|
||||
{
|
||||
if (ObjClientes.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DataRow DatosCliente = ObjClientes.DtResultados.Rows[0];
|
||||
if (DatosCliente["CorreoEntregaCompras"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaCompras"].ToString()));
|
||||
if (DatosCliente["CorreoEntregaAlmacen"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaAlmacen"].ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjVentas.GetVenta(CveVenta, 72))
|
||||
{
|
||||
if (ObjVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
|
||||
if (ObjVendedores.GetVendedores(72))
|
||||
{
|
||||
DataRow DatosVendedor = ObjVendedores.DtResultados.FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor));
|
||||
if (DatosVendedor["Correo"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["Correo"].ToString()));
|
||||
if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
string CorreosString = correos.ToString();
|
||||
if (CorreosString.Length > 0)
|
||||
{
|
||||
Correo.SendMail(Empresa, correos.ToString(), "Actualización de paqueterias entregadas", "");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", 72, "", "", e.Message), "Tareas Programadas");
|
||||
retorno = false;
|
||||
}
|
||||
|
||||
ObjGenerales.Dispose();
|
||||
ObjClientes.Dispose();
|
||||
ObjVentas.Dispose();
|
||||
ObjVendedores.Dispose();
|
||||
ObjEmpresa.Dispose();
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5983,7 +5983,7 @@ Partial Class Clientes
|
||||
|
||||
#Region "C U E N T A S - B A N C A R I A S"
|
||||
|
||||
Private Sub CargaCuentasBancarias()
|
||||
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
|
||||
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
|
||||
@@ -6004,9 +6004,8 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ObjCuentasBancos.Dispose()
|
||||
CargaPSGridCuentasBancos()
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
CargaPSGridCuentasBancos()
|
||||
|
||||
CargaMonedas()
|
||||
End Sub
|
||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||
@@ -6208,13 +6207,10 @@ Partial Class Clientes
|
||||
RecargaGlobalCuentasBancarias()
|
||||
End Sub
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveCliente > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
If ObjCuentasBancos.GetCuentasDepositos() Then
|
||||
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
End If
|
||||
ObjCuentasBancos.Dispose()
|
||||
If CveCliente > 0 Then
|
||||
|
||||
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -3313,7 +3313,7 @@
|
||||
<tr align="left" id="trPaqueteriaOpciones" runat="server" visible="false">
|
||||
<td colspan="2">
|
||||
<asp:RadioButtonList runat="server" ID="RblPaqueteria">
|
||||
<asp:ListItem Value="1" Text="Entrega En Mostrador" />
|
||||
<asp:ListItem Value="1" Selected="True" Text="Entrega En Mostrador" />
|
||||
<asp:ListItem Value="2" Text="Entrega Interna" />
|
||||
<asp:ListItem Value="3" Text="Entrega Externa" />
|
||||
</asp:RadioButtonList>
|
||||
|
||||
@@ -14471,6 +14471,8 @@ Partial Class Ventas
|
||||
If Not DdlVendedor.SelectedValue.ToEntero() > 0 Then
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
End If
|
||||
|
||||
TxtCorreoNotificaciones.Text = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltroPrimeroValor("Correo")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -25827,7 +25829,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Private Sub MostrarOpcioensPaqueteria()
|
||||
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped")
|
||||
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1"
|
||||
trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
|
||||
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user