Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -766,7 +766,7 @@ Partial Class AF_AF
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("Empresas\{0}\AF\Placas", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Placas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
@@ -883,7 +883,7 @@ Partial Class AF_AF
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("Empresas\{0}\AF\Licencias", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Licencias", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
If HdnModalidadLicencia.Value = "A" Then
|
||||
@@ -1036,7 +1036,7 @@ Partial Class AF_AF
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Polizas", UsuarioActual.Empresa.Ruta))
|
||||
Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("{0}AF\Polizas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
If HdnModalidadPoliza.Value = "A" Then
|
||||
@@ -1929,7 +1929,7 @@ Partial Class AF_AF
|
||||
If EsURL2 Then
|
||||
If objAF.UpdateActivosFijosResguardosURL("-1", $"AFT{CveResguardoPadre}.{FileExtension}", CveResguardoPadre) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
@@ -1937,7 +1937,7 @@ Partial Class AF_AF
|
||||
Else
|
||||
If objAF.UpdateActivosFijosResguardosURL($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
|
||||
@@ -545,7 +545,7 @@ Partial Class AF_ResguardoAF
|
||||
If File.Exists(String.Format("{0}\AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then
|
||||
File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
@@ -561,7 +561,7 @@ Partial Class AF_ResguardoAF
|
||||
If File.Exists(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then
|
||||
File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then
|
||||
If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
@@ -578,7 +578,7 @@ Partial Class AF_ResguardoAF
|
||||
If File.Exists(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension)) Then
|
||||
File.Delete(String.Format("{0}AF\Resguardos\AFR{1}.{2}", UsuarioActual.Empresa.Ruta, CveResguardoPadre, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta)) Then
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("{0}AF\Resguardos", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
|
||||
@@ -519,7 +519,7 @@ Namespace Extensiones
|
||||
Return retorno
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False) As Boolean
|
||||
Public Function FilesMove(oldName As String, newName As String, newDirectorio As String, Optional Sobreescribir As Boolean = False, Optional ConcatenarDirectorioBase As Boolean = True) As Boolean
|
||||
Dim retorno As Boolean = True
|
||||
Dim directorioOld As New StringBuilder
|
||||
Dim directorioNew As New StringBuilder
|
||||
@@ -531,11 +531,17 @@ Namespace Extensiones
|
||||
End If
|
||||
|
||||
'SI VA A LA CARPETA DE EMPRESAS TIENE QUE TOMAR LA RUTA DE EMPRESAS
|
||||
If newDirectorio.Contains("Empresas") Then
|
||||
directorioNew.AppendFormat("{0}{1}\", ModExtensiones.DirectorioBaseEmpresas, newDirectorio)
|
||||
If ConcatenarDirectorioBase Then
|
||||
If newDirectorio.Contains("Empresas") Then
|
||||
directorioNew.AppendFormat("{0}{1}\", ModExtensiones.DirectorioBaseEmpresas, newDirectorio)
|
||||
Else
|
||||
directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio)
|
||||
End If
|
||||
Else
|
||||
directorioNew.AppendFormat("{0}{1}\", AppDomain.CurrentDomain.BaseDirectory, newDirectorio)
|
||||
End If
|
||||
'SI YA TIENE EL DIRECTORIO COMPLETO NO CONCANTENA EL DIRECTORIO
|
||||
directorioNew.AppendFormat("{0}\", newDirectorio)
|
||||
End If
|
||||
|
||||
|
||||
If Not Directory.Exists(directorioNew.ToString) Then
|
||||
Directory.CreateDirectory(directorioNew.ToString)
|
||||
|
||||
105
Ashx/SIGWeb.ashx
105
Ashx/SIGWeb.ashx
@@ -8,6 +8,12 @@ Imports Extensiones
|
||||
Imports System.IO
|
||||
|
||||
Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
'TEMPORAL, DEBE SER REEMPLAZADO POR EL MODELO DE LA LIBRERIA
|
||||
Public Class MResponseModel(Of T)
|
||||
Public Property IsSuccess As Boolean
|
||||
Public Property Message As String
|
||||
Public Property Result As T
|
||||
End Class
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
If context.Request("metodo") IsNot Nothing AndAlso context.Request("metodo").ToString() = "GetTokenAngular" Then
|
||||
@@ -51,13 +57,14 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CveEmpresa As Integer = context.Request("CveEmpresa").ToString().ToEntero()
|
||||
GuardaLog(String.Format("?metodo=Contabilizapoliza&CvePrePoliza={0}&CveUsuario={1}&CveEmpresa ={2}", CvePrePoliza, CveUsuario, CveEmpresa))
|
||||
ActualizaPrePoliza(context)
|
||||
Dim obj As New ADSNetLibrary.SIGAPI.Models.ResponseModel(Of Object)()
|
||||
|
||||
Dim obj As New MResponseModel(Of Object)()
|
||||
obj.Result = DateTime.Now.ToString()
|
||||
Dim retorno = JsonConvert.SerializeObject(obj).ToString()
|
||||
context.Response.Write(retorno)
|
||||
context.Response.StatusCode = 200
|
||||
Case "RevisaConexion"
|
||||
Dim obj As New ADSNetLibrary.SIGAPI.Models.ResponseModel(Of Object)()
|
||||
Dim obj As New MResponseModel(Of Object)()
|
||||
obj.Result = DateTime.Now.ToString()
|
||||
Dim retorno = JsonConvert.SerializeObject(obj).ToString()
|
||||
context.Response.Write(retorno)
|
||||
@@ -92,8 +99,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
ActualizaPrePoliza(context)
|
||||
Case "getpersonal"
|
||||
getpersonal(context)
|
||||
Case "getcuentascontables"
|
||||
GetCuentasContables(context)
|
||||
Case "getcontratos"
|
||||
GetContratos(context)
|
||||
Case "GettingCURP"
|
||||
@@ -214,7 +219,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CveEmpresa As Integer = context.Request("CveEmpresa").ToString.ToEntero
|
||||
Dim CveUsuario As Integer = context.Request("CveUsuario").ToString.ToEntero
|
||||
Dim Empresa As New Empresa
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
Dim Retorno As Integer = 0
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
@@ -224,19 +229,22 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjEmpresa.Dispose()
|
||||
Dim IdPoliza As Integer = -1
|
||||
|
||||
ObjConta.GetPrePoliza(CvePrePoliza, CveEmpresa)
|
||||
IdPoliza = ObjConta.DtResultados.FiltroPrimeroValor("IdPoliza", "").ToEntero
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Try
|
||||
ObjConta.GetPrePoliza(CvePrePoliza, CveEmpresa)
|
||||
IdPoliza = ObjConta.DtResultados.FiltroPrimeroValor("IdPoliza", "").ToEntero
|
||||
If IdPoliza > 0 Then
|
||||
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
||||
End If
|
||||
|
||||
If IdPoliza > 0 Then
|
||||
|
||||
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, CveUsuario, Empresa, pIDPoliza:=IdPoliza) Then
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, CveUsuario, Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then
|
||||
Retorno = 200
|
||||
End If
|
||||
Else
|
||||
Retorno = 200
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLogAD(ex.ToString())
|
||||
End Try
|
||||
ObjConta.Dispose()
|
||||
|
||||
Empresa = Nothing
|
||||
'context.Response.Write(CveUsuario.ToString())
|
||||
context.Response.StatusCode = Retorno
|
||||
@@ -582,15 +590,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
'Dim i As Integer = 0 'limpieza de columnas
|
||||
'While i < DtRetorno.Columns.Count
|
||||
' If Not DtRetorno.Columns(i).ColumnName.Contiene("CveProveedor", "NombreCortoProveedor") Then
|
||||
' DtRetorno.Columns.RemoveAt(i)
|
||||
' Else
|
||||
' i = i + 1
|
||||
' End If
|
||||
'End While
|
||||
|
||||
DtRetorno.Columns("CveCliente").ColumnName = "id"
|
||||
DtRetorno.Columns(ColumnaNombre).ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
@@ -626,6 +625,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjProveedores.Dispose()
|
||||
End If
|
||||
|
||||
'Dim ObjProveedores As New ClsCompProveedores
|
||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||
' DtRetorno = ObjProveedores.DtResultados
|
||||
'End If
|
||||
'ObjProveedores.Dispose()
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable) '.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros(String.Format("NombreCortoProveedor like '%{0}%'", Name))
|
||||
@@ -651,7 +655,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
DtRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
@@ -740,6 +744,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163, 166) Then
|
||||
UsaGlobal = False
|
||||
|
||||
'If CveEmpresa.Contiene(140, 141) And Pagina.Contiene("ventas/ventas") Then
|
||||
' AplicaParaVenta = 1
|
||||
'End If
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa, CveMarca) Then
|
||||
|
||||
@@ -1185,6 +1193,11 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
|
||||
'Dim ObjProveedores As New ClsCompProveedores
|
||||
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
|
||||
' DtRetorno = ObjProveedores.DtResultados
|
||||
'End If
|
||||
'ObjProveedores.Dispose()
|
||||
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'")
|
||||
@@ -1192,7 +1205,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
|
||||
DtRetorno.Columns("CvePersonal").ColumnName = "id"
|
||||
DtRetorno.Columns("NombreCompleto").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
@@ -1239,47 +1251,4 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Get Cuentas"
|
||||
Private Function GetCuentasContables(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
CveEmpresa = usuario.CveEmpresa
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, CveEmpresa, Nombre:=Name) Then
|
||||
DtRetorno = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
|
||||
Dim i As Integer = 0 'limpieza de columnas
|
||||
While i < DtRetorno.Columns.Count
|
||||
If Not DtRetorno.Columns(i).ColumnName.Contiene("CveCuenta", "CtaCodigo") Then
|
||||
DtRetorno.Columns.RemoveAt(i)
|
||||
Else
|
||||
i = i + 1
|
||||
End If
|
||||
End While
|
||||
DtRetorno.Columns("CveCuenta").ColumnName = "id"
|
||||
DtRetorno.Columns("CtaCodigo").ColumnName = "text"
|
||||
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
|
||||
context.Response.Write(retorno)
|
||||
Else
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
|
||||
DtRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
@@ -302,7 +302,7 @@ Partial Class Bancos_CreditosPagoMultiple
|
||||
Alert("El Documento se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Bancos/CreditosPagoMultiple.aspx"";")
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
ObjIE.Commit()
|
||||
GeneraChequePDF(CveIE, UsuarioActual.Empresa)
|
||||
|
||||
@@ -2737,7 +2737,7 @@ Partial Class Bancos_IE
|
||||
|
||||
'GUARDA COMPROBANTE
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
'GUARDA PREPOLIZAS DETALLE [PRIMERO SON LOS CASOS ESPECIALES, AL FINAL (ELSE) LOS CASOS NORMALES] --REEMPLAZA IFs
|
||||
@@ -4880,7 +4880,7 @@ Partial Class Bancos_IE
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -321,7 +321,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false);
|
||||
}
|
||||
decimal Importe;
|
||||
decimal ImporteMN;
|
||||
@@ -744,7 +744,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancos, -1, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
|
||||
@@ -355,7 +355,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
|
||||
// SI ES DOLARES
|
||||
@@ -699,7 +699,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
|
||||
//GUARDA PREPOLIZAS DETALLE
|
||||
|
||||
@@ -1021,7 +1021,7 @@ Partial Class Bancos_PolizaCheque
|
||||
'If Conta IsNot Nothing Then Conta.Commit()
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza)
|
||||
|
||||
|
||||
@@ -186,11 +186,11 @@ Partial Class Bancos_PopIECompras
|
||||
ViewState("TipoTransaccion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property SaldoVenta As Double
|
||||
Private Property SaldoVenta As Decimal
|
||||
Get
|
||||
Return ViewState("SaldoVenta").ToString.ToDouble
|
||||
Return ViewState("SaldoVenta").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Double)
|
||||
Set(value As Decimal)
|
||||
ViewState("SaldoVenta") = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -277,7 +277,7 @@ Partial Class Bancos_PopIECompras
|
||||
<Serializable>
|
||||
Public Class Anticipos
|
||||
Public Property CveIE As Integer
|
||||
Public Property Importe As Double
|
||||
Public Property Importe As Decimal
|
||||
Public Property CvePersonal As Integer
|
||||
End Class
|
||||
<Serializable>
|
||||
@@ -677,10 +677,10 @@ Partial Class Bancos_PopIECompras
|
||||
RVImporte.Enabled = True
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDouble.ToString.FormatoNumero
|
||||
TxtImporte.Text = dr("Saldo").ToString.ToDouble.FormatoNumero
|
||||
RVImporte.MaximumValue = dr("Saldo").ToString.ToDecimal.ToString.FormatoNumero
|
||||
TxtImporte.Text = dr("Saldo").ToString.ToDecimal.FormatoNumero
|
||||
|
||||
SaldoVenta = dr("Saldo").ToString.ToDouble
|
||||
SaldoVenta = dr("Saldo").ToString.ToDecimal
|
||||
EsImportacion = CBool(dr("EsImportacion"))
|
||||
End If
|
||||
End If
|
||||
@@ -915,10 +915,10 @@ Partial Class Bancos_PopIECompras
|
||||
dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue))
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
Dim tSaldo As Double = dr("Saldo").ToString.ToDouble
|
||||
Dim tSaldo As Decimal = dr("Saldo").ToString.ToDecimal
|
||||
|
||||
'si el saldo es mayor de la compra poner el valor de la compra sino el valor del saldo
|
||||
TxtImporte.Text = If(tSaldo > TxtTotal.Text.ToDouble, TxtTotal.Text, tSaldo.ToString).FormatoNumero
|
||||
TxtImporte.Text = If(tSaldo > TxtTotal.Text.ToDecimal, TxtTotal.Text, tSaldo.ToString).FormatoNumero
|
||||
|
||||
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
@@ -1086,7 +1086,7 @@ Partial Class Bancos_PopIECompras
|
||||
End If
|
||||
Next
|
||||
'actualizo el monto maximo a pagar en el movimiento bancario
|
||||
Dim tSaldo As Double = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDouble
|
||||
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal
|
||||
If tSaldo < MovimientoPagar.Saldo Then
|
||||
TxtImporte.Text = tSaldo.FormatoNumero()
|
||||
End If
|
||||
@@ -1149,7 +1149,7 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDouble.ToString
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -1160,7 +1160,7 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
Protected Sub CVImporteDolares_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDouble <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDouble Then
|
||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDecimal <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDecimal Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
@@ -1208,7 +1208,7 @@ Partial Class Bancos_PopIECompras
|
||||
GvDeudores.Columns(6).Visible = False
|
||||
|
||||
RVImporte.Enabled = True
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDouble.ToString
|
||||
RVImporte.MaximumValue = LtlSaldo.Text.ToDecimal.ToString
|
||||
|
||||
CVImporteDolares.Enabled = False
|
||||
CVImportePesos.Enabled = False
|
||||
@@ -1219,7 +1219,7 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
Protected Sub CVImportePesos_ServerValidate(source As Object, args As ServerValidateEventArgs)
|
||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDouble <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDouble Then
|
||||
If args.Value.ToString.Substring(0, args.Value.Length - 3).ToDecimal <= LtlSaldo.Text.Substring(0, LtlSaldo.Text.Length - 3).ToDecimal Then
|
||||
args.IsValid = True
|
||||
Else
|
||||
args.IsValid = False
|
||||
@@ -1251,10 +1251,10 @@ Partial Class Bancos_PopIECompras
|
||||
#Region "GV ROW DATA BOUND"
|
||||
Private Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIngresos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim total As Double
|
||||
Dim saldo As Double
|
||||
Dim total As Decimal
|
||||
Dim saldo As Decimal
|
||||
|
||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||
total = SaldoVenta
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||
@@ -1268,10 +1268,10 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
Private Sub GvDeudores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDeudores.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim total As Double
|
||||
Dim saldo As Double
|
||||
Dim total As Decimal
|
||||
Dim saldo As Decimal
|
||||
|
||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||
total = SaldoVenta
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||
@@ -1284,10 +1284,10 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
Private Sub GvAcreedores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcreedores.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim total As Double
|
||||
Dim saldo As Double
|
||||
Dim total As Decimal
|
||||
Dim saldo As Decimal
|
||||
|
||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||
total = SaldoVenta
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||
@@ -1300,10 +1300,10 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
Private Sub GvVentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvVentas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim total As Double
|
||||
Dim saldo As Double
|
||||
Dim total As Decimal
|
||||
Dim saldo As Decimal
|
||||
|
||||
saldo = e.Row.DataKey("Saldo").ToDouble
|
||||
saldo = e.Row.DataKey("Saldo").ToDecimal
|
||||
total = SaldoVenta
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ClickDeudorChk(this, ""{0}"", ""{1}"", ""{2}"")", e.Row.FCTextBox("TxtSaldoDeudor").ClientID, total, saldo))
|
||||
@@ -1506,7 +1506,7 @@ Partial Class Bancos_PopIECompras
|
||||
CveIE = -1
|
||||
End Select
|
||||
|
||||
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDouble > 0 Then
|
||||
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then
|
||||
'Agrego el movimiento a Comisiones
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComision.Text.ToDecimal, TxtObservaciones.Text, 78, TxtObservaciones.Text, Fecha, 0, -1, CveIE, CveCompra, -1, -1, If(ViewState("CveCliente") IsNot Nothing, ViewState("CveCliente").ToString.ToEntero, -1)) Then
|
||||
MsgError = "Detalle"
|
||||
@@ -2430,7 +2430,7 @@ Partial Class Bancos_PopIECompras
|
||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2454,8 +2454,8 @@ Partial Class Bancos_PopIECompras
|
||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||
ImporteMXNoDeducible = Math.Round(ImporteMXNoDeducible, 2)
|
||||
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||
ImporteMXNoDeducible = ImporteMXNoDeducible.RoundSQL
|
||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||
@@ -2656,7 +2656,7 @@ Partial Class Bancos_PopIECompras
|
||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible)
|
||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||
ImporteMXNoDeducible = ImporteMX.RoundSQL
|
||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
@@ -2680,8 +2680,8 @@ Partial Class Bancos_PopIECompras
|
||||
ImporteMovimientoNoDeducible = (MovimientoPagar.IVANoDeducible * PorcentajePago)
|
||||
ImporteMXNoDeducible = ImporteMovimientoNoDeducible * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimientoNoDeducible = Math.Round(ImporteMovimientoNoDeducible, 2)
|
||||
ImporteMXNoDeducible = Math.Round(ImporteMXNoDeducible, 2)
|
||||
ImporteMovimientoNoDeducible = ImporteMovimientoNoDeducible.RoundSQL
|
||||
ImporteMXNoDeducible = ImporteMXNoDeducible.RoundSQL
|
||||
TimpocambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimientoNoDeducible.FormatoNumero(2)}"
|
||||
@@ -3067,7 +3067,7 @@ Partial Class Bancos_PopIECompras
|
||||
IdCtaContable = IdCtaContComplementariaCliente
|
||||
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
ImporteMX = ImporteMovimiento
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioPago - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, TxtObservaciones.Text, 207, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, rw.DataKey("CveVenta").ToString.ToEntero, CveCompra, CveCliente:=rw.DataKey("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioPago - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioPago) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -10,8 +10,8 @@ using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using static Extensiones.ModExtensiones;
|
||||
public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
{
|
||||
#region "PROPIEDADES"
|
||||
private int IDCtaContablePrestamo
|
||||
{
|
||||
get
|
||||
@@ -106,7 +106,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
TxtImporte.Attributes.Add("disabled", "disabled");
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1)
|
||||
if (UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1)
|
||||
{
|
||||
TxtFechaPrestamo.Enabled = false;
|
||||
ImgCalendarioPrestamo.Visible = false;
|
||||
@@ -187,8 +187,8 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
divTCPago.Visible = false;
|
||||
TxtTCPago.Text = "1";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
long Folio;
|
||||
ClsBancos bancos = new ClsBancos();
|
||||
Folio = bancos.GetNextFolio(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero());
|
||||
@@ -268,17 +268,17 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
if (CvePrePoliza > 0)
|
||||
{
|
||||
decimal ImporteBanco = TxtImporte.Text.ToDecimal();
|
||||
decimal ImporteMNBanco= ImporteBanco;
|
||||
decimal ImporteMNBanco = ImporteBanco;
|
||||
decimal ImporteComplementaria = 0;
|
||||
decimal TC = TxtTCPago.Text.ToDecimal();
|
||||
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransaccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), DdlFuncionarioEmpleadoPago.SelectedItem.Text, ImporteBanco.ToString().ToDouble(), CveMoneda,
|
||||
TC.ToString().ToDouble() , TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
TC.ToString().ToDouble(), TxtObservaciones.Text.Trim(), "", ChkAbonoCuenta.Checked, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (CveMoneda != 1)
|
||||
{
|
||||
{
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
ImporteMNBanco = ImporteBanco;
|
||||
@@ -296,7 +296,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||
}
|
||||
decimal Importe;
|
||||
decimal ImporteMN;
|
||||
@@ -323,9 +323,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
ImporteMN = Importe * TC;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContablePago, Conc, DateTime.Now, IDCtaContablePrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPago.SelectedValue.ToEntero(), ImporteMX: ImporteMN, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TC))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de pago acreedor";
|
||||
@@ -352,7 +352,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, ImporteBanco, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPago.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: ImporteBanco, TipoCambio: TC, TipoCambioPago: TC))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -377,7 +377,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0)
|
||||
{
|
||||
@@ -471,11 +471,11 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
int tCveMoneda = 0;
|
||||
if (dr != null)
|
||||
{
|
||||
tCveMoneda = dr["CveMoneda"].ToString().ToEntero();
|
||||
|
||||
IDCtaContableBancosPrestamo = dr["IdCtaContable"].ToString().ToEntero();
|
||||
IDCtaContableBancosPrestamoComplementario = dr["IdCtaContableComplementaria"].ToString().ToEntero();
|
||||
|
||||
tCveMoneda = dr["CveMoneda"].ToString().ToEntero();
|
||||
|
||||
IDCtaContableBancosPrestamo = dr["IdCtaContable"].ToString().ToEntero();
|
||||
IDCtaContableBancosPrestamoComplementario = dr["IdCtaContableComplementaria"].ToString().ToEntero();
|
||||
|
||||
}
|
||||
|
||||
if (tCveMoneda != 1)
|
||||
@@ -487,9 +487,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
divTCPrestamo.Visible = false;
|
||||
TxtTCPrestamo.Text = "1";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
long Folio;
|
||||
ClsBancos bancos = new ClsBancos();
|
||||
Folio = bancos.GetNextFolio(DdlCuentaPrestamo.SelectedValue.ToEntero(), DdlTipoTransanccionPrestamo.SelectedValue.ToEntero());
|
||||
@@ -500,7 +500,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
private void AsignaCuentaPersonal( int CvePersonal, int tCveMoneda)
|
||||
private void AsignaCuentaPersonal(int CvePersonal, int tCveMoneda)
|
||||
{
|
||||
IDCtaContablePrestamo = 0;
|
||||
|
||||
@@ -508,10 +508,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
if (ObjRH.GetPersonal(CvePersonal,UsuarioActual.CveEmpresa))
|
||||
if (ObjRH.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
IDCtaContablePrestamo = ObjRH.IdCtaContPrestamos;
|
||||
|
||||
IDCtaContablePrestamo = ObjRH.IdCtaContPrestamos;
|
||||
|
||||
}
|
||||
}
|
||||
ObjRH.Dispose();
|
||||
@@ -550,7 +550,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
AsignaCuentaPersonal(DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), CveMoneda);
|
||||
|
||||
// DATOS PREPOLIZA
|
||||
if (DdlTipoTransanccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119 ) FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
if (DdlTipoTransanccionPrestamo.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolioPrestamo.Text.ToEntero();
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/PRESTAMO PERSONAL", CvePlantillaPoliza, TxtImportePrestamo.Text.Trim().ToDouble(), TxtImportePrestamo.Text.Trim().ToDouble(), CveMoneda, TxtFechaPrestamo.Text.ToDate(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, null, UsuarioActual.CveEmpresa));
|
||||
|
||||
@@ -564,11 +564,11 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
string Ref = TxtObservacionesPrestamo.Text == "" ? TxtFolioPrestamo.Text : TxtObservacionesPrestamo.Text;
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuentaPrestamo.SelectedValue.ToEntero(), DdlTipoTransanccionPrestamo.SelectedValue.ToEntero(), TxtFechaPrestamo.Text.Trim().ToDate(), TxtFolioPrestamo.Text.Trim(), DdlFuncionarioEmpleadoPrestamo.SelectedItem.Text, Importe.ToString().ToDouble(), CveMoneda,
|
||||
TC.ToString().ToDouble(), TxtObservacionesPrestamo.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
TC.ToString().ToDouble(), TxtObservacionesPrestamo.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
if (CveMoneda != 1)
|
||||
{
|
||||
if (UsuarioActual.CveEmpresa.Contiene (1, 119)) { UsaComplementaria = true; }
|
||||
if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; }
|
||||
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
@@ -579,21 +579,21 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
ImporteMN = Importe * TC;
|
||||
ImporteComplementaria = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CveIE > 0)
|
||||
{
|
||||
//GUARDA COMPROBANTE
|
||||
if (!filemove.Equals(""))
|
||||
{
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta));
|
||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false);
|
||||
}
|
||||
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago:TC))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBanco, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteMN, TipoCambio: TC, TipoCambioPago: TC))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
@@ -603,7 +603,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
if (CveMoneda != 1 && UsaComplementaria)
|
||||
{
|
||||
{
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, Ref, CveConceptoContableBancoComplementario, Conc, DateTime.Now, IDCtaContableBancosPrestamo, -1, CveIE, CvePersonal: DdlFuncionarioEmpleadoPrestamo.SelectedValue.ToEntero(), ImporteMX: ImporteComplementaria, ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
@@ -612,9 +612,9 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de acreedor complementaria";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -637,7 +637,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
}
|
||||
|
||||
//CONTABILIZA
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("") )
|
||||
if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals(""))
|
||||
{
|
||||
if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0)
|
||||
{
|
||||
@@ -732,10 +732,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas
|
||||
if (DdlFuncionarioEmpleado.SelectedValue.ToEntero() > 0) CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero();
|
||||
|
||||
ClsBancos bancos = new ClsBancos();
|
||||
if(bancos.GetPersonalPrestamoAuxiliar(CvePersonal, FechaI, FechaF, UsuarioActual.CveEmpresa))
|
||||
if (bancos.GetPersonalPrestamoAuxiliar(CvePersonal, FechaI, FechaF, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvAuxiliar.DataSource = bancos.DtResultados;
|
||||
|
||||
GvAuxiliar.DataSource = bancos.DtResultados;
|
||||
|
||||
}
|
||||
bancos.Dispose();
|
||||
GvAuxiliar.DataBind();
|
||||
|
||||
@@ -888,7 +888,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
'guardo el archivo
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}\IE", UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
Anexo.Text = ""
|
||||
@@ -1013,8 +1013,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompraValuacion
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = tipoCambioCompraValuacion
|
||||
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
|
||||
'cuando son dolares, y tienen complementaria, se hace el registro
|
||||
@@ -1056,8 +1056,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
|
||||
@@ -1094,8 +1094,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1130,8 +1130,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1167,8 +1167,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1203,8 +1203,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1240,8 +1240,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1276,8 +1276,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = tipoCambioCompra
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1312,8 +1312,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
@@ -1348,8 +1348,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||
importeMX = Math.Round(importeMX, 2)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -1383,8 +1383,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago)
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
|
||||
importeMX = Math.Round(importeMX, 2)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -1588,8 +1588,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal
|
||||
importeMX = ImporteMovimiento * tipoCambioCompra
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
|
||||
If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
@@ -1643,7 +1643,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
importeMX = 0
|
||||
End If
|
||||
Else
|
||||
ImporteMovimiento = gvr.DataKey("IVAPorPagarDeducible").ToDecimal * PorcentajePago
|
||||
ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
|
||||
importeMX = ImporteMovimiento
|
||||
@@ -1657,8 +1657,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
|
||||
End If
|
||||
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
|
||||
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL
|
||||
importeMX = importeMX.RoundSQL
|
||||
|
||||
If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
|
||||
End If
|
||||
@@ -1681,9 +1681,9 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
|
||||
'se registra el iva no acreditable
|
||||
If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then
|
||||
If gvr.DataKey("IVANoDeducible").ToDecimal > 0 Then
|
||||
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago
|
||||
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, CveSubProyecto:=CveSubProyecto, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
|
||||
@@ -296,7 +296,7 @@ Partial Class Bancos_Transferencias
|
||||
If (CveIE > 0 AndAlso CveIEDestino > 0) Then
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("Empresas\{0}\IE", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
'inserto los movimientos de la conta para abonar al saldo
|
||||
|
||||
@@ -1059,7 +1059,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
if (ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim(), string.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveEtapaProcesoCRM: CveEtapa))
|
||||
{
|
||||
if (filemove != "")
|
||||
filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"Empresas\{0}\OI", UsuarioActual.CveEmpresa));
|
||||
filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false);
|
||||
|
||||
|
||||
TxtEventoDescripcion.Text = "";
|
||||
|
||||
@@ -1068,7 +1068,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
if (ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim(), string.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
|
||||
{
|
||||
if (filemove != "")
|
||||
filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"Empresas\{0}\OI", UsuarioActual.CveEmpresa));
|
||||
filemove.FilesMove(string.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), string.Format(@"{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:false);
|
||||
|
||||
|
||||
TxtEventoDescripcion.Text = "";
|
||||
|
||||
@@ -682,7 +682,7 @@
|
||||
</th>
|
||||
<th style="width: 100px">P.U. </th>
|
||||
<th style="width: 40px">IVA </th>
|
||||
<th style="width: 40px">% IEPS </th>
|
||||
<th style="width: 40px" runat="server" id="TD_Gvps_IEPS" visible="false">IEPS </th>
|
||||
<th style="width: 110px">Total </th>
|
||||
<div id="dvNoDeducible" runat="server" visible="false">
|
||||
<th style="width: 80px">¿No Deducible? </th>
|
||||
@@ -753,7 +753,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 3 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Top" ItemStyle-Width="299">
|
||||
<asp:TemplateField ItemStyle-VerticalAlign="Top" ItemStyle-Width="299">
|
||||
<ItemTemplate>
|
||||
<div style="float: left; width: 100%;">
|
||||
<span style="width: 100%; border-bottom: 1px solid gray;">
|
||||
@@ -783,15 +783,15 @@
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="53px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlIva" runat="server" Text='<%# If(Eval("IVA").ToString.Length > 0, (CDbl(Eval("IVA").ToString)).ToString("###,####,###.00"), "") %>'></asp:Label><br />
|
||||
<asp:Label ID="LtlIva" runat="server" Text='<%# If(Eval("IVA").ToString.Length > 0, If((CDbl(Eval("IVA").ToString)) > 0, (CDbl(Eval("IVA").ToString)).ToString("###,####,###.00"), ""), "") %>'></asp:Label><br />
|
||||
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 9 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="53px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="53px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlIEPSPSPorcentaje" runat="server" Text='<%# If(Eval("IEPSPSPorcentaje").ToString.Length > 0, (CDbl(Eval("IEPSPSPorcentaje").ToString) * 100).ToString("#####") & If(CDbl(Eval("IEPSPSPorcentaje").ToString) * 100 > 0, "%", ""), "") %>'></asp:Label>
|
||||
<%--<asp:Label ID="Label10" runat="server" Text='<%# Eval("IEPSPSPorcentaje").ToString %>'></asp:Label>--%>
|
||||
<asp:Label ID="LtlIEPSPS" runat="server" Text='<%# If(Eval("IEPSPS").ToString.Length > 0, If((CDbl(Eval("IEPSPS").ToString)) > 0, (CDbl(Eval("IEPSPS").ToString)).ToString("###,####,###.00"), ""), "") %>'></asp:Label><br />
|
||||
<asp:Label ID="LtlIEPSPSPorcentaje" runat="server" Text='<%# If(Eval("IEPSPSPorcentaje").ToString.Length > 0, (CDbl(Eval("IEPSPSPorcentaje").ToString) * 100).ToString("#####") & If(CDbl(Eval("IEPSPSPorcentaje").ToString) * 100 > 0, "%", ""), "") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -1548,8 +1548,8 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
If UsuarioActual.TienePermisoProceso(117) Then
|
||||
|
||||
HplAddClasificacion.Visible = False
|
||||
@@ -1574,9 +1574,30 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
MostrarOcultarColumnaIEPS()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S"
|
||||
|
||||
Private Sub MostrarOcultarColumnaIEPS()
|
||||
|
||||
|
||||
If TxtIEPS.Text.ToDecimal <> 0 And TmpDT.SUM("IEPSPS") <> 0 Then
|
||||
GvPS.Columns(9).Visible = True
|
||||
TD_Gvps_IEPS.Visible = True
|
||||
Else
|
||||
GvPS.Columns(9).Visible = False
|
||||
TD_Gvps_IEPS.Visible = False
|
||||
End If
|
||||
UpPS.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaOrdenCorte()
|
||||
Dim ObjCGame As New ClsCGame()
|
||||
If ObjCGame.GetOrdenCorte(UsuarioActual.CveEmpresa) Then
|
||||
@@ -4361,8 +4382,6 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'------------------TERMINA VALIDACIONES------------------
|
||||
|
||||
'si hay necesidad de actualizar el globaldtps
|
||||
@@ -8643,6 +8662,16 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
|
||||
If dRow("IEPSPSPorcentaje").ToString.ToDecimal > 0 AndAlso dRow("IEPSPS").ToString.ToDecimal = 0 Then
|
||||
dRow("IEPSPSPorcentaje") = 0
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -13591,7 +13620,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
@@ -18273,7 +18302,11 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
UpPS.Update()
|
||||
CargaGvPersonal()
|
||||
CargaGvPersonal()
|
||||
|
||||
MostrarOcultarColumnaIEPS()
|
||||
|
||||
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Regresa el INDEX del row que acaba de agregar en el TMPDT
|
||||
@@ -19789,6 +19822,9 @@ Partial Class Compras_Compras
|
||||
Alert("Debe seleccionar al menos un impuesto", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
MostrarOcultarColumnaIEPS()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -2699,7 +2699,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -1428,7 +1428,8 @@ Partial Class Compras_eFacturas
|
||||
|
||||
If filemove <> "" Then
|
||||
'filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa))
|
||||
'filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove("", String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
'AGREGA XML A LA LISTA
|
||||
If FileExtension.ToUpper = "XML" Or FileExtension.ToUpper = "PDF" Then
|
||||
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove))
|
||||
@@ -1454,7 +1455,7 @@ Partial Class Compras_eFacturas
|
||||
ListaComprimidos.Add(filePath)
|
||||
'CREO DIRECTORIO ALEATORIO
|
||||
Dim Aleatorio As New Random
|
||||
Dim TempDirectorio As String = String.Format("{0}\{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999))
|
||||
Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999))
|
||||
Directory.CreateDirectory(TempDirectorio)
|
||||
ListaDirectoriosTemporales.Add(TempDirectorio)
|
||||
'AGREGA DIRECTORIO A LA LISTA
|
||||
@@ -2787,7 +2788,7 @@ Partial Class Compras_eFacturas
|
||||
XMLNodosPagosModalCount = 0
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Archivo As String = String.Format("{0}Compras\{2}\{3}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, gvRow.DataKey("RFCDe"), gvRow.DataKey("XML"))
|
||||
If IO.File.Exists(Archivo) Then
|
||||
|
||||
|
||||
|
||||
@@ -532,8 +532,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||
|
||||
If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 234, 235, 240) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 291, 292) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
|
||||
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
|
||||
@@ -3248,7 +3248,7 @@ Partial Class Contratos_Default
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
cargarBitacora()
|
||||
|
||||
@@ -1462,7 +1462,7 @@ Partial Class Contratos_Default
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
cargarBitacora()
|
||||
|
||||
@@ -361,10 +361,10 @@ Partial Class Contratos_ContratoAvance
|
||||
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
Dim urlsave As String = String.Format("{0}Contrato\{1}\Anexos", UsuarioActual.Empresa.Ruta, CveContrato)
|
||||
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave, ConcatenarDirectorioBase:=False)
|
||||
Next
|
||||
|
||||
|
||||
@@ -426,9 +426,9 @@ Partial Class Contratos_ContratoAvance
|
||||
Alert("No se logro guardar el Presupuesto favor de intentarlo mas tarde o comuniquese con soporte", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
|
||||
Dim urlsave As String = String.Format("Empresas\{0}\Contrato\{1}\Anexos", UsuarioActual.CveEmpresa, CveContrato)
|
||||
Dim urlsave As String = String.Format("{0}Contrato\{1}\Anexos", UsuarioActual.Empresa.Ruta, CveContrato)
|
||||
For Each fileItem As Archivo In guardarArchivos
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave)
|
||||
fileItem.filename.FilesMove(fileItem.filename.Replace($".{fileItem.Extension}", ""), urlsave, ConcatenarDirectorioBase:=False)
|
||||
Next
|
||||
ObjContratos.Commit()
|
||||
|
||||
|
||||
@@ -3203,7 +3203,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
cargarBitacora()
|
||||
|
||||
@@ -3000,7 +3000,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
@@ -3083,7 +3083,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvBitacora.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -4284,7 +4284,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -1707,7 +1707,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("Empresas\{0}\OI\Temp", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, Now.ToString("HH-mm")), String.Format("{0}OI\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
@@ -1790,7 +1790,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMovimientoAlmacen:=CveMovimiento) Then
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvBitacora.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -98,92 +98,92 @@
|
||||
<table class="table table-striped table-advance table-hover mysmallbtn Widthall tableheader">
|
||||
<thead>
|
||||
<tr class="Titulos ADtr">
|
||||
<th width="110px">
|
||||
<th style="width:110px">
|
||||
<asp:LinkButton ID="LbTipoPeriodo" runat="server" CausesValidation="false" Text="" CommandArgument="TipoPeriodo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipoPeriodo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEjercicio" runat="server" CausesValidation="false" Text="" CommandArgument="Ejercicio" OnClick="LbOrden_Click">
|
||||
Ej.
|
||||
<asp:Literal ID="ImgEjercicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbMes" runat="server" CausesValidation="false" Text="" CommandArgument="Mes" OnClick="LbOrden_Click">
|
||||
Mes
|
||||
<asp:Literal ID="ImgMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbNumero" runat="server" CausesValidation="false" Text="" CommandArgument="Numero" OnClick="LbOrden_Click">
|
||||
No.
|
||||
<asp:Literal ID="ImgNumero" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<th style="width:100px">
|
||||
<asp:LinkButton ID="LbFechaInicio" runat="server" CausesValidation="false" Text="" CommandArgument="FechaInicio" OnClick="LbOrden_Click">
|
||||
Fecha Ini
|
||||
<asp:Literal ID="ImgFechaInicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<th style="width:100px">
|
||||
<asp:LinkButton ID="LbFechaFin" runat="server" CausesValidation="false" Text="" CommandArgument="FechaFin" OnClick="LbOrden_Click">
|
||||
Fecha Fin
|
||||
<asp:Literal ID="ImgFechaFin" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsInicioMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioMes" OnClick="LbOrden_Click">
|
||||
Ini. Mes
|
||||
<asp:Literal ID="ImgEsInicioMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsFinMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinMes" OnClick="LbOrden_Click">
|
||||
Fin Mes
|
||||
<asp:Literal ID="ImgEsFinMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsInicioSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioSS" OnClick="LbOrden_Click">
|
||||
Ini. SS
|
||||
<asp:Literal ID="ImgEsInicioSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsFinSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinSS" OnClick="LbOrden_Click">
|
||||
Fin SS
|
||||
<asp:Literal ID="ImgEsFinSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsInicioAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioAño" OnClick="LbOrden_Click">
|
||||
Ini. Año
|
||||
<asp:Literal ID="ImgEsInicioAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<th style="width:80px">
|
||||
<asp:LinkButton ID="LbEsFinAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinAño" OnClick="LbOrden_Click">
|
||||
Fin Año
|
||||
<asp:Literal ID="ImgEsFinAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<th style="width:100px">
|
||||
<asp:LinkButton ID="LbFueCalculado" runat="server" CausesValidation="false" Text="" CommandArgument="FueCalculado" OnClick="LbOrden_Click">
|
||||
Calculado
|
||||
<asp:Literal ID="ImgFueCalculado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<th style="width:100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton> <asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<%-- <td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton> <asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<%--<td style="width:100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton> <asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<%-- <td style="width:100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton> <asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th style="width: 10px;" colspan="2">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -1220,7 +1220,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND (Importe<>0 OR Valor <>0)", CvePersonal));
|
||||
foreach (DataRow rcon in dtconp.Rows)
|
||||
{
|
||||
|
||||
|
||||
@@ -2257,7 +2257,17 @@
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlTipoPeriodoCM">Tipo Periodo:</asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3 bold">Salario Diario</div>
|
||||
<div class="col-sm-3">
|
||||
<asp:Label ID="LblSalarioDiarioSimula" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-3 bold"> </div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<%--<table class="table table-striped table-hover Widthall GvConceptossimulador">
|
||||
|
||||
</table>--%>
|
||||
|
||||
@@ -4802,7 +4802,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND (Importe<>0 OR Valor <>0)", CvePersonal));
|
||||
foreach (DataRow rcon in dtconp.Rows)
|
||||
{
|
||||
|
||||
@@ -5000,6 +5000,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
protected void LnkSimulador_Click(object sender, EventArgs e)
|
||||
{
|
||||
GvConceptossimulador.DataSource = new DataTable();
|
||||
LblSalarioDiarioSimula.Text = "";
|
||||
GvConceptossimulador.DataBind();
|
||||
DdlTipoPeriodoSim.SelectedValue = "1";
|
||||
RegistraScript("$('#DSimulador').modal()");
|
||||
@@ -5214,6 +5215,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
//lconc.Add(Totales);
|
||||
LblSalarioDiarioSimula.Text = string.Format("${0:N4}", dtempleados.SUM("SalarioDiario", string.Format("CvePersonal = {0}", 1)));
|
||||
GvConceptossimulador.DataSource = lconc;
|
||||
GvConceptossimulador.DataBind();
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta))
|
||||
Filename.FilesMove(objCotizacion.CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
@@ -225,7 +225,7 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta))
|
||||
Filename.FilesMove(CveCotizacion.ToString(), String.Format("{0}Cotizaciones", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
|
||||
@@ -152,7 +152,7 @@ Partial Class OI_Normatividad
|
||||
If File.Exists(ruta) Then
|
||||
File.Delete(ruta)
|
||||
End If
|
||||
filemove.FilesMove(String.Format("OI{0}", IDSelected.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", IDSelected.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
@@ -205,7 +205,7 @@ Partial Class OI_Normatividad
|
||||
Idnew = row("CveEvento").ToString().ToEntero
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", Idnew.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", Idnew.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
ArbolCuentas.DataSource = DtDatos
|
||||
|
||||
@@ -1329,7 +1329,7 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OS{0}-{1}", UsuarioActual.CveUsuario, Consecutivo), String.Format("Empresas\{0}\OS\Temp", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OS{0}-{1}", UsuarioActual.CveUsuario, Consecutivo), String.Format("{0}OS\Temp", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
AddPS(Consecutivo, -1, DdlPSDetalle.SelectedValue.ToEntero, DdlPSDetalle.SelectedItem.Text, TxtCantidad.Text.ToEntero, TxtObservacionesServicioDetalle.Text, HdnEspecificaciones.Value.ToString, LtlPSEspecificaciones.Text, "",
|
||||
@@ -1476,7 +1476,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveOS, -1, -1, -1, -1) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -289,7 +289,7 @@ Partial Class Prospectos_Prospectos
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), -1, -1, CveProspecto, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -2817,7 +2817,7 @@ Partial Class RH_Personal
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
@@ -5361,7 +5361,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CvePersonal.ToString(), String.Format("Empresas\{0}\RH\Personal\", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(CvePersonal.ToString(), String.Format("{0}RH\Personal\", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString(), FileExtension)
|
||||
Next
|
||||
|
||||
@@ -289,7 +289,7 @@ Partial Class Prospectos_Prospectos
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), -1, -1, CveProspecto, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -3678,7 +3678,7 @@ Partial Class Clientes
|
||||
|
||||
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
filemove.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
|
||||
@@ -776,7 +776,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
'Guardar archivo
|
||||
If filemove <> "" Then
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta))
|
||||
filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -19771,7 +19771,7 @@ Partial Class Ventas
|
||||
Dim ObjEventos As New ClsOIEventos()
|
||||
If ObjEventos.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
||||
If Filename <> "" Then
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventos.CveEvento.ToString()), String.Format("Empresas\{0}\OI", UsuarioActual.CveEmpresa))
|
||||
Filename.FilesMove(String.Format("OI{0}", ObjEventos.CveEvento.ToString()), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
|
||||
End If
|
||||
End If
|
||||
ObjEventos.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user