diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 7c27793f3..9ce852417 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1345,7 +1345,7 @@ Public Class ClsContratos With SqlAdapter.SelectCommand.Parameters .Add("@CveContrato", SqlDbType.Int).Value = CveContrato .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle - .Add("@Cantidad", SqlDbType.Int).Value = Cantidad + .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index d2f3cfe8d..f7ee2c5dc 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -621,10 +621,14 @@ Public Class ClsNominas Return Retorno End Function - Public Function AddNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal) As Boolean + Public Function AddUPNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, + Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal, ImporteValor As Decimal, + CveUsuario As Integer, IsEdited As Boolean, + chkImporte As Integer, chkImporteGravado As Integer, chkImporteValor As Integer + ) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Nom_NominasDetallesAdd") + DataAdapter("PA_Nom_NominasDetallesAddUP") With SqlAdapter.SelectCommand.Parameters .Add("CveNomina", SqlDbType.Int).Value = CveNomina @@ -634,6 +638,12 @@ Public Class ClsNominas .Add("Importe", SqlDbType.Float).Value = Importe .Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado .Add("ImporteExento", SqlDbType.Float).Value = ImporteExento + .Add("ImporteValor", SqlDbType.Float).Value = ImporteValor + .Add("CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("IsEdited", SqlDbType.Bit).Value = IsEdited + .Add("chkImporteValor", SqlDbType.Int).Value = chkImporteValor + .Add("chkImporte", SqlDbType.Int).Value = chkImporte + .Add("chkImporteGravado", SqlDbType.Int).Value = chkImporteGravado End With Try @@ -646,31 +656,56 @@ Public Class ClsNominas Return Retorno End Function - Public Function UpdateNom_NominasDetalles(CveNominaDetalle As Integer, Importe As Decimal, ImporteExento As Decimal, ImporteGravado As Decimal) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Nom_NominasDetallesUpdate") + 'Public Function AddNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal) As Boolean + ' Dim Retorno As Boolean = False - With SqlAdapter.SelectCommand.Parameters - .Add("CveNominaDetalle", SqlDbType.Int).Value = CveNominaDetalle - .Add("Importe", SqlDbType.Float).Value = Importe - .Add("ImporteExento", SqlDbType.Float).Value = ImporteExento - .Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado - End With + ' DataAdapter("PA_Nom_NominasDetallesAdd") - Try - SqlAdapter.Fill(Data) - Retorno = True - ' - Catch sqlex As SqlException - If sqlex.Message.Contains("x5010") Then - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - Else - Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End If - End Try + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("CveNomina", SqlDbType.Int).Value = CveNomina + ' .Add("CvePeriodo", SqlDbType.Int).Value = CvePeriodo + ' .Add("CvePersonal", SqlDbType.Int).Value = CvePersonal + ' .Add("CveConcepto", SqlDbType.Int).Value = CveConcepto + ' .Add("Importe", SqlDbType.Float).Value = Importe + ' .Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado + ' .Add("ImporteExento", SqlDbType.Float).Value = ImporteExento + ' End With - Return Retorno - End Function + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch Ex1 As SqlException + ' Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try + + ' Return Retorno + 'End Function + + 'Public Function UpdateNom_NominasDetalles(CveNominaDetalle As Integer, Importe As Decimal, ImporteExento As Decimal, ImporteGravado As Decimal) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Nom_NominasDetallesUpdate") + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("CveNominaDetalle", SqlDbType.Int).Value = CveNominaDetalle + ' .Add("Importe", SqlDbType.Float).Value = Importe + ' .Add("ImporteExento", SqlDbType.Float).Value = ImporteExento + ' .Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado + ' End With + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' ' + ' Catch sqlex As SqlException + ' If sqlex.Message.Contains("x5010") Then + ' Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina(Timbrada).", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' Else + ' Me.OnError("Ocurrió un error al eliminar el Movimiento de Nomina.", sqlex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End If + ' End Try + + ' Return Retorno + 'End Function Public Function DeleteNom_NominasDetalles(CveConcepto As Integer, CvePersonal As Integer, CvePeriodo As Integer) As Boolean Dim Retorno As Boolean = False @@ -1770,7 +1805,7 @@ Public Class ClsNominas End Function #End Region -#Region "" +#Region "Periodos" 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 @@ -2172,34 +2207,6 @@ Public Class ClsNominas End Try Return Retorno End Function - Public Function AddUPNom_NominasDetalles(CveNomina As Integer, CvePeriodo As Integer, CvePersonal As Integer, CveConcepto As Integer, Importe As Decimal, ImporteGravado As Decimal, ImporteExento As Decimal, ImporteValor As Decimal, CveUsuario As Integer, Optional IsEdited As Boolean = False) As Boolean - Dim Retorno As Boolean = False - - DataAdapter("PA_Nom_NominasDetallesAddUP") - - With SqlAdapter.SelectCommand.Parameters - .Add("CveNomina", SqlDbType.Int).Value = CveNomina - .Add("CvePeriodo", SqlDbType.Int).Value = CvePeriodo - .Add("CvePersonal", SqlDbType.Int).Value = CvePersonal - .Add("CveConcepto", SqlDbType.Int).Value = CveConcepto - .Add("Importe", SqlDbType.Float).Value = Importe - .Add("ImporteGravado", SqlDbType.Float).Value = ImporteGravado - .Add("ImporteExento", SqlDbType.Float).Value = ImporteExento - .Add("ImporteValor", SqlDbType.Float).Value = ImporteValor - .Add("CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("IsEdited", SqlDbType.Bit).Value = IsEdited - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch Ex1 As SqlException - Me.OnError("Ocurrió un error al Guardar el Movimiento de Nomina.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - Public Function ProcesarSUA(txtSUA As String, cveEmpresa As Int32) As Boolean Dim retorno As Boolean = False DTSet = New DataSet() @@ -2298,7 +2305,7 @@ Public Class ClsNominas Dim retorno As Boolean = False Try DTSet = New DataSet() - DataAdapter("PA_Nom_NominaEmpleado", CommandType.StoredProcedure) + DataAdapter("PA_Nom_NominaEmpleadoV2", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1d8d75be2..24d24e0cd 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6788,7 +6788,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClienteTelefono", Vta.ClienteSucursal.TelefonoSucursal)) ElseIf Vta.CveCliente.ToEntero > 0 Then params.Add(New ReportParameter("ClienteContactoMail", Vta.Cliente.MailCotizacion)) - params.Add(New ReportParameter("ClienteTelefono", If(Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.Telefono.Length > 6, Vta.Cliente.Telefono, Vta.TelefonoGenerico))) + params.Add(New ReportParameter("ClienteTelefono", If(Vta.TelefonoGenerico <> "", Vta.TelefonoGenerico, Vta.Cliente.Telefono))) End If If UsuarioActual.CveEmpresa.Contiene(17) Then @@ -7925,7 +7925,7 @@ Public Class ClsPaginas Dim DTDeducciones As Data.DataTable Dim DTDeducciones2 As New Data.DataTable - Dim Ruta As String = RutaEmpresa + Dim Ruta As String = UsuarioActual.Empresa.Ruta 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 diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index 420c6e20b..f76cdd80c 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -523,7 +523,7 @@ - + diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index f487fadc2..31560b162 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -2562,7 +2562,7 @@ Partial Class Bancos_PopIECompras If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If End If @@ -2703,7 +2703,7 @@ Partial Class Bancos_PopIECompras If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero End If End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index be47e9a39..81df418d7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1109,6 +1109,8 @@ Partial Class Compras_Compras End Set End Property + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then 'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip") @@ -1548,8 +1550,8 @@ Partial Class Compras_Compras End If - 'SE OCUPAN AFUERA DEL POSTBACK ?? - cargaddlVinculacionServcios() + 'SE OCUPAN AFUERA DEL POSTBACK ?? + cargaddlVinculacionServcios() If UsuarioActual.TienePermisoProceso(117) Then HplAddClasificacion.Visible = False @@ -4088,11 +4090,15 @@ Partial Class Compras_Compras 'DF - 10/04/2017 If UsuarioActual.TienePermisoProceso(187) Then If TxtSerie.Text <> SerieVieja Then - Dim SerieNueva As String = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString - If SerieNueva = "" Then - Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia) - Exit Sub + Dim dtt As DataTable = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa) + If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then + Dim SerieNueva As String = dtt.FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString + If SerieNueva = "" Then + Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If End If + End If End If @@ -4385,6 +4391,8 @@ Partial Class Compras_Compras Exit Sub End If + + '------------------TERMINA VALIDACIONES------------------ 'si hay necesidad de actualizar el globaldtps @@ -4633,20 +4641,7 @@ Partial Class Compras_Compras If RBLPago.SelectedValue.ToEntero = 4 And EstatusCredito.Contiene(1, 101) Then CveEstatusFactura = 6 End If - 'hay amortización directa como descuento. RMF Temporal - If UsuarioActual.CveEmpresa = 119 Then - 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then - ' TxtDescuento.Text = LblAmortizacion.Text - ' LblAmortizacion.Text = "0.00" - 'End If - 'o si el descuento es igual a la amortizacion - 'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then - ' TxtDescuento.Text = LblAmortizacion.Text - ' LblAmortizacion.Text = "0.00" - 'End If - - End If 'Compra Dim CveFactura As Integer = -1 @@ -6698,7 +6693,7 @@ Partial Class Compras_Compras CveMovimientoAlmacen = ObjOC.DtResultados.FiltroPrimeroValor("CveMovimientoAlmacen").ToEntero Dim TCAjuste As Decimal = ObjOC.DtResultados.FiltroPrimeroValor("TipoCambioAjuste").ToDecimal 'RMF. falta verificar el costo indirecto de la OC - If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + If DdlMoneda.SelectedValue.ToEntero <> 1 Then TCO = TxtTC.Text.ToDecimal ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal CostoIndirectoAcum176 += ImporteCI176 @@ -6884,7 +6879,7 @@ Partial Class Compras_Compras Next If ContienePSNeteoBonif Then - importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 ").ToString.ToDecimal + importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = 20319 ").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero @@ -6905,8 +6900,6 @@ Partial Class Compras_Compras End If - - ' adfasdasd 'ChkNCInvNC If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then @@ -6968,9 +6961,11 @@ Partial Class Compras_Compras DTDistinct.Clear() End If + Dim tTipoMovimiento As Boolean = TipoMovimiento If DTDistinct.Rows.Count > 0 Then For Each Row2 As DataRow In DTDistinct.Rows + tTipoMovimiento = TipoMovimiento 'DETERMINA IMPORTE If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then importeMovimiento = DT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), String.Format("ISNULL(TipoAF,0) <> 2 And CveClasificacion = {0} And CveSubProyecto = {1} And ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal @@ -6995,8 +6990,6 @@ Partial Class Compras_Compras End If - - 'SEGMENTO DE NEGOCIO Dim IdSegmentoNegocio As Integer = -1 Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero)) @@ -7006,12 +6999,6 @@ Partial Class Compras_Compras 'AGREGA MOVIMIENTO If importeMovimiento.RoundSQL <> 0 Then - 'Conta ContPAQ - ' If IdCtaContable = 0 Then - ' CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString) - ' idCuentaContabilizacion = 0 - 'End If - Dim tcvecon As Integer = 6 Dim tidctacon As Integer = 6 @@ -7027,17 +7014,23 @@ Partial Class Compras_Compras tcvecon = 259 tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero + ElseIf UsuarioActual.CveEmpresa = 119 AndAlso Row2("CveClasificacion").ToString = "20473" Then + 'CODIGO FIJO, SI ES LA CLASIFICACION DE "SEGURO/SERVICIO COSTO", SE ABONARÁ + tTipoMovimiento = True + importeMovimiento = -importeMovimiento + importeMN = -importeMN End If + Dim usacomplementariaProveedor As Boolean = False - usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158), True, False) + usacomplementariaProveedor = If(tipoCambioActual > 1, True, False) If usacomplementariaProveedor AndAlso DdlTipoComprobante.SelectedValue = "Ant" Then 'importeMovimiento Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" importeMN = tipoCambioActual * importeMovimiento - importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, 266, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=importeMovimiento, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If importeMN = importeMovimiento @@ -7047,7 +7040,7 @@ Partial Class Compras_Compras If Not Insertado205 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -7068,7 +7061,7 @@ Partial Class Compras_Compras End If Case 5 'Proveedores If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor - Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158) + Dim UsaComplementaria As Boolean = True If tipoCambioActual <> 1 Then Select Case ConceptoContable Case 5 @@ -7374,7 +7367,7 @@ Partial Class Compras_Compras End If 'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA - If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 Then Dim importeMovimientoNC = Ant.Importe Dim importeMNNC = 0.0D Dim TipoCambioNC = Ant.TCCompra @@ -7435,7 +7428,7 @@ Partial Class Compras_Compras End If End If - ElseIf ConceptoContableAnticipo.Contiene(265) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + ElseIf ConceptoContableAnticipo.Contiene(265) And DdlMoneda.SelectedValue.ToEntero <> 1 Then Dim importeMovimientoNC = Ant.Importe Dim importeMNNC = 0.0D Dim TipoCambioNC = Ant.TCCompra @@ -7530,7 +7523,7 @@ Partial Class Compras_Compras Dim usacomplementariaAnticipo As Boolean = False - usacomplementariaAnticipo = If(Ant.TCCompra > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False) + usacomplementariaAnticipo = If(Ant.TCCompra > 1, True, False) Dim TipoCambioAnt As Decimal = Ant.TCCompra @@ -7560,7 +7553,7 @@ Partial Class Compras_Compras If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 307 Dim IdCtaContablePago As Integer = CtaProveedor Dim usacomplementariaProveedor As Boolean = False - usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False) + usacomplementariaProveedor = If(tipoCambioActual > 1, True, False) If usacomplementariaProveedor Then Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" importeMN = tipoCambioActual * importeMovimiento - importeMovimiento @@ -8633,7 +8626,7 @@ Partial Class Compras_Compras If Respuesta Then - Dim IEPSPSDetalles As Decimal = TmpDT.SUM("IEPSPS", " IEPSPS > 0 ").ToDecimal + Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ") Dim DiferenciaIEPSPS As Decimal = TxtIEPS.Text.ToDecimal - IEPSPSDetalles Dim DTConsultaIEPSPS As New DataTable @@ -8652,7 +8645,7 @@ Partial Class Compras_Compras IndiceContador = IndiceContador + 1 Next - If DiferenciaIEPSPS <> 0 Then + If DiferenciaIEPSPS.RoundAD(2) <> 0 Then If DTConsultaIEPSPS.Rows.Count > 0 Then 'Ajusta IPES en primer registro que aplique IEPS @@ -8660,7 +8653,7 @@ Partial Class Compras_Compras TmpDT.AcceptChanges() Else Respuesta = False - Alert("Los productos especificados en el lisado no tienen asigando impuesto IEPS, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia) + Alert(String.Format("Los productos especificados en el listado no tienen asigando impuesto IEPS, favor de realizar la corrección en el producto que aplique el impuesto. ({0}-{1})", IEPSPSDetalles, TxtIEPS.Text.ToDecimal), TipoMensaje.MsgAdvertencia) End If End If @@ -8921,13 +8914,13 @@ Partial Class Compras_Compras If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorAnticiposExtranjera If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then - If UsuarioActual.CveEmpresa.Contiene(119) Then - IdCtaContable = CtaProveedorAnticiposComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, "", 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then - ErrorMovtosCxP = 1 - Exit Select - End If + + IdCtaContable = CtaProveedorAnticiposComplementaria + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, "", 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then + ErrorMovtosCxP = 1 + Exit Select End If + Else ErrorMovtosCxP = 1 Exit Select @@ -8958,7 +8951,7 @@ Partial Class Compras_Compras ImporteMovimiento = ImporteMovimiento / gvr.DataKey("TCCompra").ToDecimal End If - If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorExtranjera If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then IdCtaContable = CtaProveedorComplementaria @@ -9004,7 +8997,7 @@ Partial Class Compras_Compras Dim TipoCambioAnt = gvr.DataKey("TCCompra").ToDecimal Dim usacomplementariaAnticipo As Boolean = False - usacomplementariaAnticipo = If(TipoCambioAnt > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False) + usacomplementariaAnticipo = If(TipoCambioAnt > 1, True, False) Dim ImporteAnt As Decimal = ImporteMovimiento @@ -9103,7 +9096,7 @@ Partial Class Compras_Compras ImporteMovimiento = sumaAmortizacion importeMN = ImporteMovimiento * TipoCambio17 - If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then + If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorExtranjera If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17) Then @@ -11037,18 +11030,6 @@ Partial Class Compras_Compras If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If e.Row.RowIndex = 0 Then - 'e.Row.Cells(0).Width = Unit.Pixel(15) - 'e.Row.Cells(1).Width = Unit.Pixel(45) - 'e.Row.Cells(2).Width = Unit.Pixel(70) - 'e.Row.Cells(3).Width = Unit.Pixel(230) - 'e.Row.Cells(4).Width = Unit.Pixel(202) - 'e.Row.Cells(5).Width = Unit.Pixel(155) - 'e.Row.Cells(6).Width = Unit.Pixel(155) - 'e.Row.Cells(7).Width = Unit.Pixel(50) - 'e.Row.Cells(8).Width = Unit.Pixel(80) - 'e.Row.Cells(9).Width = Unit.Pixel(80) - 'e.Row.Cells(10).Width = Unit.Pixel(43) - 'e.Row.Cells(11).Width = Unit.Pixel(43) If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0) e.Row.Cells(13).Width = Unit.Pixel(150) @@ -11239,10 +11220,6 @@ Partial Class Compras_Compras GvPS.DataSource = TmpDT GvPS.DataBind() - 'GVAF.DataSource = TmpDT - 'GVAF.DataBind() - ''UpnAF.Update() - CalculaTotales(True) CargaGvInv() CargaGVsAF() @@ -11274,17 +11251,7 @@ Partial Class Compras_Compras Private Sub GeneraGlobalDT(data As Object) GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing - 'Dim ObjPS As New ClsProductosServicios - 'If (ObjPS.GetPSSimplificado(-1)) Then - ' Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable - 'End If - - 'If ObjPS.GetPSEquivalencias(-1, -1) Then - ' GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = ObjPS.DtResultados - 'End If - - 'ObjPS.Dispose() End Sub Private Function notienepresupuesto() As Boolean Dim notienerecursos = False @@ -11357,21 +11324,7 @@ Partial Class Compras_Compras DTConceptos.Columns.Add("Total", GetType(Double)) DTConceptos.Columns.Add("Amortizacion", GetType(Double)) End Sub - 'Private Sub AddPS(Cantidad As Double, UM As String, PS As String, PU As Double, IVA As Double, Descuento As Double, Optional Total As Double = 0) - ' Dim Row As DataRow = Nothing - ' Row = DTConceptos.NewRow() - ' Row("Consec") = DTConceptos.Rows.Count + 1 - ' Row("Cantidad") = Cantidad - ' Row("UM") = UM - ' Row("CveClasificacion") = -1 - ' Row("PS") = PS - ' Row("PU") = PU - ' Row("IVA") = IVA - ' Row("Total") = If(Total > 0, Total, Cantidad * PU) - ' Row("Descuento") = Descuento - ' DTConceptos.Rows.Add(Row) - 'End Sub Private Sub CreaDTCompras() TmpDT = New DataTable @@ -11599,26 +11552,6 @@ Partial Class Compras_Compras End Sub - 'Private Sub AddDTEnvio(Cantidad As Double, UM As String, CveUM As Integer, CvePS As Integer, PS As String, PU As Double, CveAlmacen As Integer, CveEq As Integer) - - ' Dim dr As DataRow = DtInv.NewRow - - ' dr("Cantidad") = Cantidad - ' dr("UM") = UM - ' dr("CveUM") = CveUM - ' dr("CvePS") = CvePS - ' dr("PS") = PS - ' dr("PU") = PU - ' dr("CveAlmacen") = CveAlmacen - ' dr("CveEq") = CveEq - - ' DtInv.Rows.InsertAt(dr, hdnIndexInv.Value.ToEntero + 1) - - ' GvInv.DataSource = DtInv - ' GvInv.DataBind() - - - 'End Sub Protected Sub RecargaMaximum_Click(sender As Object, e As System.EventArgs) @@ -11719,62 +11652,6 @@ Partial Class Compras_Compras #End Region #Region " ALGO DE AF QUE NUNCA SE USABA " - 'Protected Sub GVAF_RowCreated(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAF.RowCreated - ' If e.Row.RowType = DataControlRowType.DataRow AndAlso (e.Row.RowState = DataControlRowState.Alternate OrElse e.Row.RowState = DataControlRowState.Normal) Then - ' e.Row.FCDropDownList("DdlTipoActivoFijo").DataSource = TmpDTTiposAF - ' e.Row.FCDropDownList("DdlTipoActivoFijo").DataBind() - - ' e.Row.FCDropDownList("DdlSubTipoActivoFijo").DataSource = Nothing - ' e.Row.FCDropDownList("DdlSubTipoActivoFijo").DataBind() - ' e.Row.FCDropDownList("DdlSubTipoActivoFijo").Items.Insert(0, New ListItem("Seleccione", "-1")) - - - ' e.Row.FCDropDownList("DdlAF").DataSource = Nothing - ' e.Row.FCDropDownList("DdlAF").DataBind() - ' e.Row.FCDropDownList("DdlAF").Items.Insert(0, New ListItem("Seleccione", "-1")) - - ' End If - 'End Sub - - 'Protected Sub GVAF_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAF.RowDataBound - ' If e.Row.RowType = DataControlRowType.DataRow Then - ' If e.Row.RowIndex = 0 Then - ' e.Row.Cells(0).Width = Unit.Pixel(20) - ' e.Row.Cells(1).Width = Unit.Pixel(140) - ' e.Row.Cells(2).Width = Unit.Pixel(250) - ' End If - - ' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Right - ' e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left - ' e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left - ' End If - 'End Sub - - 'Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) - ' Dim Array() As String = Nothing - ' Dim DdlGVSubTipoAF As DropDownList = Nothing - - ' Array = DirectCast(sender, DropDownList).ClientID.Split("_"c) - ' If Array.Length > 0 Then - ' DdlGVSubTipoAF = DirectCast(GVAF.Rows(Array(3).ToEntero).Controls(4).Controls(1), DropDownList) - ' End If - - ' If DdlGVSubTipoAF IsNot Nothing Then CargaSubTipoAF(DirectCast(sender, DropDownList), DdlGVSubTipoAF) - 'End Sub - - 'Protected Sub GvOCC2_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOCC2.RowDataBound - ' If e.Row.RowType = DataControlRowType.DataRow Then - - ' e.Row.Cells(0).Text = (e.Row.RowIndex + 1).ToString - - ' End If - 'End Sub - - 'Protected Sub chkFuncionariosEmpleados_CheckedChanged(sender As Object, e As EventArgs) Handles chkFuncionariosEmpleados.CheckedChanged - ' PnlPagoContado.Visible = Not chkFuncionariosEmpleados.Checked - ' PnlFuncionarioEmpleado.Visible = chkFuncionariosEmpleados.Checked - ' UPCondicionesPago.Update() - 'End Sub Protected Sub BtnOCAceptar_Click(sender As Object, e As EventArgs) Handles BtnOCAceptar.Click 'carga la OC Dim CveOC As Integer = -1 @@ -11804,13 +11681,6 @@ Partial Class Compras_Compras OC.Dispose() End If - 'GvOCC.DataSource = TmpDT - 'GvOCC.DataBind() - 'GvOCC2.DataSource = dt - 'GvOCC2.DataBind() - - 'UpnAF.Update() - End Sub #End Region @@ -12877,12 +12747,6 @@ Partial Class Compras_Compras Dim dr As DataRow dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue)) - 'If EmpresaPrueba Then - ' dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue)) - 'Else - ' dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlDeudor.SelectedValue)) - 'End If - If dr IsNot Nothing Then Dim tSaldo As Double = dr("Saldo").ToString.ToDouble @@ -12972,12 +12836,6 @@ Partial Class Compras_Compras UpTabs.Update() - - - - - - 'DdlProveedor.Attributes.Add("onclick", "CargaProveedores();") End Sub Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged Dim Folio As Long @@ -13528,12 +13386,6 @@ Partial Class Compras_Compras For Each gvr As GridViewRow In GvPS.Rows dr = TmpDT.Rows(gvr.RowIndex) - 'DtDetalle.Rows(gvr.RowIndex)("CveClasificacionOG") = gvr.FCDropDownList("DdlAC5").SelectedValue.ToEntero - 'DtDetalle.Rows(gvr.RowIndex)("CveProgramaOperativo") = gvr.FCDropDownList("DdlAC1").SelectedValue.ToEntero - 'DtDetalle.Rows(gvr.RowIndex)("CveUnidadAdministrativa") = gvr.FCDropDownList("DdlAC2").SelectedValue.ToEntero - 'DtDetalle.Rows(gvr.RowIndex)("CveFuenteFinanciamiento") = gvr.FCDropDownList("DdlAC3").SelectedValue.ToEntero - 'DtDetalle.Rows(gvr.RowIndex)("CveTipoGasto") = gvr.FCDropDownList("DdlAC4").SelectedValue.ToEntero - dr("CveProgramaOperativo") = gvr.FCDropDownList("DdlAC1").SelectedValue.ToEntero dr("CveUnidadAdministrativa") = gvr.FCDropDownList("DdlAC2").SelectedValue.ToEntero dr("CveFuenteFinanciamiento") = gvr.FCDropDownList("DdlAC3").SelectedValue.ToEntero @@ -18080,6 +17932,12 @@ Partial Class Compras_Compras TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0) + If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 And PS("IEPSPorcentaje").ToString.ToDecimal > 0 Then + TxtIEPSModal.Text = "0" + Alert("El producto seleccionado contiene IEPS, pero el acumulado de la factura no contiene IEPS, por lo que no se agregara el impuesto.", TipoMensaje.MsgAdvertencia) + End If + + UpIVA.Update() If PS("CveClasificacion").ToString IsNot Nothing Then @@ -18473,6 +18331,13 @@ Partial Class Compras_Compras End If + 'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere + If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then + Row("IEPSPS") = 0 + Row("IEPSPSPorcentaje") = 0 + End If + + TmpDT.Rows.Add(Row) TmpDT.Rows.IndexOf(Row) @@ -18603,6 +18468,13 @@ Partial Class Compras_Compras DrPS("IEPSPSIVAPorcentaje") = IEPSPSIVA + 'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere + If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then + DrPS("IEPSPS") = 0 + DrPS("IEPSPSPorcentaje") = 0 + End If + + AplicaCalculaTotales = True 'End If @@ -19813,6 +19685,7 @@ Partial Class Compras_Compras Dim CvePS As Integer = DdlConceptoIEPS.SelectedValue.ToEntero ' If CvePS = -1 Then CvePS = UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero AgregarConceptoIEPS(TrasladoIEPS, CvePS) + TrasladoIEPS = 0 TxtIEPS.Text = 0.ToString.FormatoNumero TrIEPS.Visible = False @@ -19827,6 +19700,7 @@ Partial Class Compras_Compras Dim CvePS As Integer = DdlConceptoOI.SelectedValue.ToEntero 'If CvePS = -1 Then CvePS = UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero AgregarConceptoIEPS(OtrosImpuestos, CvePS) + OtrosImpuestos = 0 TxtOtrosImpuestos.Text = 0.ToString.FormatoNumero TrOtrosImpuestos.Visible = False @@ -19841,7 +19715,7 @@ Partial Class Compras_Compras MostrarOcultarColumnaIEPS() - + AddPS2() End Sub #End Region diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 3a4a65a77..8241e8aee 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -4437,7 +4437,7 @@ Partial Class PopUpVerFactura RepParams.Add(New ReportParameter("AsignadoA", pUsuarioEntregar)) RepParams.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios") + ImprimirPDF($"{UsuarioActual.Empresa.Ruta}Formatos\EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios") End If End Sub diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index d77fcd5c0..9e444510f 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -149,17 +149,21 @@ Partial Class Compras_RepProductosServiciosDetalle 'DdlCategoria.SelectedValueExist(Categoria) DdlClasificacion.SelectedValueExist(Clasificacion) - If PS <> "-1" Then + If PS.ToEntero > 1 Then DdlPS.SelectedValue = PS - DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=PS.ToEntero)(0)("PSCodigo").ToString + DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=PS.ToEntero).FiltroPrimeroValor("PSCodigo") End If 'DdlSubProyecto.SelectedValueExist(SubProyecto) DdlFamilia.SelectedValueExist(Familia) DdlSubFamilia.SelectedValueExist(SubFamilia) - DdlProveedor.SelectedValue = Proveedor + If Proveedor.ToEntero > 0 Then - DdlProveedor.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {Proveedor}").Rows(0)("RazonSocial").ToString + Dim Dr As DataRow = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Proveedor.ToEntero).FiltroPrimero("") + If Dr IsNot Nothing Then + DdlProveedor.SelectedText = Dr("RazonSocial").ToString + DdlProveedor.SelectedValue = Proveedor + End If Else DdlProveedor.SelectedText = "Todos" End If @@ -200,8 +204,10 @@ Partial Class Compras_RepProductosServiciosDetalle DdlClasificacion.DataBind() 'CargaProveedor - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedor.DataBind() + DdlProveedor.setEsWebService(True) + DdlProveedor.Attributes.Add("data-metodo", "getproveedores") + DdlProveedor.SelectedText = "Todos" + DdlProveedor.SelectedValue = "-1" 'CargaUsuarios DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 8630e7aa5..6f47d8baa 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -371,6 +371,7 @@ Partial Class ContabilidadC_RegPrePoliza .Add("ContadoImporte", Type.GetType("System.Double")) .Add("ContadoBeneficiario", Type.GetType("System.String")) .Add("ContadoObservaciones", Type.GetType("System.String")) + .Add("FolioPoliza", Type.GetType("System.Int32")) End With End Sub diff --git a/Contratos/ContratoAvance.aspx b/Contratos/ContratoAvance.aspx index 69501d2c1..f96d770f8 100644 --- a/Contratos/ContratoAvance.aspx +++ b/Contratos/ContratoAvance.aspx @@ -4,28 +4,7 @@ - - - - - Autorización de Avance - - - - - - - - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ContratoObraAutorizacion.aspx.vb" Inherits="Contratos_ContratoObraAutorizacion" %> + + + + + + + + + + Autorización de Avance + + + + + + + + + + -
-
+
+
-
- +
+ +
+ +
+ + + +
+
+ + +
+
+ +
+
+
+
+
+ + +
+ +
-
- - - -
-
- - + + +
+
+ " style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" /> + " class="btn btn-circle btn-sm label-info"> +
+ +
+ +
+
+ + +
+
+ + + + + + + + + + + + <%# Eval("Cantidad", "{0:N2}")%> + + + + + <%# Eval("Importe", "{0:N2}")%> + + + + + <%# Eval("Cantidad_Ultima", "{0:N2}")%> + + + + + <%# Eval("Importe_Ultima", "{0:N2}")%> + + + + + + + + + + +
+ + + +
+
+
+ +
+
+ +
+
+ + +
+
+
+ + + + + +
+
+
+ + + + + + + + + + + + + + + + + + +
- - -
- -
- -
- - - -
-
- " style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" /> - " class="btn btn-circle btn-sm label-info"> -
- -
- -
-
- - -
-
- - - - - - - - - - - - <%# Eval("Cantidad", "{0:N2}")%> - - - - - <%# Eval("Importe", "{0:N2}")%> - - - - - <%# Eval("Cantidad_Ultima", "{0:N2}")%> - - - - - <%# Eval("Importe_Ultima", "{0:N2}")%> - - - - - - - - - - - -
- - - -
- - -
-
+
- - + -
-
+ <%----%> + + - -
-
-
- - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - <%----%> -
- - - - + + + diff --git a/Contratos/ContratoObraAutorizacion.aspx.vb b/Contratos/ContratoObraAutorizacion.aspx.vb index ccd33f44e..0edb1200f 100644 --- a/Contratos/ContratoObraAutorizacion.aspx.vb +++ b/Contratos/ContratoObraAutorizacion.aspx.vb @@ -137,11 +137,6 @@ Partial Class Contratos_ContratoObraAutorizacion DDlContratosEstimaciones.DataBind() End Sub - - - - - Protected Sub GetAnexos(sender As Object, e As System.EventArgs) Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) @@ -219,11 +214,8 @@ Partial Class Contratos_ContratoObraAutorizacion If DTEstimaciones.Rows.Count > 0 Then CveEstimacionActual = DTEstimaciones.FiltroPrimeroValor("CveEstimacion", "CveEstimacion > 0").ToString.ToEntero End If - - End If - ObjContratos.Dispose() @@ -263,9 +255,6 @@ Partial Class Contratos_ContratoObraAutorizacion e.Row.CssClass = "SubTotales3" End If - - - End If If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero > 0 Then @@ -638,7 +627,6 @@ Partial Class Contratos_ContratoObraAutorizacion Dim ErrorProceso As Boolean = True - Dim ObjContrato As New ClsContratos If ObjContrato.RemoveContratosAvance(CveContratoAvance, UsuarioActual.CveEmpresa) Then @@ -650,7 +638,7 @@ Partial Class Contratos_ContratoObraAutorizacion If Not ErrorProceso Then CargaAvancesParaEstimar() - Alert("Avance elimiando correctamente.") + Alert("Avance eliminado correctamente.") End If diff --git a/Empresas/146/Formatos/Cotizacion.rdlc b/Empresas/146/Formatos/Cotizacion.rdlc index 83c342287..309844edc 100644 --- a/Empresas/146/Formatos/Cotizacion.rdlc +++ b/Empresas/146/Formatos/Cotizacion.rdlc @@ -1245,25 +1245,7 @@ 2pt - - - Embedded - VISTAPREVIA22 - FitProportional - 0.01389in - 7.40306in - 6.34944in - 0.09753in - 20 - - =IIf(Parameters!CveVenta.Value > 0, True,False) - - - - - + 6.36333in