diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index c243c6058..29e08b635 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -758,11 +758,12 @@ Public Class ClsAcumuladores End Try Return Retorno End Function - Public Function GetGarantiasPolizaVirtual(CveVenta As Integer) As Boolean + Public Function GetGarantiasPolizaVirtual(CveVenta As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_Acum_GarantiasPolizaVirtualGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 597854f57..75aaea0c6 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5778,6 +5778,8 @@ Public Class ClsContabilidad ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString + Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString + If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza") Catch ex As Exception OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index bb62e0c26..463101747 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -1267,7 +1267,13 @@ Public Class ClsOC _CveOrdenCompraDetalle = SqlAdapter.SelectCommand.Parameters("@vCveOrdenCompraDetalle").Value.ToString.ToEntero Retorno = True Catch ex As Exception - OnError("Ocurrió un error al agregar el detalle de OrdenCompras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + If ex.Message.Contains("CK_OC_OrdenesCompraDetalle_RetIVA_Total") Then + OnError("La retención de iva no coincide con su total", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + OnError("Ocurrió un error al agregar el detalle de OrdenCompras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + End Try Return Retorno diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 27d3474b3..6a418e56b 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -99,6 +99,7 @@ Public Class ClsProductosServicios Public Property ClaveImpuestoUnidadMedida As String Public Property ClaveCategoriaToxicidad As String + Public Property EsOutSourcing As Boolean Public ReadOnly Property DtResultados() As DataTable Get @@ -290,7 +291,7 @@ Public Class ClsProductosServicios ClaveImpuestoEmpaque = Data.Rows(0)("ClaveImpuestoEmpaque").ToString ClaveImpuestoUnidadMedida = Data.Rows(0)("ClaveImpuestoUM").ToString ClaveCategoriaToxicidad = Data.Rows(0)("ClaveCategoriaToxicidad").ToString - + EsOutSourcing = Data.Rows(0)("EsOutSourcing").ToString = "True" End If Retorno = True Catch ex As SqlException @@ -388,7 +389,7 @@ Public Class ClsProductosServicios Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1) As Integer + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -461,7 +462,7 @@ Public Class ClsProductosServicios .Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje - + .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing End With Try @@ -607,7 +608,7 @@ Public Class ClsProductosServicios Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1) As Boolean + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProductosServiciosUpdate") @@ -681,7 +682,7 @@ Public Class ClsProductosServicios .Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje - + .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing End With Try diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index f41eaca91..92a134d6d 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -65,17 +65,18 @@

- + + - + <%----%> diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 3146fb542..ad9f24a9d 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -7,7 +7,14 @@ Partial Class Bancos_FluctuacionCambiaria Inherits ClsPaginas #Region "PROPIEDADES" - + Private Property LblTotal() As String + Get + Return ViewState("Total").ToString + End Get + Set(value As String) + ViewState("Total") = value + End Set + End Property #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load @@ -60,16 +67,20 @@ Partial Class Bancos_FluctuacionCambiaria Private Sub CargaDatosCompra() Dim ObjBancos As New ClsBancos - LblTotalCompras.Text = "0.00" + 'LblTotalCompras.Text = "0.00" If ObjBancos.GetFluctuaciones(TxtFecha.Text.ToDate, 1, UsuarioActual.CveEmpresa) Then GvCompras.DataSource = ObjBancos.DtResultados - LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero + 'LblTotalCompras.Text = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero + LblTotal = ObjBancos.DtResultados.SUM("Fluctuacion").FormatoNumero Else GvCompras.DataSource = Nothing Alert("Ocurrio un error al cargar las compras", TipoMensaje.MsgAdvertencia) End If ObjBancos.Dispose() GvCompras.DataBind() + If GvCompras.Rows.Count > 0 Then + GvCompras.Rows(GvCompras.Rows.Count - 1).CssClass = "SubTotales2" + End If End Sub Private Sub CargaDatosVentas() @@ -201,7 +212,7 @@ Partial Class Bancos_FluctuacionCambiaria Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias - Total = LblTotalCompras.Text.ToDecimal + Total = LblTotal.ToDecimal If Total > 0 Then CveConceptoContable = 64 CveCuenta = CveCuentaGanancia diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 40e4e3811..e79fadb0c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -907,8 +907,10 @@ - - + + + Deglose 6% + <%----%> <%-- diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d654889be..8fea41205 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1025,10 +1025,17 @@ Partial Class Compras_Compras Set(value As Double) ViewState("SubTotal2Original") = value End Set - End Property + End Property + Private Property IVAOriginal As Double - Get - Return ViewState("IVAOriginal").ToString.ToDouble + Get + + If ViewState("IVAOriginal") Is Nothing Then + Return 0 + Else + Return ViewState("IVAOriginal").ToString.ToDouble + End If + End Get Set(value As Double) ViewState("IVAOriginal") = value @@ -2087,8 +2094,12 @@ Partial Class Compras_Compras End If DdlRetIVAConcepto.Items.Add(New ListItem("Arrendamiento", "4")) - DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5")) - + + If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then + DdlRetIVAConcepto.Items.Add(New ListItem("Ret IVA Servicios", "5")) + End If + + End If @@ -2237,15 +2248,15 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then - 'If UsuarioActual.CveRol = 1 Then - ' Alert("Ok funcionalidad 577") - 'End If - If RetencionIVA = 0 And IVAOriginal > 0 Then For Each dRow As DataRow In TmpDT.Rows If dRow("CveTipoPS").ToString.ToEntero = 1 Then - tdIVA6.Visible = True + + 'comentado para reubicar el boton + 'tdIVA6.Visible = True + + Exit For End If Next @@ -17024,8 +17035,9 @@ Partial Class Compras_Compras If RetencionIVA = 0 And IVAOriginal > 0 Then For Each dRow As DataRow In TmpDT.Rows - If dRow("CveTipoPS").ToString.ToEntero = 1 Then - tdIVA6.Visible = True + If dRow("CveTipoPS").ToString.ToEntero = 1 Then + 'Comnetado para reubicar el boton + 'tdIVA6.Visible = True Exit For End If Next @@ -19305,7 +19317,7 @@ Partial Class Compras_Compras DdlRetIVAConcepto.SelectedValueExist("5") - LblRetIVA.Text = "0.06%" + LblRetIVA.Text = "6.0%" RetencionIVA = TmpDT.SUMD("RetIVA") TxtRetIVA.Text = RetencionIVA.ToString("###,###,###.00") diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index f1733aaf5..6d89b4c77 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -434,7 +434,7 @@ Partial Class Compras_ReembolsosComprobaciones End If End If Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString - CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) + CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) 'AGREGO PREPOLIZA IE BANCOS If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), 30, TxtObservaciones.Text, TxtFechaDocumento.Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal), ImporteMX:=TxtImporteVinculado.Text.ToDecimal * tipoCambio) Then MsgError = "Error al registrar detalle de concepto bancario" diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index bf1189f9b..9ad938988 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2815,6 +2815,9 @@ Partial Class Compras_eFacturas CveProveedor = gvRow.DataKey("CveProveedor").ToEntero Dim ObjCompras As New ClsCompras + + Dim TieneRegistros As Boolean = False + If ObjCompras.GetCompararComplementoPago(gvRow.DataKey("CveProveedor").ToEntero, Monto, nodePagos2.InnerXml.Replace("pago10:", ""), UsuarioActual.CveEmpresa) Then GvVincularPago.DataSource = ObjCompras.DtResultados @@ -2822,7 +2825,7 @@ Partial Class Compras_eFacturas SerieFolioIE = ObjCompras.DtResultados.Rows(0)("SerieFolio").ToString DivVincularPagoManualmente.Visible = False BtnVincularPago.Visible = True - + TieneRegistros = True Else DivVincularPagoManualmente.Visible = True BtnVincularPago.Visible = False @@ -2835,6 +2838,7 @@ Partial Class Compras_eFacturas + For Each drow As DataRow In ObjCompras.DtResultados.FiltraParametros("CveIE > 0 AND FechaDocumento IS NOT NULL", "", {"FechaDocumento"}).Rows Dim FechaDocumento As Date = drow("FechaDocumento").ToString.ToDate @@ -2873,12 +2877,18 @@ Partial Class Compras_eFacturas TextoDiferenciaImporte = $"  -   IE ${ImporteIES.FormatoNumero}
Diferencia { DiferenciaImportes.FormatoNumero() }
" BtnVincularPago.Visible = False MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})" + + If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then + DivVincularPagoManualmente.Visible = True + End If + Else 'BtnVincularPago.Visible = True 'TextoDiferenciaImporte = "" End If + LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}" LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero LblPagosCantidad.Text = PagosCantidad.ToString @@ -2893,7 +2903,7 @@ Partial Class Compras_eFacturas Else LblMensajeComlementoError.Text = "" DVMensajecomplementoError.Visible = False - + DivVincularPagoManualmente.Visible = False End If diff --git a/Contabilidad/RegPrePoliza1.aspx b/Contabilidad/RegPrePoliza1.aspx index 9d546bf50..9455bf6e8 100644 --- a/Contabilidad/RegPrePoliza1.aspx +++ b/Contabilidad/RegPrePoliza1.aspx @@ -462,6 +462,13 @@ + + TC + +
+
+ +
Cargo diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb index ea0ac4dff..36f359c07 100644 --- a/Contabilidad/RegPrePoliza1.aspx.vb +++ b/Contabilidad/RegPrePoliza1.aspx.vb @@ -396,6 +396,10 @@ Partial Class ContabilidadC_RegPrePoliza GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() + If UsuarioActual.CveRol = 1 AndAlso DtMovimientos.COUNT("TC", "TC > 1") > 0 Then + GvPrePoliza.Columns(7).Visible = True + End If + If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,17)").Rows.Count > 0 Then LnkComplementoPago.Visible = True End If diff --git a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc index 0cbc414c6..2068a25b8 100644 --- a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc +++ b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc @@ -1334,7 +1334,7 @@ 8.01986in - 0.81597in + 1.14931in true true @@ -1444,23 +1444,32 @@ + + Cuenta: + + =Parameters!Cuenta.Value Cuenta - 0.47708in - 1.82615in + 0.84375in 0.25in - 4.42313in + 5.42127in 3