diff --git a/.gitignore b/.gitignore index 609c288bd..9f8cee2fb 100644 --- a/.gitignore +++ b/.gitignore @@ -274,3 +274,4 @@ __pycache__/ /App_WebReferences/WSRDLC /wwwSIGGIT.rar /Front +/Bin.rar diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 80b8e3306..69f64de00 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2728,7 +2728,7 @@ Public Class ClsGenerales #Region "P A Q U E T E R I A S G U I A S" Public Function AddPaqueteriasGuias(CvePaqueteria As Integer, CvePaqueteriaGuiaTipo As Integer, CveEstatus As Integer, CveSubProyecto As Integer, Fecha As String, Rastreo As String, Guia As String, NumCajas As Integer, Peso As Double, Dimensiones As String, FechaEstimada As String, Observaciones As String, CveUsuario As Integer, CveEmpresa As Integer, Optional ImplicaCosto As Boolean = True, - Optional EsEntregaInterna As Boolean = False) As Integer + Optional EsEntregaInterna As Boolean = False, Optional PolizaSeguro As String = "-1") As Integer Dim Retorno As Integer = -1 @@ -2755,6 +2755,7 @@ Public Class ClsGenerales .Add("@CvePaqueteriaGuiaTipo", SqlDbType.SmallInt).Value = CvePaqueteriaGuiaTipo .Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna + .Add("@PolizaSeguro", SqlDbType.NVarChar).Value = PolizaSeguro .Add("@CvePaqueteriaGuia", SqlDbType.Int).Direction = ParameterDirection.Output diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1e93bc42a..12d2a0ae5 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4851,7 +4851,6 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/CatImpuestosLocales.aspx".ToUpper(), 394) PaginaDict.Add("/Ventas/ActualizarPrecios.aspx".ToUpper(), 397) PaginaDict.Add("/Ventas/ClientesAbonar.aspx".ToUpper(), 321) - PaginaDict.Add("/Ventas/Reportes.aspx".ToUpper(), 567) PaginaDict.Add("/Ventas/DiseñadorReportes.aspx".ToUpper(), 569) PaginaDict.Add("/Ventas/ReporteDetalle.aspx".ToUpper(), 576) PaginaDict.Add("/Ventas/PopUpBuscarPs.aspx".ToUpper(), 13) @@ -4912,7 +4911,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721) PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723) - PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 704) + PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567) #End Region diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e3592c397..0ca3ae809 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -460,8 +460,7 @@ Public Class ClsVentas Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveVendedor As Integer = -1, Optional ObsAlm As String = "", Optional FormaPaqueteria As Integer = -1, - Optional CorreoNot As String = "-1") As Boolean + Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -492,10 +491,6 @@ Public Class ClsVentas .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje - .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor - .Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObsAlm - .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria - .Add("@CorreoNotificacion", SqlDbType.NVarChar).Value = CorreoNot End With Try @@ -507,6 +502,32 @@ Public Class ClsVentas Return Retorno End Function + + Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String, + Pedido As String, OrdenCompra As String, FechaPago As String) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasObservacionesUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones + .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria + .Add("@CorreoNotificaciones", SqlDbType.NVarChar).Value = CorreoNotificaciones + .Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObservacionesAlm + .Add("@Pedido", SqlDbType.NVarChar).Value = Pedido + .Add("@OrdenCompra", SqlDbType.NVarChar).Value = OrdenCompra + .Add("@FechaPago", SqlDbType.Date).Value = FechaPago + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateFechaVencimientoVenta(CveVenta As Integer, FechaVencimiento As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasFechaVencimientoUpdate") @@ -1598,7 +1619,8 @@ Public Class ClsVentas End Function Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1, - Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean + Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, + Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepPSEconoGet") @@ -1613,6 +1635,9 @@ Public Class ClsVentas .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + .Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion + .Add("@Linea", SqlDbType.VarChar).Value = Linea + .Add("@Marca", SqlDbType.VarChar).Value = Marca End With Try diff --git a/App_WebReferences/RCGPSService/configuration91.svcinfo b/App_WebReferences/RCGPSService/configuration91.svcinfo index 74eb6fcf0..60a186b35 100644 --- a/App_WebReferences/RCGPSService/configuration91.svcinfo +++ b/App_WebReferences/RCGPSService/configuration91.svcinfo @@ -1,5 +1,5 @@ - + diff --git a/App_WebReferences/WSPenske/ReceiveGPSInfo.wsdl b/App_WebReferences/WSPenske/ReceiveGPSInfo.wsdl index b2c6f6577..73cde7e36 100644 --- a/App_WebReferences/WSPenske/ReceiveGPSInfo.wsdl +++ b/App_WebReferences/WSPenske/ReceiveGPSInfo.wsdl @@ -83,6 +83,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,6 +129,12 @@ + + + + + + @@ -116,6 +148,10 @@ + + + + @@ -146,6 +182,15 @@ + + + + + + + + + @@ -176,6 +221,15 @@ + + + + + + + + + diff --git a/App_WebReferences/WSRVConsultas/configuration91.svcinfo b/App_WebReferences/WSRVConsultas/configuration91.svcinfo index 95fb42f85..4f5b80053 100644 --- a/App_WebReferences/WSRVConsultas/configuration91.svcinfo +++ b/App_WebReferences/WSRVConsultas/configuration91.svcinfo @@ -1,5 +1,5 @@ - + diff --git a/App_WebReferences/WSRVConsultas/service1.wsdl b/App_WebReferences/WSRVConsultas/service1.wsdl index b7b24ac5b..acaf74ae5 100644 --- a/App_WebReferences/WSRVConsultas/service1.wsdl +++ b/App_WebReferences/WSRVConsultas/service1.wsdl @@ -153,6 +153,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -242,6 +279,12 @@ + + + + + + @@ -290,6 +333,11 @@ + + Consultar un CFDI directamente por UUID y Fecha + + + Consultar los CFDIs emitidos por rango de fecha @@ -366,6 +414,15 @@ + + + + + + + + + @@ -450,6 +507,15 @@ + + + + + + + + + diff --git a/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd b/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd index 3794d9bb1..1e54f4ce6 100644 --- a/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd +++ b/App_WebReferences/wsValidaCFDi2/ConsultaCFDIService.xsd @@ -3,7 +3,9 @@ + + diff --git a/App_WebReferences/wsValidaCFDi2/configuration91.svcinfo b/App_WebReferences/wsValidaCFDi2/configuration91.svcinfo index 03e1cea96..cf557a755 100644 --- a/App_WebReferences/wsValidaCFDi2/configuration91.svcinfo +++ b/App_WebReferences/wsValidaCFDi2/configuration91.svcinfo @@ -1,5 +1,5 @@ - + diff --git a/Bancos/RepEgresosSinComprobante.aspx b/Bancos/RepEgresosSinComprobante.aspx index f410feabd..62858d31e 100644 --- a/Bancos/RepEgresosSinComprobante.aspx +++ b/Bancos/RepEgresosSinComprobante.aspx @@ -157,7 +157,7 @@ - + @@ -219,7 +219,7 @@ - diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index 9cbb22665..6b0c8d62e 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -248,7 +248,7 @@ Partial Class Bancos_RepEgresosSinComprobante End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero, - ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveCuenta:=CveCuenta) Then + ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, CveCuenta:=CveCuenta) Then MsgError = "Ocurrio un error al saldar el movimiento" Exit For End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index a28d0e56b..62d1d7386 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2835,8 +2835,8 @@ Partial Class Compras_Compras GvAnticiposSel.DataBind() - '' VALIDA ELIMINAR COMPRA - If UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135) Then ' Eliminar compra + '' VALIDA ELIMINAR COMPRA, QUE NO TENGA PAGOS CONCILIADOS + If (UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135)) AndAlso dr("NumPagosConciliados").ToString.ToEntero = 0 Then ' Eliminar compra 'SIN VINCULACIÓN If UsuarioActual.TienePermisoProceso(135) Then @@ -6347,7 +6347,6 @@ Partial Class Compras_Compras Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" - Dim Insertado205 As Boolean = False If RBLPago.SelectedValue.ToEntero = 4 Then @@ -6392,15 +6391,42 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"}) 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN - For Each Dr As DataRow In DT.Rows - If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then - Dr("CveAlmacen") = 0 - End If - Dr.AcceptChanges() - Next + 'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO + If DdlTipoCompra.SelectedValue <> "10" Then + For Each Dr As DataRow In DT.Rows + If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then + Dr("CveAlmacen") = 0 + End If + Dr.AcceptChanges() + Next + End If DT.AcceptChanges() DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0") If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then + + 'SI ES GASTO CON ALMACEN + If DdlTipoCompra.SelectedValue = "10" Then + For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen", "CveClasificacion", "CveSubProyecto"}).Rows + + 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"), $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal + importeMN = importeMovimiento * tipoCambioActual * Multiplicador + + If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero + End If + End If + + If importeMN <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, + CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True + End If + End If + Next + End If + For Each Row2 As DataRow In DT.Rows 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"), $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal @@ -6418,15 +6444,16 @@ Partial Class Compras_Compras idCuentaContabilizacion = 0 End If - 'SI ES GASTO DE ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68 - If DdlTipoCompra.SelectedValue = "10" Then - SeContabiliza = False - IdCtaContable = 0 - CveCuenta = 0 + 'SI ES GASTO CON ALMACEN NO DEBE CONTABILIZAR CONCEPTO 68 + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=If(DdlTipoCompra.SelectedValue = "10", False, SeContabiliza)) Then + ErrorPrepoliza = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 68, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ErrorPrepoliza = True + 'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95 + If DdlTipoCompra.SelectedValue = "10" Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=False) Then + ErrorPrepoliza = True + End If End If ' si agrego en almacen, ya no se ocupa algun concepto puente AgregaMercanciaInventario = False @@ -6462,7 +6489,15 @@ Partial Class Compras_Compras End If Dim UsaComplementariaFleteImportaciones As Boolean = False + 'DEBE METER EL CONCEPTO DE COMPRAS SI EL TIPO ES GASTO CON ALMACEN + If DdlTipoCompra.SelectedValue = "10" Then + ConceptoContabilizacion = 6 + End If + Select Case ConceptoContabilizacion + Case 6 + importeMovimiento = TmpDT.SUMD(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")) + importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO Case 176 ConceptoContabilizacionME = 228 ConceptoContabilizacionMEComp = 229 @@ -6483,8 +6518,14 @@ Partial Class Compras_Compras importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO End Select - If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + If ConceptoContabilizacion = 6 Then + If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + End If + Else + If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + End If End If If ObjConta.GetRetCuenta(ConceptoContabilizacionME, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then @@ -6578,6 +6619,26 @@ Partial Class Compras_Compras ErrorPrepoliza = True End If End If + Case 6 + Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" + + For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows + + If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero + End If + End If + + If importeMN <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, + CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True + End If + End If + Next + End Select 'End If @@ -6595,8 +6656,6 @@ Partial Class Compras_Compras If RegistraConcepto225 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 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador @@ -6682,12 +6741,15 @@ Partial Class Compras_Compras DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1") End If 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN - For Each Dr As DataRow In DT.Rows - If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then - Dr("CveAlmacen") = 0 - End If - Dr.AcceptChanges() - Next + If DdlTipoCompra.SelectedValue <> "10" Then + For Each Dr As DataRow In DT.Rows + If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then + Dr("CveAlmacen") = 0 + End If + Dr.AcceptChanges() + Next + End If + DT.AcceptChanges() DtAlmacenes.Dispose() @@ -10118,12 +10180,14 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"}) 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN - For Each Dr As DataRow In DT.Rows - If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then - Dr("CveAlmacen") = 0 - End If - Dr.AcceptChanges() - Next + If DdlTipoCompra.SelectedValue <> "10" Then + For Each Dr As DataRow In DT.Rows + If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then + Dr("CveAlmacen") = 0 + End If + Dr.AcceptChanges() + Next + End If DT.AcceptChanges() DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0") If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then @@ -10204,12 +10268,15 @@ Partial Class Compras_Compras 'GASTO DT = TmpDT.Copy 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN - For Each Dr As DataRow In DT.Rows - If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then - Dr("CveAlmacen") = 0 - End If - Dr.AcceptChanges() - Next + If DdlTipoCompra.SelectedValue <> "10" Then + For Each Dr As DataRow In DT.Rows + If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then + Dr("CveAlmacen") = 0 + End If + Dr.AcceptChanges() + Next + End If + DT.AcceptChanges() DtAlmacenes.Dispose() @@ -10791,10 +10858,11 @@ Partial Class Compras_Compras If e.Row.DataKey("DifPSSat").ToEntero = 1 Then - '#e35b5a - e.Row.BackColor = Drawing.Color.FromArgb(1, 227, 91, 90) + + e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#EFD569") 'Drawing.Color.FromArgb(1, 227, 91, 90)'#e35b5a e.Row.Attributes.Add("data-toggle", "tooltip") - e.Row.Attributes.Add("title", "El código del producto del SAT no es igual al código del producto registrado.") + e.Row.Attributes.Add("data-html", "true") + e.Row.Attributes.Add("title", String.Format("El código del producto del SAT no es igual al código del producto registrado.
Código XML:{0}
Código Sistema:{1} ", e.Row.DBCampo("ClaveProdServ"), e.Row.DBCampo("SATClavePS"))) End If End If diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 55f95ed26..52c0ff298 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -3,6 +3,18 @@ + + @@ -10,15 +22,13 @@ - -
  • +
  • Generar Excel
  • -
    - +
    @@ -29,19 +39,19 @@
      - +
      - + -
      +
    - -
    - + +
    + -
    - - +
    + +
    @@ -57,25 +67,26 @@ -
    +
    - - + +
    -
    - - -
    - - - - - -
    + +
    + + + + + + +
    @@ -84,10 +95,10 @@
    - - - - + + + + @@ -108,7 +119,7 @@ - + <%-- --%> @@ -116,13 +127,13 @@ - + <%-- --%> - +

    @@ -140,20 +151,20 @@
    - + - + - + @@ -185,7 +196,7 @@ - + @@ -197,11 +208,13 @@ - + <%----%> - + + + @@ -212,73 +225,73 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -294,7 +307,7 @@ <%----%> - + @@ -305,11 +318,12 @@
    - + <%----%> - + + @@ -320,85 +334,85 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - <%-- + <%-- --%> - <%-- --%> + <%-- --%> @@ -409,96 +423,97 @@ -

    - +
    + - + + - - +
    +
    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -517,7 +532,7 @@ -
    +