From 07c63853c9ee17e771e8fd3e771ed92ae36aba7c Mon Sep 17 00:00:00 2001 From: Carlos Parada Date: Fri, 17 Jan 2025 16:04:05 -0400 Subject: [PATCH] Se agrega organizacion padre en Reportes Detalle de Retenciones y Retenciones Generadas --- .../postgresql/views/LVE_RV_Withholding.sql | 16 +- .../views/LVE_RV_WithholdingGenerated.sql | 7 +- ...a_fecha_contable_de_retencion_generada.xml | 2 +- ...nt_Organization_on_Withholding_Reports.xml | 1081 +++++++++++++++++ 4 files changed, 1098 insertions(+), 8 deletions(-) create mode 100644 xml/migration/3050_Add_Parent_Organization_on_Withholding_Reports.xml diff --git a/db/ddlutils/postgresql/views/LVE_RV_Withholding.sql b/db/ddlutils/postgresql/views/LVE_RV_Withholding.sql index 0222a5b..a883577 100644 --- a/db/ddlutils/postgresql/views/LVE_RV_Withholding.sql +++ b/db/ddlutils/postgresql/views/LVE_RV_Withholding.sql @@ -46,7 +46,8 @@ SELECT w.C_Currency_ID, w.PricePrecision, ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, - w.DateDoc + w.DateDoc, + w.Parent_Org_ID FROM ( SELECT whDoc.AD_Client_ID, @@ -98,10 +99,12 @@ FROM ( wh.C_ConversionType_ID, wh.C_Currency_ID, it.TaxLineTotal, - whDoc.DateAcct DateDoc + whDoc.DateAcct DateDoc, + o.Parent_Org_ID FROM C_Invoice whDoc INNER JOIN C_InvoiceLine whDocLine ON (whDoc.C_Invoice_ID = whDocLine.C_Invoice_ID) INNER JOIN C_BPartner bp ON (whDoc.C_BPartner_ID = bp.C_BPartner_ID) + INNER JOIN AD_Org o ON (whDoc.AD_Org_ID = o.AD_Org_ID) INNER JOIN AD_OrgInfo oi ON (whDoc.AD_Org_ID = oi.AD_Org_ID) INNER JOIN WH_Withholding wh ON (wh.C_Invoice_ID = whDoc.C_Invoice_ID AND wh.C_InvoiceLine_ID = whDocLine.C_InvoiceLine_ID) INNER JOIN WH_Setting whs ON (wh.WH_Setting_ID = whs.WH_Setting_ID) @@ -180,7 +183,8 @@ w.AD_Client_ID, w.C_Currency_ID, w.PricePrecision, ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, - w.DateAcct DateDoc + w.DateAcct DateDoc, + w.Parent_Org_ID FROM ( SELECT pr.AD_Client_ID, pr.AD_Org_ID, @@ -228,7 +232,8 @@ FROM ( pr.C_Currency_ID, cu.StdPrecision AS PricePrecision, 0::NUMERIC(10, 0) AS TaxLineTotal, - pr.DateAcct DateDoc + pr.DateAcct DateDoc, + org.Parent_Org_ID FROM HR_Process pr INNER JOIN C_Currency cu ON(cu.C_Currency_ID = pr.C_Currency_ID) INNER JOIN HR_Movement m ON(m.HR_Process_ID = pr.HR_Process_ID) @@ -236,10 +241,11 @@ FROM ( INNER JOIN HR_Concept c ON(c.HR_Concept_ID = m.HR_Concept_ID) INNER JOIN WH_Type wt ON(wt.HR_ProcessReport_ID = prl.HR_ProcessReport_ID) INNER JOIN C_BPartner bp ON(bp.C_BPartner_ID = m.C_BPartner_ID) + INNER JOIN AD_Org org ON (org.AD_Org_ID = pr.AD_Org_ID) INNER JOIN AD_OrgInfo o ON(o.AD_Org_ID = pr.AD_Org_ID) WHERE wt.WH_Type_ID IS NOT NULL AND pr.DocStatus IN('CO', 'CL') - GROUP BY pr.AD_Client_ID, pr.AD_Org_ID, pr.DocumentNo, pr.DateAcct, pr.Name, prl.PrintName, bp.PersonType, bp.TaxID, o.TaxID, wt.WH_Type_ID, pr.C_ConversionType_ID, pr.C_Currency_ID, cu.StdPrecision + GROUP BY pr.AD_Client_ID, pr.AD_Org_ID, pr.DocumentNo, pr.DateAcct, pr.Name, prl.PrintName, bp.PersonType, bp.TaxID, o.TaxID, wt.WH_Type_ID, pr.C_ConversionType_ID, pr.C_Currency_ID, cu.StdPrecision, org.Parent_Org_ID HAVING SUM(CASE WHEN c.Type <> 'R' THEN m.Amount ELSE 0 END) > 0 ) AS w ; diff --git a/db/ddlutils/postgresql/views/LVE_RV_WithholdingGenerated.sql b/db/ddlutils/postgresql/views/LVE_RV_WithholdingGenerated.sql index 25d5d82..6f1e36b 100644 --- a/db/ddlutils/postgresql/views/LVE_RV_WithholdingGenerated.sql +++ b/db/ddlutils/postgresql/views/LVE_RV_WithholdingGenerated.sql @@ -50,7 +50,8 @@ SELECT ROUND(wh.TaxAmt * wh.CurrencyRate,wh.PricePrecision) TaxAmt, wh.CurrencyRate, wh.PricePrecision, - wh.DateAcct + wh.DateAcct, + wh.Parent_Org_ID FROM ( SELECT wh.AD_Client_ID, @@ -103,7 +104,8 @@ FROM COALESCE(ot.TaxAmt, it.TaxAmt) TaxAmt, COALESCE(CurrencyRate(COALESCE(i.C_Currency_ID, o.C_Currency_ID), COALESCE(iw.C_Currency_ID,ash.C_Currency_ID), COALESCE(i.DateAcct, o.DateAcct), COALESCE(i.C_ConversionType_ID, o.C_ConversionType_ID), COALESCE(i.AD_Client_ID, o.AD_Client_ID), COALESCE(i.AD_Org_ID, o.AD_Org_ID)),1) CurrencyRate, pl.PricePrecision, - COALESCE(o.DateAcct, i.DateAcct) DateAcct + COALESCE(o.DateAcct, i.DateAcct) DateAcct, + org.Parent_Org_ID FROM WH_Withholding wh INNER JOIN AD_ClientInfo ci ON (wh.AD_Client_ID = ci.AD_Client_ID) @@ -116,4 +118,5 @@ FROM LEFT JOIN C_Invoice iw ON (iw.C_Invoice_ID = wh.C_Invoice_ID AND iw.DocStatus NOT IN ('VO','RE')) LEFT JOIN C_InvoiceLine ilw ON (ilw.C_InvoiceLine_ID = wh.C_InvoiceLine_ID) LEFT JOIN M_PriceList pl ON (pl.M_PriceList_ID = COALESCE(i.M_PriceList_ID,o.M_PriceList_ID)) + LEFT JOIN AD_Org org ON (org.AD_Org_ID = COALESCE(i.AD_Org_ID, o.AD_Org_ID)) ) AS wh; \ No newline at end of file diff --git a/xml/migration/3030_Se_agrega_fecha_contable_de_retencion_generada.xml b/xml/migration/3030_Se_agrega_fecha_contable_de_retencion_generada.xml index 948e9fe..0d4f069 100644 --- a/xml/migration/3030_Se_agrega_fecha_contable_de_retencion_generada.xml +++ b/xml/migration/3030_Se_agrega_fecha_contable_de_retencion_generada.xml @@ -1,6 +1,6 @@ - + " diff --git a/xml/migration/3050_Add_Parent_Organization_on_Withholding_Reports.xml b/xml/migration/3050_Add_Parent_Organization_on_Withholding_Reports.xml new file mode 100644 index 0000000..e928b81 --- /dev/null +++ b/xml/migration/3050_Add_Parent_Organization_on_Withholding_Reports.xml @@ -0,0 +1,1081 @@ + + + + + CREATE OR REPLACE VIEW LVE_RV_Withholding AS +SELECT + w.AD_Client_ID, + w.AD_Org_ID, + w.C_Invoice_ID, + w.C_InvoiceLine_ID, + ROUND(w.A_Base_Amount * w.CurrencyRate,w.PricePrecision) A_Base_Amount, + w.WithholdingAmt, + w.WithholdingRate, + ROUND(w.Subtrahend * w.CurrencyRate,w.PricePrecision) Subtrahend, + w.DocumentNo, + w.ControlNo, + w.DateInvoiced, + w.Line , + w.type, + ROUND(w.GrandTotal * w.CurrencyRate,w.PricePrecision) GrandTotal, + ROUND(w.TotalLines * w.CurrencyRate,w.PricePrecision) TotalLines, + ROUND(w.TaxAmt * w.CurrencyRate,w.PricePrecision) TaxAmt, + w.InvoiceNo, + w.CreditDocumentNo, + w.DebitDocumentNo, + w.AffectedDocumentNo, + w.DateAcct, + w.Description, + w.PersonType, + w.DocumentNote, + w.PrintName, + ROUND(w.ExemptAmt * w.CurrencyRate,w.PricePrecision) ExemptAmt, + w.IsDeclared, + w.TaxID, + w.OrgValue, + w.DocumentType, + w.Concept_Value, + w.WHDocumentNo, + w.Rate, + w.WH_Definition_ID, + w.WH_Setting_ID, + w.WH_Type_ID, + w.WithholdingDeclaration_ID, + w.IsManual, + w.FiscalDocumentType, + ROUND(w.TaxBaseAmt * w.CurrencyRate,w.PricePrecision) TaxBaseAmt, + w.Concept_Name, + w.CurrencyRate, + w.C_ConversionType_ID, + w.C_Currency_ID, + w.PricePrecision, + ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, + w.DateDoc, + w.Parent_Org_ID +FROM ( + SELECT + whDoc.AD_Client_ID, + whDoc.AD_Org_ID, + whDoc.C_Invoice_ID, + whDocLine.C_InvoiceLine_ID, + wh.A_Base_Amount, + whDocLine.LineNetAmt WithholdingAmt, + wh.WithholdingRate, + wh.Subtrahend, + origDoc.DocumentNo, + origDoc.ControlNo, + origDoc.DateInvoiced, + whDocLine.Line , + CASE WHEN whDoc.DocStatus IN ('VO','RE') THEN '3-anu' + ELSE '1-reg' END "type", + origDoc.GrandTotal, + origDoc.TotalLines, + it.TaxAmt, + CASE WHEN dtOrigDoc.FiscalDocumentType='01' THEN origDoc.DocumentNo ELSE null::varchar END InvoiceNo, + CASE WHEN dtOrigDoc.FiscalDocumentType='03' THEN origDoc.DocumentNo ELSE null::varchar END CreditDocumentNo, + CASE WHEN dtOrigDoc.FiscalDocumentType='02' THEN origDoc.DocumentNo ELSE null::varchar END DebitDocumentNo, + COALESCE(affectedHdrDoc.DocumentNo,affectedLineDoc.DocumentNo) AffectedDocumentNo, + origDoc.DateAcct, + whc.Description, + whc.PersonType, + dtWhDoc.DocumentNote, + dtWhDoc.PrintName, + COALESCE(et.ExemptAmt,0) ExemptAmt, + COALESCE(whDec.IsDeclared, 'N') IsDeclared, + bp.TaxID, + oi.TaxID OrgValue, + CASE WHEN whDoc.IsSOTrx = 'N' THEN 'C' ELSE 'V' END DocumentType, + whc.Value Concept_Value, + whDoc.DocumentNo WHDocumentNo, + it.Rate, + wh.WH_Definition_ID, + whs.WH_Setting_ID, + whs.WH_Type_ID, + wh.WithholdingDeclaration_ID, + wh.IsManual, + dtOrigDoc.FiscalDocumentType, + it.TaxBaseAmt, + whconcept.Name Concept_Name, + CurrencyRate(origDoc.C_Currency_ID, whDoc.C_Currency_ID, wh.DateAcct, wh.C_ConversionType_ID, origDoc.AD_Client_ID, origDoc.AD_Org_ID) CurrencyRate, + pl.PricePrecision, + origDoc.C_Currency_ID Doc_C_Currency_ID, + whDoc.C_Currency_ID WH_C_Currency_ID, + wh.C_ConversionType_ID, + wh.C_Currency_ID, + it.TaxLineTotal, + whDoc.DateAcct DateDoc, + o.Parent_Org_ID + FROM C_Invoice whDoc + INNER JOIN C_InvoiceLine whDocLine ON (whDoc.C_Invoice_ID = whDocLine.C_Invoice_ID) + INNER JOIN C_BPartner bp ON (whDoc.C_BPartner_ID = bp.C_BPartner_ID) + INNER JOIN AD_Org o ON (whDoc.AD_Org_ID = o.AD_Org_ID) + INNER JOIN AD_OrgInfo oi ON (whDoc.AD_Org_ID = oi.AD_Org_ID) + INNER JOIN WH_Withholding wh ON (wh.C_Invoice_ID = whDoc.C_Invoice_ID AND wh.C_InvoiceLine_ID = whDocLine.C_InvoiceLine_ID) + INNER JOIN WH_Setting whs ON (wh.WH_Setting_ID = whs.WH_Setting_ID) + INNER JOIN C_Invoice origDoc ON (origDoc.C_Invoice_ID = wh.SourceInvoice_ID) + INNER JOIN C_DocType dtOrigDoc ON (dtOrigDoc.C_DocType_ID = origDoc.C_DocTypeTarget_ID) + INNER JOIN C_DocType dtWhDoc ON (dtWhDoc.C_DocType_ID = whDoc.C_DocTypeTarget_ID) + LEFT JOIN C_Invoice affectedHdrDoc ON (affectedHdrDoc.C_Invoice_ID = origDoc.InvoiceToAllocate_ID) + LEFT JOIN (SELECT DISTINCT i.DocumentNo,il.C_Invoice_ID + FROM C_Invoice i + INNER JOIN C_InvoiceLine il ON (i.C_Invoice_ID = il.InvoiceToAllocate_ID) + )affectedLineDoc ON (affectedLineDoc.C_Invoice_ID = origDoc.C_Invoice_ID) + LEFT JOIN (SELECT it.C_Invoice_ID, + SUM(it.TaxAmt) TaxAmt, + SUM(CASE WHEN it.TaxAmt != 0 THEN it.TaxBaseAmt ELSE 0 END) TaxBaseAmt, + SUM(CASE WHEN it.TaxAmt != 0 THEN it.TaxBaseAmt + it.TaxAmt ELSE 0 END) TaxLineTotal, + t.Rate, + t.C_Tax_ID + FROM C_InvoiceTax it + LEFT JOIN C_Tax t ON (it.C_Tax_ID = t.C_Tax_ID) + GROUP BY it.C_Invoice_ID, t.Rate, t.C_Tax_ID) it ON (it.C_Invoice_ID = origDoc.C_Invoice_ID AND wh.C_Tax_ID = it.C_Tax_ID) + LEFT JOIN (SELECT it.C_Invoice_ID, + SUM(CASE WHEN it.TaxAmt = 0 THEN it.TaxBaseAmt ELSE 0 END) ExemptAmt + FROM C_InvoiceTax it + GROUP BY it.C_Invoice_ID) et ON (et.C_Invoice_ID = origDoc.C_Invoice_ID) + LEFT JOIN LVE_ListVersion whc ON (whc.LVE_ListVersion_ID = wh.WithholdingRentalRate_ID) + LEFT JOIN LVE_List whconcept ON ((whc.LVE_List_ID = whconcept.LVE_List_ID)) + LEFT JOIN (SELECT C_Invoice_ID,'Y'::VARCHAR IsDeclared FROM C_Invoice i WHERE DocStatus IN ('CO','CL')) whDec ON (whDec.C_Invoice_ID = wh.WithholdingDeclaration_ID) + LEFT JOIN M_PriceList pl ON (whDoc.M_PriceList_ID = pl.M_PriceList_ID) + WHERE + wh.DocStatus IN ('CO','CL')) AS w +UNION ALL +SELECT +w.AD_Client_ID, + w.AD_Org_ID, + w.C_Invoice_ID, + w.C_InvoiceLine_ID, + ROUND(w.A_Base_Amount * w.CurrencyRate,w.PricePrecision) A_Base_Amount, + w.WithholdingAmt, + w.WithholdingRate, + ROUND(w.Subtrahend * w.CurrencyRate,w.PricePrecision) Subtrahend, + w.DocumentNo, + w.ControlNo, + w.DateInvoiced, + w.Line , + w.type, + ROUND(w.GrandTotal * w.CurrencyRate,w.PricePrecision) GrandTotal, + ROUND(w.TotalLines * w.CurrencyRate,w.PricePrecision) TotalLines, + ROUND(w.TaxAmt * w.CurrencyRate,w.PricePrecision) TaxAmt, + w.InvoiceNo, + w.CreditDocumentNo, + w.DebitDocumentNo, + w.AffectedDocumentNo, + w.DateAcct, + w.Description, + w.PersonType, + w.DocumentNote, + w.PrintName, + ROUND(w.ExemptAmt * w.CurrencyRate,w.PricePrecision) ExemptAmt, + w.IsDeclared, + w.TaxID, + w.OrgValue, + w.DocumentType, + w.Concept_Value, + w.WHDocumentNo, + w.Rate, + w.WH_Definition_ID, + w.WH_Setting_ID, + w.WH_Type_ID, + w.WithholdingDeclaration_ID, + w.IsManual, + w.FiscalDocumentType, + ROUND(w.TaxBaseAmt * w.CurrencyRate,w.PricePrecision) TaxBaseAmt, + w.Concept_Name, + w.CurrencyRate, + w.C_ConversionType_ID, + w.C_Currency_ID, + w.PricePrecision, + ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, + w.DateAcct DateDoc, + w.Parent_Org_ID +FROM ( + SELECT pr.AD_Client_ID, + pr.AD_Org_ID, + NULL::NUMERIC(10, 0) AS C_Invoice_ID, + NULL::NUMERIC(10, 0) AS C_InvoiceLine_ID, + SUM(CASE WHEN c.Type <> 'R' THEN m.Amount ELSE 0 END) A_Base_Amount, + 0::NUMERIC(10, 0) AS WithholdingAmt, + MAX(CASE WHEN c.Type = 'R' THEN m.Amount ELSE 0 END) AS WithholdingRate, + 0::NUMERIC(10, 0) Subtrahend, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(30) AS DocumentNo, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(255) AS ControlNo, + pr.DateAcct::date AS DateInvoiced, + 0::NUMERIC(10, 0) Line , + '1-reg' AS "type", + 0::NUMERIC(10, 0) AS GrandTotal, + 0::NUMERIC(10, 0) AS TotalLines, + 0::NUMERIC(10, 0) AS TaxAmt, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(30) AS InvoiceNo, + NULL::Varchar(30) AS CreditDocumentNo, + NULL::Varchar(30) AS DebitDocumentNo, + NULL::Varchar(30) AS AffectedDocumentNo, + pr.DateAcct, + pr.Name::Varchar(255) AS Description, + bp.PersonType, + NULL::Varchar(2000) AS DocumentNote, + NULL::Varchar(60) AS PrintName, + 0::NUMERIC(10, 0) AS ExemptAmt, + 'N'::character(1) AS IsDeclared, + bp.TaxID, + o.TaxID::Varchar(20) AS OrgValue, + NULL AS DocumentType, + prl.PrintName AS Concept_Value, + NULL::Varchar(30) AS WHDocumentNo, + MAX(CASE WHEN c.Type = 'R' THEN m.Amount ELSE 0 END) AS Rate, + NULL::NUMERIC(10, 0) AS WH_Definition_ID, + NULL::NUMERIC(10, 0) AS WH_Setting_ID, + wt.WH_Type_ID, + NULL::NUMERIC(10, 0) AS WithholdingDeclaration_ID, + 'N'::character(1) IsManual, + NULL::Varchar(2) AS FiscalDocumentType, + 0::NUMERIC(10, 0) AS TaxBaseAmt, + NULL::Varchar(255) AS Concept_Name, + 1::NUMERIC(10, 0) AS CurrencyRate, + pr.C_ConversionType_ID, + pr.C_Currency_ID, + cu.StdPrecision AS PricePrecision, + 0::NUMERIC(10, 0) AS TaxLineTotal, + pr.DateAcct DateDoc, + org.Parent_Org_ID + FROM HR_Process pr + INNER JOIN C_Currency cu ON(cu.C_Currency_ID = pr.C_Currency_ID) + INNER JOIN HR_Movement m ON(m.HR_Process_ID = pr.HR_Process_ID) + INNER JOIN HR_ProcessReportLine prl ON(prl.HR_Concept_ID = m.HR_Concept_ID) + INNER JOIN HR_Concept c ON(c.HR_Concept_ID = m.HR_Concept_ID) + INNER JOIN WH_Type wt ON(wt.HR_ProcessReport_ID = prl.HR_ProcessReport_ID) + INNER JOIN C_BPartner bp ON(bp.C_BPartner_ID = m.C_BPartner_ID) + INNER JOIN AD_Org org ON (org.AD_Org_ID = pr.AD_Org_ID) + INNER JOIN AD_OrgInfo o ON(o.AD_Org_ID = pr.AD_Org_ID) + WHERE wt.WH_Type_ID IS NOT NULL + AND pr.DocStatus IN('CO', 'CL') + GROUP BY pr.AD_Client_ID, pr.AD_Org_ID, pr.DocumentNo, pr.DateAcct, pr.Name, prl.PrintName, bp.PersonType, bp.TaxID, o.TaxID, wt.WH_Type_ID, pr.C_ConversionType_ID, pr.C_Currency_ID, cu.StdPrecision, org.Parent_Org_ID + HAVING SUM(CASE WHEN c.Type <> 'R' THEN m.Amount ELSE 0 END) > 0 +) AS w +; + CREATE OR REPLACE VIEW LVE_RV_Withholding AS +SELECT + w.AD_Client_ID, + w.AD_Org_ID, + w.C_Invoice_ID, + w.C_InvoiceLine_ID, + ROUND(w.A_Base_Amount * w.CurrencyRate,w.PricePrecision) A_Base_Amount, + w.WithholdingAmt, + w.WithholdingRate, + ROUND(w.Subtrahend * w.CurrencyRate,w.PricePrecision) Subtrahend, + w.DocumentNo, + w.ControlNo, + w.DateInvoiced, + w.Line , + w.type, + ROUND(w.GrandTotal * w.CurrencyRate,w.PricePrecision) GrandTotal, + ROUND(w.TotalLines * w.CurrencyRate,w.PricePrecision) TotalLines, + ROUND(w.TaxAmt * w.CurrencyRate,w.PricePrecision) TaxAmt, + w.InvoiceNo, + w.CreditDocumentNo, + w.DebitDocumentNo, + w.AffectedDocumentNo, + w.DateAcct, + w.Description, + w.PersonType, + w.DocumentNote, + w.PrintName, + ROUND(w.ExemptAmt * w.CurrencyRate,w.PricePrecision) ExemptAmt, + w.IsDeclared, + w.TaxID, + w.OrgValue, + w.DocumentType, + w.Concept_Value, + w.WHDocumentNo, + w.Rate, + w.WH_Definition_ID, + w.WH_Setting_ID, + w.WH_Type_ID, + w.WithholdingDeclaration_ID, + w.IsManual, + w.FiscalDocumentType, + ROUND(w.TaxBaseAmt * w.CurrencyRate,w.PricePrecision) TaxBaseAmt, + w.Concept_Name, + w.CurrencyRate, + w.C_ConversionType_ID, + w.C_Currency_ID, + w.PricePrecision, + ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, + w.DateDoc +FROM ( + SELECT + whDoc.AD_Client_ID, + whDoc.AD_Org_ID, + whDoc.C_Invoice_ID, + whDocLine.C_InvoiceLine_ID, + wh.A_Base_Amount, + whDocLine.LineNetAmt WithholdingAmt, + wh.WithholdingRate, + wh.Subtrahend, + origDoc.DocumentNo, + origDoc.ControlNo, + origDoc.DateInvoiced, + whDocLine.Line , + CASE WHEN whDoc.DocStatus IN ('VO','RE') THEN '3-anu' + ELSE '1-reg' END "type", + origDoc.GrandTotal, + origDoc.TotalLines, + it.TaxAmt, + CASE WHEN dtOrigDoc.FiscalDocumentType='01' THEN origDoc.DocumentNo ELSE null::varchar END InvoiceNo, + CASE WHEN dtOrigDoc.FiscalDocumentType='03' THEN origDoc.DocumentNo ELSE null::varchar END CreditDocumentNo, + CASE WHEN dtOrigDoc.FiscalDocumentType='02' THEN origDoc.DocumentNo ELSE null::varchar END DebitDocumentNo, + COALESCE(affectedHdrDoc.DocumentNo,affectedLineDoc.DocumentNo) AffectedDocumentNo, + origDoc.DateAcct, + whc.Description, + whc.PersonType, + dtWhDoc.DocumentNote, + dtWhDoc.PrintName, + COALESCE(et.ExemptAmt,0) ExemptAmt, + COALESCE(whDec.IsDeclared, 'N') IsDeclared, + bp.TaxID, + oi.TaxID OrgValue, + CASE WHEN whDoc.IsSOTrx = 'N' THEN 'C' ELSE 'V' END DocumentType, + whc.Value Concept_Value, + whDoc.DocumentNo WHDocumentNo, + it.Rate, + wh.WH_Definition_ID, + whs.WH_Setting_ID, + whs.WH_Type_ID, + wh.WithholdingDeclaration_ID, + wh.IsManual, + dtOrigDoc.FiscalDocumentType, + it.TaxBaseAmt, + whconcept.Name Concept_Name, + CurrencyRate(origDoc.C_Currency_ID, whDoc.C_Currency_ID, wh.DateAcct, wh.C_ConversionType_ID, origDoc.AD_Client_ID, origDoc.AD_Org_ID) CurrencyRate, + pl.PricePrecision, + origDoc.C_Currency_ID Doc_C_Currency_ID, + whDoc.C_Currency_ID WH_C_Currency_ID, + wh.C_ConversionType_ID, + wh.C_Currency_ID, + it.TaxLineTotal, + whDoc.DateAcct DateDoc + FROM C_Invoice whDoc + INNER JOIN C_InvoiceLine whDocLine ON (whDoc.C_Invoice_ID = whDocLine.C_Invoice_ID) + INNER JOIN C_BPartner bp ON (whDoc.C_BPartner_ID = bp.C_BPartner_ID) + INNER JOIN AD_OrgInfo oi ON (whDoc.AD_Org_ID = oi.AD_Org_ID) + INNER JOIN WH_Withholding wh ON (wh.C_Invoice_ID = whDoc.C_Invoice_ID AND wh.C_InvoiceLine_ID = whDocLine.C_InvoiceLine_ID) + INNER JOIN WH_Setting whs ON (wh.WH_Setting_ID = whs.WH_Setting_ID) + INNER JOIN C_Invoice origDoc ON (origDoc.C_Invoice_ID = wh.SourceInvoice_ID) + INNER JOIN C_DocType dtOrigDoc ON (dtOrigDoc.C_DocType_ID = origDoc.C_DocTypeTarget_ID) + INNER JOIN C_DocType dtWhDoc ON (dtWhDoc.C_DocType_ID = whDoc.C_DocTypeTarget_ID) + LEFT JOIN C_Invoice affectedHdrDoc ON (affectedHdrDoc.C_Invoice_ID = origDoc.InvoiceToAllocate_ID) + LEFT JOIN (SELECT DISTINCT i.DocumentNo,il.C_Invoice_ID + FROM C_Invoice i + INNER JOIN C_InvoiceLine il ON (i.C_Invoice_ID = il.InvoiceToAllocate_ID) + )affectedLineDoc ON (affectedLineDoc.C_Invoice_ID = origDoc.C_Invoice_ID) + LEFT JOIN (SELECT it.C_Invoice_ID, + SUM(it.TaxAmt) TaxAmt, + SUM(CASE WHEN it.TaxAmt != 0 THEN it.TaxBaseAmt ELSE 0 END) TaxBaseAmt, + SUM(CASE WHEN it.TaxAmt != 0 THEN it.TaxBaseAmt + it.TaxAmt ELSE 0 END) TaxLineTotal, + t.Rate, + t.C_Tax_ID + FROM C_InvoiceTax it + LEFT JOIN C_Tax t ON (it.C_Tax_ID = t.C_Tax_ID) + GROUP BY it.C_Invoice_ID, t.Rate, t.C_Tax_ID) it ON (it.C_Invoice_ID = origDoc.C_Invoice_ID AND wh.C_Tax_ID = it.C_Tax_ID) + LEFT JOIN (SELECT it.C_Invoice_ID, + SUM(CASE WHEN it.TaxAmt = 0 THEN it.TaxBaseAmt ELSE 0 END) ExemptAmt + FROM C_InvoiceTax it + GROUP BY it.C_Invoice_ID) et ON (et.C_Invoice_ID = origDoc.C_Invoice_ID) + LEFT JOIN LVE_ListVersion whc ON (whc.LVE_ListVersion_ID = wh.WithholdingRentalRate_ID) + LEFT JOIN LVE_List whconcept ON ((whc.LVE_List_ID = whconcept.LVE_List_ID)) + LEFT JOIN (SELECT C_Invoice_ID,'Y'::VARCHAR IsDeclared FROM C_Invoice i WHERE DocStatus IN ('CO','CL')) whDec ON (whDec.C_Invoice_ID = wh.WithholdingDeclaration_ID) + LEFT JOIN M_PriceList pl ON (whDoc.M_PriceList_ID = pl.M_PriceList_ID) + WHERE + wh.DocStatus IN ('CO','CL')) AS w +UNION ALL +SELECT +w.AD_Client_ID, + w.AD_Org_ID, + w.C_Invoice_ID, + w.C_InvoiceLine_ID, + ROUND(w.A_Base_Amount * w.CurrencyRate,w.PricePrecision) A_Base_Amount, + w.WithholdingAmt, + w.WithholdingRate, + ROUND(w.Subtrahend * w.CurrencyRate,w.PricePrecision) Subtrahend, + w.DocumentNo, + w.ControlNo, + w.DateInvoiced, + w.Line , + w.type, + ROUND(w.GrandTotal * w.CurrencyRate,w.PricePrecision) GrandTotal, + ROUND(w.TotalLines * w.CurrencyRate,w.PricePrecision) TotalLines, + ROUND(w.TaxAmt * w.CurrencyRate,w.PricePrecision) TaxAmt, + w.InvoiceNo, + w.CreditDocumentNo, + w.DebitDocumentNo, + w.AffectedDocumentNo, + w.DateAcct, + w.Description, + w.PersonType, + w.DocumentNote, + w.PrintName, + ROUND(w.ExemptAmt * w.CurrencyRate,w.PricePrecision) ExemptAmt, + w.IsDeclared, + w.TaxID, + w.OrgValue, + w.DocumentType, + w.Concept_Value, + w.WHDocumentNo, + w.Rate, + w.WH_Definition_ID, + w.WH_Setting_ID, + w.WH_Type_ID, + w.WithholdingDeclaration_ID, + w.IsManual, + w.FiscalDocumentType, + ROUND(w.TaxBaseAmt * w.CurrencyRate,w.PricePrecision) TaxBaseAmt, + w.Concept_Name, + w.CurrencyRate, + w.C_ConversionType_ID, + w.C_Currency_ID, + w.PricePrecision, + ROUND(w.TaxLineTotal * w.CurrencyRate,w.PricePrecision) TaxLineTotal, + w.DateAcct DateDoc +FROM ( + SELECT pr.AD_Client_ID, + pr.AD_Org_ID, + NULL::NUMERIC(10, 0) AS C_Invoice_ID, + NULL::NUMERIC(10, 0) AS C_InvoiceLine_ID, + SUM(CASE WHEN c.Type <> 'R' THEN m.Amount ELSE 0 END) A_Base_Amount, + 0::NUMERIC(10, 0) AS WithholdingAmt, + MAX(CASE WHEN c.Type = 'R' THEN m.Amount ELSE 0 END) AS WithholdingRate, + 0::NUMERIC(10, 0) Subtrahend, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(30) AS DocumentNo, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(255) AS ControlNo, + pr.DateAcct::date AS DateInvoiced, + 0::NUMERIC(10, 0) Line , + '1-reg' AS "type", + 0::NUMERIC(10, 0) AS GrandTotal, + 0::NUMERIC(10, 0) AS TotalLines, + 0::NUMERIC(10, 0) AS TaxAmt, + NULLIF(regexp_replace(pr.DocumentNo, '\D','','g'), '')::Varchar(30) AS InvoiceNo, + NULL::Varchar(30) AS CreditDocumentNo, + NULL::Varchar(30) AS DebitDocumentNo, + NULL::Varchar(30) AS AffectedDocumentNo, + pr.DateAcct, + pr.Name::Varchar(255) AS Description, + bp.PersonType, + NULL::Varchar(2000) AS DocumentNote, + NULL::Varchar(60) AS PrintName, + 0::NUMERIC(10, 0) AS ExemptAmt, + 'N'::character(1) AS IsDeclared, + bp.TaxID, + o.TaxID::Varchar(20) AS OrgValue, + NULL AS DocumentType, + prl.PrintName AS Concept_Value, + NULL::Varchar(30) AS WHDocumentNo, + MAX(CASE WHEN c.Type = 'R' THEN m.Amount ELSE 0 END) AS Rate, + NULL::NUMERIC(10, 0) AS WH_Definition_ID, + NULL::NUMERIC(10, 0) AS WH_Setting_ID, + wt.WH_Type_ID, + NULL::NUMERIC(10, 0) AS WithholdingDeclaration_ID, + 'N'::character(1) IsManual, + NULL::Varchar(2) AS FiscalDocumentType, + 0::NUMERIC(10, 0) AS TaxBaseAmt, + NULL::Varchar(255) AS Concept_Name, + 1::NUMERIC(10, 0) AS CurrencyRate, + pr.C_ConversionType_ID, + pr.C_Currency_ID, + cu.StdPrecision AS PricePrecision, + 0::NUMERIC(10, 0) AS TaxLineTotal, + pr.DateAcct DateDoc + FROM HR_Process pr + INNER JOIN C_Currency cu ON(cu.C_Currency_ID = pr.C_Currency_ID) + INNER JOIN HR_Movement m ON(m.HR_Process_ID = pr.HR_Process_ID) + INNER JOIN HR_ProcessReportLine prl ON(prl.HR_Concept_ID = m.HR_Concept_ID) + INNER JOIN HR_Concept c ON(c.HR_Concept_ID = m.HR_Concept_ID) + INNER JOIN WH_Type wt ON(wt.HR_ProcessReport_ID = prl.HR_ProcessReport_ID) + INNER JOIN C_BPartner bp ON(bp.C_BPartner_ID = m.C_BPartner_ID) + INNER JOIN AD_OrgInfo o ON(o.AD_Org_ID = pr.AD_Org_ID) + WHERE wt.WH_Type_ID IS NOT NULL + AND pr.DocStatus IN('CO', 'CL') + GROUP BY pr.AD_Client_ID, pr.AD_Org_ID, pr.DocumentNo, pr.DateAcct, pr.Name, prl.PrintName, bp.PersonType, bp.TaxID, o.TaxID, wt.WH_Type_ID, pr.C_ConversionType_ID, pr.C_Currency_ID, cu.StdPrecision + HAVING SUM(CASE WHEN c.Type <> 'R' THEN m.Amount ELSE 0 END) > 0 +) AS w +; + + + CREATE OR REPLACE VIEW LVE_RV_WithholdingGenerated AS +SELECT + wh.AD_Client_ID, + wh.AD_Org_ID, + ROUND(wh.A_Base_Amount * wh.CurrencyRate,wh.PricePrecision) A_Base_Amount, + wh.C_DocType_ID, + wh.C_InvoiceLine_ID, + wh.C_Invoice_ID, + wh.Created, + wh.CreatedBy, + wh.DateDoc, + wh.Description, + wh.DocAction, + wh.DocStatus, + wh.WHDocumentNo, + wh.IsActive, + wh.IsApproved, + wh.IsDeclared, + wh.Processed, + wh.Processing, + wh.SourceInvoiceLine_ID, + wh.SourceInvoice_ID, + wh.UUID, + wh.Updated, + wh.UpdatedBy, + wh.WH_Withholding_ID, + wh.WH_Definition_ID, + ROUND(wh.WithholdingAmt * wh.CurrencyRate,wh.PricePrecision) WithholdingAmt, + wh.WH_Setting_ID, + wh.WithholdingRate, + wh.WithholdingDeclaration_ID, + wh.C_BPartner_ID, + wh.IsSimulation, + wh.SourceOrder_ID, + wh.SourceOrderLine_ID, + wh.IsManual, + wh.C_Tax_ID, + wh.WithholdingRentalRate_ID, + wh.WithholdingVariableRate_ID, + ROUND(wh.Subtrahend * wh.CurrencyRate,wh.PricePrecision) Subtrahend, + wh.IsCumulativeWithholding, + wh.WHThirdParty_ID, + wh.IsGenerated, + wh.TaxIndicator, + wh.DocumentNo, + ROUND(wh.GrandTotal * wh.CurrencyRate,wh.PricePrecision) GrandTotal, + ROUND(wh.TotalLines * wh.CurrencyRate,wh.PricePrecision) TotalLines, + wh.C_DocTypeTarget_ID, + ROUND(wh.TaxBaseAmt * wh.CurrencyRate,wh.PricePrecision) TaxBaseAmt, + ROUND(wh.TaxAmt * wh.CurrencyRate,wh.PricePrecision) TaxAmt, + wh.CurrencyRate, + wh.PricePrecision, + wh.DateAcct, + wh.Parent_Org_ID +FROM +( + SELECT wh.AD_Client_ID, + wh.AD_Org_ID, + wh.A_Base_Amount, + wh.C_DocType_ID, + wh.C_InvoiceLine_ID, + wh.C_Invoice_ID, + wh.Created, + wh.CreatedBy, + COALESCE(iw.DateAcct,wh.DateDoc) DateDoc, + wh.Description, + wh.DocAction, + wh.DocStatus, + COALESCE(iw.DocumentNo,wh.DocumentNo) WHDocumentNo, + wh.IsActive, + wh.IsApproved, + wh.IsDeclared, + wh.Processed, + wh.Processing, + wh.SourceInvoiceLine_ID, + wh.SourceInvoice_ID, + wh.UUID, + wh.Updated, + wh.UpdatedBy, + wh.WH_Withholding_ID, + wh.WH_Definition_ID, + COALESCE(ilw.LineNetAmt,wh.WithholdingAmt) WithholdingAmt, + wh.WH_Setting_ID, + wh.WithholdingRate, + wh.WithholdingDeclaration_ID, + wh.C_BPartner_ID, + wh.IsSimulation, + wh.SourceOrder_ID, + wh.SourceOrderLine_ID, + wh.IsManual, + wh.C_Tax_ID, + wh.WithholdingRentalRate_ID, + wh.WithholdingVariableRate_ID, + wh.Subtrahend, + wh.IsCumulativeWithholding, + wh.WHThirdParty_ID, + CASE WHEN iw.C_Invoice_ID IS NULL THEN 'N' ELSE 'Y' END IsGenerated, + t.TaxIndicator, + COALESCE(o.DocumentNo, i.DocumentNo) DocumentNo, + COALESCE(o.GrandTotal, i.GrandTotal) GrandTotal, + COALESCE(o.TotalLines, i.TotalLines) TotalLines, + COALESCE(o.C_DocTypeTarget_ID, i.C_DocTypeTarget_ID) C_DocTypeTarget_ID, + COALESCE(ot.TaxBaseAmt, it.TaxBaseAmt) TaxBaseAmt, + COALESCE(ot.TaxAmt, it.TaxAmt) TaxAmt, + COALESCE(CurrencyRate(COALESCE(i.C_Currency_ID, o.C_Currency_ID), COALESCE(iw.C_Currency_ID,ash.C_Currency_ID), COALESCE(i.DateAcct, o.DateAcct), COALESCE(i.C_ConversionType_ID, o.C_ConversionType_ID), COALESCE(i.AD_Client_ID, o.AD_Client_ID), COALESCE(i.AD_Org_ID, o.AD_Org_ID)),1) CurrencyRate, + pl.PricePrecision, + COALESCE(o.DateAcct, i.DateAcct) DateAcct, + org.Parent_Org_ID + FROM + WH_Withholding wh + INNER JOIN AD_ClientInfo ci ON (wh.AD_Client_ID = ci.AD_Client_ID) + INNER JOIN C_AcctSchema ash ON (ash.C_AcctSchema_ID = ci.C_AcctSchema1_ID) + LEFT JOIN C_Tax t ON (wh.C_Tax_ID = t.C_Tax_ID) + LEFT JOIN C_Order o ON (o.C_Order_ID = wh.SourceOrder_ID) + LEFT JOIN C_OrderTax ot ON (o.C_Order_ID = ot.C_Order_ID AND ot.C_Tax_ID = wh.C_Tax_ID) + LEFT JOIN C_Invoice i ON (i.C_Invoice_ID = wh.SourceInvoice_ID) + LEFT JOIN C_InvoiceTax it ON (i.C_Invoice_ID = it.C_Invoice_ID AND it.C_Tax_ID = wh.C_Tax_ID) + LEFT JOIN C_Invoice iw ON (iw.C_Invoice_ID = wh.C_Invoice_ID AND iw.DocStatus NOT IN ('VO','RE')) + LEFT JOIN C_InvoiceLine ilw ON (ilw.C_InvoiceLine_ID = wh.C_InvoiceLine_ID) + LEFT JOIN M_PriceList pl ON (pl.M_PriceList_ID = COALESCE(i.M_PriceList_ID,o.M_PriceList_ID)) + LEFT JOIN AD_Org org ON (org.AD_Org_ID = COALESCE(i.AD_Org_ID, o.AD_Org_ID)) +) AS wh; + CREATE OR REPLACE VIEW LVE_RV_WithholdingGenerated AS +SELECT + wh.AD_Client_ID, + wh.AD_Org_ID, + ROUND(wh.A_Base_Amount * wh.CurrencyRate,wh.PricePrecision) A_Base_Amount, + wh.C_DocType_ID, + wh.C_InvoiceLine_ID, + wh.C_Invoice_ID, + wh.Created, + wh.CreatedBy, + wh.DateDoc, + wh.Description, + wh.DocAction, + wh.DocStatus, + wh.WHDocumentNo, + wh.IsActive, + wh.IsApproved, + wh.IsDeclared, + wh.Processed, + wh.Processing, + wh.SourceInvoiceLine_ID, + wh.SourceInvoice_ID, + wh.UUID, + wh.Updated, + wh.UpdatedBy, + wh.WH_Withholding_ID, + wh.WH_Definition_ID, + ROUND(wh.WithholdingAmt * wh.CurrencyRate,wh.PricePrecision) WithholdingAmt, + wh.WH_Setting_ID, + wh.WithholdingRate, + wh.WithholdingDeclaration_ID, + wh.C_BPartner_ID, + wh.IsSimulation, + wh.SourceOrder_ID, + wh.SourceOrderLine_ID, + wh.IsManual, + wh.C_Tax_ID, + wh.WithholdingRentalRate_ID, + wh.WithholdingVariableRate_ID, + ROUND(wh.Subtrahend * wh.CurrencyRate,wh.PricePrecision) Subtrahend, + wh.IsCumulativeWithholding, + wh.WHThirdParty_ID, + wh.IsGenerated, + wh.TaxIndicator, + wh.DocumentNo, + ROUND(wh.GrandTotal * wh.CurrencyRate,wh.PricePrecision) GrandTotal, + ROUND(wh.TotalLines * wh.CurrencyRate,wh.PricePrecision) TotalLines, + wh.C_DocTypeTarget_ID, + ROUND(wh.TaxBaseAmt * wh.CurrencyRate,wh.PricePrecision) TaxBaseAmt, + ROUND(wh.TaxAmt * wh.CurrencyRate,wh.PricePrecision) TaxAmt, + wh.CurrencyRate, + wh.PricePrecision, + wh.DateAcct +FROM +( + SELECT wh.AD_Client_ID, + wh.AD_Org_ID, + wh.A_Base_Amount, + wh.C_DocType_ID, + wh.C_InvoiceLine_ID, + wh.C_Invoice_ID, + wh.Created, + wh.CreatedBy, + COALESCE(iw.DateAcct,wh.DateDoc) DateDoc, + wh.Description, + wh.DocAction, + wh.DocStatus, + COALESCE(iw.DocumentNo,wh.DocumentNo) WHDocumentNo, + wh.IsActive, + wh.IsApproved, + wh.IsDeclared, + wh.Processed, + wh.Processing, + wh.SourceInvoiceLine_ID, + wh.SourceInvoice_ID, + wh.UUID, + wh.Updated, + wh.UpdatedBy, + wh.WH_Withholding_ID, + wh.WH_Definition_ID, + COALESCE(ilw.LineNetAmt,wh.WithholdingAmt) WithholdingAmt, + wh.WH_Setting_ID, + wh.WithholdingRate, + wh.WithholdingDeclaration_ID, + wh.C_BPartner_ID, + wh.IsSimulation, + wh.SourceOrder_ID, + wh.SourceOrderLine_ID, + wh.IsManual, + wh.C_Tax_ID, + wh.WithholdingRentalRate_ID, + wh.WithholdingVariableRate_ID, + wh.Subtrahend, + wh.IsCumulativeWithholding, + wh.WHThirdParty_ID, + CASE WHEN iw.C_Invoice_ID IS NULL THEN 'N' ELSE 'Y' END IsGenerated, + t.TaxIndicator, + COALESCE(o.DocumentNo, i.DocumentNo) DocumentNo, + COALESCE(o.GrandTotal, i.GrandTotal) GrandTotal, + COALESCE(o.TotalLines, i.TotalLines) TotalLines, + COALESCE(o.C_DocTypeTarget_ID, i.C_DocTypeTarget_ID) C_DocTypeTarget_ID, + COALESCE(ot.TaxBaseAmt, it.TaxBaseAmt) TaxBaseAmt, + COALESCE(ot.TaxAmt, it.TaxAmt) TaxAmt, + COALESCE(CurrencyRate(COALESCE(i.C_Currency_ID, o.C_Currency_ID), COALESCE(iw.C_Currency_ID,ash.C_Currency_ID), COALESCE(i.DateAcct, o.DateAcct), COALESCE(i.C_ConversionType_ID, o.C_ConversionType_ID), COALESCE(i.AD_Client_ID, o.AD_Client_ID), COALESCE(i.AD_Org_ID, o.AD_Org_ID)),1) CurrencyRate, + pl.PricePrecision, + COALESCE(o.DateAcct, i.DateAcct) DateAcct + FROM + WH_Withholding wh + INNER JOIN AD_ClientInfo ci ON (wh.AD_Client_ID = ci.AD_Client_ID) + INNER JOIN C_AcctSchema ash ON (ash.C_AcctSchema_ID = ci.C_AcctSchema1_ID) + LEFT JOIN C_Tax t ON (wh.C_Tax_ID = t.C_Tax_ID) + LEFT JOIN C_Order o ON (o.C_Order_ID = wh.SourceOrder_ID) + LEFT JOIN C_OrderTax ot ON (o.C_Order_ID = ot.C_Order_ID AND ot.C_Tax_ID = wh.C_Tax_ID) + LEFT JOIN C_Invoice i ON (i.C_Invoice_ID = wh.SourceInvoice_ID) + LEFT JOIN C_InvoiceTax it ON (i.C_Invoice_ID = it.C_Invoice_ID AND it.C_Tax_ID = wh.C_Tax_ID) + LEFT JOIN C_Invoice iw ON (iw.C_Invoice_ID = wh.C_Invoice_ID AND iw.DocStatus NOT IN ('VO','RE')) + LEFT JOIN C_InvoiceLine ilw ON (ilw.C_InvoiceLine_ID = wh.C_InvoiceLine_ID) + LEFT JOIN M_PriceList pl ON (pl.M_PriceList_ID = COALESCE(i.M_PriceList_ID,o.M_PriceList_ID)) +) AS wh; + + + + Parent Organization + false + false + + + false + false + Parent (superior) Organization + true + + 2025-01-17 11:17:50.138 + + 2025-01-17 11:17:50.138 + + 102082 + false + N + false + + + + 0 + + Parent_Org_ID + Parent Organization - the next level in the organizational hierarchy. + true + + false + N + + true + false + false + true + 0 + LVE + 0 + 0 + + 54669 + 100 + 2306 + 276 + + 22 + 18 + 100 + 39088cbf-e6be-472b-ace4-2a790f8efa31 + + true + + + + + + 2025-01-17 11:17:51.648 + true + 2025-01-17 11:17:51.648 + 102082 + false + Parent Organization + 0 + 0 + 100 + 100 + es_MX + f0bc17d1-7962-49c7-9563-eb6d97394bce + + + + + 2025-01-17 11:19:57.753 + Parent Organization + true + false + 2025-01-17 11:19:57.753 + false + + Parent_Org_ID + Parent (superior) Organization + Parent Organization - the next level in the organizational hierarchy. + + true + + + + + + false + 59353 + 0 + 0 + LVE + 22 + 54302 + 100 + 18 + + 110 + 100 + 130 + 2306 + 224addc6-f6aa-4f15-b236-da2e75f406fa + + + + + 2025-01-17 11:19:58.916 + true + 2025-01-17 11:19:58.916 + Parent Organization + false + Parent (superior) Organization + Parent Organization - the next level in the organizational hierarchy. + 59353 + 0 + 0 + 100 + es_MX + 100 + ef15a833-a896-49ea-9a8d-498a662bd01b + + + + + 113 + + + + + Parent (superior) Organization + true + + 2025-01-17 11:21:37.545 + + 2025-01-17 11:21:37.545 + + 102083 + false + Parent Organization + false + false + + + false + false + N + false + + + + 0 + + Parent_Org_ID + Parent Organization - the next level in the organizational hierarchy. + true + + false + N + + true + false + false + true + 0 + LVE + 0 + 0 + + 54763 + 100 + 2306 + 130 + + 22 + 18 + 100 + 6c7ba4ae-c616-478f-9d4c-a486498de35c + + true + + + + + + 2025-01-17 11:21:39.134 + true + 2025-01-17 11:21:39.134 + 102083 + false + Parent Organization + 0 + 0 + 100 + 100 + es_MX + 32aa778f-4333-42aa-b188-5c85fcc03fb8 + + + + + + 2025-01-17 11:22:09.347 + Parent Organization + true + false + 2025-01-17 11:22:09.347 + false + + Parent_Org_ID + Parent (superior) Organization + Parent Organization - the next level in the organizational hierarchy. + + true + + + + + false + 59354 + 0 + 0 + LVE + 22 + 54444 + 100 + 18 + + 210 + 100 + 113 + 2306 + a7284c88-dc2c-4617-9d67-fa2ebb02f4ac + + + + + 2025-01-17 11:22:10.418 + true + 2025-01-17 11:22:10.418 + Parent Organization + false + Parent (superior) Organization + Parent Organization - the next level in the organizational hierarchy. + 59354 + 0 + 0 + 100 + es_MX + 100 + f4fdda77-4578-473a-92ec-bbfa8b63db8b + + + + + 10 + + + + + 20 + + + + + 30 + + + + + 40 + + + + + 50 + + + + + 60 + + + + + 70 + + + + + 80 + + + + + 90 + + + + + 100 + + + + + 110 + + + + + 10 + + + + + 20 + + + + + 30 + + + + + 40 + + + + + 50 + + + +