diff --git a/AC/RegNomina.aspx.vb b/AC/RegNomina.aspx.vb index a85fa5425..7568b2c12 100644 --- a/AC/RegNomina.aspx.vb +++ b/AC/RegNomina.aspx.vb @@ -421,9 +421,6 @@ Partial Class AC_RegNomina End If End If - - Dim drt As DataRow - IDPoliza = objAC.AddPoliza(3, TxtConcepto.Text.Trim, 0, 0, UsuarioActual.CveUsuario, Fecha) If IDPoliza > 0 Then diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index d2779e6d3..a9d79c531 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -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 @@ -877,13 +877,13 @@ Partial Class AF_AF Filename = fileItem.filename Next - Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Licencias\{1}", ModExtensiones.DirectorioBaseEmpresas, Filename)) + Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Licencias\{1}", UsuarioActual.Empresa.Ruta, Filename)) If Archivo.Exists() Then Archivo.Delete() 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 @@ -940,7 +940,7 @@ Partial Class AF_AF extencion = array(array.Length - 1) End If - If Adjunto.Trim.Length > 0 Then + If Adjunto.Trim.Length > 0 Then Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/AF/Polizas/" & Adjunto & "." & extencion Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "AF/Polizas/" & Adjunto & "." & extencion @@ -1030,13 +1030,13 @@ Partial Class AF_AF Filename = fileItem.filename Next - Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Polizas\{1}", AppDomain.CurrentDomain.BaseDirectory, Filename)) + Dim Archivo As New System.IO.FileInfo(String.Format("{0}AF\Polizas\{1}", UsuarioActual.Empresa.Ruta, Filename)) If Archivo.Exists() Then Archivo.Delete() End If If Filename <> "" Then - Filename.FilesMove(String.Format("{0}", Archivo.Name), String.Format("Empresas\{0}\AF\Polizas", UsuarioActual.CveEmpresa)) + 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 @@ -2022,7 +2022,7 @@ Partial Class AF_AF Dim DirectorioOld As New StringBuilder Dim DirectorioNew As New StringBuilder DirectorioOld.AppendFormat("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, FileMove) - DirectorioNew.AppendFormat("{0}Empresas\{1}\AF\", ModExtensiones.DirectorioBaseEmpresas, CveEmpresaActual) + DirectorioNew.AppendFormat("{0}AF\", UsuarioActual.Empresa.Ruta) If Not Directory.Exists(DirectorioNew.ToString) Then Directory.CreateDirectory(DirectorioNew.ToString) End If @@ -2054,7 +2054,7 @@ Partial Class AF_AF If (CveImagenActivoFijo > 0) Then Dim ObjActivoFijo As New ClsAF If ObjActivoFijo.RemoveActivosFijosImagenes(CveImagenActivoFijo) Then - File.Delete(String.Format("{0}Empresas\{1}\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresaActual, ObjActivoFijo.DtResultados.Rows(0)("URL"))) + File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjActivoFijo.DtResultados.Rows(0)("URL"))) CargarArchivo() RegistraScript("initcarusel();") End If diff --git a/AF/ResguardoAF.aspx.vb b/AF/ResguardoAF.aspx.vb index 5f48d7542..03ab0ce02 100644 --- a/AF/ResguardoAF.aspx.vb +++ b/AF/ResguardoAF.aspx.vb @@ -542,10 +542,10 @@ Partial Class AF_ResguardoAF If EsLiberacion Then If objAF.UpdateActivosFijosResguardosURL($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then If filemove <> "" Then - If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then - File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) + 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("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) 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 @@ -558,10 +558,10 @@ Partial Class AF_ResguardoAF If EsURL2 Then If objAF.UpdateActivosFijosResguardosURLGpo("-1", $"AFT{CveResguardoPadre}.{FileExtension}", CveResguardoPadre) Then If filemove <> "" Then - If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then - File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) + 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("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) 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 @@ -575,10 +575,10 @@ Partial Class AF_ResguardoAF If objAF.UpdateActivosFijosResguardosURLGpo($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then If filemove <> "" Then - If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) Then - File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, ModExtensiones.DirectorioBaseEmpresas, FileExtension)) + 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("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) 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 diff --git a/AIMMGM/ConsultaCliente.aspx.vb b/AIMMGM/ConsultaCliente.aspx.vb index 29c856863..1264906e2 100644 --- a/AIMMGM/ConsultaCliente.aspx.vb +++ b/AIMMGM/ConsultaCliente.aspx.vb @@ -648,14 +648,14 @@ Partial Class AIMMGM_ConsultaCliente End If Dim AIM As New ClsAIMMGM - If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) Then - IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) + If Not IO.Directory.Exists(String.Format("{0}Documentos", UsuarioActual.Empresa.Ruta)) Then + IO.Directory.CreateDirectory(String.Format("{0}Documentos", UsuarioActual.Empresa.Ruta, UsuarioActual.CveEmpresa)) End If Dim Cve As Integer = AIM.AddPago(CveCliente, CveVentaDetalle, TxtImporte.Text.ToDouble, 1, TxtFecha.Text.ToDate, IO.Path.GetExtension(FUComprobante.FileName), TxtObservaciones.Text.Trim, 9999, TxtAprobacion.Text.ToEntero) If Cve > 0 Then - FUComprobante.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Cve, IO.Path.GetExtension(FUComprobante.FileName))) + FUComprobante.SaveAs(String.Format("{0}Documentos/{1}{2}", UsuarioActual.Empresa.Ruta, Cve, IO.Path.GetExtension(FUComprobante.FileName))) Alert("Pago ingresado correctamente", TipoMensaje.MsgInformacion) End If AIM.Dispose() @@ -669,8 +669,8 @@ Partial Class AIMMGM_ConsultaCliente Exit Sub End If 'obtengo la clave de la publicidad - If Not IO.Directory.Exists(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) Then - IO.Directory.CreateDirectory(String.Format("{0}\Empresas\{1}\Documentos", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa)) + If Not IO.Directory.Exists(String.Format("{0}Documentos", UsuarioActual.Empresa.Ruta)) Then + IO.Directory.CreateDirectory(String.Format("{0}Documentos", UsuarioActual.Empresa.Ruta)) End If Dim Logo As String @@ -680,10 +680,10 @@ Partial Class AIMMGM_ConsultaCliente If AIM.DtResultados.Rows.Count > 0 Then CvePublicidad = AIM.DtResultados.Rows(0)("CvePublicidad").ToString.ToEntero Logo = String.Format("Logo{0}{1}", CvePublicidad, IO.Path.GetExtension(FULogo.FileName)) - FULogo.SaveAs(String.Format("{0}/Empresas/{1}/Documentos/{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Logo)) + FULogo.SaveAs(String.Format("{0}Documentos/{2}", UsuarioActual.Empresa.Ruta, Logo)) AIM.UpdateLogo(CvePublicidad, Logo) - ImgLogo.ImageUrl = String.Format("/Empresas/{0}/Documentos/{1}", UsuarioActual.CveEmpresa, Logo) + ImgLogo.ImageUrl = String.Format("{0}/Documentos/{1}", UsuarioActual.Empresa.Ruta, Logo) End If End If diff --git a/AIMMGM/Pagos.aspx.vb b/AIMMGM/Pagos.aspx.vb index 37f0c54a4..24ccdebfd 100644 --- a/AIMMGM/Pagos.aspx.vb +++ b/AIMMGM/Pagos.aspx.vb @@ -161,7 +161,7 @@ Partial Class AIMMGM_Pagos Next Next - Dim Archivoxlsx As String = String.Format("{0}/Empresas/{1}/Documentos/{2}.xlsx", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, NombreArchivoXLSX) + Dim Archivoxlsx As String = String.Format("{0}Documentos/{1}.xlsx", UsuarioActual.Empresa.Ruta, NombreArchivoXLSX) Using wb As New XLWorkbook() wb.Worksheets.Add(dtt) wb.SaveAs(Archivoxlsx) diff --git a/AIMMGM/Registro.aspx.vb b/AIMMGM/Registro.aspx.vb index cc37fbe2f..b0b5a6a05 100644 --- a/AIMMGM/Registro.aspx.vb +++ b/AIMMGM/Registro.aspx.vb @@ -125,7 +125,7 @@ Partial Class AIMMGM_Registro Private Sub CargaReCompra(ClavePago As String, CveCliente As Integer) Dim tmp As New DataTable - Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", ModExtensiones.DirectorioBaseEmpresas) + Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", UsuarioActual.Empresa.Ruta) Dim Archivo As String = String.Format("{0}/{1}.xml", Carpeta, ClavePago) Dim Archivo2 As String = String.Format("{0}/C{1}.xml", Carpeta, ClavePago) diff --git a/AIMMGM/ePagos.aspx.vb b/AIMMGM/ePagos.aspx.vb index 75fc0b45a..1e498a877 100644 --- a/AIMMGM/ePagos.aspx.vb +++ b/AIMMGM/ePagos.aspx.vb @@ -90,7 +90,7 @@ Partial Class AIMMGM_ePagos Private Sub CargaCompra() Dim tmp As New DataTable - Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", ModExtensiones.DirectorioBaseEmpresas) + Dim Carpeta As String = String.Format("{0}AIMMGM/ePagos", UsuarioActual.Empresa.Ruta) Dim Archivo As String = String.Format("{0}/{1}.xml", Carpeta, ClavePago) Dim Archivo2 As String = String.Format("{0}/C{1}.xml", Carpeta, ClavePago) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index fbf0a6182..dd6e58ab7 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -258,7 +258,7 @@ Public Class ClsContabilidad Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1, Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1, - Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean + Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1) As Boolean Dim Retorno As Boolean = False @@ -279,6 +279,7 @@ Public Class ClsContabilidad .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta End With diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 2c8d4284b..a4f596a68 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2863,12 +2863,13 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer) As Boolean + Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@GPO", SqlDbType.Int).Value = GPO End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 71020a7ac..ef4c518c0 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1771,7 +1771,7 @@ Public Class ClsNominas #End Region #Region "" - Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer) As Boolean + Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer, Optional CveEstatus As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_PeriodosGet") @@ -1782,6 +1782,8 @@ Public Class ClsNominas .Add("@Mes", SqlDbType.Int).Value = Mes .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + End With Try @@ -2603,8 +2605,8 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Boolean - Dim retorno As Boolean = False + Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As String, estatus As Boolean, CveCuenta As Integer) As Integer + Dim retorno As Integer = 0 DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -2618,15 +2620,16 @@ Public Class ClsNominas .Add("@fechaInicioAplicacion", SqlDbType.VarChar).Value = (fechaInicioAplicacion) .Add("@estatus", SqlDbType.Bit).Value = (estatus) .Add("@CveCuenta", SqlDbType.Int).Value = (CveCuenta) + .Add("@CveMovtoPermanente", SqlDbType.Int).Direction = ParameterDirection.Output End With Try SqlAdapter.Fill(Data) - retorno = True + retorno = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero Catch sqEx As SqlException - retorno = False + retorno = -1 OnError("Ocurrió un error al agregar los movimientos permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception - retorno = False + retorno = -1 OnError("Ocurrió un error al agregar los movimientos permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 9e898f86c..1d8d75be2 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5565,20 +5565,31 @@ Public Class ClsPaginas sw.Start() Dim Bytes As Byte() = Nothing + Dim CveUsuario As Integer = 0 + Dim CveEmpresa As Integer = 0 + Dim RutaEmpresa As String = "" + + If Context.Session("UsuarioSIG") IsNot Nothing Then + CveUsuario = UsuarioActual.CveUsuario + CveEmpresa = UsuarioActual.CveEmpresa + RutaEmpresa = UsuarioActual.Empresa.RutaArchivos + End If + Dim bdir As String = If(RutaReporte.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory) + + 'TOMAR LA RUTA BASE PARA EL DIRECTORIO DE LA EMPRESA + If Not String.IsNullOrEmpty(RutaEmpresa) AndAlso Not RutaReporte.Contains("Grales") Then + bdir = RutaEmpresa.Replace($"{CveEmpresa}/", "") + End If + RutaReporte.Replace("/", "\") + If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) End If If EsProduccion Then - Dim CveUsuario As Integer = 0 - Dim CveEmpresa As Integer = 0 - If Context.Session("UsuarioSIG") IsNot Nothing Then - CveUsuario = UsuarioActual.CveUsuario - CveEmpresa = UsuarioActual.CveEmpresa - End If Dim wsreport As New WSRDLC.WebServiceSoapClient Dim params As New List(Of WSRDLC.ReportParameter) Dim ds As New DataSet @@ -5963,11 +5974,11 @@ Public Class ClsPaginas #End Region #Region "IMPRIMIR FACTURA" - Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable) + Public Sub PdfFacturaPyME(ByRef Vta As Modelos.Factura, DT As DataTable, Optional Guardar As Boolean = True) Dim retorno As Byte() = Nothing 'DATOS GENERALES - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\" + Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml" Dim NombreArchivo As String = "" Dim NombreArchivoDescarga As String = "" @@ -6456,26 +6467,27 @@ Public Class ClsPaginas DataSet.Tables.Add(Vta.DtDeduccion.Copy) If Archivo.Exists Then - - ImprimirbytesPDF(ImprimirPDFPyME(RutaFormato, DataSet, params, NombreArchivo, "PDF", MR:=Nothing), "Factura") - Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) - If Not ArchivoPDF.Exists Then - Try - DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta)) - DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto)) - File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) - Catch ex As Exception - Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) - End Try - Else - Try - ArchivoPDF.Delete() - File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) - Catch ex As Exception - Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) - End Try + If Guardar Then + Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) + If Not ArchivoPDF.Exists Then + Try + DirectoryExistsCreate(String.Format("{0}PDF", UsuarioActual.Empresa.Ruta)) + DirectoryExistsCreate(String.Format("{0}PDF\{1}", UsuarioActual.Empresa.Ruta, Vta.TipoDocto)) + File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) + Catch ex As Exception + Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) + End Try + Else + Try + ArchivoPDF.Delete() + File.WriteAllBytes(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio), retorno) + Catch ex As Exception + Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgAdvertencia) + End Try + End If End If + Else params.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New CrystalParametro("RFC", UsuarioActual.Empresa.RFC)) @@ -6493,7 +6505,7 @@ Public Class ClsPaginas ' Dim ObjVentas As New ClsVentas 'DATOS GENERALES - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\" + Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim PathXML As String = $"{Ruta}XML\{Vta.TipoDocto}\{Vta.SerieFolio}.xml" Dim NombreArchivo As String = "" Dim NombreArchivoDescarga As String = "" @@ -7913,7 +7925,7 @@ Public Class ClsPaginas Dim DTDeducciones As Data.DataTable Dim DTDeducciones2 As New Data.DataTable - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{CveEmpresa}\" + Dim Ruta As String = RutaEmpresa Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }{If(indemnizacion, "F", "")}-{ObjNomina.Folio}.xml" Dim FechaEmision, FechaCertificacion As DateTime Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String @@ -8278,7 +8290,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) 'DATOS GENERALES - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\" + Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml" Dim PathPDF As String = $"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf" SerieFolio = $"{Serie}-{Folio}" @@ -8413,8 +8425,8 @@ Public Class ClsPaginas End If - If File.Exists($"{UsuarioActual.Empresa.Ruta}\Formatos\ReciboDePago.rdlc") Then - rutaArchivo = $"Empresas\{UsuarioActual.CveEmpresa}\Formatos\ReciboDePago.rdlc" + If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then + rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc" Else rutaArchivo = " \Empresas\Grales\Formatos\ReciboDePago.rdlc" End If diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 0e5c9d088..8712432be 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -465,7 +465,9 @@ Public Class ClsSisEmpresas _Empresa.CveEncuestaCRM = Data.Rows(0)("CveEncuestaCRM").ToString.ToEntero _Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString - _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString + _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString + + _Empresa.RutaArchivos = Data.Rows(0)("RutaArchivos").ToString Else diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index 3e8120dd8..aeb1ff7b7 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -99,10 +99,15 @@ Public Class Empresa Public Property Soporte_USR As String Public Property Soporte_PWD As String Public Property Soporte_Tipo As String - Public Property Timbres As Integer + Public Property Timbres As Integer + Public Property RutaArchivos As String Public ReadOnly Property Ruta As String Get - Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa) + If Not String.IsNullOrEmpty(RutaArchivos) Then + Return RutaArchivos + Else + Return String.Format("{0}\{1}\", Extensiones.ModExtensiones.DirectorioEmpresas, Me.CveEmpresa) + End If End Get End Property Public Property IdCuentaIVAxTrasladar As Integer diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index e4f5db821..b36f28a44 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2099,7 +2099,7 @@ Namespace Modelos For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then Resultado = False Exit For @@ -2158,7 +2158,7 @@ Namespace Modelos If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Dr("Cantidad").ToString.ToDecimal(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then ' Mensaje = "Error al guardar Movimientos de distribuidor" Resultado = False diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 2f4fb03ae..3743692cd 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -519,7 +519,7 @@ Namespace Extensiones Return retorno End Function - 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) @@ -3433,16 +3439,16 @@ Namespace Extensiones Public Class Archivo Public Sub New() filename = "" - patch = "Temp\" + path = "Temp\" descripcion = "" End Sub Public Property filename As String - Public Property patch As String + Public Property path As String Public Property descripcion As String - Public ReadOnly Property Extencion As String + Public ReadOnly Property Extension As String Get - Return IO.Path.GetExtension(String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename)).Replace(".", "") + Return IO.Path.GetExtension(String.Format("{0}{1}{2}", If(path.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), path, filename)).Replace(".", "") End Get End Property Public ReadOnly Property filenameO As String @@ -3452,7 +3458,7 @@ Namespace Extensiones End Property Public ReadOnly Property FileUrl As String Get - Return String.Format("{0}{1}{2}", If(patch.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), patch, filename) + Return String.Format("{0}{1}{2}", If(path.Contains("Empresas"), ModExtensiones.DirectorioBaseEmpresas, AppDomain.CurrentDomain.BaseDirectory), path, filename) End Get End Property End Class diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 7edc077a0..f74549f7e 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -28,16 +28,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState FI = context.Request("start").ToDate FF = context.Request("end").ToDate + If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then + 'Convierte el objeto de Eventos en JSON + 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer + Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) + + context.Response.Write(sJSON) + End If + End If - - If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then - 'Convierte el objeto de Eventos en JSON - 'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer - Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events) - - context.Response.Write(sJSON) - End If End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable diff --git a/Ashx/E48.ashx b/Ashx/E48.ashx index a3d8a1d15..385fd6efe 100644 --- a/Ashx/E48.ashx +++ b/Ashx/E48.ashx @@ -445,7 +445,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) - Dim dttemp As DataTable + Dim dttemp As DataTable = Nothing 'sino existe, recarga los datos Dim ObjUsr As New ClsInventarios If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then dttemp = ObjUsr.DtResultados diff --git a/Ashx/SIGCRM.ashx b/Ashx/SIGCRM.ashx index dacdc1843..77aefdf0e 100644 --- a/Ashx/SIGCRM.ashx +++ b/Ashx/SIGCRM.ashx @@ -56,7 +56,7 @@ Public Class SIGCRM : Implements IHttpHandler, IRequiresSessionState Dim Usuario As Usuario = UsuarioActual(context) If Not IsNothing(Usuario) Then - Dim Url = String.Format("{0}\Empresas\{1}\Acercamientos\{2}\Imagenes\{3}", ModExtensiones.DirectorioBaseEmpresas, Usuario.CveEmpresa, CveAcercamiento, Archivo) + Dim Url = String.Format("{0}Acercamientos\{1}\Imagenes\{2}", Usuario.Empresa.Ruta, CveAcercamiento, Archivo) If File.Exists(Url) Then context.Response.ContentType = String.Format("image/{0}", Extension) diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx index 35541349c..63fd22d9f 100644 --- a/Ashx/SIGFacturacionCiclica.ashx +++ b/Ashx/SIGFacturacionCiclica.ashx @@ -343,7 +343,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt Dim DtDetalle As DataTable = Nothing Dim objContratos As New ClsContratos - If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then + If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveUsuario) Then DtDetalle = objContratos.DtResultados.FiltraParametros("CveTipoPresupuesto=2") Else DtDetalle = Nothing diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 50ad3494f..f191800c0 100644 --- a/Ashx/SIGWeb.ashx +++ b/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 @@ -737,9 +741,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim UsaGlobal As Boolean = True 'verifica existencias - If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153, 159, 160, 161, 162, 163) Then + 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 \ No newline at end of file diff --git a/Bancos/CargarConciliacionesBancarias.aspx.vb b/Bancos/CargarConciliacionesBancarias.aspx.vb index 8fe358133..380ccb142 100644 --- a/Bancos/CargarConciliacionesBancarias.aspx.vb +++ b/Bancos/CargarConciliacionesBancarias.aspx.vb @@ -77,60 +77,14 @@ Partial Class Bancos_CargarConciliacionesBancarias Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) If TxtExcel.getfiles().Archivos.Count > 0 Then Dim file As Archivo = TxtExcel.getfiles().Archivos(0) - Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch - Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV") + Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path + Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV") CargaExcel(Directorio, file.filename, Tipo) Else Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError) 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 - End Function Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String) If Not DdlCuenta.SelectedValue.ToEntero > 0 Then diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb index 3389cd8d3..55cf1b55f 100644 --- a/Bancos/CreditosPagoMultiple.aspx.vb +++ b/Bancos/CreditosPagoMultiple.aspx.vb @@ -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) diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 2e7b1a6a3..2ffebf93d 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -17,7 +17,7 @@ - +
@@ -58,14 +58,14 @@
- +
- +
@@ -333,9 +333,10 @@ } else { txt.value = ""; } - - $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); - + let valor = FormatoNumero(SumaValores(), 2); + $('#hdnTotal').val(valor); + $get('TxtImporte').value = valor; + } function FnCambia(chk, txt, saldo, op, text) { @@ -353,7 +354,9 @@ } } var Suma = SumaValores(); - $get('TxtImporte').value = FormatoNumero(Suma, 2); + let valor = FormatoNumero(SumaValores(), 2); + $('#C_hdnTotal').val(valor); + $get('TxtImporte').value = valor; if ($get('TxtTotal') != null) { $get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2); diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index a8e06bbe5..f8131736a 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -112,8 +112,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e) - { - string tipo = ""; + { switch (TipoDevolucion.SelectedValue) { case "1": @@ -160,7 +159,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } protected void CargaPersonal() { - DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa); + DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto"); DdlPersonal.DataBind(); DdlPersonal.Items.Insert(0, new ListItem("Seleccione", "-1")); } @@ -345,12 +344,26 @@ public partial class Bancos_Devoluciones : ClsPaginas return; } - if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2 && TxtValor.Text == "") + if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { - Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); - return; + if (TxtValor.Text == "") + { + Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); + return; + } + else + { + int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero(); + int total = hdnTotal.Text.ToEntero(); + if (valor <> total) + { + Alert("La cantidad total debe ser igual a lo seleccionado"); + } + } + } + ClsBancos ObjIE = new ClsBancos(); ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL()); ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL()); @@ -415,27 +428,9 @@ public partial class Bancos_Devoluciones : ClsPaginas string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; - if (OpcionDevolucion.SelectedValue.ToEntero() == 3 || TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) + if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { - foreach (GridViewRow gvr in GvDevoluciones.Rows) - { - if (gvr.FCCheckBox("Chk").Checked) - { - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE)) - { - MsgError = "No se pudo insertar concepto de Devolución"; - break; - } - } - } - //GUARDA PREPOLIZAS DETALLE Bancos - if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, TxtImporte.Text.ToDecimal(), Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: TxtImporte.Text.ToDecimal())) - { - MsgError = "No se pudo insertar concepto de Devolución"; - } - - if (MsgError.Equals("")) - { + int cveConcepto = DdlConcepto.SelectedValue.ToEntero(); string descripcion = TxtDescripcion.Text; @@ -448,11 +443,36 @@ public partial class Bancos_Devoluciones : ClsPaginas bool estatus = true; int CveCuenta = -1; - if (!ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta)) + if (ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta) < 0) { MsgError = "No se pudo insertar movimiento permanente"; } + + + foreach (GridViewRow gvr in GvDevoluciones.Rows) + { + if (gvr.FCCheckBox("Chk").Checked) + { + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), Ref, CveConceptoContableDevolucion, Conc, DateTime.Now, 0, -1, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtAbonar").Text.ToDecimal(), CveIEDevolucion: CveIE)) + { + MsgError = "No se pudo insertar concepto de Devolución"; + break; + } + else + { + //Decimal tTotal = (TxtValor.Text.ToDecimal() * TxtVecesAplicar.Text.ToDecimal()).RoundSQL(); + Decimal tTotal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal(); + //GUARDA PREPOLIZAS DETALLE Via Nómina + if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, !TipoMovoDevolucion, tTotal, Ref, 174, Conc, DateTime.Now, 0, -1, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveCliente: cveCliente, CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: tTotal)) + { + MsgError = "No se pudo insertar concepto de Devolución"; + } + } + } } + + + } else @@ -612,17 +632,20 @@ public partial class Bancos_Devoluciones : ClsPaginas Msg.AppendFormat(@"

Ver Póliza", IDPoliza); } ObjIE.Commit(); + + if (!Msg.ToString().Equals("")) + { + string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery); + Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)); + } } else { ObjIE.RollBack(); + Msg.Clear(); + Alert(Msg.ToString(), TipoMensaje.MsgError); } - - if (!Msg.ToString().Equals("")) - { - string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery); - Alert(Msg.ToString(), TipoMensaje.MsgInformacion, String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)); - } + ObjIE.Dispose(); ObjMov.Dispose(); diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index e0ef0f2ee..7bde7a0bc 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -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 @@ -5028,8 +5028,8 @@ Partial Class Bancos_IE #Region " CARGAR - COMPROBANTE " Protected Sub BtnConfirmaComprobante_Click(sender As Object, e As EventArgs) - Dim DirectorioGuardar = String.Format("{0}Empresas\{1}\IE", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa) - Dim ArchivoTemporal = String.Format("{0}Empresas\{1}\Temp\{2}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, Session("FileUpload").ToString) + Dim DirectorioGuardar = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) + Dim ArchivoTemporal = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString) If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ArchivoTemporal) Then Dim Extension As String = Path.GetExtension(ArchivoTemporal) @@ -5084,8 +5084,7 @@ Partial Class Bancos_IE Dim Path As String = HttpContext.Current.Request.ApplicationPath Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") - Path = Extensiones.DirectorioBaseEmpresas - Path += String.Format("Empresas/{0}/IE", UsuarioActual.CveEmpresa) + Path = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index fc91d55d9..56fa5710f 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -321,7 +321,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - 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); } 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(@"Empresas\{0}\IE", UsuarioActual.CveEmpresa, 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())) diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index e96343893..abd9ee76f 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -355,7 +355,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - 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); } // SI ES DOLARES @@ -699,7 +699,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas //GUARDA COMPROBANTE if (!filemove.Equals("")) { - 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); } //GUARDA PREPOLIZAS DETALLE diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index ef2889275..4c7177d1f 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -1021,7 +1021,7 @@ Partial Class Bancos_PolizaCheque 'If Conta IsNot Nothing Then Conta.Commit() 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 GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 67e647931..f487fadc2 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -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 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 @@ -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 diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 9f38b7a6d..c0ec85953 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -690,7 +690,7 @@ Partial Class Bancos_PopIEVentas If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" AndAlso dr("FolioFiscal").ToString() <> "" Then - Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("RFCReceptor").ToString, dr("Total").ToString.ToDecimal) + Dim Valida As New ClsValidaCFDi(dr("FolioFiscal").ToString(), UsuarioActual.Empresa.RFC, dr("RFCReceptor").ToString, dr("Total").ToString.ToDecimal.RoundAD(2)) If Valida.EsValida > 0 Then If Valida.EsValida = 2 Then @@ -3467,8 +3467,6 @@ Partial Class Bancos_PopIEVentas PDFReciboDePagos(-1, -1, ObjBancos.CveComplementoPago, False) - Dim LigaDescargaXML = $"../Empresas/{UsuarioActual.CveEmpresa}/XML/Pag/{ObjBancos.ComplementoSerieFolio}.xml" - Dim LigaDescargaPDF = $"../Empresas/{UsuarioActual.CveEmpresa}/PDF/Pag/{ObjBancos.ComplementoSerieFolio}.pdf" Retorno.AppendFormat(" Complemento de pago {0}
", ObjBancos.ComplementoSerieFolio) Retorno.AppendFormat("XML    ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", ObjBancos.ComplementoSerieFolio, ObjBancos.CveComplementoPago, CveIE))) Retorno.AppendFormat("PDF   ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", ObjBancos.ComplementoSerieFolio, ObjBancos.CveComplementoPago, CveIE))) diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index 2ecb1b234..61470b145 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -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(@"Empresas\{0}\IE", UsuarioActual.CveEmpresa, 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(@"Empresas\{0}\IE", UsuarioActual.CveEmpresa, 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(); diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 056bb2fd1..7e9093f82 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -888,7 +888,7 @@ Partial Class Bancos_ProveedoresAbonar 'guardo el archivo 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 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" diff --git a/Bancos/RepCobrado.aspx.vb b/Bancos/RepCobrado.aspx.vb index 970fbe2e9..27bab7d10 100644 --- a/Bancos/RepCobrado.aspx.vb +++ b/Bancos/RepCobrado.aspx.vb @@ -134,7 +134,7 @@ Partial Class Ventas_RepRecuperacion If DdlCuentaBancaria.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cuenta Bancaria: {0}", DdlCuentaBancaria.SelectedItem.Text) Dim RutaPDF As String - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\" + Dim Ruta As String = UsuarioActual.Empresa.Ruta RutaPDF = $"{Ruta}\Formatos\RepRecuperacion.rdlc" If Not File.Exists(RutaPDF) Then RutaPDF = "Empresas/Grales/Formatos/RepRecuperacion.rdlc" diff --git a/Bancos/RepCobradoDetalle.aspx.vb b/Bancos/RepCobradoDetalle.aspx.vb index 16ad3e3ca..06560f929 100644 --- a/Bancos/RepCobradoDetalle.aspx.vb +++ b/Bancos/RepCobradoDetalle.aspx.vb @@ -193,7 +193,7 @@ Partial Class Ventas_RepRecuperacionDetalle If DdlProveedorSucursal.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proveedor Sucursal: {0}", DdlProveedorSucursal.SelectedItem.Text) Dim RutaPDF As String - Dim Ruta As String = $"{ModExtensiones.DirectorioBaseEmpresas}Empresas\{UsuarioActual.CveEmpresa}\" + Dim Ruta As String = UsuarioActual.Empresa.Ruta RutaPDF = $"{Ruta}\Formatos\RepRecuperacionDetalle.rdlc" If Not File.Exists(RutaPDF) Then RutaPDF = "Empresas/Grales/Formatos/RepRecuperacionDetalle.rdlc" diff --git a/Bancos/RepEgresosSinComprobante.aspx b/Bancos/RepEgresosSinComprobante.aspx index 62858d31e..e8ca5c719 100644 --- a/Bancos/RepEgresosSinComprobante.aspx +++ b/Bancos/RepEgresosSinComprobante.aspx @@ -150,7 +150,7 @@
- + diff --git a/Bancos/RepIE.aspx.vb b/Bancos/RepIE.aspx.vb index 9abca51fc..79f1f35ea 100644 --- a/Bancos/RepIE.aspx.vb +++ b/Bancos/RepIE.aspx.vb @@ -535,7 +535,7 @@ Partial Class Bancos_RepIE End Sub Private Sub Imprimir(Formato As String) - Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa) + Dim LogoRutaFisica As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta) Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)) diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index 097a21b4f..1cdd89b8e 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -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 diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index ad05f2e5d..bd33d2fb3 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -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 = ""; @@ -1448,7 +1448,7 @@ public partial class CRM_Acercamiento : ClsPaginas if ((CveArchivo > 0)) { string NombreNuevo = string.Format("{0}{1}", CveArchivo, FileExtension); - string DirectorioNuevo = string.Format("{0}\\Empresas\\{1}\\Acercamientos\\{2}\\Imagenes\\", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, CveAcercamiento); + string DirectorioNuevo = string.Format("{0}Acercamientos\\{1}\\Imagenes\\", UsuarioActual.Empresa.Ruta, CveAcercamiento); if (!Directory.Exists(DirectorioNuevo)) { Directory.CreateDirectory(DirectorioNuevo); diff --git a/CRM/CatEmpresasCRM.aspx.cs b/CRM/CatEmpresasCRM.aspx.cs index 729929056..89eff8ed4 100644 --- a/CRM/CatEmpresasCRM.aspx.cs +++ b/CRM/CatEmpresasCRM.aspx.cs @@ -152,7 +152,7 @@ public partial class CRM_CatEmpresasCRM : ClsPaginas if( TxtExcel.getfiles().Archivos.Count > 0 ) { Archivo file = TxtExcel.getfiles().Archivos[0]; - string Directorio = Server.MapPath("~") + file.patch; + string Directorio = Server.MapPath("~") + file.path; DataTable dt = ReadExcelFile(Directorio + file.filename, true); DataRowCollection Rows = dt.Rows; diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index b0dc49fe5..14b65061a 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -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 = ""; diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 22040bb52..ecfa7bf4b 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -639,7 +639,7 @@ # Cant Unidad - Clasificación + Clasificación @@ -661,7 +661,7 @@
Producto o Servicio - Observación + Observación   @@ -675,21 +675,15 @@ - Tipo de Gasto - - - - - - - + Tipo de Gasto
- P.U.  - % IVA  - Total  + P.U.  + IVA  + % IEPS  + Total 
¿No Deducible? 
@@ -740,7 +734,7 @@ - + <%-- 0 --%> @@ -759,7 +753,7 @@ <%-- 3 --%> - +
@@ -774,7 +768,7 @@ <%-- 4 --%> <%-- 5 --%> - + @@ -783,62 +777,73 @@ <%-- 6 --%> - + <%-- 7 --%> <%-- 8 --%> - + +
- <%-- 9 --%> - + <%-- 9 --%> + + + + <%----%> + + + + <%-- 10 --%> + + + <%-- 11 --%> - <%-- 11 --%> - + <%-- 12 --%> + - <%-- 12 --%> - + <%-- 13 --%> + - <%-- 13 --%> + <%-- 14 --%> - <%-- 14 --%> + <%-- 15 --%> - <%-- 15 --%> + <%-- 16 --%> - <%-- 16 --%> + <%-- 17 --%> - <%-- 17 --%> + <%-- 18 --%> @@ -4447,7 +4452,7 @@ <%-- --%> - +
@@ -5359,8 +5364,8 @@
--%> -