Skip to main content

--Suppliers and their tax profiles

Supplier / Customer Tax Profiles Information

I have been working in a data migration project, and we have migrated customers and suppliers.


We have also uploaded tax profiles for them, i had to write SQL scripts to check/reconcile the tax profiles.


And these are them. Hopefully they are useful to any of you looking for the same.



--Customers and their tax profiles


SELECT A.customer_name,

  DECODE(A.customer_type, 'I', 'Internal', 'R', 'External') customer_type,

  a1.profile_class_name,

  a.creation_date,

  b.party_name,

  b.party_number,

  c.party_type_code,

  d.creation_date,

  d.class_category,

  d.class_code,

  d.start_date_active,

  e.tax_regime_code,

  e.registration_number,

  e.registration_status_code,

  e.effective_from,

  --A.vat_code,

  A.tax_reference,

  b1.party_site_name,

  b1.party_site_number,

  c1.party_type_code site_party_type_code,

  e1.tax_regime_code site_tax_regime_code,

  e1.registration_number site_registration_number,

  e1.registration_status_code site_registration_status_code,

  e1.effective_from site_effective_from,

  d1.class_category site_class_category,

  d1.class_code site_class_code,

  d1.start_date_active site_start_date_active

FROM ar_customers A,

  ar_customer_profiles_v a1,

  hz_parties b,

  hz_party_sites b1,

  zx_party_tax_profile c,

  zx_party_tax_profile c1,

  hz_code_assignments d,

  hz_code_assignments d1,

  zx_registrations e,

  zx_registrations e1

WHERE A.orig_system_reference =b.orig_system_reference

AND A.customer_id             =a1.customer_id(+)

AND b.party_id                =c.party_id(+)

AND c.party_tax_profile_id    =d.owner_table_id(+)

AND c.party_type_code(+)      ='THIRD_PARTY'

AND c.party_tax_profile_id    =e.party_tax_profile_id(+)

AND d.class_category(+)       ='XXXX'

AND b.party_id                =b1.party_id

AND b1.party_site_id          =c1.party_id(+)

AND c1.party_type_code(+)     ='THIRD_PARTY_SITE'

AND c1.party_tax_profile_id   =d1.owner_table_id(+)

AND c1.party_tax_profile_id   =e1.party_tax_profile_id(+);



--Suppliers and their tax profiles

SELECT --A.vendor_name,
  A.segment1 Suuplier_No,
  A.vendor_name Suuplier_Name,
  A.VENDOR_NAME_ALT Supp_ARABIC_NAME,
  A.ATTRIBUTE1 SUPP_Check_Name,
  --b.party_name,
  A.vendor_type_lookup_code,
  --b.party_number,
  c.party_type_code,
  c.process_for_applicability_flag allow_tax_applicability,
  c.allow_offset_tax_flag allow_offset_tax,
  d.class_category,
  d.class_code,
  d.start_date_active,
  d.end_date_active,
  e.tax_regime_code,
  e.registration_number,
  e.registration_status_code,
  e.effective_from,
  e.effective_to,
  A.vat_code,
  b1.party_site_name,
  b1.party_site_number,
  c1.party_type_code site_party_type_code,
  c1.process_for_applicability_flag site_allow_tax_applicability,
  c1.allow_offset_tax_flag site_allow_offset_tax,
  d1.class_category site_class_category,
  d1.class_code site_class_code,
  d1.start_date_active site_start_date_active,
  e1.tax_regime_code site_tax_regime_code,
  e1.registration_number site_registration_number,
  e1.registration_status_code site_registration_status_code,
  e1.effective_from site_effective_from,
  e1.effective_to site_effective_to
FROM ap_suppliers A,
  hz_parties b,
  hz_party_sites b1,
  zx_party_tax_profile c,
  zx_party_tax_profile c1,
  hz_code_assignments d,
  hz_code_assignments d1,
  zx_registrations e,
  zx_registrations e1
WHERE A.party_id                   =b.party_id
AND b.party_id                     =c.party_id(+)
AND c.party_type_code(+)           ='THIRD_PARTY'
AND c.party_tax_profile_id         =d.owner_table_id(+)
AND c.party_tax_profile_id         =e.party_tax_profile_id(+)
AND d.class_category(+)            =' XXXX '
AND A.vendor_type_lookup_code NOT IN ('EMPLOYEE', 'INTERNAL')
AND b.party_id                     =b1.party_id(+)
AND b1.party_site_id               =c1.party_id(+)
AND c1.party_type_code(+)          ='THIRD_PARTY_SITE'
AND c1.party_tax_profile_id        =d1.owner_table_id(+)
AND c1.party_tax_profile_id        =e1.party_tax_profile_id(+)
and A.segment1='1542'
  --and b.party_name='James Fleming'
ORDER BY d.class_category DESC,
  e.registration_status_code,
  b.party_name;

Comments

Popular posts from this blog

O2C Cycle with Accounting Entries

  ORDER    TO  CASH  PARTICULARS  DR  CR SPL NOTES ACCOUNT IS PULLED FROM Sales order entry No Accounting Sales Order Pick From Sub Inventory A/c 100 At Standard Cost Sub-inventory Material A/c Setup To Sub Inventory A/c 100 At Standard Cost(Staging) Sub-inventory Material A/c Setup Sales Order Issue COGS 100 It can be fetched from five places Master Item/Org/Order Type/Line Type/Shipping Params To Sub Inventory A/c 100 At Standard Cost Sub-inventory Material A/c Setup Transaction level Receivable A/c 120 Auto Accounting Tax A/c 10 Auto Accounting Freight A/c 10 Auto Accounting Revenue A/c 100 Auto Accounting Receipts Receipts with no remittance method Cash 100 Before application of the receipt Receipt class Unapplied A/c 100 Receipt class Unapplied A/c 100 After application of the receipt to the transaction Receipt class Receivables A/c 100 Receipt class Cash A/c 100 Receipt class Unidentified A/c 100 In case of receipt without customer...

Number to Word conversion in RTF

<?xdofx: expression ?> for extended SQL functions <?xdoxslt: expression ?> for extended XSL functions. You cannot mix xdofx statements with XSL expressions in the same context This function enables the conversion of numbers to words for RTF template output. This is a common requirement for check printing. The new function is “to_check_number”. The syntax of this function is <?xdofx:to_check_number(amount, precisionOrCurrency, caseType, decimalStyle)?> The following table describes the function attributes:   Attribute Description Valid Value amount The number to be transformed. Any number precisionOrCurrency For this attribute you can specify either the precision, which is the number of digits after the decimal point; or the currency code, which will govern the number of digits after the decimal point. The currency code does not generate a currency symbol in the output. An integer, such as 2; or a currency code, such as ‘USD’. caseType The case type of th...

Oracle Fusion Cloud: Supplier Import Process using File Based Data Import (FBDI)

 Supplier Data Migration or Upload to Oracle Fusion environment File-Based Data Import for Oracle Procurement Cloud Supplier import in oracle fusion   In this post , We will discuss about Supplier import in oracle fusion. Oracle has provided the FBDI tool to import suppliers from External  Source  to the Oracle fusion. Supplier Import in Oracle fusion we first need to  Download  the Supplier Import FDBI  templates  given by the Oracle fusion to import suppliers. Oracle has given 5 Different FBDI templates to Import supplier in Fusion. Here in this post , I will share the Complete steps for Supplier import in oracle fusion. You can refer this post for Supplier Import.   Steps for Supplier import in oracle fusion     Step1- First we need to download Supplier Data  Template  from Oracle Repository. Go to this path for Oracle Repository. ( select Based on your Cloud version) https://docs.oracle.com/en/...