diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index 13f18fd12..ac47d269b 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -449,7 +449,7 @@ - + diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index ad11b7002..8bbe06bd5 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -133,7 +133,7 @@ Partial Class Acumuladores_CatFoliosGarantia ObjAcum.Dispose() Else 'si se marca como enviado, debe de revisar que tenga el movto de traslado - If HdnCveMovimientoSalida.Value = "" AndAlso DdlEstatusEditar.SelectedValue = "2" Then + If HdnCveMovimientoSalida.Value.ToEntero = 0 AndAlso DdlEstatusEditar.SelectedValue = "2" Then Alert("No se ha realizado la salida del almacen de garantía, al de 'devolución al proveedor'.
Favor de aplicar la salida y luego cambiar el estatus a enviado. ", TipoMensaje.MsgAdvertencia) Exit Sub End If diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 511e9125e..9ea2ab57d 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -537,7 +537,21 @@ Public Class ClsProductosServicios If Ex1.Message.Contains("Número: 2627;") Then Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia) ElseIf Ex1.Message.Contains("Número: 2601;") Then - Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + + If Ex1.Message.Contains("UK_ProductosServicios_Codigo_Empresa") Then + Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_CodigoBarras") Then + Alert("El Nuevo Producto o Servicio tiene Codigo de barras duplicado:" & CodigoBarras, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_CveEmpresa_NumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("UK_ProductosServicios_EmpresaNumeroParte") Then + Alert("El Nuevo Producto o Servicio tiene Numero de Parte duplicado:" & NumeroParte, TipoMensaje.MsgAdvertencia) + Else + Alert("El Nuevo Producto o Servicio duplicado(ND):" & NumeroParte, TipoMensaje.MsgAdvertencia) + End If + + + Else Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index abf6c7d0f..c0bd4a9d4 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1329,7 +1329,16 @@ - + + + + Unidad + + + + + + <%----%> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e6b366a25..e78190fe8 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1962,10 +1962,12 @@ Partial Class Compras_Compras Dim BaseIVA As Decimal = 0 Dim TasaIEPS As String = "" Dim traslados As XmlNodeList = impuestosNode.SelectNodes("cfdi:Traslados/cfdi:Traslado", namespaces) + Dim tieneIEPS As Boolean = False For Each traslado As XmlNode In traslados ' Obtener los valores de los atributos Base e Importe Dim baseValue As Decimal = Decimal.Parse(ValorXML(traslado, "Base")).RoundSQL(2) Dim impuesto As String = ValorXML(traslado, "Impuesto") + Dim importeImpuesto As Decimal = ValorXML(traslado, "Importe").ToDecimal.RoundSQL(2) If impuesto = "001" Then impuesto = "ISR" @@ -1975,12 +1977,12 @@ Partial Class Compras_Compras ElseIf impuesto = "003" Then impuesto = "IEPS" TasaIEPS = ValorXML(traslado, "TasaOCuota") - BaseIEPS += baseValue + BaseIEPS = baseValue + importeImpuesto + tieneIEPS = True End If Next ' Validar si Base coincide con Importe - If BaseIVA <> BaseIEPS AndAlso BaseIEPS > 0 Then - 'SbValRet.Append($"La base e importe de la retención del impuesto {impuesto} no coinciden para {descripcion}. Base: {baseValue.ToString()}, Importe: {importeValue.ToString()}
") + If tieneIEPS AndAlso Math.Abs(BaseIVA - BaseIEPS) > 0.01 Then 'subTotal + IEPS SbValRet.Append($"Producto: {descripcion} La base del IEPS es no coincide con el subtotal, favor de desglosarlo en una base : {BaseIEPS.ToString()}, Tasa: {TasaIEPS}
") End If End If @@ -2306,6 +2308,7 @@ Partial Class Compras_Compras GvPS.DataSource = TmpDT GvPS.DataBind() UpPS.Update() + CargaGvInv() End If End If Else @@ -2447,11 +2450,12 @@ Partial Class Compras_Compras Msg &= String.Format("- Los descuentos del detalle no coinciden con el descuento general
") End If + If Math.Abs(Math.Round(IVATemp, 6) - Math.Round(TrasladoIVA, 6)) > 0.01 Then Msg &= String.Format("- Los IVAS del detalle no coinciden con el IVA general
") End If - If Math.Abs(Math.Round(IEPSTemp, 6) - Math.Round(TrasladoIEPS, 6)) > 0.01 Then + If Math.Abs(Math.Round(IEPSTemp, 6) - Math.Round(TrasladoIEPS, 6)).RoundAD(2) > 0.01 Then Msg &= String.Format("- Los IEPS del detalle no coinciden con el IEPS general
") End If @@ -5098,306 +5102,306 @@ Partial Class Compras_Compras End If End If - '-------INICIA U S A A C ------------------------------------------------------------------- - 'If UsuarioActual.Empresa.UsaAC AndAlso Not TieneError Then + '-------INICIA U S A A C ------------------------------------------------------------------- + 'If UsuarioActual.Empresa.UsaAC AndAlso Not TieneError Then - ' If TotalPorDevengar <= TxtTotal.Text.ToDouble And TotalPorDevengar > 0 Then - ' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) - ' ObjContaAC.IniciaTransacSQL() + ' If TotalPorDevengar <= TxtTotal.Text.ToDouble And TotalPorDevengar > 0 Then + ' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) + ' ObjContaAC.IniciaTransacSQL() - ' ''POLIZA COMPROMETIDO SOLO SI NO SE VINCULA OC - ' If HdnVCveOC.Value.ToEntero > 0 Then + ' ''POLIZA COMPROMETIDO SOLO SI NO SE VINCULA OC + ' If HdnVCveOC.Value.ToEntero > 0 Then - ' IDPolizaComprometido = 1 - ' TotalPorDevengar = TotalPorDevengar * 2 - ' Else - ' TotalPorDevengar = TotalPorDevengar * 3 - ' End If + ' IDPolizaComprometido = 1 + ' TotalPorDevengar = TotalPorDevengar * 2 + ' Else + ' TotalPorDevengar = TotalPorDevengar * 3 + ' End If - ' IdPoliza = ObjContaAC.AddPoliza(3, TxtDescripcion.Text.Trim, TotalPorDevengar, TotalPorDevengar, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate) + ' IdPoliza = ObjContaAC.AddPoliza(3, TxtDescripcion.Text.Trim, TotalPorDevengar, TotalPorDevengar, UsuarioActual.CveUsuario, TxtFecha.Text.ToDate) - ' 'Dim filtro As New StringBuilder - ' If IdPoliza > 0 Then - ' PolizaFolio = ObjContaAC.Folio - ' 'Dim RegistroMatriz As DataRow - ' 'Dim CuentaCargo As Integer - ' Dim CuentaAbono As Integer - ' Dim Importe As Decimal + ' 'Dim filtro As New StringBuilder + ' If IdPoliza > 0 Then + ' PolizaFolio = ObjContaAC.Folio + ' 'Dim RegistroMatriz As DataRow + ' 'Dim CuentaCargo As Integer + ' Dim CuentaAbono As Integer + ' Dim Importe As Decimal - ' 'CUENTA PROVEEDOR - ' 'If tIdContaProveedor <= 0 Then - ' ' 'normalmente debe de ser la cuenta 021120000000000000, para el caso de APH, se el cmabio al 2119 - ' ' If ObjContaAC.GetCuentas(-1, "021190000000000000", -1) Then - ' ' Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("") - ' ' If drCuenta IsNot Nothing Then + ' 'CUENTA PROVEEDOR + ' 'If tIdContaProveedor <= 0 Then + ' ' 'normalmente debe de ser la cuenta 021120000000000000, para el caso de APH, se el cmabio al 2119 + ' ' If ObjContaAC.GetCuentas(-1, "021190000000000000", -1) Then + ' ' Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("") + ' ' If drCuenta IsNot Nothing Then - ' ' CuentaAbono = drCuenta("Id").ToString.ToEntero - ' ' Dim FolioProveedor = ObjContaAC.GetFolioProveedores("021190000000000000").ToString - ' ' ViewState("CtaProveedor") = ObjContaAC.AddCuenta(String.Format("02119{0}000000000", FolioProveedor.PadLeft(4, "0"c)), NombreProveedor, "D", 2, 0, 1, 0, "", 1, CuentaAbono) - ' ' ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, CtaProveedor) + ' ' CuentaAbono = drCuenta("Id").ToString.ToEntero + ' ' Dim FolioProveedor = ObjContaAC.GetFolioProveedores("021190000000000000").ToString + ' ' ViewState("CtaProveedor") = ObjContaAC.AddCuenta(String.Format("02119{0}000000000", FolioProveedor.PadLeft(4, "0"c)), NombreProveedor, "D", 2, 0, 1, 0, "", 1, CuentaAbono) + ' ' ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, CtaProveedor) - ' ' Else - ' ' ErrorAC = True - ' ' ErrorACMEnsaje.Append(" - DrCuenta Nula") - ' ' End If - ' ' Else - ' ' ErrorACMEnsaje.Append(" - Error al consultar cuenta 021190000000000000 ") - ' ' ErrorAC = True - ' ' End If - ' 'End If + ' ' Else + ' ' ErrorAC = True + ' ' ErrorACMEnsaje.Append(" - DrCuenta Nula") + ' ' End If + ' ' Else + ' ' ErrorACMEnsaje.Append(" - Error al consultar cuenta 021190000000000000 ") + ' ' ErrorAC = True + ' ' End If + ' 'End If - ' Dim ConceptoRenglon As String = "" - ' If Not ErrorAC Then + ' Dim ConceptoRenglon As String = "" + ' If Not ErrorAC Then - ' 'INVENTARIOS EN AC - ' Dim ContadorInventario As Integer = GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) + ' 'INVENTARIOS EN AC + ' Dim ContadorInventario As Integer = GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) - ' Dim tTotalIVA, tTotalGral, tDiferenciaIVA, tIVA, tRetIVA, tRetISR As Decimal - ' Dim ipresup As Integer = 0 - ' 'COMIENZA: PRUEBA AGRUPACION CONCEPTOS - ' Dim Presup = From gvr As DataRow In TmpDT.Rows.Cast(Of DataRow)() - ' Group gvr By Grp = New With { - ' Key .CvePresupuestoEgreso = gvr("CvePresupuestoEgreso").ToString.ToEntero, - ' Key .CveOrdencompraDetalle = If(gvr("CveOrdencompraDetalle").ToString.ToEntero > 0, 1, -1), - ' Key .CveActivoFijo = If(gvr("TipoAF").ToString.ToEntero = 2, gvr("CveActivoFijo").ToString.ToEntero, -1) - ' } Into Group - ' Select Grp.CvePresupuestoEgreso, Grp.CveActivoFijo, Grp.CveOrdencompraDetalle, - ' TotalImporte = Group.Sum(Function(r) r("Total").ToString.ToDecimal) - ' Dim Fecha As Date = TxtFecha.Text.ToDate + ' Dim tTotalIVA, tTotalGral, tDiferenciaIVA, tIVA, tRetIVA, tRetISR As Decimal + ' Dim ipresup As Integer = 0 + ' 'COMIENZA: PRUEBA AGRUPACION CONCEPTOS + ' Dim Presup = From gvr As DataRow In TmpDT.Rows.Cast(Of DataRow)() + ' Group gvr By Grp = New With { + ' Key .CvePresupuestoEgreso = gvr("CvePresupuestoEgreso").ToString.ToEntero, + ' Key .CveOrdencompraDetalle = If(gvr("CveOrdencompraDetalle").ToString.ToEntero > 0, 1, -1), + ' Key .CveActivoFijo = If(gvr("TipoAF").ToString.ToEntero = 2, gvr("CveActivoFijo").ToString.ToEntero, -1) + ' } Into Group + ' Select Grp.CvePresupuestoEgreso, Grp.CveActivoFijo, Grp.CveOrdencompraDetalle, + ' TotalImporte = Group.Sum(Function(r) r("Total").ToString.ToDecimal) + ' Dim Fecha As Date = TxtFecha.Text.ToDate - ' 'Dim tTotalIVA, tTotalGral, tDiferenciaIVA, tIVA As Double - ' tTotalIVA = TxtIVA.Text.ToDecimal - ' tRetIVA = TxtRetIVA.Text.ToDecimal - ' tRetISR = TxtRetISR.Text.ToDecimal + ' 'Dim tTotalIVA, tTotalGral, tDiferenciaIVA, tIVA As Double + ' tTotalIVA = TxtIVA.Text.ToDecimal + ' tRetIVA = TxtRetIVA.Text.ToDecimal + ' tRetISR = TxtRetISR.Text.ToDecimal - ' 'tTotalIVA = tTotalIVA - tRetIVA - tRetISR + ' 'tTotalIVA = tTotalIVA - tRetIVA - tRetISR - ' tTotalGral = TxtTotal.Text.ToDecimal + tRetIVA + tRetISR ' EL TOTAL GENERAL DEBE DE SER EL SUBTOTAL + IVA, NO SE DEBEN DE INCLUIR LAS RETENCIONES, POR ESO SE RESTA - ' tDiferenciaIVA = tTotalIVA + ' tTotalGral = TxtTotal.Text.ToDecimal + tRetIVA + tRetISR ' EL TOTAL GENERAL DEBE DE SER EL SUBTOTAL + IVA, NO SE DEBEN DE INCLUIR LAS RETENCIONES, POR ESO SE RESTA + ' tDiferenciaIVA = tTotalIVA - ' ipresup = 0 + ' ipresup = 0 - ' Dim CuentaMatrizAlmacen As Integer + ' Dim CuentaMatrizAlmacen As Integer - ' 'PresupuestoEgresos - ' Dim DtPresupuestosTemp As DataTable - ' Dim IdCuentaComprometido, IdCuentaPorEjercer, IdCuentaDevengado, IdCuentaMatriz As Integer - ' ' Dim DescuentoConIVA As Decimal - ' Dim tPorIVA As Decimal = tTotalIVA / (tTotalGral - tTotalIVA) - ' Dim tAjusteTotal As Decimal + ' 'PresupuestoEgresos + ' Dim DtPresupuestosTemp As DataTable + ' Dim IdCuentaComprometido, IdCuentaPorEjercer, IdCuentaDevengado, IdCuentaMatriz As Integer + ' ' Dim DescuentoConIVA As Decimal + ' Dim tPorIVA As Decimal = tTotalIVA / (tTotalGral - tTotalIVA) + ' Dim tAjusteTotal As Decimal - ' For Each grp In Presup - ' Importe = grp.TotalImporte - ' TotalDetalle += Importe - ' ipresup += 1 - ' If Importe > 0 Then - ' 'saco la proporcion de iva que le corresponde - ' tIVA = Math.Round(Importe * tPorIVA, 2) - ' tDiferenciaIVA -= tIVA - ' 'identifico si es el ultimo registro, para ver si es necesario un ajuste - ' If ipresup = Presup.Count Then - ' If Math.Round(TotalDetalle - tTotalGral, 2) <= 0.01 AndAlso tDiferenciaIVA > 0 Then - ' tIVA += tDiferenciaIVA - ' End If - ' End If + ' For Each grp In Presup + ' Importe = grp.TotalImporte + ' TotalDetalle += Importe + ' ipresup += 1 + ' If Importe > 0 Then + ' 'saco la proporcion de iva que le corresponde + ' tIVA = Math.Round(Importe * tPorIVA, 2) + ' tDiferenciaIVA -= tIVA + ' 'identifico si es el ultimo registro, para ver si es necesario un ajuste + ' If ipresup = Presup.Count Then + ' If Math.Round(TotalDetalle - tTotalGral, 2) <= 0.01 AndAlso tDiferenciaIVA > 0 Then + ' tIVA += tDiferenciaIVA + ' End If + ' End If - ' 'le sumo el iva al concepto - ' Importe += tIVA + ' 'le sumo el iva al concepto + ' Importe += tIVA - ' 'codigo Provisional, para cuand tenga descuento, solo tome el subtotal * el iva,RMF - ' If TxtDescuento.Text.ToDouble > 0 Then - ' Importe = grp.TotalImporte * 1.16D - ' End If + ' 'codigo Provisional, para cuand tenga descuento, solo tome el subtotal * el iva,RMF + ' If TxtDescuento.Text.ToDouble > 0 Then + ' Importe = grp.TotalImporte * 1.16D + ' End If - ' tAjusteTotal += Importe - ' 'valido que la sumas de lo detalles no exceda al totalgeneral - ' If Math.Round(tAjusteTotal, 2) > tTotalGral Then - ' 'le resto la diferencia - ' Importe -= (tAjusteTotal - tTotalGral) - ' End If + ' tAjusteTotal += Importe + ' 'valido que la sumas de lo detalles no exceda al totalgeneral + ' If Math.Round(tAjusteTotal, 2) > tTotalGral Then + ' 'le resto la diferencia + ' Importe -= (tAjusteTotal - tTotalGral) + ' End If - ' 'Presupuesto Egresos - ' DtPresupuestosTemp = DtPresupuestos.FiltraParametros(String.Format("CvePresupuestoEgreso = {0}", grp.CvePresupuestoEgreso)) - ' If DtPresupuestosTemp.Rows.Count <> 1 Then - ' ErrorAC = True - ' ErrorACMEnsaje.Append(" - DtPresupuestosTemp.Rows.Count <> 1 ") - ' Exit For - ' End If - ' IdCuentaComprometido = DtPresupuestosTemp.Rows(0)("IdCuentaComprometido").ToString.ToEntero - ' IdCuentaPorEjercer = DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero - ' IdCuentaDevengado = DtPresupuestosTemp.Rows(0)("IdCuentaDevengado").ToString.ToEntero - ' IdCuentaMatriz = DtPresupuestosTemp.Rows(0)("IdCuentaMatriz").ToString.ToEntero + ' 'Presupuesto Egresos + ' DtPresupuestosTemp = DtPresupuestos.FiltraParametros(String.Format("CvePresupuestoEgreso = {0}", grp.CvePresupuestoEgreso)) + ' If DtPresupuestosTemp.Rows.Count <> 1 Then + ' ErrorAC = True + ' ErrorACMEnsaje.Append(" - DtPresupuestosTemp.Rows.Count <> 1 ") + ' Exit For + ' End If + ' IdCuentaComprometido = DtPresupuestosTemp.Rows(0)("IdCuentaComprometido").ToString.ToEntero + ' IdCuentaPorEjercer = DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero + ' IdCuentaDevengado = DtPresupuestosTemp.Rows(0)("IdCuentaDevengado").ToString.ToEntero + ' IdCuentaMatriz = DtPresupuestosTemp.Rows(0)("IdCuentaMatriz").ToString.ToEntero - ' 'COMPROMETIDO DEPENDIENTE SI EXISTE SU POLIZA - ' If grp.CveOrdencompraDetalle = -1 Then - ' ConceptoRenglon = String.Format("GC Fact: {0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) - ' If ObjContaAC.AddMovimiento(IdPoliza, IdCuentaComprometido, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then - ' If Not ObjContaAC.AddMovimiento(IdPoliza, IdCuentaPorEjercer, True, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then - ' ErrorAC = True - ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 1") - ' Exit For - ' End If - ' Else - ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 2") - ' ErrorAC = True - ' Exit For - ' End If - ' End If + ' 'COMPROMETIDO DEPENDIENTE SI EXISTE SU POLIZA + ' If grp.CveOrdencompraDetalle = -1 Then + ' ConceptoRenglon = String.Format("GC Fact: {0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) + ' If ObjContaAC.AddMovimiento(IdPoliza, IdCuentaComprometido, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then + ' If Not ObjContaAC.AddMovimiento(IdPoliza, IdCuentaPorEjercer, True, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then + ' ErrorAC = True + ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 1") + ' Exit For + ' End If + ' Else + ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 2") + ' ErrorAC = True + ' Exit For + ' End If + ' End If - ' ConceptoRenglon = String.Format("GD Fact:{0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) - ' 'DEVENGADO - ' If ObjContaAC.AddMovimiento(IdPoliza, IdCuentaDevengado, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then - ' If Not ObjContaAC.AddMovimiento(IdPoliza, IdCuentaComprometido, True, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then - ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 3") - ' ErrorAC = True - ' Exit For - ' End If - ' Else - ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 4") - ' ErrorAC = True - ' Exit For - ' End If + ' ConceptoRenglon = String.Format("GD Fact:{0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) + ' 'DEVENGADO + ' If ObjContaAC.AddMovimiento(IdPoliza, IdCuentaDevengado, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then + ' If Not ObjContaAC.AddMovimiento(IdPoliza, IdCuentaComprometido, True, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then + ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 3") + ' ErrorAC = True + ' Exit For + ' End If + ' Else + ' ErrorACMEnsaje.Append(" - Error al agregar movimiento contabilidad 4") + ' ErrorAC = True + ' Exit For + ' End If - ' If ContadorInventario > 0 Then + ' If ContadorInventario > 0 Then - ' ' CuentaMatrizAlmacen = CtaAlmacen - ' ElseIf grp.CveActivoFijo > 0 Then + ' ' CuentaMatrizAlmacen = CtaAlmacen + ' ElseIf grp.CveActivoFijo > 0 Then - ' Dim CtaAF As Integer = -1 - ' Dim AF As String = "" - ' Dim CuentaInicial As Integer = -1 + ' Dim CtaAF As Integer = -1 + ' Dim AF As String = "" + ' Dim CuentaInicial As Integer = -1 - ' If ObjAF.GetActivosFijos(grp.CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then - ' CtaAF = ObjAF.Cuenta - ' AF = ObjAF.Descripcion - ' CuentaInicial = ObjAF.CuentaInicial - ' Else - ' ErrorAC = True - ' ErrorACMEnsaje.Append(" - Error al obtener activos fijos ") - ' Exit For - ' End If + ' If ObjAF.GetActivosFijos(grp.CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "", -1, UsuarioActual.CveEmpresa) Then + ' CtaAF = ObjAF.Cuenta + ' AF = ObjAF.Descripcion + ' CuentaInicial = ObjAF.CuentaInicial + ' Else + ' ErrorAC = True + ' ErrorACMEnsaje.Append(" - Error al obtener activos fijos ") + ' Exit For + ' End If - ' If Not CuentaInicial > 0 Then - ' CuentaInicial = 1241 - ' End If + ' If Not CuentaInicial > 0 Then + ' CuentaInicial = 1241 + ' End If - ' 'CUENTA AF - ' If CtaAF <= 0 Then - ' If ObjContaAC.GetCuentas(-1, String.Format("0{0}0000000000000", CuentaInicial), -1) Then - ' Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("") - ' If drCuenta IsNot Nothing Then - ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000 drCuenta nula") - ' CuentaAbono = drCuenta("Id").ToString.ToEntero - ' Dim FolioAF As String = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString - ' CtaAF = ObjContaAC.AddCuenta(String.Format("0{0}{1}000000000", CuentaInicial, FolioAF.PadLeft(4, "0"c)), AF, "A", 2, 0, 1, 0, "", 1, CuentaAbono) + ' 'CUENTA AF + ' If CtaAF <= 0 Then + ' If ObjContaAC.GetCuentas(-1, String.Format("0{0}0000000000000", CuentaInicial), -1) Then + ' Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("") + ' If drCuenta IsNot Nothing Then + ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000 drCuenta nula") + ' CuentaAbono = drCuenta("Id").ToString.ToEntero + ' Dim FolioAF As String = ObjContaAC.GetFolioProveedores(String.Format("0{0}0000000000000", CuentaInicial)).ToString + ' CtaAF = ObjContaAC.AddCuenta(String.Format("0{0}{1}000000000", CuentaInicial, FolioAF.PadLeft(4, "0"c)), AF, "A", 2, 0, 1, 0, "", 1, CuentaAbono) - ' ObjAF.UpdateActivosFijosCuentaAC(grp.CveActivoFijo, CtaAF, UsuarioActual.CveUsuario) - ' Else - ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000 drCuenta nulo") - ' ErrorAC = True - ' End If - ' Else - ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000") - ' ErrorAC = True - ' End If - ' End If + ' ObjAF.UpdateActivosFijosCuentaAC(grp.CveActivoFijo, CtaAF, UsuarioActual.CveUsuario) + ' Else + ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000 drCuenta nulo") + ' ErrorAC = True + ' End If + ' Else + ' ErrorACMEnsaje.Append(" - Error al obtener cuentas 0{0}0000000000000") + ' ErrorAC = True + ' End If + ' End If - ' CuentaMatrizAlmacen = CtaAF - ' Else - ' CuentaMatrizAlmacen = IdCuentaMatriz - ' End If + ' CuentaMatrizAlmacen = CtaAF + ' Else + ' CuentaMatrizAlmacen = IdCuentaMatriz + ' End If - ' ''AFECTAR MATRIZ EGRESOS - ' If ObjContaAC.AddMovimiento(IdPoliza, CuentaMatrizAlmacen, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then + ' ''AFECTAR MATRIZ EGRESOS + ' If ObjContaAC.AddMovimiento(IdPoliza, CuentaMatrizAlmacen, False, MultiplicadorNC * Importe, "", ConceptoRenglon, 0, Fecha, "") Then - ' ''VERIFICA SI TIENE DESCUENTO (AMORTIZACION) - ' 'If TxtDescuento.Text.ToDouble > 0 Then - ' ' DescuentoConIVA = TxtDescuento.Text.ToDouble * 1.16 + ' ''VERIFICA SI TIENE DESCUENTO (AMORTIZACION) + ' 'If TxtDescuento.Text.ToDouble > 0 Then + ' ' DescuentoConIVA = TxtDescuento.Text.ToDouble * 1.16 - ' ' 'Valida que el descuento con iva cuadre en los totales - ' ' If Math.Abs(DescuentoConIVA - (Importe - TxtTotal.Text.ToDouble)) < 0.02 Then - ' ' DescuentoConIVA = Importe - TxtTotal.Text.ToDouble - ' ' ElseIf DescuentoConIVA <> (Importe - TxtTotal.Text.ToDouble) Then - ' ' ErrorAC = True - ' ' Exit For - ' ' End If + ' ' 'Valida que el descuento con iva cuadre en los totales + ' ' If Math.Abs(DescuentoConIVA - (Importe - TxtTotal.Text.ToDouble)) < 0.02 Then + ' ' DescuentoConIVA = Importe - TxtTotal.Text.ToDouble + ' ' ElseIf DescuentoConIVA <> (Importe - TxtTotal.Text.ToDouble) Then + ' ' ErrorAC = True + ' ' Exit For + ' ' End If - ' ' 'actualizo el idcuenta del presupuesto - ' ' If ObjContaAC.AddMovimiento(123456, IdPoliza, tIdContaProveedor, True, Importe - DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then - ' ' 'agrego a la cuenta contable anticipos - ' ' If Not ObjContaAC.AddMovimiento(123456, IdPoliza, CtaProveedorAnticipos, True, DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then - ' ' ErrorAC = True - ' ' Exit For - ' ' End If - ' ' Else - ' ' ErrorAC = True - ' ' Exit For - ' ' End If + ' ' 'actualizo el idcuenta del presupuesto + ' ' If ObjContaAC.AddMovimiento(123456, IdPoliza, tIdContaProveedor, True, Importe - DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then + ' ' 'agrego a la cuenta contable anticipos + ' ' If Not ObjContaAC.AddMovimiento(123456, IdPoliza, CtaProveedorAnticipos, True, DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then + ' ' ErrorAC = True + ' ' Exit For + ' ' End If + ' ' Else + ' ' ErrorAC = True + ' ' Exit For + ' ' End If - ' 'Else - ' ' 'actualizo el idcuenta del presupuesto - ' ' Importe = TxtTotal.Text.ToDouble - ' ' If Not ObjContaAC.AddMovimiento(123456, IdPoliza, tIdContaProveedor, True, If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe), "", ConceptoRenglon, 0, Fecha, "") Then - ' ' ErrorAC = True - ' ' Exit For - ' ' End If + ' 'Else + ' ' 'actualizo el idcuenta del presupuesto + ' ' Importe = TxtTotal.Text.ToDouble + ' ' If Not ObjContaAC.AddMovimiento(123456, IdPoliza, tIdContaProveedor, True, If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe), "", ConceptoRenglon, 0, Fecha, "") Then + ' ' ErrorAC = True + ' ' Exit For + ' ' End If - ' 'End If + ' 'End If - ' Else - ' ErrorACMEnsaje.Append(" - Error AFECTAR MATRIZ EGRESOS ObjContaAC.AddMovimiento") - ' ErrorAC = True - ' Exit For - ' End If - ' ''TERMINA AFECTAR MATRIZ EGRESOS + ' Else + ' ErrorACMEnsaje.Append(" - Error AFECTAR MATRIZ EGRESOS ObjContaAC.AddMovimiento") + ' ErrorAC = True + ' Exit For + ' End If + ' ''TERMINA AFECTAR MATRIZ EGRESOS - ' Else - ' ErrorACMEnsaje.Append(" - For Each grp In Presup Importe > 0 ") - ' ErrorAC = True - ' Exit For - ' End If + ' Else + ' ErrorACMEnsaje.Append(" - For Each grp In Presup Importe > 0 ") + ' ErrorAC = True + ' Exit For + ' End If - ' Next + ' Next - ' ''actualizo el idcuenta del presupuesto - ' 'Importe = TxtTotal.Text.ToDecimal - ' 'If Not ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe)), "", ConceptoRenglon, 0, Fecha, "") Then - ' ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 3") - ' ' ErrorAC = True - ' 'End If - ' 'End If + ' ''actualizo el idcuenta del presupuesto + ' 'Importe = TxtTotal.Text.ToDecimal + ' 'If Not ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe)), "", ConceptoRenglon, 0, Fecha, "") Then + ' ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 3") + ' ' ErrorAC = True + ' 'End If + ' 'End If - ' 'If tRetISR > 0 Then 'CtaProveedorRetISR - ' ' ConceptoRenglon = String.Format("GD Fact: {0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) - ' ' If Not ObjContaAC.AddMovimiento(IdPoliza, 0, True, MultiplicadorNC * tRetISR, "", ConceptoRenglon, 0, Fecha, "") Then - ' ' ErrorACMEnsaje.Append(" RetISR > 0 ObjContaAC.AddMovimiento") - ' ' ErrorAC = True - ' ' End If - ' 'End If + ' 'If tRetISR > 0 Then 'CtaProveedorRetISR + ' ' ConceptoRenglon = String.Format("GD Fact: {0}-{1} {2}", TxtSerie.Text.Trim, TxtFolio.Text.Trim, DdlProveedor.SelectedItem.Text) + ' ' If Not ObjContaAC.AddMovimiento(IdPoliza, 0, True, MultiplicadorNC * tRetISR, "", ConceptoRenglon, 0, Fecha, "") Then + ' ' ErrorACMEnsaje.Append(" RetISR > 0 ObjContaAC.AddMovimiento") + ' ' ErrorAC = True + ' ' End If + ' 'End If - ' 'TERMINA: PRUEBA AGRUPACION CONCEPTOS + ' 'TERMINA: PRUEBA AGRUPACION CONCEPTOS - ' 'registrar amortizar anticipos - ' End If + ' 'registrar amortizar anticipos + ' End If - ' Else - ' ErrorACMEnsaje.Append(" - Id Poliza = 0 ") - ' ErrorAC = True - ' End If - ' Else - ' TieneError = True - ' ErrorACMEnsaje.Append("- TotalPorDevengar <= TxtTotal.Text.ToDouble And TotalPorDevengar > 0") - ' ErrorAC = True - ' End If - 'End If - '-------FIN U S A A C ------------------------------------------------------------------- + ' Else + ' ErrorACMEnsaje.Append(" - Id Poliza = 0 ") + ' ErrorAC = True + ' End If + ' Else + ' TieneError = True + ' ErrorACMEnsaje.Append("- TotalPorDevengar <= TxtTotal.Text.ToDouble And TotalPorDevengar > 0") + ' ErrorAC = True + ' End If + 'End If + '-------FIN U S A A C ------------------------------------------------------------------- - If Not ErrorAC AndAlso Not TieneError Then + If Not ErrorAC AndAlso Not TieneError Then Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" @@ -7638,12 +7642,12 @@ Partial Class Compras_Compras Dim Msg As New StringBuilder Msg.Append("La compra se registró correctamente") - If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4) Then - If ObjConta.ValorPolizaDescuadre > 0 Then - GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - ErrorPrepolizaDescuadre = True - End If - End If + 'If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4) Then + ' If ObjConta.ValorPolizaDescuadre > 0 Then + ' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + ' ErrorPrepolizaDescuadre = True + ' End If + 'End If 'ACTUALIZA CVEFACTURA If Request("CveFactura") IsNot Nothing Then @@ -11114,6 +11118,48 @@ Partial Class Compras_Compras End If + + + ''VALIDA UNIDAD DE MEDIDA + 'If e.Row.DBCampo("CvePS").ToString.ToEntero > 0 Then + ' Dim DtEquivalencias As DataTable = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToString.ToEntero, e.Row.DBCampo("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa) + + ' 'SI UM NO ESTA REGISTRADA + ' If e.Row.DBCampo("CveUM").ToString.ToEntero <= 0 Then + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(1,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN registrar") + ' End If + + ' 'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCHyperLink("HplPS").Text = e.Row.DBCampo("PSCodigo") + + ' 'EQUIVALENCIA + ' If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then + + ' If DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero}").Rows.Count > 0 Then + ' If Not DtEquivalencias.FiltraParametros($"CveUM = {e.Row.DBCampo("CveUM").ToString.ToEntero} AND UnidadBase = 1").Rows.Count > 0 Then + ' 'UM NO BASE + ' e.Row.FCLinkButton("LBAplicarEquivalencia").Visible = True + + ' 'e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(2,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida NO medida base") + ' End If + ' Else + ' 'SIN EQUIVALENCIA + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("onclick", $"FncUMEquivalencias(3,'{e.Row.DBCampo("UM").Replace("'", "")}',{e.Row.RowIndex},'{DtEquivalencias.FiltroPrimeroValor("UnidadMedida", "UnidadBase = 1")}','{e.Row.DBCampo("CveUnidadMedidaSAT")}','{e.Row.DBCampo("SATClaveUnidadMedida")}')") + ' e.Row.FCLabel("LtlUnidadMedida").CssClass = "label label-danger manita centrarUM" + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("data-toggle", "tooltip") + ' e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN equivalencia") + ' End If + ' DtEquivalencias.Dispose() + ' End If + 'End If + + + End If 'HEADER GvInv @@ -13617,18 +13663,19 @@ Partial Class Compras_Compras 'End Sub Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try - Dim subtotaldevolucion As Double = 0 + Dim subtotaldevolucion As Decimal = 0 Dim realizadevolucion As Boolean = False 'Calculo los subtotales para comparar con la NC - Dim cantidad As Double = 0.0 + Dim cantidad As Decimal = 0D For Each Dr As GridViewRow In GVDevolucion.Rows - cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble + cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal If cantidad > 0 Then realizadevolucion = True - subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad + Dim PU As Decimal = If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr.DataKey("PUExtranjero").ToString.ToDecimal, Dr.DataKey("PU").ToString.ToDecimal) + subtotaldevolucion += PU * cantidad End If Next @@ -13869,14 +13916,18 @@ Partial Class Compras_Compras End If End If + Dim dttpagos As DataTable = New DataTable ' 2024-11-13 OIC Esta ubicado antes de Refacturacion por que al refacturar los datos de pago dejan de estar disponibles dttpagos sellena antes + If ObjCompra.GetComprasPagos(CveCompraRefacturacion, UsuarioActual.CveEmpresa) Then + dttpagos = ObjCompra.DtResultados + End If + Dim Tipo As Integer = 1 If ChkRefacNC.Checked Then Tipo = 2 'CONTABILIZA REFACTURACION If ObjCompra.Refacturacion(CveCompraRefacturacion, CveCompra, UsuarioActual.CveEmpresa, Tipo) Then - Dim dttpagos As DataTable - If ObjCompra.GetComprasPagos(CveCompraRefacturacion, UsuarioActual.CveEmpresa) Then - dttpagos = ObjCompra.DtResultados + + If dttpagos IsNot Nothing AndAlso dttpagos.Rows.Count > 0 Then For Each drp As DataRow In dttpagos.Rows Dim Pago As New CompraPago @@ -13885,22 +13936,17 @@ Partial Class Compras_Compras Pago.CveMonedaPago = 1 Pago.CveCompraAmortizacion = -1 Pago.TipoPago = If(drp("CveIE").ToString.ToEntero > 0, "B", "NC") - Dim ErrorMovtosCxP As Boolean = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) Next - End If - Else ErrorBitacora = True End If - - - 'Return True Return ErrorBitacora + End Function Private Function GuardaRefacturacionBitacora(ObjCompra As ClsCompras, ObjEventos As ClsOIEventos) As Boolean diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 031d3d505..31475c28c 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1686,7 +1686,7 @@ Partial Class Compras_eFacturas fpdf = fpdf.Replace($"{fpdfSplit(0)}-", "") End If - If fxml.Contains(fpdf) Then + If fxml.Contains(fpdf) Or (ListXML.Count = 1 And ListPDF.Count = 1) Then RutaPDF = fInfoPDF.FullName Exit For End If @@ -7985,6 +7985,9 @@ Namespace ADS.eFacturas GuardaLogAD(ex.ToString(), ArchivoLog) End Try + + ElseIf Fact.RespuestaInsert = 0 AndAlso Fact.CveFactura > 0 Then + 'FIXME OIC Else rowLog("Motivo") = $"RFC ""{Fact.ReceptorRFC}"" Error al insertar" End If diff --git a/Empresas/119/Formatos/Cotizacion.rdlc b/Empresas/119/Formatos/Cotizacion.rdlc index 51e22dcf5..e45d17b44 100644 --- a/Empresas/119/Formatos/Cotizacion.rdlc +++ b/Empresas/119/Formatos/Cotizacion.rdlc @@ -1237,6 +1237,7 @@ 2pt + true @@ -2787,12 +2788,6 @@ true ReportParameter1 - - String - true - true - ReportParameter1 - diff --git a/Empresas/158/Formatos/Cotizacion.rdlc b/Empresas/158/Formatos/Cotizacion.rdlc index 54181a5fb..7f69682af 100644 --- a/Empresas/158/Formatos/Cotizacion.rdlc +++ b/Empresas/158/Formatos/Cotizacion.rdlc @@ -1,2111 +1,5 @@ - - - - - true - true - - - - - Cliente: - - - - =Parameters!ClienteNombre.Value - - - - - - - - - Dirección: - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Atención A: - - - - =Parameters!ClienteContacto.Value - - - - - - - Textbox2 - 0.05159in - 4.32145cm - 0.99993in - 3.6362in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - Cotización - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - = Parameters!Fecha.Value - - - - - - - - - - - - - Forma de pago: - - - - =Parameters!FormaPago.Value - - - - - - - - - Método de pago: - - - - =Parameters!MetodoPago.Value - - - - - - - - - Cuenta: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - - Textbox4 - 0.05159in - 5.39311in - 1.27833in - 2.8593in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - AJA9809264V2 - - - - - - - - - - - - - - - - - - Vendedor: - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox40 - 3.51387cm - 13.72673cm - 2.47332cm - 7.26261cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.75572in - - - 0.58129in - - - 0.79461in - - - 2.38421in - - - 0.78125in - - - 0.63048in - - - 0.55487in - - - 0.62063in - - - 1.11998in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IEPS - - - - - - - Textbox23 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IVA - - - - - - - Textbox8 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IEPS.Value - - - - - - - IEPS - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IVA.Value - - - - - - - IVA - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 2.45577in - 0.04048in - 0.34081in - 8.22304in - 4 - - - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 3.25108in - 0.98592in - 0.18861in - 7.2776in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.99824cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.93858cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 7.4511cm - 15.05252cm - 0.48004cm - 5.93682cm - 8 - - - - - - true - true - - - - - Sin más por el momento, se despide su seguro proveedor - - - - Textbox2 - 16.4177cm - 3.65232cm - 0.57354cm - 12.91587cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - 17.86437cm - 7.71741cm - 0cm - 5.675cm - 10 - - - - - - true - true - - - - - =Parameters!VendedorNombre.Value - - - - Textbox3 - 17.93492cm - 7.71741cm - 0.6cm - 5.675cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre Comercial: - - - - - - - - - Beneficiario: - - - - - - - - - - - - - Banco: - - - - - - - - - - - - - Clabe: - - - - - - - - - Cuenta: - - - - - - - - - - - Textbox1 - 12.29987cm - 0.10282cm - 2.03296cm - 3.74249cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - BBVA BANCOMER, MONEDA NACIONAL - - - - - - - - - 012760004508391082 - - - - - - - - - 0450839108 - - - - - - - Textbox1 - 12.29987cm - 3.84531cm - 2.03295cm - 5.75197cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre Comercial: - - - - - - - - - Beneficiario: - - - - - - - - - - - - - Banco: - - - - - - - - - - - - - Clabe: - - - - - - - - - Cuenta: - - - - - - - - - - - Textbox1 - 12.29987cm - 9.70311cm - 2.03295cm - 4.17266cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - AGROPECUARIA JAM SA DE CV - - - - - - - - - BBVA BANCOMER, MONEDA DOLARES - - - - - - - - - 012760004508391163 - - - - - - - - - 0450839116 - - - - - - - Textbox1 - 12.29987cm - 13.87577cm - 2.03294cm - 6.94061cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Observaciones de crédito: - - - - =Parameters!Observaciones.Value - - - - - - - =Parameters!FormaEntrega.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - logo - FitProportional - 0.13104cm - 0.10282cm - 2.53982cm - 4.06377cm - 17 - - - - - - 18.53492cm - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + =Parameters!ClienteNombre.Value + + + + + + + + + Dirección: + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Atención A: + + + + =Parameters!ClienteContacto.Value + + + + + + + Textbox2 + 0.05159in + 4.32145cm + 0.99993in + 3.6362in + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + Cotización + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + = Parameters!Fecha.Value + + + + + + + + + + + + + Forma de pago: + + + + =Parameters!FormaPago.Value + + + + + + + + + Método de pago: + + + + =Parameters!MetodoPago.Value + + + + + + + + + Cuenta: + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + + Textbox4 + 0.05159in + 5.39311in + 1.27833in + 2.8593in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + AJA9809264V2 + + + + + + + + + + + + + + + + + + Vendedor: + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox40 + 3.51387cm + 13.72673cm + 2.47332cm + 7.26261cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.75572in + + + 0.58129in + + + 0.79461in + + + 2.38421in + + + 0.78125in + + + 0.63048in + + + 0.55487in + + + 0.62063in + + + 1.11998in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IEPS + + + + + + + Textbox23 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IVA + + + + + + + Textbox8 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IEPS.Value + + + + + + + IEPS + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IVA.Value + + + + + + + IVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.45577in + 0.04048in + 0.34081in + 8.22304in + 4 + + + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 3.25108in + 0.98592in + 0.18861in + 7.2776in + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 7.4511cm + 15.05252cm + 0.48004cm + 5.93682cm + 8 + + + + + + true + true + + + + + Sin más por el momento, se despide su seguro proveedor + + + + Textbox2 + 16.4177cm + 3.65232cm + 0.57354cm + 12.91587cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + 17.86437cm + 7.71741cm + 0cm + 5.675cm + 10 + + + + + + true + true + + + + + =Parameters!VendedorNombre.Value + + + + Textbox3 + 17.93492cm + 7.71741cm + 0.6cm + 5.675cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre Comercial: + + + + + + + + + Beneficiario: + + + + + + + + + + + + + Banco: + + + + + + + + + + + + + Clabe: + + + + + + + + + Cuenta: + + + + + + + + + + + Textbox1 + 12.29987cm + 0.10282cm + 2.03296cm + 3.74249cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + BBVA BANCOMER, MONEDA NACIONAL + + + + + + + + + 012760004508391082 + + + + + + + + + 0450839108 + + + + + + + Textbox1 + 12.29987cm + 3.84531cm + 2.03295cm + 5.75197cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre Comercial: + + + + + + + + + Beneficiario: + + + + + + + + + + + + + Banco: + + + + + + + + + + + + + Clabe: + + + + + + + + + Cuenta: + + + + + + + + + + + Textbox1 + 12.29987cm + 9.70311cm + 2.03295cm + 4.17266cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + AGROPECUARIA JAM SA DE CV + + + + + + + + + BBVA BANCOMER, MONEDA DOLARES + + + + + + + + + 012760004508391163 + + + + + + + + + 0450839116 + + + + + + + Textbox1 + 12.29987cm + 13.87577cm + 2.03294cm + 6.94061cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones de crédito: + + + + =Parameters!Observaciones.Value + + + + + + + =Parameters!FormaEntrega.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + logo + FitProportional + 0.13104cm + 0.10282cm + 2.53982cm + 4.06377cm + 17 + + + + + + 18.53492cm + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + @@ -535,14 +535,14 @@ =Fields!Cantidad.Value @@ -553,6 +553,7 @@ + true @@ -567,13 +568,13 @@ =Fields!UM.Value @@ -598,7 +599,7 @@ =Fields!CodPS.Value @@ -629,7 +630,7 @@ =Fields!Producto.Value @@ -658,7 +659,7 @@ =Fields!Obs.Value @@ -687,7 +688,7 @@ =Fields!Importe.Value @@ -823,7 +824,7 @@ I.V.A. @@ -833,7 +834,7 @@ Textbox20 - 1.84536cm + 1.76972cm 15.76748cm 0.45183cm 2.5cm @@ -857,7 +858,7 @@ TOTAL: @@ -867,7 +868,7 @@ Textbox20 - 3.94467cm + 3.86903cm 15.77277cm 0.45183cm 2.5cm @@ -892,7 +893,7 @@ =Parameters!IVA.Value @@ -904,7 +905,7 @@ Textbox20 - 1.84536cm + 1.76972cm 18.26748cm 0.45183cm 2.4365cm @@ -930,7 +931,7 @@ =Parameters!Total.Value @@ -942,7 +943,7 @@ Textbox20 - 3.94467cm + 3.86903cm 18.27277cm 0.45183cm 2.43121cm @@ -968,7 +969,7 @@ SUB-TOTAL @@ -978,7 +979,7 @@ Textbox20 - 0.40195cm + 0.32631cm 15.76748cm 0.45183cm 2.5cm @@ -1003,7 +1004,7 @@ =Parameters!SubTotal.Value @@ -1015,8 +1016,8 @@ Textbox20 - 0.40195cm - 18.26748cm + 0.32631cm + 18.29588cm 0.45183cm 2.4365cm 5 @@ -1050,7 +1051,7 @@ Textbox46 - 4.05051cm + 4.13362cm 0.00001cm 0.45183cm 15.04926cm @@ -1080,7 +1081,7 @@ Textbox5 - 0.11768cm + 0.04204cm 0.14316cm 20.70398cm 7 @@ -1112,7 +1113,7 @@ Textbox5 - 3.73096cm + 3.65532cm 15.22566cm 0.14316cm 5.47753cm @@ -1145,7 +1146,7 @@ Textbox5 - 4.50233cm + 4.42669cm 15.22566cm 0.14502cm 5.47832cm @@ -1186,7 +1187,7 @@ Textbox1 - 0.43723cm + 0.36159cm 0.03529cm 0.41479cm 14.67376cm @@ -1211,7 +1212,7 @@ Ret I.V.A @@ -1221,7 +1222,7 @@ Textbox20 - 2.29719cm + 2.22155cm 15.76669cm 0.45183cm 2.5cm @@ -1249,7 +1250,7 @@ =Parameters!RetIVA.Value @@ -1261,7 +1262,7 @@ Textbox20 - 2.29719cm + 2.22155cm 18.26669cm 0.45183cm 2.4365cm @@ -1290,7 +1291,7 @@ Ret I.S.R @@ -1300,7 +1301,7 @@ Textbox20 - 2.74902cm + 2.67338cm 15.76669cm 0.45183cm 2.5cm @@ -1328,7 +1329,7 @@ =Parameters!RetISR.Value @@ -1340,7 +1341,7 @@ Textbox20 - 2.74902cm + 2.67338cm 18.26669cm 0.45183cm 2.4365cm @@ -1369,7 +1370,7 @@ I.E.P.S @@ -1379,7 +1380,7 @@ Textbox20 - 3.20085cm + 3.12521cm 15.76669cm 0.45183cm 2.5cm @@ -1407,7 +1408,7 @@ =Sum(Fields!IEPS.Value, "DsOC") @@ -1419,7 +1420,7 @@ Textbox20 - 3.20085cm + 3.12521cm 18.26669cm 0.45183cm 2.4365cm @@ -1448,7 +1449,7 @@ DESCUENTO @@ -1458,7 +1459,7 @@ Textbox20 - 0.88906cm + 0.81342cm 15.77355cm 0.45183cm 2.5cm @@ -1486,7 +1487,7 @@ =Parameters!Descuento.Value @@ -1498,7 +1499,7 @@ Textbox20 - 0.88906cm + 0.81342cm 18.27355cm 0.45183cm 2.4365cm @@ -1527,7 +1528,7 @@ SUB-TOTAL2 @@ -1537,7 +1538,7 @@ Textbox20 - 1.34089cm + 1.26525cm 15.77355cm 0.45183cm 2.5cm @@ -1565,7 +1566,7 @@ =Parameters!SubTotal2.Value @@ -1577,7 +1578,7 @@ Textbox20 - 1.34089cm + 1.26525cm 18.27355cm 0.45183cm 2.4365cm @@ -1598,10 +1599,10 @@ true - 1.12516cm + 1.04205cm 0.12849cm - 5.34083cm - 20.71005cm + 5.42394cm + 20.73238cm 1 - + + + + + 4 + true @@ -2226,7 +2227,7 @@ - RFC del proveedor de cretificación: + RFC del proveedor de certificación: - true diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 6dc4f95bb..4fcdc2a61 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -963,16 +963,12 @@ Partial Class Inventarios_EntradasSalidas HdnIdPoliza.Value = Mov.IDPoliza.ToString HplImprimir.Visible = True HplImprimir.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) - HplImprimirResumen.Visible = True HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento))) - CveCompra = Mov.CveCompra CveConcepto = Mov.CveConcepto - - If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then HplDescargaXml.Visible = True HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto")))) @@ -987,20 +983,18 @@ Partial Class Inventarios_EntradasSalidas HplCartaPorte.Visible = True HplCartaPorte.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPO&CVEMOV={0}", CveMovimiento))) End If - - If UsuarioActual.CveRol = 1 Then LnkGenerarPDF.Visible = True End If End If - - + If CveConcepto.Contiene(26, 27) Then + LnkAgregarProducto.Visible = False ' si es traspaso no se debe permitir agregar + End If If CveConcepto.Contiene(3, 8) Then LiLnkGuias.Visible = True End If - If Mov.IDPoliza > 0 Then HplPoliza.Visible = True : HplPoliza.NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", Mov.IDPoliza) If CveConcepto = 6 Or CveConcepto = 7 Then diff --git a/Transportes/RepContratoDetalle.aspx b/Transportes/RepContratoDetalle.aspx index 0ca5a6ff9..4d1b16a83 100644 --- a/Transportes/RepContratoDetalle.aspx +++ b/Transportes/RepContratoDetalle.aspx @@ -152,20 +152,19 @@ -
- -
- - - -
-
- -
-
+
+ +
+ + + +
+
+
+
@@ -388,10 +387,11 @@
-
+
+
+ - - Descargar + Descargar @@ -473,11 +473,9 @@ Subir Archivo - - - - + +
@@ -1147,6 +1145,7 @@
+ <%--Modal subir archivo--%> @@ -1220,6 +1219,7 @@ diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9f461244b..7910d3c62 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6716,6 +6716,9 @@ Partial Class Ventas ddlAlmacen.Items.Clear() DTAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") + If UsuarioActual.CveEmpresa = 199 Then + DTAlmacen.Merge(GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto <> {DdlSubProyectoDatos.SelectedValue.ToEntero()}")) + End If ddlAlmacen.DataSource = DTAlmacen ddlAlmacen.Items.Insert(0, New ListItem("Seleccione ", "-1")) @@ -9526,18 +9529,18 @@ Partial Class Ventas e.Row.FCLiteral("LtlSerie").Visible = True End If - If e.Row.DBCampo("CveTipoInvPS").ToEntero() = 5 And CveVenta <= 0 Then - - e.Row.FCTextBox("TxtSerie").Visible = True - e.Row.FCTextBox("TxtSerie").Attributes.Remove("onkeypress") - e.Row.FCTextBox("TxtSerie").Attributes.Add("onkeypress", String.Format("SeriePS(event,{0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID)) - e.Row.FCTextBox("TxtSerie").Attributes.Remove("onblur") - e.Row.FCTextBox("TxtSerie").Attributes.Add("onblur", String.Format("SeriePSBlur({0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID)) - - 'e.Row.FCTextBox("TxtSerie").Attributes.Add("onkeyup", String.Format("LimpiaAF(1, '{0}'); EnterAFEdit(event,this,{1},{2});", e.Row.FCHiddenField("HdnCveConcepto").Value, e.Row.FCHiddenField("HdnCveAF").ClientID, e.Row.FCHiddenField("HdnCodAF").ClientID)) - - 'e.Row.FCTextBox("LblCodigo").Attributes.Add("onkeyup", String.Format("LimpiaAF(1, '{0}'); EnterAFEdit(event,this,{1},{2});", e.Row.FCHiddenField("HdnCveConcepto").Value, e.Row.FCHiddenField("HdnCveAF").ClientID, e.Row.FCHiddenField("HdnCodAF").ClientID)) - 'e.Row.FCTextBox("LblCodigo").Attributes.Add("onblur", String.Format("LimpiaAF(1, '{0}'); AFBlurEdit(this,{1},{2});", e.Row.FCHiddenField("HdnCveConcepto").Value, e.Row.FCHiddenField("HdnCveAF").ClientID, e.Row.FCHiddenField("HdnCodAF").ClientID)) + If CveVenta <= 0 Then + If e.Row.DBCampo("AplicaSerie").ToEntero() = 1 Then + GvInv.Columns(4).Visible = True + e.Row.FCTextBox("TxtSerie").Visible = True + e.Row.FCTextBox("TxtSerie").Attributes.Remove("onkeypress") + e.Row.FCTextBox("TxtSerie").Attributes.Add("onkeypress", String.Format("SeriePS(event,{0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID)) + e.Row.FCTextBox("TxtSerie").Attributes.Remove("onblur") + e.Row.FCTextBox("TxtSerie").Attributes.Add("onblur", String.Format("SeriePSBlur({0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID)) + End If + If e.Row.DBCampo("AplicaLote").ToEntero() = 1 Then + CargarCaducidadProducto(e.Row.DBCampo("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"), "", Nothing) + End If End If If e.Row.DBCampo("CvePS") = "" Then @@ -9590,6 +9593,37 @@ Partial Class Ventas End If End Sub + Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList, ValorAsignado As String, DtDatosDevolucion As DataTable) + DdlLoteFechaCaducidad.Items.Clear() + DdlLoteFechaCaducidad.Items.Add(New ListItem("-", "|")) + + Dim almacenes As String = ddlAlmacen.SelectedValue + If almacenes = "" Then + almacenes = "-1" + End If + GvInv.Columns(7).Visible = True + If DtDatosDevolucion IsNot Nothing Then + DdlLoteFechaCaducidad.Visible = True + For Each dr As DataRow In DtDatosDevolucion.FiltraParametros($"CvePS = {CvePS}", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows + DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}")) + Next + Else + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then + DdlLoteFechaCaducidad.Visible = True + For Each dr As DataRow In ObjInventarios.DtResultados.FiltraParametros("", DistinctColumns:={"Lote", "FechaCaducidad"}).Rows + DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}")) + Next + End If + ObjInventarios.Dispose() + End If + + If Not String.IsNullOrEmpty(ValorAsignado) Then + DdlLoteFechaCaducidad.SelectedValueExist(ValorAsignado) + End If + + End Sub + Protected Sub GVINV_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvInv.RowEditing GvInv.EditIndex = e.NewEditIndex CargaGVInv(DtInv.FiltraParametros("CveTipoPS=2")) @@ -10132,6 +10166,8 @@ Partial Class Ventas Dim CveProducto As Integer Dim Existencia As Double Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero() + Dim tCveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero() + If UsuarioActual.CveEmpresa = 199 Then tCveSubProyecto = -1 For Each dr As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then @@ -10141,7 +10177,7 @@ Partial Class Ventas Cantidad = TmpDT.SUM("Cantidad", $"CvePS = {CveProducto} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") 'VALIDA CONTRA LA SUMA DEL MISMO PS If UsuarioActual.Empresa.UsaInventarios AndAlso RemisionesLista.Count < 1 AndAlso dr("EntregaDirecta").ToString().ToEntero() < 1 Then Dim BuscarEnTabla As Boolean = If(UsuarioActual.Empresa.Funcionalidad(715) = "1", True, False) - Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), + Existencia = ObjInventarios.GetExistenciasPS(CveProducto, CveUnidad, UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=tCveSubProyecto, CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1, BuscarEnTabla:=BuscarEnTabla) If Existencia < Cantidad Then @@ -16606,8 +16642,16 @@ Partial Class Ventas End If Dim CveSeccionAlmacen As Integer = -3 'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero + Dim Lote As String = "-1" + Dim FCaducidad As Date = MinFecha - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then + If GvInv.Rows(i).FCDropDownList("DdlCaducidadProducto") IsNot Nothing AndAlso GvInv.Rows(i).FCDropDownList("DdlCaducidadProducto").Visible Then + Dim ArrayCaducidad As String() = GvInv.Rows(i).FCDropDownList("DdlCaducidadProducto").SelectedValue.Split("|"c) + Lote = ArrayCaducidad(0) + FCaducidad = ArrayCaducidad(1).ToDate + End If + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), Lote:=Lote, FechaCaducidad:=FCaducidad, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then OcurrioError = True ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
") Exit For @@ -20341,6 +20385,9 @@ Partial Class Ventas Row("CodigoPS") = DrPS("PSCodigo").ToString() Row("CveTipoPS") = DrPS("CveTipoPS") Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") + Row("AplicaSerie") = DrPS("AplicaSerie") + Row("AplicaLote") = DrPS("AplicaLote") + Row("AplicaCaducidad") = DrPS("AplicaCaducidad") Row("CveTamaño") = DrPS("CveTamaño") Row("CodigoObjetoImpuesto") = DrPS("CodigoObjetoImpuesto") @@ -20599,6 +20646,9 @@ Partial Class Ventas TmpDT.Columns.Add("NoIdentificacion", GetType(String)) TmpDT.Columns.Add("CveTipoPS", GetType(Integer)) TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) + TmpDT.Columns.Add("AplicaSerie", GetType(Integer)) + TmpDT.Columns.Add("AplicaLote", GetType(Integer)) + TmpDT.Columns.Add("AplicaCaducidad", GetType(Integer)) TmpDT.Columns.Add("Serie", GetType(String)) TmpDT.Columns.Add("CuentaPredial", GetType(String)) TmpDT.Columns.Add("Obs", GetType(String)) @@ -24959,6 +25009,8 @@ Partial Class Ventas ObjInventarios.Dispose() UpINV.Update() End Sub + + Private Function ValidaSerieINV() As Boolean Dim Retorno As Boolean = False Dim Existencia As Decimal = 0 @@ -25305,7 +25357,7 @@ Partial Class Ventas DtTemporal.Columns.Add(colNew) End If - GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0 + GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha