diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 1b16277ef..b06d1b586 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1162,7 +1162,7 @@ Public Class ClsCompras Return Retorno End Function - Public Function GetFacturasComparacionXML(Version As String, Xml As String, CveEmpresa As Integer) As Boolean + Public Function GetFacturasComparacionXML(Version As String, Xml As String, CveEmpresa As Integer, Optional RestriccionesVinculacion As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComparacionXML") @@ -1170,6 +1170,7 @@ Public Class ClsCompras .Add("@Version", SqlDbType.VarChar, 4).Value = Version .Add("@Xml", SqlDbType.Xml).Value = Xml .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@RestriccionesVinculacion", SqlDbType.VarChar, 100).Value = RestriccionesVinculacion .Add("@Error", SqlDbType.VarChar, 300).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index 29c6072ed..19a737a7f 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -715,7 +715,7 @@ Public Class ClsOC Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1", - Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0, Optional EsTemporal As Boolean = False) As Boolean + Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraAdd") @@ -763,8 +763,6 @@ Public Class ClsOC .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito .Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega ' 0 Contado, 1 Credito .Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago - .Add("@EsTemporal", SqlDbType.Bit).Value = EsTemporal - .Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output @@ -1675,7 +1673,7 @@ Public Class ClsOC CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1", Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1, Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1, - Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1, Optional EsTemporal As Integer = -1) As Boolean + Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraRep") @@ -1708,9 +1706,6 @@ Public Class ClsOC .Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago .Add("@Serie", SqlDbType.VarChar).Value = Serie .Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo - .Add("@EsTemporal", SqlDbType.Int).Value = EsTemporal - - End With Try @@ -1849,7 +1844,7 @@ Public Class ClsOC Public Function GetOrdenesPendientes(pTipo As String, pTipoBusqueda As Integer, pCveEmpresa As Integer, pCveProyecto As Integer, pCveSubProyecto As Integer, pCveEstatusCompra As Integer, pCveUsuario As Integer, CveCliente As Integer, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, - Optional TieneAnticipo As Integer = -1, Optional EsTemporal As Integer = -1) As Boolean + Optional TieneAnticipo As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraPendientes") @@ -1867,7 +1862,6 @@ Public Class ClsOC .Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado .Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta .Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo - .Add("@EsTemporal", SqlDbType.Int).Value = EsTemporal End With Try @@ -2631,12 +2625,13 @@ Public Class ClsOC End Function - Public Function PendientesCompra(CvePS As Integer, CveEmpresa As Integer) As Boolean + Public Function PendientesCompra(CvePS As Integer, CveSubProyectos As String, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_PendientesCompra") With SqlAdapter.SelectCommand.Parameters .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveSubProyectos", SqlDbType.VarChar, 100).Value = CveSubProyectos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 0f4eea25a..18be4490a 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2504,7 +2504,7 @@ Public Class ClsVentas End Function Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String, - Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer + Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional ReqAutorizacion As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Vta_PromocionesAdd") @@ -2522,6 +2522,7 @@ Public Class ClsVentas .Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor + .Add("@ReqAutorizacion", SqlDbType.Bit).Value = ReqAutorizacion .Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -2668,7 +2669,8 @@ Public Class ClsVentas Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1, - Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False, Optional Opcion As Integer = 1) As Boolean + Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional IncluyeImpuestos As Boolean = False, Optional Opcion As Integer = 1 + ) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesDetalleAdd") @@ -2695,6 +2697,7 @@ Public Class ClsVentas .Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño .Add("@IncluyeImpuestos", SqlDbType.Bit).Value = IncluyeImpuestos .Add("@Opcion", SqlDbType.Int).Value = Opcion + End With Try diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index e8fd53eae..9343ffa93 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -3726,6 +3726,14 @@ Namespace Extensiones End Try End Sub + + Public Function DataColumnToString(ByRef dtt As DataTable, NombreColumna As String) As String + + Return String.Join(", ", dtt.AsEnumerable(). + Where(Function(row) Not row.IsNull(NombreColumna)). + Select(Function(row) row(NombreColumna).ToString())) + End Function + Public Function GetSelectedValues(ByRef Ddl As ListBox, Optional beforeValue As String = "", Optional AfterValue As String = "") As String Dim retorno As New StringBuilder diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 4f4952174..660c5a22c 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -672,7 +672,7 @@ # Cant Unidad - Clasificación + Clasificación     @@ -682,7 +682,7 @@
Producto o Servicio - Observación + Observación   @@ -772,7 +772,7 @@ <%-- 3 --%> - +
@@ -785,7 +785,7 @@ <%-- 4 --%> - + <%-- 5 --%> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2fe6da977..48d4a0c62 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1901,14 +1901,19 @@ Partial Class Compras_Compras Xml = Xml.Replace("<", "") Xml = Xml.Replace("&", "") 'adicional, si hay otros - If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then + 'si el tipo de proveedor es acreedor, no cruzar por numero de parte + Dim RestriccionesVinculacion As String = "" + ' Acreedor + If CveTipoProveedor.Contiene(2, 3) Then RestriccionesVinculacion = "NO-NUMEROPARTE" + + If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa, RestriccionesVinculacion) Then TmpDT = ObjeFacturas.DtResultados TmpDT.Columns.Add("CveSATPSActualizado") SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL If Not TmpDT.Columns.Contains("Amortizacion") Then TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) - If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) - If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) + If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add(New DataColumn("AplicaLote", GetType(Boolean)) With {.DefaultValue = False}) + If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add(New DataColumn("AplicaCaducidad", GetType(Boolean)) With {.DefaultValue = False}) If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) @@ -3154,36 +3159,34 @@ Partial Class Compras_Compras 'VINCULACIÓN OC - NUEVA DICIEMBRE 2015 If dr("OCVinculada").ToString() <> "" Then - Dim DtOCs As New DataTable + Dim OCS As String = "", CveOCS As String = "" - - DtOCs.Columns.Add("FolioOC", GetType(Integer)) + Dim DtOCs As New DataTable + DtOCs.Columns.Add("SerieFolioOC", GetType(String)) DtOCs.Columns.Add("CveOrdenCompra", GetType(Integer)) - - - For Each drt As DataRow In TmpDT.Rows - If drt("FolioOC").ToString <> "" Then + DtOCs.Columns.Add("Fecha", GetType(Date)) + DtOCs.Columns.Add("Descripcion", GetType(String)) + For Each drt As DataRow In TmpDT.FiltraParametros("", "", {"SerieFolioOC", "CveOrdenCompra"}).Rows + If drt("SerieFolioOC").ToString <> "" Then Dim DrOC As DataRow = DtOCs.NewRow - DrOC("FolioOC") = drt("FolioOC").ToString + DrOC("SerieFolioOC") = drt("SerieFolioOC").ToString DrOC("CveOrdenCompra") = drt("CveOrdenCompra").ToString DtOCs.Rows.Add(DrOC) End If Next - DtOCs = DtOCs.FiltraParametros("", "", {"FolioOC", "CveOrdenCompra"}) - DtOCs.Columns.Add("Fecha", GetType(Date)) - DtOCs.Columns.Add("Descripcion", GetType(String)) - If DtOCs.Rows.Count > 0 Then For Each drt As DataRow In DtOCs.Rows - If ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, drt("CveOrdenCompra").ToString.ToEntero, CveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then - If ObjOC.DtResultados.Rows.Count = 1 Then - OCS += If(OCS <> "", String.Format(",{0}", drt("FolioOC").ToString), drt("FolioOC").ToString) - CveOCS += If(CveOCS <> "", String.Format(",{0}", drt("CveOrdenCompra").ToString), drt("CveOrdenCompra").ToString) - drt("Fecha") = ObjOC.DtResultados.FiltroPrimeroValor("FechaIng") - drt("Descripcion") = ObjOC.DtResultados.FiltroPrimeroValor("Descripcion") - End If - End If + OCS += If(OCS <> "", String.Format(",{0}", drt("SerieFolioOC").ToString), drt("SerieFolioOC").ToString) + CveOCS += If(CveOCS <> "", String.Format(",{0}", drt("CveOrdenCompra").ToString), drt("CveOrdenCompra").ToString) + 'If ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, drt("CveOrdenCompra").ToString.ToEntero, CveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then + ' If ObjOC.DtResultados.Rows.Count = 1 Then + ' OCS += If(OCS <> "", String.Format(",{0}", drt("FolioOC").ToString), drt("FolioOC").ToString) + ' CveOCS += If(CveOCS <> "", String.Format(",{0}", drt("CveOrdenCompra").ToString), drt("CveOrdenCompra").ToString) + ' drt("Fecha") = ObjOC.DtResultados.FiltroPrimeroValor("FechaIng") + ' drt("Descripcion") = ObjOC.DtResultados.FiltroPrimeroValor("Descripcion") + ' End If + 'End If Next End If @@ -4301,7 +4304,7 @@ Partial Class Compras_Compras Dim AnioFactura As Integer = TxtFecha.Text.ToDate.Year Dim Fecha28Dic As Date = New Date(2024, 12, 28) - If NowADS() >= Fecha28Dic Then + If NowADS() >= Fecha28Dic AndAlso TxtFecha.Text.ToDate.Year < 2025 Then Alert("A partir del 28 de diciembre de 2024 no se pueden registrar facturas de 2024.", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -7752,8 +7755,8 @@ Partial Class Compras_Compras If CveMovimientoInventario > 0 Then Dim TempParametros As String = Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoInventario)) - Msg.AppendFormat("
Ver Movimiento de Almacen", CveMovimientoInventario) - Msg.AppendFormat("
Imprimir Entrada Almacen", TempParametros) + Msg.AppendFormat("
Ver Movimiento de Almacen  ", CveMovimientoInventario) + Msg.AppendFormat(" Imprimir", TempParametros) End If If UsuarioActual.Empresa.TipoContabilidad = 2 Then @@ -11087,7 +11090,7 @@ Partial Class Compras_Compras If OC.GetOC(CveOC, UsuarioActual.CveEmpresa) Then - TxtOC.Text = OC.Folio.ToString + TxtOC.Text = OC.SerieFolio 'RegistraScript(String.Format("$get('TxtOC').value = '{0}';tb_remove;", OC.Folio)) RegistraScript("tb_remove();") @@ -11141,29 +11144,26 @@ Partial Class Compras_Compras #Region " ALMACEN " Private Sub CargaGvInv() - - If Not TmpDT.Columns.Contains("UUIDRow") Then - TmpDT.Columns.Add("UUIDRow", GetType(String)) - End If + If Not TmpDT.Columns.Contains("UUIDRow") Then TmpDT.Columns.Add("UUIDRow", GetType(String)) For Each dRow As DataRow In TmpDT.Rows If dRow("UUIDRow").ToString.Trim = "" Then dRow("UUIDRow") = Guid.NewGuid().ToString() End If - Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero + 'Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero - dRow("AplicaLote") = False - dRow("AplicaCaducidad") = False + 'dRow("AplicaLote") = False + 'dRow("AplicaCaducidad") = False - If CvePS > 0 Then - Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePS={CvePS}") - If drPS IsNot Nothing Then - dRow("AplicaLote") = If(drPS("AplicaLote").ToString = "", False, Boolean.Parse(drPS("AplicaLote").ToString)) - dRow("AplicaCaducidad") = If(drPS("AplicaCaducidad").ToString = "", False, Boolean.Parse(drPS("AplicaCaducidad").ToString)) - 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) - End If + 'If CvePS > 0 Then + ' Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + ' If drPS IsNot Nothing Then + ' dRow("AplicaLote") = If(drPS("AplicaLote").ToString = "", False, Boolean.Parse(drPS("AplicaLote").ToString)) + ' dRow("AplicaCaducidad") = If(drPS("AplicaCaducidad").ToString = "", False, Boolean.Parse(drPS("AplicaCaducidad").ToString)) + ' 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) + ' End If - End If + 'End If Next TmpDT.AcceptChanges() @@ -11175,16 +11175,14 @@ Partial Class Compras_Compras DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy End If - For Each dRow As DataRow In DtInv.Rows - - 'Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero - Dim AplicaLote As Boolean = Boolean.Parse(dRow("AplicaLote").ToString) 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}")) - Dim AplicaCaducidad As Boolean = Boolean.Parse(dRow("AplicaCaducidad").ToString) 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) + Dim AplicaLote As Boolean = False + Boolean.TryParse(dRow("AplicaLote").ToString, AplicaLote) + Dim AplicaCaducidad As Boolean = False + Boolean.TryParse(dRow("AplicaCaducidad").ToString, AplicaCaducidad) GvInv.Columns(7).Visible = AplicaLote GvInv.Columns(8).Visible = AplicaCaducidad - Next GvInv.DataSource = DtInv @@ -11254,25 +11252,10 @@ Partial Class Compras_Compras Protected Sub GVINV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then + Dim AplicaLote As Boolean = e.Row.DBCampo("AplicaLote").ToBool + Dim AplicaCaducidad As Boolean = e.Row.DBCampo("AplicaCaducidad").ToBool - Dim CvePS As Integer = e.Row.DataKey("CvePS").ToEntero - - Dim AplicaLote As Boolean = False - Dim AplicaCaducidad As Boolean = False - - If CvePS > 0 Then - Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CvePS={CvePS}") - If drPS IsNot Nothing Then - AplicaLote = If(drPS("AplicaLote").ToString = "", False, Boolean.Parse(drPS("AplicaLote").ToString)) 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}")) - AplicaCaducidad = If(drPS("AplicaCaducidad").ToString = "", False, Boolean.Parse(drPS("AplicaCaducidad").ToString)) 'Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) - End If - End If - - - If AplicaLote Then - e.Row.FCTextBox("TxtLote").Visible = True - End If - + If AplicaLote Then e.Row.FCTextBox("TxtLote").Visible = True If AplicaCaducidad Then Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl) DvFechaCaducidad.Visible = True @@ -11283,6 +11266,13 @@ Partial Class Compras_Compras Dim StrTipo As String = "CveTipoAlmacen IN (1,2,7,14,19)" If DdlTipoCompra.SelectedValue.Contiene("9", "12") Then StrTipo = "CveTipoAlmacen IN (21)" If EsDevolucionApoyoLogistico Then StrTipo = "CveTipoAlmacen = 27" + If CompraEstaVinculadaOC Then + 'filtrar solo los almacenes de las sucursales especficiadsa en el tmpdt. para encasillarlo + Dim dttt As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"CveSubProyecto"}) + If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then + StrTipo = StrTipo & " AND CveSubProyecto IN (" & DataColumnToString(dttt, "CveSubProyecto") & ") " + End If + End If e.Row.FCDropDownList("ddlEAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrTipo) e.Row.FCDropDownList("ddlEAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -11303,7 +11293,6 @@ Partial Class Compras_Compras e.Row.FCTextBox("TbCantidad").Enabled = True e.Row.FCTextBox("TbCantidad").Attributes.Add("onblur", String.Format("ValidarCantidad(this,{0})", If(e.Row.DBCampo("CantidadF").ToString.ToDecimal > e.Row.DBCampo("Cantidad").ToString.ToDecimal, e.Row.DBCampo("Cantidad"), e.Row.DBCampo("CantidadF")))) e.Row.FCTextBox("TbCantidad").Text = If(e.Row.DBCampo("CantidadF").ToString.ToDecimal > e.Row.DBCampo("Cantidad").ToString.ToDecimal, e.Row.DBCampo("Cantidad"), e.Row.DBCampo("CantidadF")) - End If 'SIEMPRE ENABLED FALSE @@ -11336,10 +11325,14 @@ Partial Class Compras_Compras 'que no sea recepcion alamcen adelantado. DdlOCVinculaInv If (UsuarioActual.Empresa.Funcionalidad(567) = "1" OrElse UsuarioActual.TienePermisoProceso(121)) AndAlso DdlOCVinculaInv.SelectedValue <> "176" Then If e.Row.FCDropDownList("ddlEAlmacen").Items.Count > 1 Then - e.Row.FCDropDownList("ddlEAlmacen").SelectedIndex = 1 + If UsuarioActual.CveAlmacen > 0 Then + e.Row.FCDropDownList("ddlEAlmacen").SelectedValueExist(UsuarioActual.CveAlmacen) + Else + e.Row.FCDropDownList("ddlEAlmacen").SelectedIndex = 1 + End If e.Row.FCCheckBox("cbInv").Checked = True - ddlAlmacenConsignacion_SelectedIndexChanged(e.Row.FCDropDownList("ddlEAlmacen"), Nothing) - CambiaTotalDevengar(Nothing, Nothing) + 'ddlAlmacenConsignacion_SelectedIndexChanged(e.Row.FCDropDownList("ddlEAlmacen"), Nothing) + ' CambiaTotalDevengar(Nothing, Nothing) End If End If If e.Row.DBCampo("Consec").ToEntero = 0 Then e.Row.BackColor = Drawing.Color.PaleGreen @@ -11388,17 +11381,6 @@ Partial Class Compras_Compras End If End If - If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then - - 'e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal.ToString("###,###,###.00") - - 'If PorcentajeProntoPago > 0 Then - ' e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal - () - 'End If - - End If - - ''VALIDA UNIDAD DE MEDIDA 'If e.Row.DBCampo("CvePS").ToString.ToEntero > 0 Then @@ -11453,6 +11435,14 @@ Partial Class Compras_Compras If DdlTipoCompra.SelectedValue.ToEntero = 10 Then StrAlmacenes = $"Modalidad = 0" If EsDevolucionApoyoLogistico Then StrAlmacenes = " CveTipoAlmacen = 27" + If CompraEstaVinculadaOC Then + 'filtrar solo los almacenes de las sucursales especficiadsa en el tmpdt. para encasillarlo + Dim dttt As DataTable = TmpDT.FiltraParametros("", DistinctColumns:={"CveSubProyecto"}) + If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then + StrAlmacenes = StrAlmacenes & " AND CveSubProyecto IN (" & DataColumnToString(dttt, "CveSubProyecto") & ") " + End If + End If + e.Row.FCDropDownList("ddlAlmacen").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros(StrAlmacenes) e.Row.FCDropDownList("ddlAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1")) e.Row.FCDropDownList("ddlAlmacen").DataBind() @@ -11469,7 +11459,11 @@ Partial Class Compras_Compras 'que no sea recepcion almacen adelantado. DdlOCVinculaInv If (UsuarioActual.Empresa.Funcionalidad(567) = "1" OrElse UsuarioActual.TienePermisoProceso(121)) AndAlso DdlOCVinculaInv.SelectedValue <> "176" Then If e.Row.FCDropDownList("ddlAlmacen").Items.Count > 1 Then - e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1 + If UsuarioActual.CveAlmacen > 0 Then + e.Row.FCDropDownList("ddlAlmacen").SelectedValueExist(UsuarioActual.CveAlmacen) + Else + e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1 + End If e.Row.FCCheckBox("cbAll").Checked = True End If End If @@ -12122,7 +12116,7 @@ Partial Class Compras_Compras End Sub Protected Sub CambiaTotalDevengar(sender As Object, e As EventArgs) - CalculaTotalPorDevengar() + If UsuarioActual.Empresa.UsaAC Then CalculaTotalPorDevengar() End Sub #End Region @@ -15484,6 +15478,8 @@ Partial Class Compras_Compras AjusteProntoPagoPorcentajeIVA = TmpDT.MAX("IVAPorcentaje").ToDecimal AjusteProntoPagoConIVA = (ImporteCompraConIVA - ImporteOCConIVA) AjusteProntoPagoSinIVA = (ImporteCompraSinIVA - ImporteOCSinIVA) + If Math.Abs(AjusteProntoPagoConIVA) < 1 Then AjusteProntoPagoConIVA = 0 Else ImporteRNC += AjusteProntoPagoConIVA + If Math.Abs(AjusteProntoPagoSinIVA) < 1 Then AjusteProntoPagoSinIVA = 0 If ConfirmaVinculacionOC_RNC(AjusteProntoPagoPorcentajeIVA) Then Vinculacion() @@ -15505,9 +15501,9 @@ Partial Class Compras_Compras For Each gvr As GridViewRow In GvOC1.Rows If gvr.DataKey("IVAPorcentaje").ToDecimal > 0 Then - ImporteOCConIVA = ImporteOCConIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) + ImporteOCConIVA = ImporteOCConIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) '- gvr.DataKey("Descuento").ToDecimal Else - ImporteOCSinIVA = ImporteOCSinIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) + ImporteOCSinIVA = ImporteOCSinIVA + (gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) '- gvr.DataKey("Descuento").ToDecimal End If Next @@ -15534,7 +15530,6 @@ Partial Class Compras_Compras End Sub Private Sub Vinculacion(Optional VinculacionCompleta As Boolean = False) - 'SI PUEDE RECIBIR POR OC Y COMPRA If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then @@ -15596,6 +15591,7 @@ Partial Class Compras_Compras Dim PU As Decimal = gvr.FCTextBox("TxtPU").Text.ToDecimal Dim tDescuento As Decimal = dr("Descuento").ToString.ToDecimal Dim Total As Decimal = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, Math.Round((gvr.FCTextBox("TxtCantidad").Text.ToDecimal * gvr.FCTextBox("TxtPU").Text.ToDecimal) - (TxtDescuento.Text.ToDouble / TotalRows).ToDecimal, 2), Cantidad * PU - tDescuento) 'gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal) + 'Dim Total As Decimal = gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal 'Dim IVA As Decimal = gvr.FCHiddenField("HdnOC1IVA").Value.ToDecimal 'Dim RetIVA As Double = gvr.FCHiddenField("HdnOC1RetIVA").Value.ToDecimal @@ -15627,6 +15623,12 @@ Partial Class Compras_Compras End If End If + If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then + PU = ((PU * Cantidad) - tDescuento) / Cantidad + Descuentos = 0 + Descuento = 0 + End If + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=CveCultivoCuadroDetalle, CveSATPSActualizado:=CveSATPSActualizado) @@ -15640,7 +15642,7 @@ Partial Class Compras_Compras TmpDT.Rows(Index)("CveClasificacionOG") = dr("CveClasificacionOG").ToString.ToEntero 'TmpDT.Rows(Index)("PSCodigo") = DtTemporalXML.Rows(IndexTmpOriginal)("PSCodigo") - TmpDT.Rows(Index)("PSCodigo") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "").ToString + TmpDT.Rows(Index)("PSCodigo") = dr("PS").ToString ' GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "").ToString Dim CveAF As String = dr("CveActivoFijo").ToString If CveAF <> "" AndAlso CveAF <> "-1" Then @@ -15657,7 +15659,7 @@ Partial Class Compras_Compras IndexTmpOriginal += 1 Next - If UsuarioActual.Empresa.Funcionalidad(574) = "1" AndAlso (AjusteProntoPagoConIVA > 0 Or AjusteProntoPagoSinIVA > 0) Then + If UsuarioActual.Empresa.Funcionalidad(574) = "1" AndAlso (ImporteRNC > 0 Or AjusteProntoPagoSinIVA > 0) Then Dim CvePS_RNC As Integer = UsuarioActual.Empresa.Funcionalidad(580).ToEntero If CvePS_RNC = 0 Then @@ -15689,8 +15691,8 @@ Partial Class Compras_Compras Dim UM As String = PSRow("UnidadMedida").ToString - If AjusteProntoPagoConIVA > 0 Then - AddPS(1, CveUM, UM, CveClasificacion, Clasificacion, CvePS_RNC, PS, 1, CveSubProyectoPrincipal.ToString, SubProyecto, "", "-1", "", AjusteProntoPagoConIVA, AjusteProntoPagoConIVA, AjusteProntoPagoPorcentajeIVA, 0, 0, 0, 0, 0) + If ImporteRNC > 0 Then + AddPS(1, CveUM, UM, CveClasificacion, Clasificacion, CvePS_RNC, PS, 1, CveSubProyectoPrincipal.ToString, SubProyecto, "", "-1", "", ImporteRNC, ImporteRNC, AjusteProntoPagoPorcentajeIVA, 0, 0, 0, 0, 0) End If If AjusteProntoPagoSinIVA > 0 Then @@ -15698,14 +15700,13 @@ Partial Class Compras_Compras End If End If - - AddPS2(False) + CompraEstaVinculadaOC = True + 'AddPS2(False) 'AJUSTE DE REDONDEO O DIFERENCIA PERMITIDA DE IMPORTE AjustaImporteUltimoConcepto((If(TieneAmortizacion, TmpDT.SUMD("ImporteSinImpuestos"), TxtSubTotal2.Text.ToDouble) + TxtOtrosImpuestos.Text.ToDouble).ToDecimal - If(TieneAmortizacion, TmpDT.SUM("ImporteSinImpuestos").ToString.ToDecimal, TmpDT.SUM("Total").ToString.ToDecimal)) 'AjustaImporteUltimoConcepto(TxtSubTotal2.Text.ToDecimal + TxtOtrosImpuestos.Text.ToDecimal - (TmpDT.SUM("Total").ToString.ToDecimal)) - BtnGuardar.Enabled = True If Not CierrePeriodo Then BtnGuardar.Visible = True @@ -15804,9 +15805,7 @@ Partial Class Compras_Compras End If - CalculaTotales() - CompraEstaVinculadaOC = True End Sub @@ -16917,8 +16916,9 @@ Partial Class Compras_Compras Private Sub CargaSerie() Dim AplicaCaducidad As Boolean = False - If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).Rows(0)("AplicaCaducidad").ToString = "True", True, False) + Dim drr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltroPrimero("") + If drr IsNot Nothing Then + AplicaCaducidad = If(drr("AplicaCaducidad").ToString = "True", True, False) End If If AplicaCaducidad Then @@ -16969,7 +16969,7 @@ Partial Class Compras_Compras Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Dim SerieLote As String = TxtSerieLote.Text.Replace(" ", String.Empty) Dim AplicaCaducidad As Boolean = False - Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltroPrimero("", "PS") + Dim dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltroPrimero("", "PS") If dr IsNot Nothing Then AplicaCaducidad = dr("AplicaCaducidad").ToString = "True" 'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS @@ -21992,7 +21992,7 @@ Partial Class Compras_Compras .NombreProveedor = NombreProveedor, .Fecha = Fecha, .CveMoneda = CveMoneda, - .Serie = If(EsDRMN, $"DRNC-{Serie}", Serie), + .Serie = $"D-{Serie}", .Folio = Folio, .CveCompraAmortizacion = CveCompraRegistrada } @@ -22849,23 +22849,15 @@ Public Class ClsCompraManagerCompras TmpDT.Columns.Add("CveSATPSActualizado") SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL - If Not TmpDT.Columns.Contains("Amortizacion") Then - TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) - End If + If Not TmpDT.Columns.Contains("Amortizacion") Then TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) + If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) - If Not TmpDT.Columns.Contains("AplicaLote") Then - TmpDT.Columns.Add("AplicaLote", GetType(Boolean)) - End If - If Not TmpDT.Columns.Contains("AplicaCaducidad") Then - TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) - End If - If Not TmpDT.Columns.Contains("Lote") Then - TmpDT.Columns.Add("Lote", GetType(String)) - End If - If Not TmpDT.Columns.Contains("FechaCaducidad") Then - TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) - End If + If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean)) + + If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String)) + + If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date)) 'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101 Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") @@ -22875,7 +22867,6 @@ Public Class ClsCompraManagerCompras If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then Errores.AppendLine($"El comprobante contiene productos con código SAT '01010101', revise los productos:

{ProductosCodigoSATNoPermitidos.ToString}") - End If Else GuardaLog($"Error al cargar detalles GetFacturasComparacionXML.") diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 87b1c600a..5213950cf 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -3140,6 +3140,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaVencimiento", If(CveCompra > 0, dr("FechaVencimiento").ToString.ToDate().ToString("dd/MM/yyyy"), ""))) params.Add(New ReportParameter("NombreCapturo", If(CveCompra > 0, dr("NombreCapturo").ToString, ""))) + params.Add(New ReportParameter("NumeroOrden", If(CveCompra > 0, dr("OCSerieFolioVinculada").ToString, ""))) Else params.Add(New ReportParameter("NombreRecibio", String.Format(Recibio))) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index f2874e93f..641e5d482 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -1125,7 +1125,7 @@ Partial Class Compras_eFacturas If UsuarioActual.CveEmpresa.Contiene(13, 83) Then Dim Fecha28Dic As Date = New Date(2024, 12, 28) - If NowADS() >= Fecha28Dic AndAlso e.Row.DBCampo("FechaFactura").ToDate <= "2025/01/01".ToDate Then + If NowADS() >= Fecha28Dic AndAlso e.Row.DBCampo("FechaFactura").ToDate.Year < 2025 Then e.Row.FCHyperLink("HplAgregar").Visible = False End If End If diff --git a/Empresas/189/Formatos/Entradas.rdlc b/Empresas/189/Formatos/Entradas.rdlc index 653b09464..b1f0e2451 100644 --- a/Empresas/189/Formatos/Entradas.rdlc +++ b/Empresas/189/Formatos/Entradas.rdlc @@ -179,22 +179,22 @@ - 1.0835cm + 0.97724cm - 1.53251cm + 1.40581cm 1.40148cm - 11.05821cm + 10.82525cm - 2.33994cm + 3.03882cm - 1.86685cm + 1.63389cm 1.96383cm @@ -222,7 +222,7 @@ @@ -275,7 +275,7 @@ @@ -478,7 +478,7 @@ - Costo Unit. + Cos.Unit. @@ -632,7 +632,7 @@ @@ -1899,7 +1899,7 @@ - =Parameters!OCVinculada.Value + =Parameters!NumeroOrden.Value + + + + + + Textbox12 + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + @@ -553,7 +596,6 @@ - true @@ -647,6 +689,35 @@ + + + + true + true + + + + + =Fields!NumeroParte.Value + + + + + + + + + @@ -790,6 +861,7 @@ + @@ -805,7 +877,7 @@ DsOC 0.04788in 0.34081in - 8.16912in + 8.21665in @@ -1700,7 +1772,7 @@ 3.83039in + + + + + + Textbox28 + + + + + + #e36c09 + 1pt + + + + + + + + + + + 1.86196cm + + + 1.02278cm + + + 1.8cm + + + 1.34315cm + + + 0.96498cm + + + 1.69804cm + + + 1.3cm + + + 3.87584cm + + + 1.32706cm + + + 1.41521cm + + + 2.5cm + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + + SerieFolio1 + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!SubTotal.Value + + + + + + + + + + + SubTotal + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!IVA.Value + + + + + + + IVA1 + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!Descuentos.Value + + + + + + + Descuentos + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!Moneda.Value + + + + + + + Moneda + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + + RazonSocial + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!FolioInv.Value + + + + + + + FolioInv + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!FechaInv.Value + + + + + + + FechaInv + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + + + + + =Fields!Almacen.Value + + + + + + + Almacen + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + + + + + + 0.44125cm + + + true + true + + + + + Serie/Folio + + + + + + + Textbox40 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Cant. + + + + + + + Textbox42 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + SubTotal + + + + + + + Textbox44 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + IVA + + + + + + + Textbox49 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Desc. + + + + + + + Textbox51 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Total + + + + + + + Textbox47 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Moneda + + + + + + + Textbox4 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Proveedor + + + + + + + Textbox6 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + F. Inv. + + + + + + + Textbox15 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + F. Mov. + + + + + + + Textbox17 + + + #e36c09 + 1pt + + + + + + + + 0.44125cm + + + true + true + + + + + Almacén + + + + + + + Textbox5 + + + #e36c09 + 1pt + + + + + + + + + + + + + 1.5cm + + + true + true + + + + + =iif(CInt(Fields!CveCompra.Value)<1,Fields!GPO.Value,Fields!Fecha.Value) + + + + + + + GPO + + + =IIF(CInt(Fields!CveCompra.Value) < 1, "#67809F","Transparent") + 0.5pt + + + + + + + + true + true + DataSet1 + 0.75875cm + 0.06614cm + 0.8825cm + 20.60902cm + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox1 + 0.07056cm + 0.06614cm + 0.58236cm + 19.58715cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.77116in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE COMPRAS DETALLE + + + + + + + + + + + + + + + + Textbox2 + 0.63528cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.08126cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Usuario: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!UsuarioImprimio.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, "Fecha Impresión: ", "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Globals.PageNumber = Globals.TotalPages, Parameters!FechaImpresion.Value, "") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.1cm + 0.1cm + 1cm + 1cm + 0.13cm + + + + + + + Black + + 1pt + + + Black + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U.M. + + + + + + + Black + + 1pt + + + Black + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Black + + 1pt + + + Black + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Black + + 1pt + + + Black + + 1pt + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.30367cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + Codigo + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + =Fields!Codigo.Value + + + + + + + UnidadMedida + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Sum(Fields!Cantidad.Value) + + + + + + + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Total Productos + + + + + + + Textbox21 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox37 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + Before + + + + DsInventarios + 0.07056cm + 0.00711cm + 1.17559cm + 19.44107cm + + + + + + 0.68252in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox4 + 3.24568cm + 17.73805cm + 0.6cm + 1.76305cm + 1 + + + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + + Textbox5 + 3.24566cm + 16.62329cm + 0.6cm + 1.11476cm + 2 + + + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + 2pt + 2pt + + + + true + true + + + + + FOLIO: + + + + + + + Textbox5 + 0.03803cm + 16.27678cm + 0.6cm + 1.23137cm + 4 + + + Bottom + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 8, "AVISO", "RECEPCIÓN") & " DE TRASLADO" + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo2 + FitProportional + 0.0028in + 0.91907in + 1.74231in + 7 + + + + + + + + + + + 6.19829cm + true + true + + + true + true + + + + + =Parameters!NombreEntrego.Value + + + + + + + Textbox21 + 1.87056cm + 0.07295cm + 0.63472cm + 6.88796cm + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAccion.Value + + + + + + + Textbox21 + 1.87056cm + 12.50545cm + 0.63528cm + 6.94273cm + 1 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Firma + + + + + + + Textbox21 + 3.82353cm + 0.66941cm + 1.2cm + 5.78664cm + 2 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.82354cm + 13.51087cm + 1.2cm + 5.78664cm + 3 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + OBSERVACIONES: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.37639cm + 0.00626cm + 0cm + 19.57518cm + 6 + + + + + + 0.17639cm + 0cm + 19.57518cm + 7 + + + + + + true + true + + + + + ENTREGA + + + + + + + Textbox22 + 1.41167cm + 0.64295cm + 0.6cm + 5.78664cm + 8 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.37639cm + 13.16691cm + 0.6cm + 5.78664cm + 9 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!NombreAccion.Value="-1","",Parameters!NombreAccion.Value) + + + + + + + Textbox21 + 1.87cm + 6.66948cm + 0.63528cm + 6.56093cm + 10 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + + + + Nombre y Firma + + + + + + + Textbox21 + 3.82354cm + 7.24137cm + 1.2cm + 5.78664cm + 11 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.37583cm + 6.96091cm + 0.6cm + 5.78664cm + 12 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + = "Fecha Impresión: " & Format(Globals!ExecutionTime, "dd/MM/yyyy HH:mm:ss") + + + + + + + Textbox31 + 5.75203cm + 5.9827cm + 0.41981cm + 8.76488cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 5.77848cm + 14.9056cm + 0.41981cm + 4.66958cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.70264cm + 0.00313cm + 0cm + 19.57518cm + 16 + + + + + + + + + + 25cm + 21.59cm + 1cm + 0cm + 1cm + 1cm + 0.13cm + + + + + + + + + Folio fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + =Parameters!FechaCertificacion.Value + + + + Número de serie del Certificado de Sello Digital: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 0.0444in + 6.56374in + 1.13974in + 1.53682in + 1 + + + + + + true + 3.53788in + 0.03589in + 1.21305in + 8.22763in + + + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + TIPO DE DOCUMENTO: Traslado + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + = Parameters!Fecha.Value + + + + + + + + + Régimen fiscal: + + + + Regimen General de Ley Personas Morales + + + + + + + + + + + Textbox4 + 0.05022in + 4.90719in + 1.00267in + 3.35633in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.54927in + + + 1.05064in + + + 0.98425in + + + 1.11327in + + + 4.57762in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + + Textbox22 + + + + Black + + + + Black + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + + Black + + + + Black + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CÓDIGO + + + + + + + Black + + + + Black + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLAVE SAT + + + + + + + Textbox29 + + + + Black + + + + Black + + + #e36c09 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + + Black + + + + Black + + + #e36c09 + 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!Noidentificacion.Value + + + + + + + Noidentificacion + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.25503in + 0.04048in + 0.34081in + 8.27505in + 3 + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén Origen: + + + + =Parameters!AlmOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén Destino: + + + + =Parameters!AlmDestino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!DireccionOrigen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!DireccionDestino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo2 + FitProportional + 0.12756cm + 0.05298in + 0.91907in + 1.74231in + 12 + + + + + + 12.81558cm + + + + + 21.12145cm + + + 0.5327cm + true + true + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.11289cm + 18.37079cm + 0.41981cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm +