diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index ccbbfd441..e905fcd03 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -468,7 +468,9 @@ Public Class ClsContPAQi StrSQL.Append(" EjercicioAsignado, PeriodoAsignado, IETUDeducible, IETUModificado,IETUAcreditable, IdConceptoIETU,UUID)") StrSQL.Append(" VALUES (@IdDevIVA, @RowVersion, @IdPoliza, @IdCuenta, ISNULL ((SELECT MAX (NumDev) FROM DevolucionesIVA WHERE IdPoliza = @IdPoliza), 0) + 1, @IdProveedor, @PorIVA, @SubTotal + @IVA, @SubTotal, @IVA, CASE WHEN @IVA > 0 THEN 1 ELSE 0 END, CASE WHEN @IVA = 0 THEN 1 ELSE 0 END,") StrSQL.Append(" 0, @Serie, @Folio, @Referencia, 0, 0, @SubTotal + @IVA, @RetIVA, @RetISR, @SubTotal + @IVA - @RetIVA - @RetISR,") - StrSQL.Append(" YEAR(@FechaMov), MONTH(@FechaMov),@SubTotal, 0,0,1,@UUID);") + StrSQL.Append(" YEAR(@FechaMov), MONTH(@FechaMov),@SubTotal, 0,0,1,@UUID); ") + + StrSQL.Append(" EXEC PA_UpdateId 'Id_DevolucionIVA'; ") StrSQL.Append(" END TRY") @@ -582,7 +584,7 @@ Public Class ClsContPAQi VALUES (@IdMovDev, @RowVersion, @IdPoliza, ISNULL ((SELECT MAX (NumMovto) FROM MovimientosImpuestos WHERE IdPoliza = @IdPoliza), 0) + 1, @IdPersona, 0,YEAR(@FechaMov), MONTH(@FechaMov), @IdCuenta, 0, 1, 0, @Serie, @Folio, @Referencia, @UUID, 2, 0, 1, @TipoMovimiento, 1, @Impuesto, 2,'', @TasaOCuota, @SubTotal, - @ImpImpuesto, @ImpImpuesto,0, @IVANoAcred, 0, 0, 0, 0, 0, @GuidMov, @GuidMovPadre, 0, + @ImpImpuesto, (@ImpImpuesto + @SubTotal),0, @IVANoAcred, 0, 0, 0, 0, 0, @GuidMov, @GuidMovPadre, 0, @ConceptoIVA, @SubconceptoIVA, 0, @ProporcionDIOT, @DeducibleDIOT); EXEC PA_UpdateId 'Id_MovimientoImpuesto'; diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 8f709f32e..944f482ba 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5867,7 +5867,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer) As Boolean + Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer, PorcentajeImpuesto As Decimal, CveColectiva As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasGlobalesAdd") @@ -5877,6 +5877,8 @@ Public Class ClsContabilidad .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@TipoGlobal", SqlDbType.Int).Value = TipoGlobal .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva End With Try diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index e70e86699..0b28c1fba 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -94,6 +94,8 @@ Public Class ClsInventarios Public Property CveOrdenCompra As Integer Public Property CveOrdenCompraLiga As Integer Public Property FolioOC As String + Public Property DescripcionOC As String + Public Property CvePS As Integer Public Property CveEntregaForanea As Integer Public Property CvePaqueteriaGuia As Integer @@ -852,6 +854,7 @@ Public Class ClsInventarios CveOrdenCompra = dr("CveOrdenCompra").ToString.ToEntero CveOrdenCompraLiga = dr("CveOrdenCompraLiga").ToString.ToEntero FolioOC = dr("FolioOC").ToString + DescripcionOC = dr("DescripcionOC").ToString FolioInterno = dr("VentaAnticipo").ToString CveCliente = If(dr("CveCliente").ToString.ToEntero > 0, dr("CveCliente").ToString.ToEntero, -1) CveClienteSucursal = If(dr("CveClienteSucursal").ToString.ToEntero > 0, dr("CveClienteSucursal").ToString.ToEntero, -1) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 3a7756ca7..833a4b715 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1785,7 +1785,7 @@ Public Class ClsNominas #End Region #Region "ClsNominasSaatConceptos" - Public Function GetConceptos() As Boolean + Public Function GetConceptoSAT() As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Nom_Sat_ConceptosGet") @@ -3468,6 +3468,28 @@ Public Class ClsNominas End Try Return retorno End Function + + + Public Function GetFonacotSaldos(CveEmpresa As Integer, CvePersonal As Integer, CveFonacot As Integer) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GetFonacotSaldos", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@CveFonacot", SqlDbType.Int).Value = CveFonacot + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener los saldos Fonacot.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener los saldos Fonacot.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + 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 Date, estatus As Boolean, CveCuenta As Integer, Optional CveIE As Integer = -1, Optional EsAcumulado As Integer = 0) As Integer Dim retorno As Integer = 0 DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 262651cb4..0bc7b8015 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -918,7 +918,7 @@ Public Class ClsPaginas Dim AppNombre As String = "GlobalDTNomSatConceptos" If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Using ObjNom As New ClsNominas() - If ObjNom.GetConceptos() Then Application(AppNombre) = ObjNom.DtResultados + If ObjNom.GetConceptoSAT() Then Application(AppNombre) = ObjNom.DtResultados End Using End If GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) @@ -8326,7 +8326,7 @@ Public Class ClsPaginas End Function #End Region #Region "PDF NOMINA" - Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte() + Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String) As Byte() Dim Retorno As Byte() = Nothing Using ObjNomina As New ClsNominas Using ObjPersonal As New ClsRH @@ -8344,7 +8344,7 @@ Public Class ClsPaginas Dim DTDeducciones As Data.DataTable Dim DTDeducciones2 As New Data.DataTable Dim Ruta As String = UsuarioActual.Empresa.Ruta - Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }{If(indemnizacion, "F", "")}-{ObjNomina.Folio}.xml" + Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }-{ObjNomina.Folio}.xml" Dim FechaEmision, FechaCertificacion As DateTime Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String FolioFiscal = "" @@ -8468,12 +8468,12 @@ Public Class ClsPaginas Dim ajusteindemnizacion As Double = 0 'PERCECIONES - DEDUCCIONES If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then - Dim filtrop As String = " AND CveSistema NOT IN(10,11,32)" - Dim friltrod As String = " AND CveSistema <>47" - If indemnizacion Then - filtrop = "AND CveSistema IN(10,11,32)" - friltrod = " AND CveSistema =47" - End If + Dim filtrop As String = "" '" AND CveSistema NOT IN(10,11,32)" + Dim friltrod As String = "" '" AND CveSistema <>47" + 'If indemnizacion Then + ' filtrop = "AND CveSistema IN(10,11,32)" + ' friltrod = " AND CveSistema =47" + 'End If DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND ((Importe <>0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1)) {filtrop}") DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND ((Importe >0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1) ) {friltrod}") DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND (( Importe >0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1) ){friltrod}") @@ -8535,7 +8535,7 @@ Public Class ClsPaginas RptParametro.Add(New ReportParameter("Cantidad", "1")) RptParametro.Add(New ReportParameter("Unidad", "ACT")) RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA")) - RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString())) + RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString())) RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDecimal.Texto2Letras)) RptParametro.Add(New ReportParameter("Clave", "84111505")) cQr = GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 42765c4be..e7aa74343 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -3924,6 +3924,7 @@ Namespace Modelos DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) If DT.Rows.Count > 0 Then + Dim CondicionesPago As Integer = If(ObjFactura.CondicionesPago = 0, 2, ObjFactura.CondicionesPago) 'Se agrega movimiento separado por la cuenta de ventas (ER) For Each Row2 As DataRow In DT.Rows importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador) @@ -3934,7 +3935,7 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas If importeMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal, CveColectiva:=CondicionesPago) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -4334,7 +4335,7 @@ Namespace Modelos Next End If - If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2) Then + If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2) Then If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre = 2 Then ErrorList.Add(ObjConta.MensajePolizaDescuadre) @@ -5805,7 +5806,7 @@ Namespace Modelos End If 'CUANDO SE CANCELA, Y TIENE RELACIONADA UNA REMISIÓN, Y ESTA NO SE CANCELARÁ. DEBE DE HACER EN AUTOMÁTICO LOS MOVIMIENTOS AL ALMACEN DE ENTREGA POR ADELANTADO - Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count)) + Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (ListaRemisionesCancelar IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count)) 'REMISION YA SE DEBE HACER POR EL PROCESO DE DEVOLUCION DE ALMACEN If Not EsRefacturacion AndAlso (ObjFactura.SaldoAlmacen <> 0 AndAlso ObjFactura.EsDevolucionVenta.Contiene(0, 1)) AndAlso Not (RealizarDevolucionAlmacen.Contiene(1, 2)) And RevivirRemisiones = False Then diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index cd5dbd416..82fe0d488 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1362,6 +1362,8 @@ Partial Class Compras_Compras Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + + If Not IsPostBack Then 'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip") 'ImgBtnBuscarOC.Attributes.Add("data-placement", "top") @@ -4517,7 +4519,7 @@ Partial Class Compras_Compras Exit Sub End If - If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 Then + If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 AndAlso LblSaldoFactura.Text.ToDecimal > 0 And CveFactura <> 1187114 Then Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -17609,10 +17611,15 @@ Partial Class Compras_Compras If TxtDescuento.Text.ToDouble > 0 Then TrDescuento.Visible = True If ActualizaTotales And (UsuarioActual.CveEmpresa = 72 Or Not CveCompraFactura > 0) Then - TxtTotal.Text = Total.ToString.FormatoNumero() - If CveCompra > 0 AndAlso CveCompraFactura = 0 Then + + If Not (CveFactura > 0 And CveCompra <= 0) Then + TxtTotal.Text = Total.ToString.FormatoNumero() + ElseIf CveCompra > 0 AndAlso CveCompraFactura = 0 Then 'Compra manual que ya estaba registrada + TxtTotal.Text = Total.ToString.FormatoNumero() TxtIVA.Text = IVA.ToString.FormatoNumero() End If + + End If Else diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 0bf6594b8..c6e5e4842 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -238,7 +238,7 @@ Partial Class PopUpVerFactura Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1 - GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion) + GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa) End If If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then imprimirpallet2(Request("CvePallet").ToString.ToEntero()) @@ -2890,6 +2890,7 @@ Partial Class PopUpVerFactura Dim CvePrePoliza As Integer = ObjInventarios.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero Dim DireccionCliente As String = ObjInventarios.DtResultados.FiltroPrimeroValor("DireccionCliente") + Dim Ruta As String = "" Dim Supervisor As String = "" @@ -2913,6 +2914,8 @@ Partial Class PopUpVerFactura Dim CveMoneda As Integer = ObjInventarios.CveMoneda Dim FolioVenta As String = ObjInventarios.FolioVenta Dim FolioOC As String = ObjInventarios.FolioOC + Dim DescripcionOC As String = ObjInventarios.DescripcionOC + Dim FolioInterno As String = ObjInventarios.FolioInterno Dim CveCliente As Integer = ObjInventarios.CveCliente @@ -3093,7 +3096,7 @@ Partial Class PopUpVerFactura PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego, CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo, - Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola, DireccionCliente:=DireccionCliente) + Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola, DireccionCliente:=DireccionCliente, DescripcionOC:=DescripcionOC) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -3112,7 +3115,8 @@ Partial Class PopUpVerFactura EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "", - Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1", Optional DireccionCliente As String = "") + Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1", Optional DireccionCliente As String = "", + Optional DescripcionOC As String = "") Select Case CveConcepto @@ -3161,7 +3165,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa.Contiene(4, 145) Then params.Add(New ReportParameter("FacturadoA", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If - If UsuarioActual.CveEmpresa.Contiene(119, 199, 201) Then + If UsuarioActual.CveEmpresa.Contiene(119, 199, 201, 13) Then params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("RazonSocialOC", RazonSocialOC)) @@ -3174,12 +3178,16 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreProveedor", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If + If UsuarioActual.CveEmpresa.Contiene(13) Then + params.Add(New ReportParameter("DescripcionOC", DescripcionOC)) + End If + Dim ConceptoFormato As String = "ENTRADA DE ALMACÉN" If CveConcepto = 32 Then ConceptoFormato = "ENTRADA POR AJUSTE" If CveConcepto = 33 Then ConceptoFormato = "ENTRADA MANUAL" 'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH - If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189, 199, 201) Then + If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189, 199, 201, 13) Then params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 6e09a63bc..0299d8c07 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -258,6 +258,38 @@ + + + + +
+ +
+ + + + <%----%> +
+
+ <%--
+ + +
+ + + +
+ + +
+ +
+ +
--%> +
+
+ + diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 7edaa79fb..c193f5885 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -330,13 +330,63 @@ Partial Class Compras_ReembolsosComprobaciones End Sub Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged + Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) + If dr IsNot Nothing Then HdnTipoTransaccion.Value = dr("Tipo").ToString End If CargaCuentas() + + CargaCuentasDepositoClientes() + End Sub + Private Sub CargaCuentasDepositoClientes() + + DdlCuentaDeposito.ClearSelection() + DdlCuentaDeposito.SelectedValue = Nothing + DdlCuentaDeposito.Items.Clear() + + trCuentaDeposito.Visible = False + DdlCuentaDeposito.Enabled = False + + + Dim CvePersonal As Integer = DdlPersonal.SelectedValue.ToEntero + + If CvePersonal > 0 Then + + If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then + + trCuentaDeposito.Visible = True + DdlCuentaDeposito.Enabled = True + + Dim Dep As New ClsGenerales + If Dep.GetCuentasDepositos(CvePersonal:=CvePersonal, CveEmpresa:=UsuarioActual.CveEmpresa) Then + + DdlCuentaDeposito.DataSource = Dep.DtResultados + If Dep.DtResultados.Rows.Count > 0 Then + + trCuentaDeposito.Visible = True + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) + + End If + End If + + Dep.Dispose() + DdlCuentaDeposito.DataBind() + + + End If + + End If + + UpCuentaDeposito.Update() + + + End Sub + + Protected Sub DDlCheques_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlCheques.SelectedIndexChanged If DDlCheques.SelectedValue.ToEntero > 0 Then @@ -381,6 +431,16 @@ Partial Class Compras_ReembolsosComprobaciones #Region " BTN GUARDAR " Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click + Dim CvecuentaDeposito As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero > 0, DdlCuentaDeposito.SelectedValue.ToEntero, -1) + If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then + If CvecuentaDeposito <= 0 Then + Alert("Debe de seleccionar una cuenta deposito", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Else + CvecuentaDeposito = -1 + End If + Dim ValFechaDocumento As Boolean = False Dim FoliosFechasValFechaDocumentoAnio As New StringBuilder @@ -408,7 +468,7 @@ Partial Class Compras_ReembolsosComprobaciones Dim MesDocumento As Integer = FechaDocumento.Month If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumentoAnio.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
") + FoliosFechasValFechaDocumentoAnio.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
") ValFechaDocumento = True ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then FoliosFechasValFechaDocumentoMesInferior.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") }
") @@ -534,7 +594,7 @@ Partial Class Compras_ReembolsosComprobaciones If ChkChequeExcedente.Checked Then CvePrePolizaExcedente = ObjMov.AddPrePolizas("Compras/Comprobaciones3", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) + CveIEExcedente = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaExcedente, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False), CveCuentaDeposito:=CvecuentaDeposito) If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal * tipoCambio, If(CveCajaChica > 0, 30, 29), TxtObservaciones.Text, TxtObservaciones.Text, CveIE:=CveIEExcedente, CvePersonal:=CvePersonal, CveCompra:=-1, CveProveedor:=-1, ImporteME:=If(tipoCambio = 1, 0, TxtImporte.Text.ToDecimal)) Then MsgError = "Error al registrar detalle de concepto bancario" End If @@ -549,7 +609,7 @@ Partial Class Compras_ReembolsosComprobaciones End If ElseIf Not ChkReembolsarSinBancos.Checked Then CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones4", 9, TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, CveMoneda, TxtFechaDocumento.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False)) + CveIERegistrado = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDecimal, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePolizaIERegistrado, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked, True, False), CveCuentaDeposito:=CvecuentaDeposito) If CveIERegistrado > 0 Then If filemove <> "" Then @@ -1242,4 +1302,7 @@ Partial Class Compras_ReembolsosComprobaciones Calendario.EndDate = NowADS() End Sub + + + End Class diff --git a/Compras/RepComplementoPago.aspx b/Compras/RepComplementoPago.aspx index 2eeab0a77..121bcdb3d 100644 --- a/Compras/RepComplementoPago.aspx +++ b/Compras/RepComplementoPago.aspx @@ -136,9 +136,9 @@ <%--0--%> - + <%--1--%> - + <%--2--%> @@ -149,7 +149,7 @@ <%--3--%> <%--4--%> - + <%--5--%> <%--6--%> diff --git a/Compras/RepComplementoPago.aspx.vb b/Compras/RepComplementoPago.aspx.vb index cf4bf2ab6..ed3cd252a 100644 --- a/Compras/RepComplementoPago.aspx.vb +++ b/Compras/RepComplementoPago.aspx.vb @@ -105,9 +105,9 @@ Partial Class Compras_RepComplementoPago GvDatos.Columns(2).Visible = ChkFolioFiscal.Checked If ChkFolioFiscal.Checked Then - GvDatos.Columns(0).ItemStyle.Width = 15% + 'GvDatos.Columns(0).ItemStyle.Width = 15% Else - GvDatos.Columns(0).ItemStyle.Width = 30% + 'GvDatos.Columns(0).ItemStyle.Width = 30% End If UpDatos.Update() @@ -240,7 +240,7 @@ Partial Class Compras_RepComplementoPago SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto) - GvDatos.ExportToExcelGembox("RepComplementos_" & NowADS().ToShortDateString, UsuarioActual, "Ordenes de Servicio Medicas", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatos.ExportToExcelGembox("RepComplementos_" & NowADS().ToShortDateString, UsuarioActual, "Reporte de Complementos Pago de Compras", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End Sub Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) diff --git a/Contabilidad/CatCuentasAsignaciones.aspx b/Contabilidad/CatCuentasAsignaciones.aspx index 01910855b..e64e0933e 100644 --- a/Contabilidad/CatCuentasAsignaciones.aspx +++ b/Contabilidad/CatCuentasAsignaciones.aspx @@ -103,7 +103,7 @@
@@ -111,7 +111,7 @@ - + @@ -238,7 +238,7 @@
- +
@@ -261,7 +261,21 @@ - + +
+
+
+ + +
+
+
+
+ + + +
+
+ CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" data-heighterror="460"> <%----%> diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 4d27e3f08..ba4669fca 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -236,6 +236,16 @@ public partial class Nomina_Nomina2 : ClsPaginas set { ViewState["CveTipoTrabajador"] = value; } } + protected int posconceptospersonalizar + { + get + { + if (ViewState["posconceptospersonalizar"] == null) { return 0; } + else { return ViewState["posconceptospersonalizar"].ToString().ToEntero(); } + } + + set { ViewState["posconceptospersonalizar"] = value; } + } protected int CvePeriodoSeleccionado { @@ -440,6 +450,9 @@ public partial class Nomina_Nomina2 : ClsPaginas DdlBanco.DataSource = GlobalDTNomSatBancos; DdlBanco.DataBind(); + + if(UsuarioActual.CveEmpresa == 119) DdlRegimenContratacion.SelectedValue = "1"; + //Permisos if (UsuarioActual.TienePermisoProceso(82)) { @@ -4137,6 +4150,12 @@ public partial class Nomina_Nomina2 : ClsPaginas periodo = 20000101; LimpiarFonacot(); + using (ClsNominas ObjMovt = new ClsNominas()) + { + ObjMovt.GetFonacotSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CveFonacot); + GVFonacotDetalle.DataSource = ObjMovt.DtResultados; + GVFonacotDetalle.DataBind(); + } TxtFonValor.Text = importeFijo.ToString(); TxtFonImporteCredito.Text = importeCredito.ToString(); TxtFonPagosHechos.Text = pagosHechos.ToString(); @@ -4941,12 +4960,13 @@ public partial class Nomina_Nomina2 : ClsPaginas addcoltopersonalizar("Sueldo diario", "0", "", ""); addcoltopersonalizar("Dias Pen Pago", "0", "", ""); - + int pos = 4; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 AND EsFormula =0").Rows) { if (!(dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0)) { addcoltopersonalizar(row["Concepto"].ToString(), "1", string.Format("[V_{0}]", row["CveConcepto"].ToString()), row["Codigo"].ToString()); + pos = pos + 1; } } @@ -4965,7 +4985,7 @@ public partial class Nomina_Nomina2 : ClsPaginas //addcoltopersonalizar("Deducciones", "1", "Deducciones", ""); addcoltopersonalizar("Neto a Pagar", "1", "Total", ""); - + posconceptospersonalizar = pos; //foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 AND EsFormula =0").Rows)//EsFormula =0 //{ @@ -5007,7 +5027,7 @@ public partial class Nomina_Nomina2 : ClsPaginas drorden["Tipo"] = "0"; drorden["ColumnaDB"] = DdlMOPXColumna.SelectedItem.Value; //drorden["TipoDB"] = DdlMOTipo.SelectedItem.Value; - DtNomPersonalizarxls.Rows.Add(drorden); + DtNomPersonalizarxls.Rows.InsertAt(drorden, posconceptospersonalizar); } GvPersonalizarExcel.DataSource = DtNomPersonalizarxls; @@ -5103,7 +5123,7 @@ public partial class Nomina_Nomina2 : ClsPaginas ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70); ClosedXML.Excel.XLColor colororangeblue = ClosedXML.Excel.XLColor.FromArgb(79, 129, 189); ClosedXML.Excel.IXLCell celda; - DataTable dtConceptos = this.dtConceptos.FiltraParametros("(Tipo ='P' AND EsPadre = 1 AND EsFormula =0) OR (Tipo = 'D' AND EsPadre = 1 AND EsFormula =0) OR Tipo = 'O' AND EsPadre = 1 AND EsFormula =0"); + DataTable dtConceptos = this.dtConceptos.FiltraParametros(""); DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable foreach (GridViewRow row in GvPersonalizarExcel.Rows) @@ -5196,7 +5216,7 @@ public partial class Nomina_Nomina2 : ClsPaginas int finPercepciones = iniciotipe; column++; - TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column+2, false, false, PercborderColor); + TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column, false, false, PercborderColor); TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, false, PercborderColor); //column++; //TitleRange(libro, "Permisos", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue); @@ -5353,6 +5373,10 @@ public partial class Nomina_Nomina2 : ClsPaginas column++; libro.Cell(Fila, column).Value = ""; + try{libro.Cell(Fila, column).Value = erow[string.Format("V_{0}", 6817)]; + libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\""; + } + catch (Exception) { } column++; libro.Cell(Fila, column).Value = erow["SalarioDiario"]; @@ -9568,14 +9592,14 @@ public partial class Nomina_Nomina2 : ClsPaginas } } pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); - if (confiniquito) - { - List pdfs = new List(); - pdfs.Add(pdf); - pdfs.Add(GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta, true)); - pdf = MergeFiles(pdfs); + //if (confiniquito) + //{ + // List pdfs = new List(); + // pdfs.Add(pdf); + // pdfs.Add(GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta, true)); + // pdf = MergeFiles(pdfs); - } + //} } else { diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 1d77e1cf1..00b264ed3 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -5133,7 +5133,7 @@
- +
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index dfcb4d6bc..6cc73ef11 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -924,7 +924,7 @@ Partial Class RH_Personal End If LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158)) Using objno As New ClsNominas - objno.GetConceptos() + objno.GetConceptos(UsuarioActual.CveEmpresa) dtNomConceptos = objno.DtResultados objno.GetSubTipoPeriodo(UsuarioActual.CveEmpresa) dtSubTipoPeriodo = objno.DtResultados @@ -3447,7 +3447,6 @@ Partial Class RH_Personal Row("CLABE") = TxtCLABECB.Text.Trim Row("SWIFT") = TxtSWIFT.Text Row("Plaza") = TxtPlaza.Text - Row("Cuenta") = TxtNumeroSucursal.Text Row("CIE") = TxtConvenioCIE.Text Row("Referencia") = TxtReferenciaC.Text Row("RefCrediProveedor") = TxtRefCrediProveedor.Text @@ -8455,13 +8454,13 @@ Partial Class RH_Personal 'End Sub - Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs) + 'Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs) - 'If ChkEstatusPagoE.Checked Then - ' Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia) - 'End If + ' 'If ChkEstatusPagoE.Checked Then + ' ' Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia) + ' 'End If - End Sub + 'End Sub End Class diff --git a/RH/Reclutamiento.aspx.vb b/RH/Reclutamiento.aspx.vb index a0ea99a16..6607d0ff3 100644 --- a/RH/Reclutamiento.aspx.vb +++ b/RH/Reclutamiento.aspx.vb @@ -779,6 +779,7 @@ Partial Class RH_Reclutamiento Try + GlobalDTDIOTTipoOperacion = Nothing Dim dt As DataTable = GlobalDTTipoPeriodo() diff --git a/Transportes/RepContratoDetalle.aspx.vb b/Transportes/RepContratoDetalle.aspx.vb index 272f108ad..43eae8823 100644 --- a/Transportes/RepContratoDetalle.aspx.vb +++ b/Transportes/RepContratoDetalle.aspx.vb @@ -624,24 +624,24 @@ Partial Class RepContratoDetalle End If End If - 'If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then - ' 'CveVentaRemision - ' Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}" + If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then + 'CveVentaRemision + Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}" - ' Dim Respuesta As New RespuestaFacturacion() - ' Dim CvePS As Integer = 907784 - ' Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero) + Dim Respuesta As New RespuestaFacturacion() + Dim CvePS As Integer = 907784 + Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero) - ' If Respuesta.CveVenta > 0 Then - ' CveVentaRemision = Respuesta.CveVenta - ' SerieFolioRemision = Respuesta.SerieFolio - ' ErrorProceso = False - ' SeGeneroRemision = True - ' Else - ' ErrorProceso = True - ' Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia) - ' End If - 'End If + If Respuesta.CveVenta > 0 Then + CveVentaRemision = Respuesta.CveVenta + SerieFolioRemision = Respuesta.SerieFolio + ErrorProceso = False + SeGeneroRemision = True + Else + ErrorProceso = True + Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia) + End If + End If If Not ErrorProceso Then ObjContratos.Commit() diff --git a/Transportes/RepContratos.aspx.vb b/Transportes/RepContratos.aspx.vb index 744f1aa8b..38a8034ba 100644 --- a/Transportes/RepContratos.aspx.vb +++ b/Transportes/RepContratos.aspx.vb @@ -73,9 +73,9 @@ Partial Class ListadoContratos Private Sub CargaDatos() Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, - FechaInicioIngreso:=txtFechaI.Text.ToDate, FechaFinIngreso:=txtFechaF.Text.ToDate) Then - GvContratos.DataSource = ObjContratos.DtResultados + If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) Then + + GvContratos.DataSource = ObjContratos.DtResultados.FiltraParametros($"FechaInicial >= '{txtFechaI.Text.ToDate.ToString("yyyy/MM/dd")}'", "FechaInicial") DtDatos = ObjContratos.DtResultados.Copy End If @@ -165,22 +165,17 @@ Partial Class ListadoContratos Dim tempArray() As String tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) Dim fDestino = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}") - Try If File.Exists(fDestino) Then File.Delete(fDestino) End If - File.Move(fileItem.FileUrl, fDestino) - If Not File.Exists(fDestino) Then ErrorProceso = True End If - If ObjContratos.UpdateContratoArchivo(CveContrato, $"{CveContrato.ToString}.{ FileExtension}", UsuarioActual.CveEmpresa) Then ErrorProceso = False End If - Catch ex As Exception ErrorProceso = True End Try @@ -222,7 +217,6 @@ Partial Class ListadoContratos End If End If - If Not ErrorProceso Then ObjContratos.Commit() @@ -323,7 +317,6 @@ Partial Class ListadoContratos If Not Directory.Exists(folderContratosPath) Then Directory.CreateDirectory(folderContratosPath) End If - If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp")) End If @@ -334,26 +327,20 @@ Partial Class ListadoContratos Session("FileExtension") = FileExtension Dim tempArray() As String tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) - - ViewState("extencion") = FileExtension ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename) - File.Move(fileItem.FileUrl, ViewState("FUrl").ToString) LbArchivo.Text = tempArray(1) - Next UpModal.Update() RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1") - End Sub #End Region #Region "G E N E R A R E M I S O N" - Private Function GeneraRemision(CveContrato As Integer, ObsPartida As String, Importe As Decimal, CvePS As Integer, ByRef TransaccionSQL As SqlClient.SqlTransaction) As RespuestaFacturacion Dim Respuesta As New RespuestaFacturacion() @@ -366,7 +353,6 @@ Partial Class ListadoContratos Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, DdlClientes.SelectedValue.ToEntero, CveMoneda, "Rem") If ObjFactura IsNot Nothing AndAlso ProcesoOK Then - ObjFactura.CveMoneda = CveMoneda ObjFactura.CveContrato = CveContrato ObjFactura.Observaciones = ObsPartida @@ -433,8 +419,6 @@ Partial Class ListadoContratos End Sub End Class - - #End Region Protected Sub LnkAgregarContrato_Click(sender As Object, e As EventArgs) @@ -442,7 +426,4 @@ Partial Class ListadoContratos RegistraScript("$('#ModalAgregar').modal({ backdrop: 'static', keyboard: false });") UpTitulos.Update() End Sub - - - End Class diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index 6bc9d7074..aeccaaf1b 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -731,23 +731,23 @@ - + + + + + + + + + + + + <%----%>
- - - - - - - - - - - - +
@@ -1236,11 +1236,7 @@ setTimeout(() => { // dateAxis.zoomToDates(new Date(anioI, mesI, diaI), new Date(anioF, mesF, diaF)); }, 1500); - } - - - var PrimeraCargaCalendario = true; var currentUpdateEvent; @@ -1257,20 +1253,15 @@ let anio = parseInt($('#<%=HidCurrentYear.ClientID%>').val()); Calendario(mes, anio); - }); } function selectDate(start, end, allDay) { } - function updateEvent(event, element, esCalendario = true) { - - + function updateEvent(event, element, esCalendario = true) { $('#<%=HdnCveContrato.ClientID%>').val(event.id); - $('#BtnCargaContratoCalendario').click(); - - + $('#BtnCargaContratoCalendario').click(); } function formatearFechaISO(fechaISO) { diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index ba4c43fb8..ad0243b62 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -5,6 +5,7 @@ Imports ADSNetLibrary.SIGAPI.Helpers Imports Extensiones.ModExtensiones Imports GemBox.Spreadsheet Imports Microsoft.Reporting.WebForms +Imports Modelos Imports Newtonsoft.Json.Linq Partial Class RepContratosCalendario @@ -301,19 +302,13 @@ Partial Class RepContratosCalendario Dim CvePadre As Integer = -1 For Each dRowUnidad As DataRow In DtUnidades.Rows - - Dim CveActivoFijo As Integer = dRowUnidad("CveActivoFijo").ToString.ToEntero Dim CodigoAF As String = dRowUnidad("Codigo").ToString 'Dim unidad As String = $"{dRowUnidad("Codigo").ToString}-{dRowUnidad("Descripcion").tostring}" - Dim SeEncontro As Boolean = False - Dim EsHijo As Boolean = False For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> '' AND TipoEstatus <> 3").Rows - Dim CveActivoFijoContrato As Integer = Row("CveAF").ToString.ToEntero - 'If CveActivoFijo = CveActivoFijoContrato Then ' str.AppendLine(String.Format("{0}", separator)) ' SeEncontro = True @@ -325,9 +320,6 @@ Partial Class RepContratosCalendario ' separator = "," ' encontrados = encontrados + 1 'End If - - - If CveActivoFijo = CveActivoFijoContrato Then str.AppendLine(String.Format("{0}", separator)) SeEncontro = True @@ -343,18 +335,15 @@ Partial Class RepContratosCalendario separator, Row("CveContrato").ToString, Row("NumeroContrato").ToString().Replace("\\", "\\\\").Replace("""", "\"""), Row("FechaInicial"), Row("FechaFinal"), 0, 100, unidad, duracion, ColorAleatorio(randomNumber), Row("CodigoAF").ToString, Row("CveContrato").ToString) ) End If - If Not EsHijo Then CvePadre = Row("CveContrato").ToString.ToEntero EsHijo = True End If - separator = "," encontrados = encontrados + 1 Else EsHijo = False End If - Next If Not SeEncontro Then @@ -365,18 +354,11 @@ Partial Class RepContratosCalendario str.AppendLine(String.Format("{{id: {1}, text: ""{2}"", start_date: ""{3}"", end_date: ""{4}"", parent: {5}, progress:{6}, open: true, unidad: ""{7}"",duracion: ""{8}"", color: ""{9}"",codigoaf: ""{10}"", hidden: true}} ", "", CveActivoFijo, -1, txtFechaF.Text.ToDate.ToString("yyyy/MM/dd HH:mm"), txtFechaF.Text.ToDate.ToString("yyyy/MM/dd HH:mm"), 0, 100, "", "", ColorAleatorio(randomNumber), CodigoAF)) separator = "," - End If - 'str.AppendLine(String.Format("}")) - Next - End If - - - str.AppendLine("];loadGant();") RegistraScript(str.ToString()) @@ -389,7 +371,6 @@ Partial Class RepContratosCalendario Private Function ColorAleatorio(randomNumber As Random) As String Dim listaColores As New List(Of String) - listaColores.Add("#94f35a") listaColores.Add("#1989a9") listaColores.Add("#5a3c98") @@ -436,10 +417,7 @@ Partial Class RepContratosCalendario listaColores.Add("#058106") listaColores.Add("#0485f2") listaColores.Add("#401685") - - Dim ranNumber As Integer = randomNumber.Next(0, listaColores.Count - 1) - Return listaColores(ranNumber) End Function @@ -591,8 +569,6 @@ Partial Class RepContratosCalendario DdlTipoAF.SelectedValueExist(DRow("CveTipoAF").ToString) DdlTipoAF_SelectedIndexChanged(Nothing, Nothing) - - If DRow("CveAF").ToString.ToEntero > 0 Then Dim ExisteItem As Boolean = False For Each item As ListItem In DdlAF.Items @@ -607,10 +583,7 @@ Partial Class RepContratosCalendario DdlAF.Items.Add(New ListItem(TmpItemText, $"{DRow("CveAF").ToString}")) End If End If - - DdlAF.SelectedValueExist(DRow("CveAF").ToString) - HidCveAF.Value = "-1" HidCveAFDes.Value = "" If DRow("CveAF").ToString.ToEntero > 0 Then @@ -619,10 +592,9 @@ Partial Class RepContratosCalendario End If TxtMotivoCambioUnidad.Text = "" DVMotivoCambioAF.Visible = False - - HypRemision.Text = DRow("RemisionSerieFolio").ToString HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={DRow("CveVentaRemision").ToString}" + HdnCveVentaRemision.Value = DRow("CveVentaRemision").ToString If DRow("RemisionSaldo").ToString.ToDecimal > 0 Then LblSaldo.Text = $"Saldo {DRow("RemisionSaldo").ToString.ToDecimal.ToString("###,###,###.00")}" @@ -642,15 +614,8 @@ Partial Class RepContratosCalendario Else Alert("Contrato no especificado", TipoMensaje.MsgAdvertencia) End If - - - - - - End Sub - Protected Sub UpdateContrato(sender As Object, e As EventArgs) Dim TieneError As Boolean = False Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1) @@ -662,6 +627,7 @@ Partial Class RepContratosCalendario Dim ObjContratos As New ClsContratos Dim objGenerales As New ClsGenerales(ObjContratos.IniciaTransacSQL()) + Dim ObjVentas As New ClsVentas(ObjContratos.IniciaTransacSQL()) Dim DTAgendadados As New DataTable If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then @@ -691,8 +657,22 @@ Partial Class RepContratosCalendario -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then - RegistraScript("$('#ModalActualizar').modal('hide');") - Alert("Actualizado Correctamente.") + + 'cancelar la venta. + If DdlEstatusContrato.SelectedValue = "52" Then 'cancelación de Fact/Rem + Dim CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC + Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing + Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, HdnCveVentaRemision.Value.ToEntero, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True) + If ObjFacturaCancelacion IsNot Nothing AndAlso ObjFacturaCancelacion.CveVenta > 0 Then + resp = ObjFacturaCancelacion.CancelarFactura(0, CancelacionPagos:=CancelacionPagos, ValidarSAT:=False) + If resp.HuboError Then + TieneError = True + Else + RegistraScript("$('#ModalActualizar').modal('hide');") + Alert("Actualizado Correctamente.") + End If + End If + End If Else TieneError = True End If @@ -702,10 +682,9 @@ Partial Class RepContratosCalendario Else ObjContratos.Commit() End If - ObjContratos.Dispose() objGenerales.Dispose() - + ObjVentas.Dispose() UpTitulos.Update() CargaDatos() InicializaCalendar() @@ -726,20 +705,17 @@ Partial Class RepContratosCalendario TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss") TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ") TxtMoneda.Text = GvRow.DataKey("Moneda") - TxtAnticipo.Text = GvRow.DataKey("ImporteMin") TxtDolares.Text = GvRow.DataKey("Importe") 'Requeridos - DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer")) DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2")) chkSegundoChofer.Checked = If(NumChoferes = 2, True, False) - DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus")) DdlSubProyectoModal.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) - DdlTipoAF.SelectedValueExist(GvRow.DataKey("CveTipoAF")) DdlTipoAF_SelectedIndexChanged(Nothing, Nothing) + HdnCveVentaRemision.Value = GvRow.DataKey("CveVentaRemision") If GvRow.DataKey("CveAF").ToEntero > 0 Then Dim ExisteItem As Boolean = False @@ -749,7 +725,6 @@ Partial Class RepContratosCalendario Exit For End If Next - If Not ExisteItem Then Dim TmpItemText As String = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CodDesc", $" EstadoActivoFijo= 'Activo' AND CveActivoFijo = {GvRow.DataKey("CveAF")}") DdlAF.Items.Add(New ListItem(TmpItemText, $"{GvRow.DataKey("CveAF")}")) @@ -757,7 +732,6 @@ Partial Class RepContratosCalendario End If DdlAF.SelectedValueExist(GvRow.DataKey("CveAF")) - HidCveAF.Value = "-1" HidCveAFDes.Value = "" If GvRow.DataKey("CveAF").ToEntero > 0 Then @@ -766,17 +740,13 @@ Partial Class RepContratosCalendario End If TxtMotivoCambioUnidad.Text = "" DVMotivoCambioAF.Visible = False - - HypRemision.Text = GvRow.DataKey("RemisionSerieFolio") HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={GvRow.DataKey("CveVentaRemision")}" - If GvRow.DataKey("RemisionSaldo").ToDecimal > 0 Then LblSaldo.Text = $"Saldo {GvRow.DataKey("RemisionSaldo").ToDecimal.ToString("###,###,###.00")}" Else LblSaldo.Text = "" End If - CveContrato = GvRow.DataKey("CveContrato").ToEntero OcultarMostrarSegundoChofer() @@ -790,19 +760,17 @@ Partial Class RepContratosCalendario If HidModClienteNombre.Value = "" Then HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial") End If - TxtMotivoCambioUnidad.Text = "" DVMotivoCambioAF.Visible = False DdlClientes.SelectedText = HidModClienteNombre.Value DdlClientes.SelectedValue = HidModCveCliente.Value DdlClientes.txtText.Value = HidModClienteNombre.Value DdlClientes.txtValue.Value = HidModCveCliente.Value - chkSegundoChofer.Checked = If(HidNumChoferes.Value.ToEntero = 2, True, False) OcultarMostrarSegundoChofer() HypRemision.Text = HidRemisionSerieFolio.Value - HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HidCveVentaRemision.Value}" + HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HdnCveVentaRemision.Value}" If HidRemisionSaldo.Value.ToDecimal > 0 Then LblSaldo.Text = $"Saldo {HidRemisionSaldo.Value.ToDecimal.ToString("###,###,###.00")}" Else @@ -884,11 +852,9 @@ Partial Class RepContratosCalendario Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click Dim SubProyecto As String = DdlSubProyectos.SelectedItem.Text - Dim SbFiltros As New StringBuilder() SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|") SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto) - GvContratos.ExportToExcelGembox($"Reporte_Contratos_{NowADS.ToString("yyyyMMddHHmmss")}", UsuarioActual, "Reporte Contratos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End Sub @@ -960,6 +926,4 @@ Partial Class RepContratosCalendario CargaCronograma(DdlTipoVistaCalendario.SelectedValue.ToEntero) End Sub - - End Class diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 216ca1ed8..f3935ceec 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -815,11 +815,20 @@ Partial Class Ventas_ClientesAbonar If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}") + Dim tCveMonedaIE As Integer = DtSaldo.FiltroPrimeroValor("CveMoneda", "").ToEntero Dim ImporteAbonar As Decimal = 0 - + Dim TC As Decimal = 1 + 'comparativo. For Each gvr As GridViewRow In GvCxC.Rows If gvr.FCCheckBox("Chk").Checked Then - ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal() + Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero + If CveMonedaVenta = CveMonedaPago Then + ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal() + ElseIf CveMonedaVenta = 2 And CveMonedaPago = 1 Then + ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TxtTC.Text.ToDecimal) + ElseIf CveMonedaVenta = 1 And CveMonedaPago = 2 Then + ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() / TxtTC.Text.ToDecimal) + End If End If Next ImporteAbonar += TxtAnticipo.Text.ToDecimal() @@ -939,10 +948,19 @@ Partial Class Ventas_ClientesAbonar End If Else If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc + CveIE = DdlIngreso.SelectedValue.ToEntero - If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2 - If ChkPagarDolares.Checked Then CveMoneda = 2 - If ChkPagarPesos.Checked Then CveMoneda = 1 + + If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then + CveMoneda = ObjIE.CveMoneda + Else + MsgError = "Error al obtener la moneda de ingreso por comprobar" + End If + + 'If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2 + 'If ChkPagarDolares.Checked Then CveMoneda = 2 + 'If ChkPagarPesos.Checked Then CveMoneda = 1 + End If End If @@ -1067,10 +1085,12 @@ Partial Class Ventas_ClientesAbonar Pago.FechaDocumentoRelacionado = FechaIngreso Pago.CveClientePago = CveCliente End If - 'Tipos de cambio If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos Pago.TCPago = TxtTC.Text.ToDecimal + Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal + 'Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal + 'ImportePagadoVenta = (ImportePagadoVenta / TxtTipoCambio.Text.ToDecimal).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index f1a0e6c53..4e80b42c6 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16054,6 +16054,7 @@ Partial Class Ventas Dim ConceptoContableAplicar As Integer = 4 Dim CveVentaAplicar As Integer = ObjFactura.CveVenta Dim CveVentaAmortizacionAplicar As Integer = -1 + Dim CondicionesPago As Integer = RBLPago.SelectedValue.ToEntero If ObjFactura.TipoDocto.Contiene("Egs") And DdlTipoComprobante.SelectedValue = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then ConceptoContableAplicar = 11 @@ -16102,7 +16103,7 @@ Partial Class Ventas Next End If End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal, CveColectiva:=CondicionesPago) Then ErrorPrepoliza = True Else ViewState("SeGuardoPrePoliza") = True diff --git a/asmx/WS_PuntoVenta.asmx b/asmx/WS_PuntoVenta.asmx index 9cb46d77c..9b420eaeb 100644 --- a/asmx/WS_PuntoVenta.asmx +++ b/asmx/WS_PuntoVenta.asmx @@ -1397,7 +1397,7 @@ Public Class WS_PuntoVenta Dim objInventario As New ClsInventarios Dim Respuesta As New RespuestaWS - If objInventario.GetConceptos() Then + If objInventario.GetConceptoSAT() Then Respuesta.Datos = objInventario.DtResultados '.FiltraParametros(String.Format("CveVendedor={0}", CveEmpresa)) Respuesta.Datos.TableName = "Inv_Conceptos" Respuesta.HuboError = False