merge
This commit is contained in:
@@ -2864,7 +2864,7 @@ Public Class ClsBancos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetLayoutPagosEnviados(CveCuenta As Integer, Estatus As Integer, Tipo As String, FechaI As String, FechaF As String) As Boolean
|
||||
Public Function GetLayoutPagosEnviados(CveCuenta As Integer, Estatus As Integer, Tipo As String, FechaI As String, FechaF As String, Optional PorGrupos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_LayoutPagosEnviados")
|
||||
@@ -2875,6 +2875,7 @@ Public Class ClsBancos
|
||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||
.Add("@PorGrupos", SqlDbType.Bit).Value = PorGrupos
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2906,7 +2907,7 @@ Public Class ClsBancos
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddLayoutEnvios(Archivo As String, Fecha As Date, CveCuenta As Integer) As Integer
|
||||
Public Function AddLayoutEnvios(Archivo As String, Fecha As Date, CveCuenta As Integer, Optional PorGrupos As Boolean = False) As Integer
|
||||
Dim Retorno = -1
|
||||
|
||||
DataAdapter("PA_Banc_LayoutEnviosAdd")
|
||||
@@ -2915,6 +2916,7 @@ Public Class ClsBancos
|
||||
.Add("@Archivo", SqlDbType.VarChar).Value = Archivo
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@PorGrupos", SqlDbType.Bit).Value = PorGrupos
|
||||
.Add("@CveLayoutEnvio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -3113,7 +3115,7 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetLayoutProveedores(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetLayoutProveedores(CveCuenta As Integer, CveEmpresa As Integer, Optional PorGrupos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_LayoutProveedores")
|
||||
@@ -3121,6 +3123,7 @@ Public Class ClsBancos
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@PorGrupos", SqlDbType.Bit).Value = PorGrupos
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4609,26 +4609,10 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetMonedas() As Boolean
|
||||
Public Function GetAgrupadoresSAT() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter(" SELECT * FROM Monedas ".ToString, CommandType.Text)
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las Monedas.", ex)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetAgrupadoresSAT(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter(" SELECT CveAgrupadorSAT, Codigo + REPLICATE(' ', 10 - len(Codigo)) + ' - ' + Nombre AS CodigoNombre FROM AgrupadoresSAT where CveEmpresa= '" & CveEmpresa & "'", CommandType.Text)
|
||||
|
||||
DataAdapter("PA_Conta_AgrupadoresSATGet")
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
@@ -1388,7 +1388,7 @@ Public Class ClsGenerales
|
||||
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 = "") As Boolean
|
||||
Optional Correo As String = "", Optional BBVAAlias As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosAdd")
|
||||
@@ -1410,7 +1410,8 @@ Public Class ClsGenerales
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
||||
|
||||
End With
|
||||
|
||||
@@ -1453,7 +1454,7 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
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 = "") As Boolean
|
||||
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") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosUpdate")
|
||||
@@ -1475,6 +1476,7 @@ Public Class ClsGenerales
|
||||
.Add("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
||||
|
||||
End With
|
||||
|
||||
@@ -1492,10 +1494,10 @@ Public Class ClsGenerales
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "T I P O - C A M B I O"
|
||||
Public Function AddTipoCambio(TipoCambio As Double, Fecha As Date, Optional TipoCambioEuro As Double = 0, Optional TipoCambioFIX As Double = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1175,7 +1175,7 @@ Public Class ClsPaginas
|
||||
ObjPS.Dispose()
|
||||
End Get
|
||||
End Property
|
||||
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable
|
||||
Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa)
|
||||
If CveEmpresa <> -1 Then
|
||||
@@ -1195,6 +1195,7 @@ Public Class ClsPaginas
|
||||
If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo))
|
||||
If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus))
|
||||
If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta))
|
||||
If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS))
|
||||
|
||||
Try
|
||||
GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable
|
||||
|
||||
@@ -2822,7 +2822,7 @@ Public Class ClsVentas
|
||||
Try
|
||||
|
||||
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
|
||||
If resp.Estado = 0 Then
|
||||
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
|
||||
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
|
||||
|
||||
@@ -380,7 +380,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
End If
|
||||
|
||||
If usuario.Empresa.Funcionalidad(558) = "1" Then
|
||||
If usuario.Empresa.Funcionalidad(558) = "1" AndAlso DtPSRetorno IsNot Nothing Then
|
||||
Try
|
||||
Dim NombreFiltroColumna As String = DtPSRetorno.Columns(3).ColumnName
|
||||
DtPSRetorno = DtPSRetorno.FiltraParametros("", String.Format("{0} DESC,PSCodigo", NombreFiltroColumna))
|
||||
|
||||
@@ -60,6 +60,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ViewState("NombreArchivo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTPendientes As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTPendientes"), DataTable)
|
||||
@@ -67,7 +68,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Set(value As DataTable)
|
||||
ViewState("DTPendientes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTAltasPendientes As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAltasPendientes"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAltasPendientes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTProveedores As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTProveedores"), DataTable)
|
||||
@@ -214,7 +225,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
DTPendientes = Nothing
|
||||
End If
|
||||
|
||||
If ObjBancos.GetLayoutPagosEnviados(CveCuenta, 1, DdlTipoGeneracion.SelectedValue, "-1", "-1") Then
|
||||
If ObjBancos.GetLayoutPagosEnviados(CveCuenta, 1, DdlTipoGeneracion.SelectedValue, "-1", "-1", PorGrupos:=True) Then
|
||||
DTEnviadas = ObjBancos.DtResultados
|
||||
Else
|
||||
DTEnviadas = Nothing
|
||||
@@ -237,7 +248,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
UpGVDatos.Update()
|
||||
|
||||
If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then
|
||||
CargaDatosInformativos()
|
||||
CargaDatosInformativos()
|
||||
Else
|
||||
|
||||
LbNumeroMovimientos.Text = "0"
|
||||
LbImporteMovimientos.Text = "0"
|
||||
|
||||
UpComandosGeneracion.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -331,13 +348,23 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
End Sub
|
||||
Private Function CreaArchivo(Tipo As Integer) As Boolean
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True) As Boolean
|
||||
|
||||
|
||||
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para doferentes tipos de bancos
|
||||
|
||||
DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA"))
|
||||
|
||||
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA"))
|
||||
|
||||
If Tipo = 1 Then
|
||||
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO")
|
||||
Else
|
||||
NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
Dim fs As FileStream = File.Create(path)
|
||||
|
||||
@@ -442,7 +469,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim DtRegenerar As New DataTable
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
If ObjBancos.GetLayoutPagos(CveCuenta, CveBLE, "-1") Then
|
||||
If ObjBancos.GetLayoutPagos(CveCuenta, CveBLE, "-1", PorGrupos:=True) Then
|
||||
DtRegenerar = ObjBancos.DtResultados
|
||||
Else
|
||||
DtRegenerar = Nothing
|
||||
@@ -450,7 +477,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ObjBancos.Dispose()
|
||||
|
||||
If DtRegenerar IsNot Nothing Then
|
||||
GeneraPago(DtRegenerar)
|
||||
GeneraPago(DtRegenerar, False)
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -492,13 +519,14 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
AltaProveedores(1)
|
||||
End Sub
|
||||
|
||||
Private Sub AltaProveedores(TipoAlta As Integer)
|
||||
Private Sub AltaProveedores(TipoAlta As Integer, Optional DtCuentasPendientesTemp As DataTable = Nothing)
|
||||
|
||||
|
||||
NombreArchivo = ""
|
||||
|
||||
Dim RegistrosAltaBancomer As New StringBuilder
|
||||
Dim RegistrosAltaInterbancario As New StringBuilder
|
||||
Dim SBErrores As New StringBuilder
|
||||
|
||||
Dim NombreArchivoBancomer As String = ""
|
||||
Dim NombreArchivoInterbancario As String = ""
|
||||
@@ -508,46 +536,72 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim ErrorLayout = False
|
||||
|
||||
|
||||
Dim DtCuentasPendientesTemp As DataTable = DTPendientes.Copy
|
||||
If DtCuentasPendientesTemp Is Nothing Then
|
||||
DtCuentasPendientesTemp = DTPendientes.Copy
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DtCuentasPendientesTemp.CaseSensitive = False
|
||||
|
||||
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (CuentaPago like '%BBVA%' OR CuentaPago like '%BANCOMER%' ) ", "", {"CuentaPago", "NumCuenta", "AbreviaturaMon", "RazonSocial", "CveProveedor", "CveBanco"})
|
||||
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND NOT (CuentaPago like '%BBVA%' OR CuentaPago like '%BANCOMER%' ) ", "", {"CuentaPago", "NumCuenta", "AbreviaturaMon", "RazonSocial", "CveProveedor", "CveBanco"})
|
||||
|
||||
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' ) ", "", {"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%' ) ", "", {"BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
|
||||
'CLABEDestino
|
||||
|
||||
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
|
||||
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
|
||||
|
||||
Dim SBTmpBancomer As New StringBuilder
|
||||
Dim SBErroresBancomer As New StringBuilder
|
||||
Dim ErrorLineaBancomer As Boolean = False
|
||||
|
||||
If dRow("NumCuenta").ToString.Length < 19 Then 'Tamaño maximo 18
|
||||
RegistrosAltaBancomer.Append(dRow("NumCuenta").ToString.PadLeft(18, CeroRelleno))
|
||||
SBErroresBancomer.Append($"{dRow("RazonSocial").ToString } ")
|
||||
SBErroresBancomer.Append($"Cuenta: {dRow("Cuenta").ToString } ")
|
||||
|
||||
If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18
|
||||
SBTmpBancomer.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
SBErroresBancomer.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ")
|
||||
ErrorLineaBancomer = True
|
||||
End If
|
||||
|
||||
If dRow("AbreviaturaMon").ToString.Length = 3 AndAlso dRow("AbreviaturaMon").ToString.Contiene("MXN", "USD", "EUR") Then
|
||||
RegistrosAltaBancomer.Append(dRow("AbreviaturaMon"))
|
||||
If dRow("Abreviatura").ToString.Length = 3 Then
|
||||
SBTmpBancomer.Append(dRow("Abreviatura"))
|
||||
Else
|
||||
SBErroresBancomer.Append("El tamaño de la divisa es incorrecto, ")
|
||||
ErrorLineaBancomer = True
|
||||
End If
|
||||
|
||||
RegistrosAltaBancomer.Append("0999999999999.99")
|
||||
SBTmpBancomer.Append("0999999999999.99")
|
||||
|
||||
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
|
||||
RegistrosAltaBancomer.Append(dRow("RazonSocial").ToString.PadLeft(30, EspacioRelleno))
|
||||
SBTmpBancomer.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
Else
|
||||
RegistrosAltaBancomer.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||
SBTmpBancomer.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||
End If
|
||||
|
||||
'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
|
||||
RegistrosAltaBancomer.Append(dRow("CveProveedor").ToString.PadLeft(30, EspacioRelleno))
|
||||
SBTmpBancomer.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
|
||||
|
||||
'CORREO OPCIONAL TAMAÑO MAXIMO 80
|
||||
'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno))
|
||||
|
||||
RegistrosAltaBancomer.Append(vbCrLf)
|
||||
SBTmpBancomer.Append(vbCrLf)
|
||||
|
||||
|
||||
If Not ErrorLineaBancomer Then
|
||||
RegistrosAltaBancomer.Append(SBTmpBancomer.ToString)
|
||||
Else
|
||||
SBErroresBancomer.Append("<br>")
|
||||
SBErrores.AppendLine(SBErroresBancomer.ToString)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
TextoCompleto = RegistrosAltaBancomer.ToString
|
||||
|
||||
If CreaArchivo(2) Then
|
||||
If CreaArchivo(2, True) Then
|
||||
NombreArchivoBancomer = NombreArchivo
|
||||
End If
|
||||
|
||||
@@ -561,53 +615,70 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
For Each dRow As DataRow In DtCuentasPendientesInterbancarias.Rows
|
||||
|
||||
If Not (dRow("CuentaPago").ToString.ToUpper.Contains("BBVA") Or dRow("CuentaPago").ToString.ToUpper.Contains("BANCOMER")) Then
|
||||
Dim SBTmpInterbancarias As New StringBuilder
|
||||
Dim SBErroresInterBancario As New StringBuilder
|
||||
Dim ErrorLineaInterbancaria As Boolean = False
|
||||
|
||||
If dRow("CveBanco").ToString = "" Then
|
||||
RegistrosAltaInterbancario.Append(dRow("CveBanco").ToString)
|
||||
Else
|
||||
Alert("La cuenta deposito no tiene clave ABM(Clave SAT) asignada", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
SBErroresInterBancario.Append($"{dRow("RazonSocial").ToString } ")
|
||||
SBErroresInterBancario.Append($"Cuenta: {dRow("Cuenta").ToString } ")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If dRow("NumCuenta").ToString.Length < 19 Then 'Tamaño maximo 18
|
||||
RegistrosAltaInterbancario.Append(dRow("NumCuenta").ToString.PadLeft(18, CeroRelleno))
|
||||
End If
|
||||
|
||||
If dRow("AbreviaturaMon").ToString.Length = 3 AndAlso dRow("AbreviaturaMon").ToString.Contiene("MXN", "USD", "EUR") Then
|
||||
RegistrosAltaInterbancario.Append(dRow("AbreviaturaMon"))
|
||||
End If
|
||||
|
||||
RegistrosAltaInterbancario.Append("0999999999999.99")
|
||||
|
||||
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
|
||||
RegistrosAltaInterbancario.Append(dRow("RazonSocial").ToString.PadLeft(30, EspacioRelleno))
|
||||
If dRow("CveBanco").ToString.Trim.Length = 3 Then
|
||||
SBTmpInterbancarias.Append(dRow("CveBanco").ToString.Trim)
|
||||
Else
|
||||
RegistrosAltaInterbancario.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||
SBErroresInterBancario.Append("clave ABM(Clave SAT) incorrecta, ")
|
||||
ErrorLineaInterbancaria = True
|
||||
End If
|
||||
|
||||
'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
|
||||
RegistrosAltaInterbancario.Append(dRow("CveProveedor").ToString.PadLeft(30, EspacioRelleno))
|
||||
|
||||
If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18
|
||||
SBTmpInterbancarias.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
|
||||
Else
|
||||
SBErroresInterBancario.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ")
|
||||
ErrorLineaInterbancaria = True
|
||||
End If
|
||||
|
||||
If dRow("Abreviatura").ToString.Length = 3 Then
|
||||
SBTmpInterbancarias.Append(dRow("Abreviatura").ToString.Trim)
|
||||
Else
|
||||
SBErroresInterBancario.Append("El tamaño de la divisa es incorrecto, ")
|
||||
ErrorLineaInterbancaria = True
|
||||
End If
|
||||
|
||||
SBTmpInterbancarias.Append("0999999999999.99")
|
||||
|
||||
If dRow("RazonSocial").ToString.Trim.Length <31 Then 'Tamaño maximo 30
|
||||
SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
Else
|
||||
SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
|
||||
End If
|
||||
|
||||
' ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
|
||||
SBTmpInterbancarias.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
|
||||
|
||||
'CORREO OPCIONAL TAMAÑO MAXIMO 80
|
||||
'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno))
|
||||
|
||||
If Not (dRow("CuentaPago").ToString.ToUpper.Contains("BBVA") Or dRow("CuentaPago").ToString.ToUpper.Contains("BANCOMER")) Then
|
||||
RegistrosAltaInterbancario.Append("40")
|
||||
End If
|
||||
|
||||
RegistrosAltaInterbancario.Append(vbCrLf)
|
||||
'Tipo de cuenta
|
||||
SBTmpInterbancarias.Append("40")
|
||||
|
||||
SBTmpInterbancarias.Append(vbCrLf)
|
||||
|
||||
|
||||
If Not ErrorLineaInterbancaria Then
|
||||
RegistrosAltaInterbancario.Append(SBTmpInterbancarias.ToString)
|
||||
Else
|
||||
SBErroresInterBancario.Append("<br>")
|
||||
SBErrores.AppendLine(SBErroresInterBancario.ToString)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
TextoCompleto = RegistrosAltaInterbancario.ToString
|
||||
If CreaArchivo(2) Then
|
||||
NombreArchivoInterbancario = NombreArchivo
|
||||
If RegistrosAltaInterbancario.Length > 0 Then
|
||||
TextoCompleto = RegistrosAltaInterbancario.ToString
|
||||
If CreaArchivo(2, False) Then
|
||||
NombreArchivoInterbancario = NombreArchivo
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -616,15 +687,23 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim Mensaje As New StringBuilder
|
||||
|
||||
|
||||
Mensaje.Append("Descarga Layouts<br>")
|
||||
Mensaje.Append("Descarga Layouts<br><br>")
|
||||
|
||||
If NombreArchivoBancomer.Trim.Length > 0 Then
|
||||
Mensaje.Append($"Cuentas Bancomer <a class='texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoBancomer}' download>Descarga Archivo cuentas Bancomer<a> <br><br>")
|
||||
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
|
||||
Mensaje.Append($"Cuentas Interbancarias <a class='texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoInterbancario}' download>Descarga Archivo cuentas Bancomer<a>")
|
||||
Mensaje.Append($"Cuentas Interbancarias <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoInterbancario}' download >Descarga Archivo cuentas Bancomer</a> <br><br>")
|
||||
End If
|
||||
|
||||
|
||||
If SBErrores.ToString.Length > 0 Then
|
||||
Mensaje.Append("<a class='Texto' data-toggle='collapse' data-target='#ErroresCuentas'>Errores Cuentas</a><br>")
|
||||
Mensaje.Append("<div id='ErroresCuentas' Class='collapse'")
|
||||
Mensaje.Append(SBErrores.ToString)
|
||||
Mensaje.Append("</div>")
|
||||
End If
|
||||
|
||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
|
||||
@@ -637,239 +716,86 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
|
||||
|
||||
Private Sub AltaProveedoresViejo(TipoAlta As Integer)
|
||||
Dim DtTemp As DataTable = Nothing
|
||||
CreaDtAlta()
|
||||
|
||||
|
||||
'TIPO ALTA
|
||||
'1 = Alta comun
|
||||
'2 = Alta masiva
|
||||
If TipoAlta = 1 Then
|
||||
If DTPendientes Is Nothing OrElse DTPendientes.FiltraParametros("EstatusCtaDeposito = 'True'").Rows.Count <= 0 Then
|
||||
Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
DtTemp = DTPendientes.FiltraParametros("EstatusCtaDeposito = 'True'").Copy
|
||||
End If
|
||||
ElseIf TipoAlta = 2 Then
|
||||
If DTProveedores Is Nothing OrElse DTProveedores.Rows.Count <= 0 Then
|
||||
Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
DtTemp = DTProveedores.Copy
|
||||
End If
|
||||
ElseIf TipoAlta = 3 Then
|
||||
If DTFyE Is Nothing OrElse DTFyE.Rows.Count <= 0 Then
|
||||
Alert("No hay registros para generar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
DtTemp = DTProveedores.Copy
|
||||
End If
|
||||
End If
|
||||
|
||||
'REINICIA PROPIEDAS
|
||||
HeaderTexto = ""
|
||||
DetalleTexto = ""
|
||||
TrailerTexto = ""
|
||||
TotalAcumulado = 0
|
||||
|
||||
''VALIDA CUENTAS DEPOSITOS
|
||||
Dim ErrorCuenta = False
|
||||
Dim ProveedoresError As StringBuilder = New StringBuilder
|
||||
ProveedoresError.AppendFormat("<table width='600px'><thead><tr><td width='300px'>Proveedor</td><td width='150px'>Cuenta</td><td width='150px'>Error</td></tr></thead><tbody>")
|
||||
Dim TotalDetalles As Integer = 0
|
||||
Dim EsBancomer = False
|
||||
For Each gvr As DataRow In DtTemp.Rows
|
||||
If gvr("CveCuentaDeposito").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
|
||||
DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
|
||||
ErrorCuenta = False
|
||||
EsBancomer = False
|
||||
|
||||
If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or (DTPendienteActual(0)("CLABE").ToString.Length = 18 AndAlso DTPendienteActual(0)("CLABE").ToString.Substring(0, 3) = "012") Then
|
||||
EsBancomer = True
|
||||
End If
|
||||
|
||||
''COMENTADO PARA PERMITIR ENTRADA DE UNA CUENTA A PROVEEDOR, 22 DE SEPTIEMBRE, ISRAEL PIÑA
|
||||
'If Not ErrorCuenta Then
|
||||
' If EsBancomer AndAlso (DTPendienteActual(0)("CLABE").ToString.Length = 18 AndAlso Not DTPendienteActual(0)("CLABE").ToString.Substring(0, 3) = "012") Then
|
||||
' ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>CLABE NO PERTENECE A BANCOMER</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
' ErrorCuenta = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
''CLABE SIEMPRE OBLIGATORIA CUANDO NO ES BANCOMER CON CIE
|
||||
'If (DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18 And Not EsBancomer) Or (EsBancomer And TxtConvenioCIE.Text.Trim.Length <> 6 And DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18) Then
|
||||
' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
|
||||
If Not ErrorCuenta Then
|
||||
If DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18 And DTPendienteActual(0)("CLABE").ToString.Trim.Length = 0 And Not EsBancomer Then
|
||||
ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>CLABE ES OBLIGATORIA</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
ErrorCuenta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
|
||||
If Not ErrorCuenta Then
|
||||
If DTPendienteActual(0)("Cuenta").ToString.Trim.Length <> 0 AndAlso DTPendienteActual(0)("Cuenta").ToString.Trim.Length <> 10 AndAlso EsBancomer Then
|
||||
ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>NUMERO DE CUENTA CON FORMATO INCORRECTO</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
ErrorCuenta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
|
||||
If Not ErrorCuenta Then
|
||||
If DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 0 AndAlso DTPendienteActual(0)("CLABE").ToString.Trim.Length <> 18 Then
|
||||
ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>CLABE CON FORMATO INCORRECTO</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
ErrorCuenta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI CIE TIENE ALGO DEBE TENER REFERENCIA OBLIGATORIA
|
||||
If Not ErrorCuenta Then
|
||||
If DTPendienteActual(0)("CIE").ToString.Trim.Length <> 0 And DTPendienteActual(0)("Referencia").ToString.Trim.Length < 3 Then
|
||||
ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>CIE CON FORMATO INCORRECTO</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
ErrorCuenta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
|
||||
If Not ErrorCuenta Then
|
||||
If EsBancomer AndAlso Not (DTPendienteActual(0)("Cuenta").ToString.Trim.Length = 10 Or DTPendienteActual(0)("CIE").ToString.Trim.Length <> 0) Then
|
||||
ProveedoresError.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>CUENTA BANCOMER SIN CUENTA O CIE</td></tr>", DTPendienteActual(0)("RazonSocial").ToString, DTPendienteActual(0)("BancoNombre").ToString)
|
||||
ErrorCuenta = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'DTPendienteActual(0)("").ToString
|
||||
|
||||
'VALDIACION ANTIGUA
|
||||
'If Not (DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER")) Then
|
||||
' If Not DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
|
||||
' ProveedoresError.AppendFormat("Proveedor: {0}", DTPendienteActual(0)("RazonSocial").ToString)
|
||||
' ErrorCuenta = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not ErrorCuenta Then
|
||||
If TotalDetalles > 0 Then
|
||||
DetalleTexto &= vbCrLf
|
||||
End If
|
||||
CrearDetalle()
|
||||
TotalDetalles += 1
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
ProveedoresError.AppendFormat("</tbody></table>")
|
||||
|
||||
|
||||
If TotalDetalles > 0 Then
|
||||
FormarTexto(TotalDetalles)
|
||||
CreaArchivo(2)
|
||||
|
||||
Dim Descargas As New StringBuilder()
|
||||
Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?File={0}"" target='_blank'>TXT</a></li>", NombreArchivo)
|
||||
'Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?REPORTE=S"" target='_blank'>Reporte</a></li>", NombreArchivo)
|
||||
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncg();"">Descargar Reporte</a></li>", NombreArchivo)
|
||||
|
||||
|
||||
Dim TextoErrorProveedores = ""
|
||||
If ProveedoresError.Length > 160 Then TextoErrorProveedores = String.Format("<br /><br /><br />Proveedores con Error: <br/><br/>------------------------------------------------------------------<br/>{0}<br /><br />", ProveedoresError.ToString)
|
||||
|
||||
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.{1}<br />Descargas:<ul>{0}</ul>", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
|
||||
|
||||
'NombreArchivo = "LayoutAltaProveedores"
|
||||
'DescargarArchivo()
|
||||
Else
|
||||
Alert("No hay proveedores que dar de alta", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CrearDetalle()
|
||||
Dim Resultado = True
|
||||
Dim CuentaDeposito As String = ""
|
||||
Dim TipoCuentaDeposito As String = ""
|
||||
Dim TipoCuenta As String = ""
|
||||
'Protected Sub CrearDetalle()
|
||||
' Dim Resultado = True
|
||||
' Dim CuentaDeposito As String = ""
|
||||
' Dim TipoCuentaDeposito As String = ""
|
||||
' Dim TipoCuenta As String = ""
|
||||
|
||||
''''' LLENADO DE DETALLE
|
||||
'Campos #1-4 del Detalle
|
||||
DetalleTexto &= String.Format("DA{0}N ", DTPendienteActual(0)("CveCuentaDeposito").ToString.ToUpper.PadLeft(30, PadCeros))
|
||||
' ''''' LLENADO DE DETALLE
|
||||
' 'Campos #1-4 del Detalle
|
||||
' DetalleTexto &= String.Format("DA{0}N ", DTPendienteActual(0)("CveCuentaDeposito").ToString.ToUpper.PadLeft(30, PadCeros))
|
||||
|
||||
'Banco BBVA
|
||||
If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Then
|
||||
'Llenamos datos de BBVA
|
||||
'Campo #5-7 del detalle
|
||||
' 'Banco BBVA
|
||||
' If DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BBVA") Or DTPendienteActual(0)("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Then
|
||||
' 'Llenamos datos de BBVA
|
||||
' 'Campo #5-7 del detalle
|
||||
|
||||
'Busca que cuenta sera la asignada para el proveedor
|
||||
If DTPendienteActual(0)("CIE").ToString <> "" Then
|
||||
CuentaDeposito = String.Format("02{0}", DTPendienteActual(0)("CIE").ToString.PadLeft(8, PadCeros))
|
||||
TipoCuenta = "50"
|
||||
TipoCuentaDeposito = "CIE"
|
||||
ElseIf DTPendienteActual(0)("Cuenta").ToString.Length = 10 Then
|
||||
CuentaDeposito = DTPendienteActual(0)("Cuenta").ToString
|
||||
TipoCuenta = "99"
|
||||
TipoCuentaDeposito = "Cuenta"
|
||||
ElseIf DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
|
||||
CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
TipoCuenta = "40"
|
||||
TipoCuentaDeposito = "CLABE"
|
||||
End If
|
||||
' 'Busca que cuenta sera la asignada para el proveedor
|
||||
' If DTPendienteActual(0)("CIE").ToString <> "" Then
|
||||
' CuentaDeposito = String.Format("02{0}", DTPendienteActual(0)("CIE").ToString.PadLeft(8, PadCeros))
|
||||
' TipoCuenta = "50"
|
||||
' TipoCuentaDeposito = "CIE"
|
||||
' ElseIf DTPendienteActual(0)("Cuenta").ToString.Length = 10 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("Cuenta").ToString
|
||||
' TipoCuenta = "99"
|
||||
' TipoCuentaDeposito = "Cuenta"
|
||||
' ElseIf DTPendienteActual(0)("CLABE").ToString.Length = 18 Then
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuenta = "40"
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
' End If
|
||||
|
||||
|
||||
DetalleTexto &= String.Format("{0}{1}{2}", DTPendienteActual(0)("Abreviatura").ToString, TipoCuenta, CuentaDeposito.PadLeft(35, PadCeros))
|
||||
' DetalleTexto &= String.Format("{0}{1}{2}", DTPendienteActual(0)("Abreviatura").ToString, TipoCuenta, CuentaDeposito.PadLeft(35, PadCeros))
|
||||
|
||||
'Llenamos en blanco datos de otros bancos
|
||||
'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta
|
||||
DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd"))
|
||||
' 'Llenamos en blanco datos de otros bancos
|
||||
' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd"))
|
||||
|
||||
|
||||
'Otros Bancos NACIONAL!!
|
||||
Else
|
||||
' 'Otros Bancos NACIONAL!!
|
||||
' Else
|
||||
|
||||
CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
TipoCuentaDeposito = "CLABE"
|
||||
' CuentaDeposito = DTPendienteActual(0)("CLABE").ToString
|
||||
' TipoCuentaDeposito = "CLABE"
|
||||
|
||||
'Llenamos en blanco datos de BBVA
|
||||
DetalleTexto &= Vacio.PadRight(40)
|
||||
' 'Llenamos en blanco datos de BBVA
|
||||
' DetalleTexto &= Vacio.PadRight(40)
|
||||
|
||||
'Llenamos datos de otros bancos
|
||||
'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta
|
||||
DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd"))
|
||||
End If
|
||||
' 'Llenamos datos de otros bancos
|
||||
' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta
|
||||
' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd"))
|
||||
' End If
|
||||
|
||||
'Llenamos datos de Tipo de Persona - Fisica o Moral
|
||||
TipoPersona()
|
||||
' 'Llenamos datos de Tipo de Persona - Fisica o Moral
|
||||
' TipoPersona()
|
||||
|
||||
'Campos 27-32 --- Fillers --- datos de otros bancos (internacional)
|
||||
DetalleTexto &= Vacio.PadLeft(153)
|
||||
' 'Campos 27-32 --- Fillers --- datos de otros bancos (internacional)
|
||||
' DetalleTexto &= Vacio.PadLeft(153)
|
||||
|
||||
'Campos 33-36 --- Datos de confirmacion
|
||||
DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), CorreoNotificacionesEmpresa.ToUpper.PadRight(50))
|
||||
' 'Campos 33-36 --- Datos de confirmacion
|
||||
' DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), CorreoNotificacionesEmpresa.ToUpper.PadRight(50))
|
||||
|
||||
'If DTPendienteActual(0)("ContactoMail").ToString.Length > 0 Then
|
||||
' 'DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), DTPendienteActual(0)("ContactoMail").ToString.ToUpper.PadRight(50))
|
||||
'ElseIf DTPendienteActual(0)("ContactoMail").ToString.Length <= 0 Then
|
||||
' DetalleTexto &= String.Format("{0}00{1}", Vacio.PadRight(40), Vacio.PadRight(50))
|
||||
'End If
|
||||
' 'If DTPendienteActual(0)("ContactoMail").ToString.Length > 0 Then
|
||||
' ' 'DetalleTexto &= String.Format("{0}02{1}", Vacio.PadRight(40), DTPendienteActual(0)("ContactoMail").ToString.ToUpper.PadRight(50))
|
||||
' 'ElseIf DTPendienteActual(0)("ContactoMail").ToString.Length <= 0 Then
|
||||
' ' DetalleTexto &= String.Format("{0}00{1}", Vacio.PadRight(40), Vacio.PadRight(50))
|
||||
' 'End If
|
||||
|
||||
'Campos 37-39 -- FILLER
|
||||
DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
||||
' 'Campos 37-39 -- FILLER
|
||||
' DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
||||
|
||||
|
||||
''LLENA DT PARA REPORTE
|
||||
Dim Row = DtAlta.NewRow()
|
||||
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||
Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||
Row("TipoCuenta") = TipoCuentaDeposito
|
||||
Row("Cuenta") = String.Format("{0}", CuentaDeposito)
|
||||
DtAlta.Rows.Add(Row)
|
||||
End Sub
|
||||
' ''LLENA DT PARA REPORTE
|
||||
' Dim Row = DtAlta.NewRow()
|
||||
' Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||
' Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||
' Row("TipoCuenta") = TipoCuentaDeposito
|
||||
' Row("Cuenta") = String.Format("{0}", CuentaDeposito)
|
||||
' DtAlta.Rows.Add(Row)
|
||||
'End Sub
|
||||
|
||||
Protected Sub TipoPersona()
|
||||
'Persona Moral
|
||||
@@ -985,7 +911,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
If DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing Then
|
||||
|
||||
GeneraPago(DTPendientes.FiltraParametros("EstatusPagoElectronico > 0 AND EstatusCtaDeposito > 0"))
|
||||
GeneraPago(DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0"))
|
||||
|
||||
Else
|
||||
|
||||
@@ -994,10 +920,10 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraPago(DTPendientesTemp As DataTable)
|
||||
Private Sub GeneraPago(DTPendientesTemp As DataTable, Optional InsertaEnDB As Boolean = True)
|
||||
|
||||
Dim RegistrosPago As New StringBuilder
|
||||
Dim MENSAJE As New StringBuilder
|
||||
Dim MENSAJEError As New StringBuilder
|
||||
|
||||
|
||||
Dim CeroRelleno As Char = "0"c
|
||||
@@ -1008,6 +934,12 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
For Each drow As DataRow In DTPendientesTemp.Rows
|
||||
|
||||
|
||||
MENSAJEError.Clear()
|
||||
|
||||
MENSAJEError.AppendLine($"Error al generar pago <br>")
|
||||
MENSAJEError.AppendLine($" Proveedor: {drow("RazonSocial").ToString} detalle: { drow("Observaciones").ToString} <br>")
|
||||
|
||||
|
||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
||||
RegistrosPago.Append("PTC")
|
||||
Else
|
||||
@@ -1018,31 +950,144 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
RegistrosPago.Append(drow("CLABEOrigen").ToString)
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJE.AppendLine("ERROR EN CLABE")
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If drow("CLABEDestino").ToString.Trim.Length <> 18 Then
|
||||
If drow("CLABEDestino").ToString.Trim.Length = 18 Then
|
||||
RegistrosPago.Append(drow("CLABEDestino").ToString)
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJE.AppendLine("ERROR EN CLABE")
|
||||
MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
RegistrosPago.Append("Abreviatura")
|
||||
|
||||
RegistrosPago.Append(drow("Abreviatura").ToString)
|
||||
RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
|
||||
|
||||
RegistrosPago.Append(drow("CveIE").ToString.PadRight(30, EspacioRelleno))
|
||||
|
||||
If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
|
||||
|
||||
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
|
||||
|
||||
Else
|
||||
|
||||
If drow("RazonSocial").ToString.Length <= 30 Then
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
|
||||
Else
|
||||
RegistrosPago.Append(drow("RazonSocial").ToString.Substring(0, 30))
|
||||
End If
|
||||
|
||||
RegistrosPago.Append("40") '03 tarjeta debito 40 Clabe
|
||||
|
||||
If drow("CveBanco").ToString.Trim.Length = 3 Then
|
||||
RegistrosPago.Append(drow("CveBanco").ToString.Trim)
|
||||
Else
|
||||
ErrorLayout = True
|
||||
MENSAJEError.AppendLine("Error tamaño clave banco")
|
||||
End If
|
||||
|
||||
'Motivo de pago
|
||||
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
|
||||
|
||||
If drow("Referencia").ToString.Trim.Length > 7 Then
|
||||
RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 7))
|
||||
Else
|
||||
RegistrosPago.Append(drow("Referencia").ToString.PadRight(7, EspacioRelleno))
|
||||
End If
|
||||
|
||||
RegistrosPago.Append("H")
|
||||
|
||||
End If
|
||||
|
||||
If ErrorLayout Then
|
||||
Alert(MENSAJEError.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
RegistrosPago.Append(vbCrLf)
|
||||
|
||||
'CveIE
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If Not ErrorLayout Then
|
||||
|
||||
Dim NombreArchivoPago As String = ""
|
||||
|
||||
TextoCompleto = RegistrosPago.ToString
|
||||
If CreaArchivo(1) Then
|
||||
NombreArchivoPago = NombreArchivo
|
||||
End If
|
||||
|
||||
|
||||
If InsertaEnDB Then
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
ObjBancos.IniciaTransacSQL()
|
||||
|
||||
|
||||
Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta, PorGrupos:=True)
|
||||
|
||||
If CveLayoutEnvio > 0 Then
|
||||
For Each dr As DataRow In DTPendientesTemp.Rows
|
||||
If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then
|
||||
If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
|
||||
ErrorLayout = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorLayout = True
|
||||
End If
|
||||
|
||||
If ErrorLayout Then
|
||||
ObjBancos.RollBack()
|
||||
ObjBancos.Dispose()
|
||||
Else
|
||||
ObjBancos.Commit()
|
||||
ObjBancos.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If ErrorLayout = False And RegistrosPago.Length > 0 Then
|
||||
|
||||
Dim Mensaje As New StringBuilder
|
||||
|
||||
Mensaje.Append("Descarga Layout<br>")
|
||||
|
||||
If NombreArchivoPago.Trim.Length > 0 Then
|
||||
Mensaje.Append($"Pagos Descarga <a class='Texto' href='../Empresas/{UsuarioActual.CveEmpresa}/Layout/{NombreArchivoPago}' download> {NombreArchivoPago}<a> <br><br>")
|
||||
End If
|
||||
|
||||
If NombreArchivoPago.Length > 0 Then
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1263,6 +1308,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
TextoCompleto = String.Format("{1}{0}{2}{0}{3}{0}", vbCrLf, HeaderTexto, DetalleTexto, TrailerTexto)
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CARGA ALTA PROVEEDORES"
|
||||
@@ -2082,12 +2128,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
CargaReporte()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaReporte()
|
||||
Private Sub CargaReporte()
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString) Then
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString, PorGrupos:=True) Then
|
||||
DTReportes = ObjBancos.DtResultados
|
||||
Else
|
||||
DTReportes = Nothing
|
||||
@@ -2141,7 +2188,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
If TipoMasiva = 1 Then
|
||||
AltaProveedores(2)
|
||||
AltaProveedores(2, DTProveedores)
|
||||
Else
|
||||
GeneraAltaFyE()
|
||||
End If
|
||||
@@ -2150,7 +2197,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Private Sub CargaProveedores()
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
|
||||
DTProveedores = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (12,13)")
|
||||
Else
|
||||
DTProveedores = Nothing
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="250px" ValidationGroup="GrpGuardar">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="250px" ValidationGroup="GrpGuardar" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -211,10 +211,37 @@ Partial Class Bancos_PolizaCheque
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuenta()
|
||||
DdlCuenta.Items.Clear()
|
||||
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
DdlCuenta.Items.Clear()
|
||||
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
|
||||
|
||||
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
|
||||
dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
End If
|
||||
|
||||
'cuando es layout
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
dt = dt.FiltraParametros("UsaLayout = 1")
|
||||
End If
|
||||
|
||||
'cuando es layout Por Grupos
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
DdlCuenta.DataSource = dt 'GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
DdlCuenta.DataBind()
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
UPPDocumento.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoTransaccion(TipoPlantilla As Integer)
|
||||
@@ -240,7 +267,8 @@ Partial Class Bancos_PolizaCheque
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
|
||||
CargaFolio()
|
||||
'CargaFolio()
|
||||
CargaCuenta()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFolio()
|
||||
@@ -1184,8 +1212,9 @@ Partial Class Bancos_PolizaCheque
|
||||
End If
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -3624,6 +3624,7 @@ Partial Class Compras_Compras
|
||||
'OBTENER TRASLADOS POR DETALLES
|
||||
Dim ContadorTraslado = 0
|
||||
Dim nodosConceptosTraslado As XmlNodeList = node.SelectNodes(String.Format("//{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces)
|
||||
|
||||
For Each nodeTraslado As XmlNode In nodosConceptosTraslado
|
||||
|
||||
If Not DtTemporalGuardados.FiltraParametros($"Contador = {ContadorTraslado} AND Tipo = 1").Rows.Count > 0 Then
|
||||
@@ -3637,7 +3638,12 @@ Partial Class Compras_Compras
|
||||
Dr("Tipo") = 1
|
||||
DtTemporalGuardados.Rows.Add(Dr)
|
||||
DtTemporalGuardados.AcceptChanges()
|
||||
Exit For
|
||||
|
||||
If PorcentajeIVA > 0 Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
ElseIf ValorXML(nodeTraslado, "Impuesto") = "003" Then
|
||||
IEPS = ValorXML(nodeTraslado, "Importe").Trim.ToDecimal
|
||||
PorcentajeIEPS = ValorXML(nodeTraslado, "TasaOCuota").Trim.ToDecimal
|
||||
@@ -16717,7 +16723,7 @@ Partial Class Compras_Compras
|
||||
Dim DiferenciaPermitida = 0.6
|
||||
|
||||
If Math.Abs(DifTotales) > DiferenciaPermitida Then
|
||||
Alert("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Alert(String.Format("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.[{0}]", Math.Abs(DifTotales) - DiferenciaPermitida), TipoMensaje.MsgAdvertencia)
|
||||
EsValido = False
|
||||
ElseIf DifTotales <> 0 Then
|
||||
TxtSubTotal2.Text = (TxtSubTotal2.Text.ToDouble + DifTotales).ToString
|
||||
|
||||
@@ -1943,7 +1943,10 @@
|
||||
<ContentTemplate>
|
||||
<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" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
<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" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Banco" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
@@ -3575,6 +3578,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DivAddCuentasBancarias" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpAddBancos" class="modal-dialog" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -3632,6 +3636,13 @@
|
||||
<asp:TextBox ID="TxtCorreoCuenta" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtBBVAAlias" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
|
||||
<label for="<%= TxtCorreoCuenta.ClientID.ToString()%>">BBVA Alias:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList CssClass="form-control select2me" Width="50%" ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" InitialValue="-1" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -1640,7 +1640,7 @@ Partial Class Compras_Proveedores
|
||||
''Agregar Cuentas Bancarias
|
||||
If TempDTCuentasBancos.Rows.Count > 0 Then
|
||||
For Each row As DataRow In TempDTCuentasBancos.Rows
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString) Then
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString) Then
|
||||
ErrorBancos = True
|
||||
End If
|
||||
Next
|
||||
@@ -3038,6 +3038,7 @@ Partial Class Compras_Proveedores
|
||||
RecargaGlobalCuentasBancarias()
|
||||
End Sub
|
||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim EsBancomer = False
|
||||
|
||||
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then
|
||||
@@ -3110,15 +3111,15 @@ Partial Class Compras_Proveedores
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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) Then
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor, Correo:=Correo, BBVAAlias:=BBVAAlias) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
|
||||
@@ -3156,7 +3157,7 @@ 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) 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) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))
|
||||
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
|
||||
@@ -3204,6 +3205,7 @@ Partial Class Compras_Proveedores
|
||||
TxtReferencia.Text = ""
|
||||
TxtRefCrediProveedor.Text = ""
|
||||
TxtCorreoCuenta.Text = ""
|
||||
TxtBBVAAlias.Text = ""
|
||||
End Sub
|
||||
|
||||
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
||||
@@ -4668,6 +4670,7 @@ Partial Class Compras_Proveedores
|
||||
TxtRefCrediProveedor.Text = ""
|
||||
DdlMoneda.SelectedIndex = 0
|
||||
TxtCorreoCuenta.Text = ""
|
||||
TxtBBVAAlias.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
divestatus.Visible = False
|
||||
UpAddBancos.Update()
|
||||
@@ -4689,6 +4692,7 @@ Partial Class Compras_Proveedores
|
||||
TxtReferencia.Text = GvRow.DataKey("Referencia")
|
||||
TxtRefCrediProveedor.Text = GvRow.DataKey("RefCrediProveedor")
|
||||
TxtCorreoCuenta.Text = GvRow.DataKey("Correo")
|
||||
TxtBBVAAlias.Text = GvRow.DataKey("BBVAAlias")
|
||||
DdlMoneda.SelectedValueExist(GvRow.DataKey("CveMoneda"))
|
||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
||||
divestatus.Visible = True
|
||||
|
||||
@@ -239,6 +239,22 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then
|
||||
dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
End If
|
||||
|
||||
'cuando es layout
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
|
||||
dt = dt.FiltraParametros("UsaLayout = 1")
|
||||
End If
|
||||
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
|
||||
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
|
||||
End If
|
||||
|
||||
DdlCuenta.DataSource = dt
|
||||
DdlCuenta.DataBind()
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione cuenta", "-1"))
|
||||
|
||||
@@ -2842,16 +2842,24 @@ Partial Class Compras_eFacturas
|
||||
|
||||
Dim FechaDocumento As Date = GvRowF.DataKey("FechaPago").ToString.ToDate
|
||||
Dim FechaDoRecibo As Date = GvRowF.DataKey("Fecha").ToString.ToDate
|
||||
Dim CveIEDocumento As Integer = GvRowF.DataKey("CveIE").ToEntero
|
||||
|
||||
Dim FT1 As Date = FechaDocumento.AddDays(-6)
|
||||
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||
If CveIEDocumento > 0 And FechaDocumento > New Date(1, 1, 1) Then
|
||||
Dim FT1 As Date = FechaDocumento
|
||||
|
||||
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||
If FechaDocumento <> New Date(1, 1, 1) Then
|
||||
FT1 = FechaDocumento.AddDays(-6)
|
||||
End If
|
||||
|
||||
BtnVincularPago.Visible = False
|
||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||
Dim FT2 As Date = FechaDocumento.AddDays(7)
|
||||
|
||||
Exit For
|
||||
If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then
|
||||
|
||||
BtnVincularPago.Visible = False
|
||||
MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. "
|
||||
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
@@ -53,21 +53,21 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
|
||||
//DdlProveedores.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
//DdlProveedores.DataBind();
|
||||
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataBind();
|
||||
|
||||
DdlPlantillasPolizas.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);
|
||||
DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlPlantillasPolizas.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
|
||||
//CargaDatos();
|
||||
|
||||
}
|
||||
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataBind();
|
||||
|
||||
DdlPlantillasPolizas.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);
|
||||
DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlPlantillasPolizas.DataBind();
|
||||
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
|
||||
{
|
||||
TienePermisoEditar = true;
|
||||
|
||||
@@ -111,22 +111,16 @@ Partial Class Contabilidad2_CatCuentas
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMonedas()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObJConta As New ClsContabilidad
|
||||
|
||||
|
||||
If ObJConta.GetMonedas() Then
|
||||
DdlMoneda.DataSource = ObJConta.DtResultados
|
||||
End If
|
||||
ObJConta.Dispose()
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgrupadorSAT()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
If ObjConta.GetAgrupadoresSAT(UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.GetAgrupadoresSAT() Then
|
||||
DdlAgrupadorSAT.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -65,7 +65,7 @@
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.49417cm</Height>
|
||||
<Height>0.43067cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
@@ -79,6 +79,7 @@
|
||||
<Value>=Fields!Cantidad.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#.##</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
@@ -115,6 +116,7 @@
|
||||
<Value>=Fields!SubTotal.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
@@ -151,6 +153,7 @@
|
||||
<Value>=Fields!Descuento.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
@@ -187,6 +190,7 @@
|
||||
<Value>=Fields!IVA.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
@@ -223,6 +227,7 @@
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Format>#,0.00</Format>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
@@ -456,6 +461,7 @@
|
||||
<Value>=Fields!GPO.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>=IIF(Fields!Orden.Value.Equals(""),"Bold","Normal")</FontWeight>
|
||||
<Color>=IIF(Fields!Orden.Value = "","White","Black")</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
@@ -481,8 +487,9 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>0.8255cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>1.09417cm</Height>
|
||||
<Height>1.03067cm</Height>
|
||||
<Width>18.9786cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -490,14 +497,47 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Filtros">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Filtros.Value</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Filtros</rd:DefaultName>
|
||||
<Top>0.11867cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.601cm</Height>
|
||||
<Width>18.9786cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>0.43077in</Height>
|
||||
<Height>0.78077in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>7.52397in</Width>
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<Height>3.05745cm</Height>
|
||||
<Height>2.40834cm</Height>
|
||||
<PrintOnFirstPage>true</PrintOnFirstPage>
|
||||
<PrintOnLastPage>true</PrintOnLastPage>
|
||||
<ReportItems>
|
||||
@@ -514,14 +554,16 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Top>0.18521cm</Top>
|
||||
<Left>2.8349cm</Left>
|
||||
<Left>2.57968cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>12.60299cm</Width>
|
||||
<Width>13.9655cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -567,9 +609,9 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Top>1.10271cm</Top>
|
||||
<Left>3.80842cm</Left>
|
||||
<Left>2.57968cm</Left>
|
||||
<Height>0.52945cm</Height>
|
||||
<Width>9.98771cm</Width>
|
||||
<Width>13.9655cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -595,37 +637,6 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Image>
|
||||
<Textbox Name="Filtros">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Filtros.Value</Value>
|
||||
<MarkupType>HTML</MarkupType>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Filtros</rd:DefaultName>
|
||||
<Top>2.40001cm</Top>
|
||||
<Left>0.06614cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>18.9786cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -111,14 +111,21 @@ public partial class General_CATIEPSxEntidadFed : ClsPaginas
|
||||
|
||||
protected void LnkPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
string FechaInicio = $" <b>Fecha Inicio:</b> {TxtIEPSfechaInicio.Text}";
|
||||
string FechaFin = $" <b>Fecha Inicio:</b> {TxtIEPSfechaFin.Text}";
|
||||
string Estado = DdlEstado.SelectedValue.ToEntero() > -1 ? $" <b>Estado:</b> {DdlEstado.SelectedItem}" : "";
|
||||
string IEPS = DdlIeps.SelectedValue.ToEntero() > -1 ? $" <b>IEPS:</b> {DdlIeps.SelectedItem}" : "";
|
||||
string Agrupador = DdlAgrupador.SelectedValue.ToEntero() > -1 ? $" <b>Agrupador:</b> {DdlAgrupador.SelectedItem}" : "";
|
||||
List<ReportParameter> paramList = new List<ReportParameter>();
|
||||
paramList.Add(new ReportParameter("Logo", String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)));
|
||||
paramList.Add(new ReportParameter("FechaInicio", TxtIEPSfechaInicio.Text));
|
||||
paramList.Add(new ReportParameter("FechaInicio", FechaInicio));
|
||||
paramList.Add(new ReportParameter("FechaFin", TxtIEPSfechaFin.Text));
|
||||
paramList.Add(new ReportParameter("Agrupador", DdlAgrupador.SelectedValue));
|
||||
paramList.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
|
||||
paramList.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
paramList.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString("d/M/yyyy")));
|
||||
paramList.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
paramList.Add(new ReportParameter("Filtros", $"{FechaInicio}{FechaFin}{IEPS}{Estado}{Agrupador}"));
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CatIepsEntidadFed.rdlc", DtIEPS, paramList,"IEPS por entidades federativa",RDSName:"DsInventarios");
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
318
OC/OC.aspx.vb
318
OC/OC.aspx.vb
@@ -6082,51 +6082,51 @@ Partial Class OC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
Dim columns As String()
|
||||
Dim curRow As Integer = 0
|
||||
Dim curCol As Integer = 0
|
||||
Dim dataTable As DataTable = New DataTable()
|
||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||
|
||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||
|
||||
If firstRowHasHeaders Then
|
||||
|
||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||
Else
|
||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||
End If
|
||||
|
||||
curRow = 1
|
||||
Else
|
||||
dataTable.Columns.Add("Column " & (cols + 1))
|
||||
End If
|
||||
Next
|
||||
|
||||
While curRow < worksheet.Rows.Count
|
||||
columns = New String(cols - 1) {}
|
||||
|
||||
For curCol = 0 To cols - 1
|
||||
|
||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||
columns(curCol) = ""
|
||||
Else
|
||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||
End If
|
||||
Next
|
||||
|
||||
dataTable.Rows.Add(columns)
|
||||
curRow += 1
|
||||
End While
|
||||
|
||||
Return dataTable
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
Dim columns As String()
|
||||
Dim curRow As Integer = 0
|
||||
Dim curCol As Integer = 0
|
||||
Dim dataTable As DataTable = New DataTable()
|
||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
||||
|
||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
||||
|
||||
If firstRowHasHeaders Then
|
||||
|
||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
||||
Else
|
||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
||||
End If
|
||||
|
||||
curRow = 1
|
||||
Else
|
||||
dataTable.Columns.Add("Column " & (cols + 1))
|
||||
End If
|
||||
Next
|
||||
|
||||
While curRow < worksheet.Rows.Count
|
||||
columns = New String(cols - 1) {}
|
||||
|
||||
For curCol = 0 To cols - 1
|
||||
|
||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
||||
columns(curCol) = ""
|
||||
Else
|
||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
||||
End If
|
||||
Next
|
||||
|
||||
dataTable.Rows.Add(columns)
|
||||
curRow += 1
|
||||
End While
|
||||
|
||||
Return dataTable
|
||||
End Function
|
||||
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
@@ -7469,131 +7469,131 @@ Partial Class OC
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "C A R G A R E X C E L "
|
||||
#Region "C A R G A R E X C E L "
|
||||
Protected Sub BtnCargaExcelCot_Click(sender As Object, e As EventArgs)
|
||||
If TxtExcelCot.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcelCot.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
CargarArchivoCot(Directorio, file.filename)
|
||||
|
||||
CargaCotizaciones(CveOrdenCompra)
|
||||
RegistraScript("$('#DivCargaExcelCotizaciones').modal('hide');")
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
If TxtExcelCot.getfiles().Archivos.Count > 0 Then
|
||||
Dim file As Archivo = TxtExcelCot.getfiles().Archivos(0)
|
||||
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||
CargarArchivoCot(Directorio, file.filename)
|
||||
|
||||
CargaCotizaciones(CveOrdenCompra)
|
||||
RegistraScript("$('#DivCargaExcelCotizaciones').modal('hide');")
|
||||
Else
|
||||
Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDescargarFormatoCot_Click(sender As Object, e As EventArgs)
|
||||
'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación
|
||||
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows
|
||||
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
|
||||
Where row.RowType = DataControlRowType.DataRow
|
||||
Select New With
|
||||
{
|
||||
.Cantidad = row.DataKey("Cantidad"),
|
||||
.Codigo = rowPS("Codigo"),
|
||||
.Producto = rowPS("PSCodigo"),
|
||||
.PrecioUnitario = row.DataKey("Importe").ToDecimal(),
|
||||
.FechaEntrega = "",
|
||||
.Observacion = row.DataKey("Observacion")
|
||||
}).QueryToDataTable(True)
|
||||
If DtExcel.Rows.Count < 2 Then
|
||||
Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DtExcel.TableName = "Cotización"
|
||||
'DtExcel.Columns("Codigo").ColumnName = "Código"
|
||||
'DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.StartColumn = 0
|
||||
})
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
FileExcel.Save(Response, "Cotizacion.xlsx", SaveOptions.XlsxDefault)
|
||||
|
||||
End Sub
|
||||
Protected Sub CargarArchivoCot(Ruta As String, FileName As String)
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
|
||||
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||
'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación
|
||||
If DdlProveedorCot.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
||||
Alert("El nombre de la tercera columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
|
||||
Where row.RowType = DataControlRowType.DataRow
|
||||
Select New With
|
||||
{
|
||||
.Cantidad = row.DataKey("Cantidad"),
|
||||
.Codigo = rowPS("Codigo"),
|
||||
.Producto = rowPS("PSCodigo"),
|
||||
.PrecioUnitario = row.DataKey("Importe").ToDecimal(),
|
||||
.FechaEntrega = "",
|
||||
.Observacion = row.DataKey("Observacion")
|
||||
}).QueryToDataTable(True)
|
||||
If DtExcel.Rows.Count < 2 Then
|
||||
Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
DtExcel.TableName = "Cotización"
|
||||
'DtExcel.Columns("Codigo").ColumnName = "Código"
|
||||
'DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.StartColumn = 0
|
||||
})
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
FileExcel.Save(Response, "Cotizacion.xlsx", SaveOptions.XlsxDefault)
|
||||
|
||||
End Sub
|
||||
Protected Sub CargarArchivoCot(Ruta As String, FileName As String)
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Catch ex As Exception
|
||||
ErrorArchivo = True
|
||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||
End Try
|
||||
|
||||
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||
'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación
|
||||
If DdlProveedorCot.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(1).ColumnName = "Codigo" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(2).ColumnName = "Producto" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'Producto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(3).ColumnName = "PrecioUnitario" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'PrecioUnitario'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
If Not dt.Columns(0).ColumnName = "Cantidad" Then
|
||||
Alert("El nombre de la tercera columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(4).ColumnName = "FechaEntrega" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'FechaEntrega'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
If Not dt.Columns(1).ColumnName = "Codigo" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(5).ColumnName = "Observacion" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'Observacion'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
dt.TableName = "Datos"
|
||||
Dim ProductosNoCargados As New StringBuilder()
|
||||
Dim RowsCargados As Integer = 0
|
||||
If Not dt.Columns(2).ColumnName = "Producto" Then
|
||||
Alert("El nombre de la cuarta columna debe ser 'Producto'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(3).ColumnName = "PrecioUnitario" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'PrecioUnitario'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(4).ColumnName = "FechaEntrega" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'FechaEntrega'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(5).ColumnName = "Observacion" Then
|
||||
Alert("El nombre de la sexta columna debe ser 'Observacion'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
dt.TableName = "Datos"
|
||||
Dim ProductosNoCargados As New StringBuilder()
|
||||
Dim RowsCargados As Integer = 0
|
||||
Dim RowsNoCargados As Integer = 0
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim objCotizacion As New ClsOC
|
||||
objCotizacion.IniciaTransacSQL()
|
||||
|
||||
Try
|
||||
Try
|
||||
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows
|
||||
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
|
||||
Where row.RowType = DataControlRowType.DataRow
|
||||
Select New With
|
||||
{
|
||||
.CvePS = row.DataKey("CvePS").ToEntero(),
|
||||
.CveUnidadMedida = rowPS("CveUnidadMedida").ToString().ToEntero(),
|
||||
.CveOrdenCompraDetalle = row.DataKey("CveOrdenCompraDetalle").ToString().ToEntero(),
|
||||
.Codigo = rowPS("Codigo")
|
||||
Select New With
|
||||
{
|
||||
.CvePS = row.DataKey("CvePS").ToEntero(),
|
||||
.CveUnidadMedida = rowPS("CveUnidadMedida").ToString().ToEntero(),
|
||||
.CveOrdenCompraDetalle = row.DataKey("CveOrdenCompraDetalle").ToString().ToEntero(),
|
||||
.Codigo = rowPS("Codigo")
|
||||
}).QueryToDataTable(True)
|
||||
|
||||
|
||||
@@ -7618,23 +7618,23 @@ Partial Class OC
|
||||
End If
|
||||
Else
|
||||
TieneError = False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
OnError("Ocurrió un error al cargar las cotizaciones.", ex)
|
||||
Finally
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
OnError("Ocurrió un error al cargar las cotizaciones.", ex)
|
||||
Finally
|
||||
If TieneError Then
|
||||
objCotizacion.RollBack()
|
||||
Alert("Ocurrió un error al cargar las cotizaciones.")
|
||||
Else
|
||||
objCotizacion.Commit()
|
||||
Alert("Las cotizaciones se cargaron correctamente.")
|
||||
End If
|
||||
End If
|
||||
objCotizacion.Dispose()
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -912,7 +912,11 @@
|
||||
</asp:LinkButton></th>
|
||||
<th id="THEstatus" runat="server" style="width: 7%;">
|
||||
<asp:LinkButton ID="LbEstatusPE" runat="server" CausesValidation="false" Text="Estatus Layout" OnClick="LbOrden_Click" CommandArgument="Estatus"></asp:LinkButton> <asp:ImageButton ID="ImgEstatusPE" OnClick="LbOrden_Click" CommandArgument="Estatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></th>
|
||||
<th width="7%">
|
||||
BBVA Alias
|
||||
</td>
|
||||
|
||||
|
||||
<th id="THEstatusTexto" runat="server" style="width: 7%;">
|
||||
<asp:LinkButton ID="LbEstatusTexto" runat="server" CausesValidation="false" Text="Estatus" CommandArgument="EstatusTexto"></asp:LinkButton> <asp:ImageButton ID="ImageButton5" OnClick="LbOrden_Click" CommandArgument="Estatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></th>
|
||||
<th style="text-align: center;" width="14%">Comandos</th>
|
||||
@@ -963,9 +967,18 @@
|
||||
</td>
|
||||
<td id="TDEstatusLayout" runat="server" visible="true" width="7%"></td>
|
||||
|
||||
<td id="TDEstatusTexto" runat="server" visible="true" width="7%">
|
||||
<td align="center" width="7%">
|
||||
<asp:TextBox ID="TxtBBVAAlias" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
|
||||
|
||||
</td>
|
||||
|
||||
<td id="TDEstatusTexto" runat="server" visible="false" width="7%">
|
||||
<%--<asp:CheckBox ID ="ChkEstatus" runat="server" Checked="true"></asp:CheckBox>--%>
|
||||
</td>
|
||||
<td id="TD1" runat="server" visible="true" width="7%">
|
||||
<%--<asp:CheckBox ID ="ChkEstatus" runat="server" Checked="true"></asp:CheckBox>--%>
|
||||
</td>
|
||||
<td align="center" width="7%">
|
||||
|
||||
<asp:LinkButton ID="LbAgregarCuentaBanco" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpAgregarBanco" OnClick="LbAgregarCuentaBanco_Click"></asp:LinkButton>
|
||||
@@ -975,7 +988,8 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpCuentasBancos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" CssClass="table table-striped table-hover Widthall" Style="table-layout: fixed" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" CssClass="table table-striped table-hover Widthall" Style="table-layout: fixed" runat="server"
|
||||
DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
<%--<asp:GridView ID="GvBancosCuentas" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="table table-striped table-advance table-hover" Style="table-layout: fixed" BorderWidth="0" GridLines="None">--%>
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
@@ -1005,6 +1019,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroCuenta" FilterType="Numbers" />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtCLABE" runat="server" data-toggle="tooltip" title='<%# Eval("CLABE")%>' Text='<%# Eval("CLABE")%>'></asp:Label>
|
||||
@@ -1014,6 +1029,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCLABE" FilterType="Numbers" />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtSWIFT" runat="server" data-toggle="tooltip" title='<%# Eval("SWIFT")%>' Text='<%# Eval("SWIFT")%>'></asp:Label>
|
||||
@@ -1047,6 +1063,7 @@
|
||||
<asp:TextBox CssClass="form-control" ID="TxtReferencia" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("Referencia")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtRefCrediProveedor" runat="server" data-toggle="tooltip" title='<%# Eval("RefCrediProveedor")%>' Text='<%# Eval("RefCrediProveedor")%>'></asp:Label>
|
||||
@@ -1055,6 +1072,7 @@
|
||||
<asp:TextBox CssClass="form-control" ID="TxtRefCrediProveedor" runat="server" CausesValidation="true" MaxLength="5" Text='<%# Eval("RefCrediProveedor")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtMoneda" runat="server" data-toggle="tooltip" title='<%# Eval("Moneda")%>' Text='<%# Eval("Moneda")%>'></asp:Label>
|
||||
@@ -1065,6 +1083,18 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblBBVAAlias" runat="server" data-toggle="tooltip" title='<%# Eval("BBVAAlias")%>' Text='<%# Eval("BBVAAlias")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtBBVAAlias" runat="server" CausesValidation="true" MaxLength="30" Text='<%# Eval("BBVAAlias")%>' Width="90%"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<!--IIf(CBool(Eval("EstatusPagoElectronico")), "Sí", "No") = If(EstatusPagoElectronico) Then "Sí" Else "No"-->
|
||||
|
||||
@@ -1479,7 +1479,7 @@ Partial Class RH_Personal
|
||||
|
||||
If TempDTCuentasBancos.Rows.Count > 0 Then
|
||||
For Each row As DataRow In TempDTCuentasBancos.Rows
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, "", UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -2669,7 +2669,7 @@ Partial Class RH_Personal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABECB.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferenciaCB.Text.Trim, DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text)
|
||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABECB.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferenciaCB.Text.Trim, DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, TxtBBVAAlias.Text)
|
||||
End Sub
|
||||
Private Sub CargaGridCuentasBancos(Orden As String)
|
||||
If CvePersonal > 0 Then
|
||||
@@ -2693,13 +2693,13 @@ Partial Class RH_Personal
|
||||
GvBancosCuentas.DataBind()
|
||||
UpCuentasBancos.Update()
|
||||
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, CveMoneda As Integer, Moneda As String)
|
||||
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, CveMoneda As Integer, Moneda As String, BBVAAlias As String)
|
||||
|
||||
Dim Row As DataRow
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
|
||||
@@ -2816,7 +2816,9 @@ Partial Class RH_Personal
|
||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString.ToEntero
|
||||
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||
|
||||
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
||||
|
||||
Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
||||
|
||||
@@ -2868,7 +2870,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If CvePersonal > 0 Then
|
||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(e.RowIndex)("CveCuentaDeposito").ToString.ToEntero, NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, False, Estatus, CveMoneda, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
Alert("Cuenta actualizada con exito.", TipoMensaje.MsgInformacion)
|
||||
@@ -4802,6 +4804,7 @@ Partial Class RH_Personal
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Constancia_Curso_" & _CveCurso & "_" & Now.ToString("yyyyMMddhhmmss") & ".docx")
|
||||
Response.BinaryWrite(DocumenBitArray)
|
||||
Response.End()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -6893,19 +6893,37 @@ Partial Class Clientes
|
||||
Dim memoryStreamDoc As New System.IO.MemoryStream
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(linkDescarga)
|
||||
Dim Tags As New List(Of TagsDocumentos)
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
Tags.Add(New TagsDocumentos("{Monto}", "xyz"))
|
||||
Tags.Add(New TagsDocumentos("{Fecha}", Date.Today.ToString))
|
||||
Tags.Add(New TagsDocumentos("{FechaConFormato}", "23 de marzo del 2020"))
|
||||
Tags.Add(New TagsDocumentos("{CantidadLetra}", "69420"))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocial}", "mengano y perengano"))
|
||||
Tags.Add(New TagsDocumentos("{Direccion}", "merida 1270"))
|
||||
Tags.Add(New TagsDocumentos("{Ciudad}", "Hermosillo"))
|
||||
Tags.Add(New TagsDocumentos("{Telefono}", "2209839"))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", "blablabla"))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", "asdfqwer"))
|
||||
Tags.Add(New TagsDocumentos("{CiudadAval}", "Hermosillo"))
|
||||
Tags.Add(New TagsDocumentos("{TelefonoAval}", "6621432648"))
|
||||
Dim monto As String = ""
|
||||
Dim razonSocial As String = ""
|
||||
Dim direccion As String = ""
|
||||
Dim ciudad As String = ""
|
||||
Dim Telefono As String = ""
|
||||
Dim mesArray = New String() {"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"}
|
||||
Dim hoy As DateTime = DateTime.Now
|
||||
Dim fechaConFormato As String = String.Format("{0} de {1} del {2}", hoy.Day, mesArray(hoy.Month), hoy.Year)
|
||||
|
||||
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
monto = ObjClientes.DtResultados.FiltroPrimeroValor("LimiteCredito").ToDouble.ToString("N")
|
||||
razonSocial = ObjClientes.DtResultados.FiltroPrimeroValor("NombreComercial")
|
||||
direccion = ObjClientes.DtResultados.FiltroPrimeroValor("Direccion")
|
||||
ciudad = ObjClientes.DtResultados.FiltroPrimeroValor("Ciudad")
|
||||
Telefono = ObjClientes.DtResultados.FiltroPrimeroValor("Telefono")
|
||||
End If
|
||||
|
||||
Tags.Add(New TagsDocumentos("{Monto}", monto))
|
||||
Tags.Add(New TagsDocumentos("{Fecha}", fechaConFormato))
|
||||
Tags.Add(New TagsDocumentos("{FechaConFormato}", fechaConFormato))
|
||||
Tags.Add(New TagsDocumentos("{CantidadLetra}", monto.ToDouble.Texto2Letras(1)))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocial}", razonSocial))
|
||||
Tags.Add(New TagsDocumentos("{Direccion}", direccion))
|
||||
Tags.Add(New TagsDocumentos("{Ciudad}", ciudad))
|
||||
Tags.Add(New TagsDocumentos("{Telefono}", Telefono))
|
||||
Tags.Add(New TagsDocumentos("{RazonSocialAval}", UsuarioActual.Empresa.NombreCorto))
|
||||
Tags.Add(New TagsDocumentos("{DireccionAval}", UsuarioActual.Empresa.Direccion))
|
||||
Tags.Add(New TagsDocumentos("{CiudadAval}", UsuarioActual.Empresa.Ciudad))
|
||||
Tags.Add(New TagsDocumentos("{TelefonoAval}", UsuarioActual.Empresa.Telefono))
|
||||
|
||||
'objGemBoxDocument.AgregarImagen(RutaLogo, 61.0, 53.0)
|
||||
objGemBoxDocument.SustituirTags(Tags)
|
||||
|
||||
@@ -107,9 +107,8 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">Cliente:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlCliente" DataTextField="NombreComercial" DataValueField="CveCliente" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCliente" runat="server" ControlToValidate="DdlCliente" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;">
|
||||
</ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,7 +116,7 @@
|
||||
<label class="col-md-2 truncate">Moneda:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlMoneda" DataTextField="Moneda" DataValueField="CveMoneda" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlCliente" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,9 +87,10 @@ Partial Class Ventas_Promociones
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("todos", "-1"))
|
||||
'DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
'DdlCliente.DataBind()
|
||||
'DdlCliente.Items.Insert(0, New ListItem("todos", "-1"))
|
||||
DdlClientes.setEsWebService(True)
|
||||
|
||||
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
@@ -131,6 +132,7 @@ Partial Class Ventas_Promociones
|
||||
TempDT.Columns.Add("TipoPromocion", GetType(String))
|
||||
TempDT.Columns.Add("Promocion", GetType(String))
|
||||
TempDT.Columns.Add("CantidadMinima", GetType(Integer))
|
||||
TempDT.Columns.Add("RinTamaño", GetType(String))
|
||||
|
||||
TempDT.Columns.Add("AplicaRestriccionTexto", GetType(String))
|
||||
TempDT.Columns.Add("AplicaRestriccion", GetType(Boolean))
|
||||
@@ -149,7 +151,7 @@ Partial Class Ventas_Promociones
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ChangeDdlProducto()
|
||||
DdlTipoPromocion.Items.FindByValue("1").Enabled = False
|
||||
DdlTipoPromocion.Items.FindByValue("3").Enabled = False
|
||||
' DdlTipoPromocion.Items.FindByValue("3").Enabled = False
|
||||
End Sub
|
||||
Private Sub ChangeDdlProducto()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
@@ -185,9 +187,10 @@ Partial Class Ventas_Promociones
|
||||
DdlSubProyecto.SelectedValue = Dr("CveSubProyecto").ToString
|
||||
DdlMarca.SelectedValue = Dr("CveMarca").ToString
|
||||
If Dr("CveVendedor").ToString.ToEntero > 0 Then DdlVendedor.SelectedValue = Dr("CveVendedor").ToString
|
||||
If Dr("CveCliente").ToString.ToEntero > 0 Then DdlCliente.SelectedValue = Dr("CveCliente").ToString
|
||||
If Dr("CveCliente").ToString.ToEntero > 0 Then DdlClientes.SelectedValue = Dr("CveCliente").ToString
|
||||
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
|
||||
DdlMoneda.SelectedValueExist(Dr("CveMoneda").ToString)
|
||||
DdlMarca.SelectedValueExist(Dr("CveMarca").ToString)
|
||||
|
||||
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
|
||||
TempDT = ObjVentas.DtResultados
|
||||
@@ -411,11 +414,12 @@ Partial Class Ventas_Promociones
|
||||
|
||||
|
||||
Private Sub GuardaPromocion()
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim TieneError = False
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero)
|
||||
|
||||
If CvePromocion > 0 Then
|
||||
@@ -443,11 +447,13 @@ Partial Class Ventas_Promociones
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
Private Sub ActualizaPromocion()
|
||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim TieneError = False
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha), DdlVendedor.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CvePromocion, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha), DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlMarca.SelectedValue.ToEntero) Then
|
||||
|
||||
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 0").Rows
|
||||
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
|
||||
|
||||
@@ -69,7 +69,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificación", "4"))
|
||||
DdlGrupo.Items.Insert(2, New ListItem("Productos-Servicios", "5"))
|
||||
DdlGrupo.Items.Insert(3, New ListItem("Año", "6"))
|
||||
DdlGrupo.Items.Insert(4, New ListItem("Mes", "7"))
|
||||
@@ -493,7 +493,21 @@ Partial Class Ventas_RepProductosServicios
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim Cliente = If(DdlClientes.SelectedText = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedText}")
|
||||
Dim FechaInicio = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio:</b> {txtFechaI.Text}")
|
||||
Dim FechaFin = If(txtFechaF.Text = "", "", $" <b>Fecha Fin:</b> {txtFechaF.Text}")
|
||||
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" <b>Agrupado por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text }")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Proyecto:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}")
|
||||
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Usuario:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
|
||||
|
||||
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -503,7 +517,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
|
||||
@@ -34,7 +34,7 @@ Partial Class Ventas
|
||||
Private Property FolioXML As String
|
||||
Private Property SubTotal As Decimal
|
||||
Private Property Total As Decimal = 0
|
||||
Private Property Descuentos As Decimal = 0
|
||||
' Private Property Descuentos As Decimal = 0
|
||||
Private Property EmisorRFC As String
|
||||
Private Property ReceptorRFC As String
|
||||
Private Property TrasladoIVA As Decimal = 0
|
||||
@@ -5883,11 +5883,12 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
|
||||
'Dim TipoDescuento As Integer
|
||||
Dim Cantidad, PU, Descuento, CantidadInventario As Decimal
|
||||
Dim Cantidad, PU, CantidadInventario As Decimal
|
||||
Dim ObjDescuento As New Descuentos
|
||||
Dim CuentaPredial As String
|
||||
Cantidad = GvPS.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
PU = (GvPS.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDecimal).RoundSQL(6)
|
||||
Descuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
ObjDescuento.ImporteDescuento = (GvPS.Rows(e.RowIndex).FCTextBox("TxtDescuento").Text.ToDecimal).RoundSQL(NumeroDecimales)
|
||||
CuentaPredial = GvPS.Rows(e.RowIndex).FCTextBox("TxtPredial").Text.Trim
|
||||
|
||||
If PU <= 0 AndAlso UsuarioActual.CveEmpresa = 141 Then
|
||||
@@ -5896,7 +5897,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
Descuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU)
|
||||
ObjDescuento = CalcularDescuentos(TmpDT.Rows(e.RowIndex)("CvePS").ToString.ToEntero, Cantidad, PU)
|
||||
End If
|
||||
|
||||
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
||||
@@ -6060,10 +6061,10 @@ Partial Class Ventas
|
||||
CalculaUsados()
|
||||
AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero, DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero, DdlCla.SelectedItem.Text,
|
||||
GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero, GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedText,
|
||||
GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim, PU, Descuento,
|
||||
GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero, GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text,
|
||||
GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text,
|
||||
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString.ToEntero, SeActualiza:=True)
|
||||
CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString.ToEntero, SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle)
|
||||
|
||||
' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue
|
||||
' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text
|
||||
@@ -6091,7 +6092,7 @@ Partial Class Ventas
|
||||
TmpDT.Rows(e.RowIndex)("PorcentajeIEPS") = 0
|
||||
End If
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (Descuento))
|
||||
Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (ObjDescuento.ImporteDescuento))
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = 0
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
@@ -6119,7 +6120,7 @@ Partial Class Ventas
|
||||
TmpDT.Rows(e.RowIndex)("Obs") = GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim
|
||||
TmpDT.Rows(e.RowIndex)("TiempoEntrega") = GvPS.Rows(e.RowIndex).FCTextBox("TxtTiempoEntrega").Text.Trim
|
||||
TmpDT.Rows(e.RowIndex)("PU") = PU
|
||||
TmpDT.Rows(e.RowIndex)("Descuento") = Descuento
|
||||
TmpDT.Rows(e.RowIndex)("Descuento") = ObjDescuento.ImporteDescuento
|
||||
TmpDT.Rows(e.RowIndex)("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteIVA") = (TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales)
|
||||
TmpDT.Rows(e.RowIndex)("ImporteIEPS") = (TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales)
|
||||
@@ -9422,7 +9423,7 @@ Partial Class Ventas
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero,
|
||||
Row("PU").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
|
||||
Row("Obs").ToString, Row("Descuento").ToString.ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
|
||||
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
|
||||
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CvePromocionDetalle:=Row("CvePromocionDetalle").ToString.ToEntero,
|
||||
IEPS:=Row("ImporteIEPS").ToString.ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
|
||||
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDouble,
|
||||
PorcentajeIVA:=Row("PorcentajeIVA").ToString.ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDouble, CuentaPredial:=Row("CuentaPredial").ToString) Then
|
||||
@@ -14201,11 +14202,21 @@ Partial Class Ventas
|
||||
EsValido = True
|
||||
End If
|
||||
Else
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
'valida sino tiene promocion la clasificacion
|
||||
If DtPromociones.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero}").Rows.Count > 0 Then
|
||||
''falta aplicar si tiene promocion
|
||||
If DrPS IsNot Nothing Then
|
||||
If DtPromociones.FiltraParametros(String.Format("CveClasificacion = {0}", DdlClasificacion.SelectedValue.ToEntero)).Rows.Count > 0 Then
|
||||
''falta aplicar si tiene promocion
|
||||
Dim drPromo As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0}", DdlClasificacion.SelectedValue.ToEntero))
|
||||
If drPromo IsNot Nothing Then
|
||||
If drPromo("CveMarca").ToString = DrPS("CveMarca").ToString Then
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14245,7 +14256,7 @@ Partial Class Ventas
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function CalcularDescuentos(CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Decimal
|
||||
Private Function CalcularDescuentos(CvePS As Integer, Cantidad As Decimal, PU As Decimal) As Descuentos
|
||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(572) = "1" AndAlso Not TbDescuentosRNC.Visible Then
|
||||
@@ -14256,19 +14267,50 @@ Partial Class Ventas
|
||||
Descuento = HdnDescuento.Value.ToDecimal * Cantidad
|
||||
End If
|
||||
|
||||
Dim ValidaCondicionesComerciales As Boolean = True
|
||||
|
||||
'AGREGA PROMOCION EN EL DESCUENTO
|
||||
Dim TipoPromo As Integer = 0
|
||||
Dim TotalPromocion As Decimal = 0
|
||||
Dim PromocionPorcentaje As Decimal = 0
|
||||
Dim CantMinima As Integer = 0
|
||||
Dim CveMarcaPS As Integer = 0
|
||||
Dim CveClasifPS As Integer = 0
|
||||
Dim CvePromocionDetalle As Integer = 0
|
||||
Dim ObjDescuento As New Descuentos
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS IsNot Nothing Then
|
||||
|
||||
CveMarcaPS = DrPS("CveMarca").ToString.ToEntero
|
||||
CveClasifPS = DrPS("CveClasificacion").ToString.ToEntero
|
||||
|
||||
If CveClasifPS = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If DtPromociones IsNot Nothing AndAlso DtPromociones.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero($"CvePS = {CvePS}")
|
||||
Dim dr As DataRow = DtPromociones.FiltroPrimero(String.Format("CvePS = {0} AND (CveSubProyecto = {1} OR CveSubProyecto IS NULL)", CvePS, DdlSubProyectoDatos.SelectedValue))
|
||||
If dr IsNot Nothing Then
|
||||
TipoPromo = dr("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
PromocionPorcentaje = dr("Promocion").ToString.ToDecimal
|
||||
CantMinima = dr("CantidadMinima").ToString.ToEntero
|
||||
CvePromocionDetalle = dr("CvePromocionDetalle").ToString.ToEntero
|
||||
Else
|
||||
'verifica marca, si tiene asignada la promocion
|
||||
Dim drC As DataRow = DtPromociones.FiltroPrimero(String.Format("CveClasificacion = {0} AND (CveMarca = {1} OR CveMarca IS NULL)", CveClasifPS, CveMarcaPS))
|
||||
|
||||
If drC IsNot Nothing Then
|
||||
TipoPromo = drC("TipoPromocion").ToString.ToEntero
|
||||
TotalPromocion = drC("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal
|
||||
PromocionPorcentaje = drC("Promocion").ToString.ToDecimal
|
||||
CantMinima = drC("CantidadMinima").ToString.ToEntero
|
||||
CvePromocionDetalle = drC("CvePromocionDetalle").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14279,15 +14321,11 @@ Partial Class Ventas
|
||||
ElseIf TipoPromo = 3 Then 'Promocion por Cantidad
|
||||
If Cantidad >= CantMinima Then
|
||||
Descuento = Descuento + TotalPromocion
|
||||
Else
|
||||
CvePromocionDetalle = -1
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
Dim ValidaCondicionesComerciales As Boolean = True
|
||||
|
||||
If DrPS IsNot Nothing AndAlso DrPS("CveClasificacion").ToString.ToEntero = 20636 Then
|
||||
ValidaCondicionesComerciales = False
|
||||
End If
|
||||
|
||||
'VERIFICA SI APLICAN CONDICIONES COMERCIALES
|
||||
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||
@@ -14334,8 +14372,13 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Descuento
|
||||
ObjDescuento.ImporteDescuento = Descuento
|
||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||
|
||||
Return ObjDescuento
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub AgregarPS()
|
||||
'SELECCIONA EL PS DEPENDIENDO LA MODALIDAD (CODIGO BARRAS - DDL)
|
||||
Dim CvePS As Integer = -1
|
||||
@@ -14353,12 +14396,12 @@ Partial Class Ventas
|
||||
|
||||
Dim Cantidad As Decimal = TxtCantidad.Text.ToDecimal
|
||||
Dim PU As Decimal = If(CvePSAmortizacion > 0, TxtPrecio.Text.Trim.ToDecimal * -1, TxtPrecio.Text.Trim.ToDecimal)
|
||||
Dim Descuento As Decimal = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
Dim ObjDescuento As Descuentos = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, Descuento,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
DdlProyecto.SelectedValue.ToEntero, DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedItem.Text,
|
||||
SerieLote:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS)
|
||||
SerieLote:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle)
|
||||
|
||||
CalculaUsados()
|
||||
|
||||
@@ -14390,10 +14433,10 @@ Partial Class Ventas
|
||||
|
||||
Dim CvePS As Integer = DdlPSPyME.SelectedValue.ToEntero
|
||||
|
||||
Dim Descuento As Decimal = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
Dim Descuento As Descuentos = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUMPyME.SelectedValue.ToEntero, DdlUMPyME.SelectedItem.Text, DdlClasificacionPyME.SelectedValue.ToEntero, DdlClasificacionPyME.SelectedItem.Text,
|
||||
CvePS, DdlPSPyME.SelectedText, TxtObsPyME.Text, PU, Descuento, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||
CvePS, DdlPSPyME.SelectedText, TxtObsPyME.Text, PU, Descuento.ImporteDescuento, CveProyecto, Proyecto, CveSubProyecto, SubProyecto)
|
||||
|
||||
CalculaUsados()
|
||||
CalculaTotalesVenta()
|
||||
@@ -14492,7 +14535,7 @@ Partial Class Ventas
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
|
||||
Optional SeActualiza As Boolean = False) As Boolean
|
||||
Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
If Not CvePS > 0 Then
|
||||
@@ -14639,6 +14682,7 @@ Partial Class Ventas
|
||||
Row("IEPS") = Row("ImporteIEPS")
|
||||
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
|
||||
Row("TipoDescuento") = HdnTipoDescuento.Value
|
||||
Row("CvePromocionDetalle") = CvePromocionDetalle
|
||||
Row("Total") = (Cantidad * PU)
|
||||
Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales)
|
||||
|
||||
@@ -14830,6 +14874,7 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("SubProyecto", GetType(String))
|
||||
TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
|
||||
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
|
||||
|
||||
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
|
||||
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
|
||||
@@ -18290,6 +18335,8 @@ Partial Class Ventas
|
||||
Case "egreso" : DdlTipoComprobante.SelectedValue = "Egs"
|
||||
End Select
|
||||
|
||||
Dim Descuentos As Decimal = 0
|
||||
|
||||
|
||||
RFC = ReceptorRFC
|
||||
TxtFecha.Text = Fecha
|
||||
@@ -18556,7 +18603,7 @@ Partial Class Ventas
|
||||
_Fecha = ValorXML(nodo, "fecha")
|
||||
SubTotal = ValorXML(nodo, "subTotal").ToDecimal
|
||||
Total = ValorXML(nodo, "total").ToDecimal
|
||||
Descuentos = ValorXML(nodo, "descuento").ToDecimal
|
||||
'Descuentos = ValorXML(nodo, "descuento").ToDecimal
|
||||
_Moneda = ValorXML(nodo, "Moneda")
|
||||
_TipoComprobante = ValorXML(nodo, "tipoDeComprobante")
|
||||
|
||||
@@ -20058,11 +20105,11 @@ Partial Class Ventas
|
||||
Dim Cantidad As Decimal = TxtCantidadPyME.Text.ToDecimal()
|
||||
Dim PU As Decimal = TxtPrecioPyME.Text.ToDecimal()
|
||||
|
||||
Dim Descuento As Decimal = CalcularDescuentos(DdlPSPyME.SelectedValue.ToEntero, Cantidad, PU)
|
||||
Dim ObjDescuento As Descuentos = CalcularDescuentos(DdlPSPyME.SelectedValue.ToEntero, Cantidad, PU)
|
||||
|
||||
TxtDescuentoPyME.Text = Descuento.FormatoNumero(2).Replace(","c, "")
|
||||
TxtDescuentoPyME.Text = ObjDescuento.ImporteDescuento.FormatoNumero(2).Replace(","c, "")
|
||||
|
||||
LblTotalPyME.Text = ((Cantidad * PU) - Descuento).FormatoNumero(2).Replace(","c, "")
|
||||
LblTotalPyME.Text = ((Cantidad * PU) - ObjDescuento.ImporteDescuento).FormatoNumero(2).Replace(","c, "")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 80 Then
|
||||
'busca el precio de la sucursal
|
||||
@@ -25155,4 +25202,8 @@ Partial Class Ventas
|
||||
' ObjBancos.Dispose()
|
||||
' If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||
'End Sub
|
||||
Partial Class Descuentos
|
||||
Public ImporteDescuento As Decimal = 0
|
||||
Public CvePromocionDetalle As Integer = -1
|
||||
End Class
|
||||
End Class
|
||||
Reference in New Issue
Block a user