diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 461483dc3..05955771f 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -832,7 +832,7 @@ Partial Class AF_AF Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged CargaFolios() ModalidadesPaginaAF() - LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) + LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) UPEstatus.Update() End Sub @@ -944,7 +944,7 @@ Partial Class AF_AF DdlTipoActivoFijo.SelectedValue = ObjActivoFijo.CveTipoActivoFijo.ToString() CargaSubTipoActivoFijo() DdlSubTipoActivoFijo.SelectedValue = ObjActivoFijo.CveSubTipoActivoFijo.ToString() - LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) + LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) TxtLatitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Lat").ToString() TxtLongitud.Text = ObjActivoFijo.DtResultados.Rows(0)("Long").ToString() @@ -3105,7 +3105,7 @@ Partial Class AF_AF CargaCaracteristicas() CargaDispositivos() ModalidadesPaginaAF() - LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) + LatLong.Visible = UsuarioActual.CveEmpresa = 158 And ((DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZO") Or (DdlTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS") Or (DdlSubTipoActivoFijo.SelectedItem.Text.ToUpper() = "POZOS")) UPEstatus.Update() End Sub diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 02367b7a2..78225137a 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1,6 +1,7 @@ Imports System.Data Imports System.Data.SqlClient Imports Extensiones +Imports HigLabo Public Class ClsNominas Implements IDisposable @@ -998,7 +999,7 @@ Public Class ClsNominas End With Try SqlAdapter.Fill(Data) - Retorno = True + retorno = True Catch ex As Exception OnError("Ocurrió un error al autorizar la nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try @@ -2402,6 +2403,7 @@ Public Class ClsNominas Try DTSet = New DataSet() DataAdapter("PA_Nom_NominaEmpleadoSimulador", CommandType.StoredProcedure) + SqlAdapter.SelectCommand.CommandTimeout = 2400 With SqlAdapter.SelectCommand.Parameters .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto @@ -2616,7 +2618,40 @@ Public Class ClsNominas End Try Return retorno End Function - Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional SalarioDiario As Decimal = 0, Optional CveTipoTrabajador As Integer = -1) As Boolean + Public Function GetNominaEmpleado(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, + Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional NetoxSalario As Decimal = 0, Optional Neto As Decimal = 0, + Optional CveTipoTrabajador As Integer = -1) As Boolean + Dim retorno As Boolean = False + Try + DTSet = New DataSet() + DataAdapter("PA_Nom_NominaEmpleadosz", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveTurno", SqlDbType.Int).Value = CveTurno + .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo + .Add("@Agrupador", SqlDbType.VarChar).Value = Agrupador + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion + .Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal + .Add("@NetoxSalario", SqlDbType.Decimal).Value = NetoxSalario + .Add("@Neto", SqlDbType.Decimal).Value = Neto + .Add("@CveTipoTrabajador", SqlDbType.Decimal).Value = CveTipoTrabajador + End With + + + SqlAdapter.Fill(DTSet) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al Realizar el cálculo de nómina.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al Realizar el cálculo de nómina.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function + Public Function GetNominaEmpleadoV(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional SalarioDiario As Decimal = 0, Optional CveTipoTrabajador As Integer = -1) As Boolean Dim retorno As Boolean = False Try DTSet = New DataSet() diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 75e53dde0..efe2c4f5d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9676,14 +9676,20 @@ Public Class ClsPaginas tImporteCompra = (Pago.ImportePago * TCValuacionCompra).RoundSQL tImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL End If + Dim ImportePagoMN As Decimal = Pago.ImportePago + Dim UsaComplementaria As Boolean = True If CompraActual.CveMoneda > 1 Then ImporteME = Pago.ImportePago - 'movimiento de pago proveedor - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, Pago.CveConceptoPago, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'caso excepcional de complementarias + UsaComplementaria = False + ImportePagoMN = (Pago.ImportePago * TCValuacionCompra).RoundSQL + End If + 'movimiento de pago proveedor + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImportePagoMN, Pago.CveConceptoPago, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True 'movimiento de pago proveedor Complementaria - If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 Then + If Not ErrorMovtos AndAlso CompraActual.CveMoneda > 1 AndAlso UsaComplementaria Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, (ImporteME * TCValuacionCompra - ImporteME).RoundSQL, CveConceptoContableComplementaria, CompraActual.SerieFolio, Concepto, CompraActual.IdCtaContableProvComplementaria, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveCompraAmortizacion:=Pago.CveCompraAmortizacion, TipoCambio:=TCValuacionCompra, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -9833,7 +9839,7 @@ Public Class ClsPaginas End If - If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O + If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero @@ -10219,9 +10225,9 @@ Public Class ClsPaginas Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If ObjConta.GetRetCuenta(38, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero + If ObjConta.GetRetCuenta(38, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString.ToEntero - If ObjConta.GetRetCuenta(39, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + If ObjConta.GetRetCuenta(39, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString.ToEntero End If diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index bbac807ee..2ba9024bc 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -19,6 +19,7 @@ Public Class LogicNominas sw.Start() End If + hasfiniquito = False Dim cfdi As CFDITimbre = PreTimbrar(CveNomina, UsuarioActual, False, versionTimbre) 'CvePersonal, CvePeriodo, If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then If Not cfdi.Timbrado Then @@ -232,7 +233,7 @@ Public Class LogicNominas End If Next - hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) OR (Tipo = 'D' AND SATCveConcepto = '101')") > 0 + hasfiniquito = objNomina.DtResultados.COUNT("SATCveConcepto", "(Tipo = 'P' AND SATCveConcepto IN ('022', '023','025')) ") > 0 'OR (Tipo = 'D' AND SATCveConcepto = '101') TotalPercepciones = DtPercepciones.SUM("Importe").ToString().ToDecimal() @@ -399,7 +400,7 @@ Public Class LogicNominas Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()} If Row("SATCveConcepto").ToString().ToEntero() = 4 Then - otrp.ejercicio = DateTime.Now.Year - 1 + otrp.ejercicio = DateTime.Now.Year - If(DateTime.Now.Month = 12, 0, 1) otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs() otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs() End If diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index d00ade5fd..ae5d47fc5 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -240,7 +240,7 @@ Namespace Extensiones strLineaTMP = String.Format("{0} {0}{3}{2}:{1}{0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) Try - ArchivoW = New StreamWriter(String.Format("{0}\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception Exit Sub End Try @@ -260,7 +260,7 @@ Namespace Extensiones Dim strLineaTMP As String strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) Try - ArchivoW = New StreamWriter(String.Format("{0}\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception Exit Sub End Try @@ -280,7 +280,7 @@ Namespace Extensiones ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) Try - ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException 'Alert("No hay permisos para guardar en el Log.", Extensiones.TipoMensaje.MsgError) Exit Sub @@ -303,7 +303,7 @@ Namespace Extensiones strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) Try - ArchivoW = New StreamWriter(String.Format("{0}\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) + ArchivoW = New StreamWriter(String.Format("{0}\Log\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception Exit Sub End Try diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index e95df4dd1..8941c6e1b 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -878,7 +878,7 @@ Partial Class Bancos_ProveedoresAbonar End If Next - Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145) + Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83) Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}" Dim Referencia As String = $"{HdnTipoTransaccionAbreviatura.Value}: {TxtFolio.Text.Trim}" Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal @@ -899,10 +899,13 @@ Partial Class Bancos_ProveedoresAbonar End If Else + Dim ImporteME As Decimal = 0 + If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then + ImporteME = tImporteMN + tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL + End If - If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL - - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=tImporteMN) Then MsgError = "No se pudo insertar la póliza" End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index bcbc9dbe8..eadfd1fe5 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6967,6 +6967,8 @@ Partial Class Compras_Compras Case 5 'Proveedores If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor Dim UsaComplementaria As Boolean = True + + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then UsaComplementaria = False If tipoCambioActual <> 1 Then Select Case ConceptoContable Case 5 diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 373264917..81d6807c0 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -280,7 +280,7 @@ <%-- --%> <%-- --%> - + @@ -301,7 +301,7 @@ <%-- --%> - + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 2a712db9b..c17a2cb31 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -575,7 +575,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero If CveConceptoContable.Contiene(1, 2, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 272) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) - If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) + If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc index 288ba1a15..c783cb174 100644 --- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc +++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc @@ -3035,31 +3035,32 @@ ReportParameter1 + =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1") - =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1") + =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteAnterior.Value, 0) , "DataSet1") - =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteActual.Value, 0), "DataSet1") + =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteActual.Value, 0) , "DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1") + =Sum(iif(Fields!Tipo.Value.ToString() = "D" AND Cint(Fields!TipoCuenta.Value) = 3 , Fields!ImporteAnterior.Value, 0) , "DataSet1") true =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") + =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteActual.Value, 0) , "DataSet1") =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1") + =Sum(iif(Fields!Tipo.Value.ToString() = "F" AND (Cint(Fields!TipoCuenta.Value) = 5 OR Cint(Fields!TipoCuenta.Value) = 6 OR Cint(Fields!TipoCuenta.Value) = 7 OR Cint(Fields!TipoCuenta.Value) = 8) , Fields!ImporteAnterior.Value, 0) , "DataSet1") =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index 2771700f8..4185a3525 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -918,7 +918,7 @@ Partial Class Inventarios_ResguardoMaterial CveSeccionAlmacen = -1 End If If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, - Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, + Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then TieneError = True MensajeError = "Ocurrió un error al guardar los movimientos de entrada" diff --git a/LogIn.aspx.vb b/LogIn.aspx.vb index 3cf8db7c6..1ec1f9d38 100644 --- a/LogIn.aspx.vb +++ b/LogIn.aspx.vb @@ -11,7 +11,7 @@ Partial Class LogIn #Region " PROPIEDADES " Private Property CveUsuario As Integer Get - Return ViewState("CveUsuario").ToString.ToEntero + Return IfNull(ViewState("CveUsuario"), "-1").ToString.ToEntero End Get Set(value As Integer) ViewState("CveUsuario") = value diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index d568ab061..742f2d086 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -6625,7 +6625,7 @@ public partial class Nomina_Nomina2 : ClsPaginas while (Neto != NetoSimulado && continuarV) { - if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, SDI) + if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, Neto) && objnom.DTSetResultados.Tables.Count > 1) { dtempleadosSimula = objnom.DTSetResultados.Tables[3]; @@ -6674,6 +6674,7 @@ public partial class Nomina_Nomina2 : ClsPaginas { continuarV = false; } + continuarV = false; } } if (continuar) diff --git a/OC/OC.aspx b/OC/OC.aspx index f44a7c14a..a56f4f8d4 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -2366,7 +2366,7 @@
<%----%> - +
diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 1508587d5..934a150d6 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -174,7 +174,7 @@
- +
diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 73c79e8ff..5e2c2ed6d 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -203,7 +203,7 @@ - Contacto: + Representante Legal: diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb index b095f668a..4f3664346 100644 --- a/Sistemas/Empresa.aspx.vb +++ b/Sistemas/Empresa.aspx.vb @@ -258,7 +258,7 @@ Partial Class Sistemas_Empresa TxtCP.Text = .CP.ToString TxtRFC.Text = .RFC TxtTelefono.Text = .Telefono - TxtContacto.Text = .Contacto + TxtContacto.Text = .Contacto 'Representante legal TxtMail.Text = .Mail DdlTipoFacturacion.SelectedValue = .TipoFacturacion TxtBIUsuario.Text = .BIUsuario diff --git a/Ventas/CatClasificaciones.aspx.vb b/Ventas/CatClasificaciones.aspx.vb index bf140a196..4043ffbbd 100644 --- a/Ventas/CatClasificaciones.aspx.vb +++ b/Ventas/CatClasificaciones.aspx.vb @@ -214,8 +214,8 @@ Partial Class CatClasificaciones End If End If - GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing ObjClasificaciones.Dispose() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing CargaDatos() UpDatos.Update() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 3d80a5652..e806ed1dc 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -565,8 +565,7 @@
- - +
@@ -583,7 +582,7 @@
- +
@@ -600,7 +599,7 @@
- +
@@ -1851,7 +1850,7 @@
- + <%----%> @@ -5096,7 +5095,7 @@
- +
@@ -5365,7 +5364,7 @@
<%----%> - +
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 4e92f2575..9bc11695d 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -941,10 +941,10 @@ Partial Class Clientes LnkAgregarLineaAdicional.Visible = True GetLineasAdicionales() - End If - - - + End If + + + End If 'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017 @@ -4068,10 +4068,10 @@ Partial Class Clientes Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF") Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta)) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - 'OBTENEMOS LOS DATOS + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + 'OBTENEMOS LOS DATOS Dim DtCxCFact As DataTable = Nothing Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) @@ -4276,7 +4276,17 @@ Partial Class Clientes End Try Else If Archivo.Exists Then - ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Else + ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + End If + Else ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4319,7 +4329,16 @@ Partial Class Clientes DtCxCFact2.Rows.Add(drr) If Archivo.Exists Then - ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta)) + If ArchivoSti.Exists Then + Dim listass As New List(Of ReportParameter) + For Each item As CrystalParametro In lista + listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) + Next + ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + Else + ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) + End If Else ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4342,9 +4361,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4412,11 +4431,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4486,11 +4505,11 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " - + Private Sub CargaCombosDirecionesClientesSAT() CargaDirClientePais() CargaDirClienteEstado() @@ -4713,12 +4732,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4822,9 +4841,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) HdnModalidad.Value = "I" @@ -5412,9 +5431,9 @@ Partial Class Clientes End If Return Retorno - End Function + End Function #End Region - + #Region "GPS" Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click If hdnArrayDispositivo.Value.Length > 0 Then @@ -5555,10 +5574,10 @@ Partial Class Clientes UpMoverDispositivo.Update() RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") - End Sub - + End Sub + #End Region - + #Region "Sucursales" Public Sub CreaDTSucursales() @@ -5792,14 +5811,14 @@ Partial Class Clientes End If End If End If - End Sub - + End Sub + #End Region - + #Region "G P S" - - - + + + Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try @@ -5870,16 +5889,16 @@ Partial Class Clientes End If ObjClientes.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "C O N T R A T O S" - - - - + + + + Private Sub CargaDatosContrato() If CveCliente <= 0 Then Exit Sub @@ -5924,10 +5943,10 @@ Partial Class Clientes e.Row.CssClass = "Totales white" End If End If - End Sub - + End Sub + #End Region - + #Region "M E T O D O S " Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then @@ -6337,13 +6356,13 @@ Partial Class Clientes End If - End Sub - + End Sub + #End Region - + #Region "IMPRIMIR GVHistorial" - - + + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") @@ -6418,18 +6437,18 @@ Partial Class Clientes ObjClientes.Dispose() Return retorno - End Function - - + End Function + + #End Region - + #Region "C O B R A N Z A" Public Sub Visitas_Click(sender As Object, e As EventArgs) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) - End Sub - + End Sub + #End Region - + #Region "Usuarios" Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero() @@ -6464,12 +6483,12 @@ Partial Class Clientes e.Row.Cells(5).Visible = False End If End If - End Sub + End Sub #End Region - - + + #Region "C U E N T A S - B A N C A R I A S" - + Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False) If CveCliente <= 0 Then Exit Sub @@ -6642,8 +6661,8 @@ Partial Class Clientes TxtNumeroCuenta2.Text = "" TxtConvenioCIE2.Text = "" TxtReferencia2.Text = "" - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -6699,10 +6718,10 @@ Partial Class Clientes GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing End If - End Sub - + End Sub + #End Region - + Private Sub CargaPSGridCuentasBancos() If CveCliente > 0 Then GvBancosCuentas.DataSource = DTCuentasBancos @@ -6760,9 +6779,9 @@ Partial Class Clientes divestatus.Visible = True UpAddBancos.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) - End Sub + End Sub #End Region - + #Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel" Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click GenerarPDF("Excel") @@ -6784,11 +6803,11 @@ Partial Class Clientes ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) - End Sub + End Sub #End Region - + #Region "VENTAS" - + Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte() Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -7019,10 +7038,10 @@ Partial Class Clientes ObjVentas.Dispose() Return PdfFactura(Vta) - End Function - + End Function + #End Region - + #Region "COMERCIO EXTERIOR" Public Sub CargaCombosComercioExterior() @@ -7146,12 +7165,12 @@ Partial Class Clientes End Sub Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) CargaColonia() - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N " - + Private Sub CargaDocumentacionCliente() Dim objRH As New ClsEdocumentacion() @@ -7789,12 +7808,12 @@ Partial Class Clientes RegistraScript("Download('" & baseUrl & "')") - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T O S V E N T A S" - + Private Sub CargaDocumentosVenta(tCveCliente As Integer) Dim objInv As New ClsEdocumentacion @@ -7965,11 +7984,11 @@ Partial Class Clientes objRH.Dispose() - End Sub - - + End Sub + + #End Region - + #Region "PERSONA FISICA" Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs) RegistraScript("$('#DivModalPersonaFisica').modal();") @@ -7994,9 +8013,9 @@ Partial Class Clientes ObjCliente.Dispose() UpDatos.Update() - End Sub + End Sub #End Region - + #Region "USUARIOS PLATAFORMA CLIENTE - 6 " Protected Sub CargaUsuariosPortalCliente() Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios @@ -8005,19 +8024,19 @@ Partial Class Clientes GvUsuarios.DataBind() End If objUsuario.Dispose() - End Sub + End Sub #End Region - + #Region " DEVOLVER DINERO ANT/NC " Private Sub InicializaDevolverDinero() If UsuarioActual.TienePermisoProceso(247) Then GVAnticipos.Columns(6).Visible = True End If - End Sub + End Sub #End Region - + #Region "MODAL GRAFICA/PEDIDOS" - + Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) If CargaDatatables() Then RegistraScript("$('#DivModalGrafica').modal('show')") @@ -8354,13 +8373,13 @@ Partial Class Clientes RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55") UPModalProd.Update() - End Sub - - + End Sub + + #End Region - + #Region "TAB - COMPORTAMIENTO DE VENTAS" - + Private Sub CargaGrupo() DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4")) @@ -8544,12 +8563,12 @@ Partial Class Clientes ObjVentas.Dispose() GvComportamientoVenta.DataBind() UpDatosComportamientoVenta.Update() - End Sub - + End Sub + #End Region - + #Region "DISPOSITIVOS" - + Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs) Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero() Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero() @@ -8587,10 +8606,10 @@ Partial Class Clientes CargaEventoBitacora() NombreDispositivo = "" RegistraScript("$('#DivMoverDispositivo').modal('hide');") - End Sub - + End Sub + #End Region - + #Region "CRM" Protected Sub CargaDatosCRM() Dim ObjCRM = New ClsCRM() @@ -8690,9 +8709,9 @@ Partial Class Clientes Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") End If End If - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE MARCAS" Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) @@ -8917,9 +8936,9 @@ Partial Class Clientes ObjPS.Dispose() - End Sub + End Sub #End Region - + #Region "PORCENTAJE PRECIO DE PRODUCTOS" Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) @@ -9155,12 +9174,12 @@ Partial Class Clientes Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2) - End Sub + End Sub #End Region - + #Region " A C U M U L A D O R E S" - - + + Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) 'CveVentaNota = 0 @@ -9803,11 +9822,11 @@ Partial Class Clientes ' ObjFactura.Timbre = PreParaTimbre(ObjFactura) - End Sub - - + End Sub + + #End Region - + #Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel" Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones") diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index f03547ae9..f295d80c9 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1454,7 +1454,7 @@ Partial Class Ventas_ClientesAbonar If ImporteMovimiento <> 0 AndAlso MsgError = "" Then 'Conta ContPAQ - If (IdCtaContable < 1 Or IdCuentaBancaria < 1) Then + If (IdCtaContable < 1 Or IdCuentaBancaria < 1) AndAlso UsuarioActual.CveEmpresa <> 119 Then CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If @@ -3168,7 +3168,7 @@ Partial Class Ventas_ClientesAbonar DT = ReadExcelFile(Directorio + file.filename, True) - If Not dt.Columns(0).ColumnName.ToUpper = "FOLIO" Then + If Not DT.Columns(0).ColumnName.ToUpper = "FOLIO" Then Alert("El nombre de la primera columna debe ser 'Folio'. Favor de corregirlo", TipoMensaje.MsgAdvertencia) Exit Sub End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index bbb1ec166..8ee7e4337 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5774,7 +5774,7 @@
<%----%> - +
@@ -8115,7 +8115,7 @@
- +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 1908b258e..57ca509db 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4467,7 +4467,12 @@ Partial Class Ventas OS.Dispose() - TxtTotal.Text = TmpDT.SUM("Total").FormatoNumero() + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + CalculaUsados() + End If + + CalculaTotalesVenta(False) GvPS.DataSource = TmpDT DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2") @@ -34130,7 +34135,7 @@ Partial Class Ventas Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean Dim Retorno As Boolean = False - If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") Then + If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") AndAlso UsuarioActual.CveUsuario <> 1719 Then LBNotaCredito.Visible = False UpnTools.Update() Retorno = True