Skip to content

Commit afc3316

Browse files
March commit
1 parent 3be92ec commit afc3316

File tree

162 files changed

+31473
-5016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+31473
-5016
lines changed

AP Expenses/AP Expenses.sql

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ nvl(aerha.report_submitted_date,aerha.creation_date) report_submitted_date,
2727
initcap(aerha.receipts_status) original_receipt_status,
2828
aerha.receipts_received_date,
2929
&image_receipt_columns
30-
xxen_util.meaning(case when aerha.audit_code in ('PAPERLESS_AUDIT','RECEIPT_BASED') and nvl(aerha.workflow_approved_flag,'M') in ('N','M') then 'Y' else 'N' end,'YES_NO',0) requires_audit,
31-
xxen_util.meaning(nvl2(aaq.auditor_id,'Y','N'),'YES_NO',0) auditor_assigned,
30+
xxen_util.meaning(case when aerha.audit_code in ('PAPERLESS_AUDIT','RECEIPT_BASED') and nvl(aerha.workflow_approved_flag,'M') in ('N','M') then 'Y' end,'YES_NO',0) requires_audit,
31+
xxen_util.meaning(nvl2(aaq.auditor_id,'Y',null),'YES_NO',0) auditor_assigned,
3232
ap_web_audit_utils.get_audit_reason(aerha.report_header_id) audit_reason,
3333
decode(aaq.auditor_id,-1,fnd_message.get_string('SQLAP','OIE_AUD_FALLBACK_AUDITOR'),xxen_util.user_name(aaq.auditor_id)) auditor,
3434
xxen_util.meaning(nvl(aerha.audit_code,'AUDIT'),'OIE_AUDIT_TYPES',200) audit_type,
@@ -60,7 +60,6 @@ aca.stopped_date is null
6060
) payment_date,
6161
&lines_columns
6262
&per_diem_columns
63-
&proj_tasks_columns
6463
aerha.expense_report_id
6564
from
6665
gl_ledgers gl,
@@ -73,7 +72,9 @@ ap_suppliers aps,
7372
ap_invoices_all aia,
7473
(select aerla.* from ap_expense_report_lines_all aerla where '&show_lines'='Y') aerla,
7574
&per_diem_table
76-
(select aerda.* from ap_exp_report_dists_all aerda where '&show_protasks'='Y') aerda
75+
(select aerda.* from ap_exp_report_dists_all aerda where '&show_lines'='Y') aerda,
76+
gl_code_combinations_kfv gcck2,
77+
gms_awards_all gaa
7778
&proj_tasks_tables
7879
where
7980
1=1 and
@@ -86,5 +87,7 @@ aerha.vouchno=aia.invoice_id(+) and
8687
aerha.report_header_id=aaq.expense_report_id(+) and
8788
aerha.report_header_id=aerla.report_header_id(+) and
8889
&per_diem_join
89-
aerla.report_line_id=aerda.report_line_id(+)
90+
aerla.report_line_id=aerda.report_line_id(+) and
91+
aerda.code_combination_id=gcck2.code_combination_id(+) and
92+
aerda.award_id=gaa.award_id(+)
9093
&proj_tasks_joins

AP Expenses/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Detail AP expense report listing corresponding AP invoices with status, line details, expense type and expense justification. Including projects task related expenses.
55

66
## Parameters
7-
Ledger, Operating Unit, Expense Status, Report Submitted Date From, Report Submitted Date To, Employee Name, Expense Report Number, Auditor Name, Audit Reason, Audit Type, Source, Expense Type, Show Lines, Show per diem details, Show Projects Tasks
7+
Ledger, Operating Unit, Expense Status, Report Submitted Date From, Report Submitted Date To, Employee Name, Expense Report Number, Auditor Name, Audit Reason, Audit Type, Source, Expense Type, Show Lines, Show per diem details
88

99
## Used tables
10-
[per_people_x](https://www.enginatics.com/library/?pg=1&find=per_people_x), [ap_invoice_payments_all](https://www.enginatics.com/library/?pg=1&find=ap_invoice_payments_all), [ap_checks_all](https://www.enginatics.com/library/?pg=1&find=ap_checks_all), [gl_ledgers](https://www.enginatics.com/library/?pg=1&find=gl_ledgers), [hr_operating_units](https://www.enginatics.com/library/?pg=1&find=hr_operating_units), [ap_expense_report_headers_all](https://www.enginatics.com/library/?pg=1&find=ap_expense_report_headers_all), [gl_code_combinations_kfv](https://www.enginatics.com/library/?pg=1&find=gl_code_combinations_kfv), [ap_aud_queues](https://www.enginatics.com/library/?pg=1&find=ap_aud_queues), [ap_suppliers](https://www.enginatics.com/library/?pg=1&find=ap_suppliers), [ap_invoices_all](https://www.enginatics.com/library/?pg=1&find=ap_invoices_all), [ap_expense_report_lines_all](https://www.enginatics.com/library/?pg=1&find=ap_expense_report_lines_all), [&per_diem_table](https://www.enginatics.com/library/?pg=1&find=&per_diem_table)
10+
[per_people_x](https://www.enginatics.com/library/?pg=1&find=per_people_x), [ap_invoice_payments_all](https://www.enginatics.com/library/?pg=1&find=ap_invoice_payments_all), [ap_checks_all](https://www.enginatics.com/library/?pg=1&find=ap_checks_all), [gl_ledgers](https://www.enginatics.com/library/?pg=1&find=gl_ledgers), [hr_operating_units](https://www.enginatics.com/library/?pg=1&find=hr_operating_units), [ap_expense_report_headers_all](https://www.enginatics.com/library/?pg=1&find=ap_expense_report_headers_all), [gl_code_combinations_kfv](https://www.enginatics.com/library/?pg=1&find=gl_code_combinations_kfv), [ap_aud_queues](https://www.enginatics.com/library/?pg=1&find=ap_aud_queues), [ap_suppliers](https://www.enginatics.com/library/?pg=1&find=ap_suppliers), [ap_invoices_all](https://www.enginatics.com/library/?pg=1&find=ap_invoices_all), [ap_expense_report_lines_all](https://www.enginatics.com/library/?pg=1&find=ap_expense_report_lines_all), [&per_diem_table](https://www.enginatics.com/library/?pg=1&find=&per_diem_table), [gms_awards_all](https://www.enginatics.com/library/?pg=1&find=gms_awards_all)
1111

1212
## Categories
1313
[Enginatics](https://www.enginatics.com/library/?pg=1&category[]=Enginatics)
@@ -19,7 +19,7 @@ Ledger, Operating Unit, Expense Status, Report Submitted Date From, Report Submi
1919
If you would like to try one of these Oracle EBS SQLs without having Blitz Report installed, note that some of the reports require functions from utility package [xxen_util](https://www.enginatics.com/xxen_util/true).
2020

2121
# Example Report
22-
[AP Expenses 05-Oct-2019 002046.xlsx](https://www.enginatics.com/example/ap-expenses/)
22+
[AP Expenses 24-Jan-2025 014015.xlsx](https://www.enginatics.com/example/ap-expenses/)
2323

2424
# Report SQL
2525
[www.enginatics.com/reports/ap-expenses/](https://www.enginatics.com/reports/ap-expenses/)

AP Invoice Payments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Ledger, Operating Unit, Payment Date From, Payment Date To, Accounting Date From
1414
[Enginatics](https://www.enginatics.com/library/?pg=1&category[]=Enginatics)
1515

1616
## Related reports
17-
[GL Account Analysis (Drilldown) (with inventory and WIP)](/GL%20Account%20Analysis%20%28Drilldown%29%20%28with%20inventory%20and%20WIP%29/)
17+
[GL Account Analysis](/GL%20Account%20Analysis/), [GL Account Analysis (Distributions)](/GL%20Account%20Analysis%20%28Distributions%29/), [GL Account Analysis (Drilldown) (with inventory and WIP)](/GL%20Account%20Analysis%20%28Drilldown%29%20%28with%20inventory%20and%20WIP%29/)
1818

1919
## Dependencies
2020
If you would like to try one of these Oracle EBS SQLs without having Blitz Report installed, note that some of the reports require functions from utility package [xxen_util](https://www.enginatics.com/xxen_util/true).

AP Supplier Upload/AP Supplier Upload.sql

Lines changed: 105 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,4 +558,108 @@ ba1.instrument_payment_use_id site_bank_instr_pay_use_id,
558558
:p_default_inclusive_tax default_inclusive_tax_flag,
559559
:p_default_allow_offset_taxes default_allow_offset_tax_flag,
560560
:p_default_pay_document_alone default_pay_alone_flag,
561-
:p_site_bank_assign_level def
561+
:p_site_bank_assign_level default_site_bank_assign_lvl
562+
from
563+
ap_suppliers aps,
564+
hz_parties hp,
565+
zx_party_tax_profile zptp0,
566+
ap_suppliers aps1,
567+
iby_external_payees_all iepa0, -- to get the supplier level payment distribution
568+
q_bank_accounts ba0,
569+
--
570+
ap_supplier_sites_all assa,
571+
hz_party_sites hps,
572+
hz_locations hl,
573+
fnd_languages fl,
574+
hr_operating_units hou,
575+
gl_ledgers gl,
576+
hz_contact_points hcp1,
577+
hz_contact_points hcp2,
578+
hz_contact_points hcp3,
579+
zx_party_tax_profile zptp1,
580+
iby_external_payees_all iepa1, -- to get the site level payment distribution
581+
q_bank_accounts ba1,
582+
--
583+
ap_supplier_contacts asco,
584+
hz_parties hpc,
585+
hz_parties hpr
586+
--
587+
where
588+
:p_upload_mode like '%' || xxen_upload.action_update and
589+
1=1 and
590+
aps.employee_id is null and
591+
aps.parent_vendor_id = aps1.vendor_id(+) and
592+
aps.party_id = hp.party_id and
593+
aps.party_id = zptp0.party_id (+) and
594+
'THIRD_PARTY' = zptp0.party_type_code (+) and
595+
--
596+
aps.party_id = iepa0.payee_party_id (+) and
597+
nvl(iepa0.party_site_id (+),0) = 0 and
598+
iepa0.payment_function (+) = 'PAYABLES_DISB' and
599+
--
600+
decode(:p_show_vendor_banks,'Y',aps.party_id) = ba0.payee_party_id (+) and
601+
nvl(ba0.party_site_id (+),0) = 0 and
602+
--
603+
decode(:p_show_vendor_sites,'Y',aps.vendor_id,-1) = assa.vendor_id (+) and
604+
(assa.org_id is null or mo_global.check_access(assa.org_id)='Y') and
605+
assa.party_site_id = hps.party_site_id (+) and
606+
hps.location_id = hl.location_id (+) and
607+
hl.language = fl.language_code (+) and
608+
assa.org_id = hou.organization_id (+) and
609+
hou.set_of_books_id = gl.ledger_id (+) and
610+
--
611+
hps.party_site_id = hcp1.owner_table_id (+) and
612+
hcp1.owner_table_name (+) = 'HZ_PARTY_SITES' and
613+
hcp1.contact_point_type (+) = 'PHONE' and
614+
hcp1.phone_line_type (+) = 'GEN' and
615+
hcp1.primary_flag (+) = 'Y' and
616+
hcp1.status (+) = 'A' and
617+
hps.party_site_id = hcp2.owner_table_id (+) and
618+
hcp2.owner_table_name (+) = 'HZ_PARTY_SITES' and
619+
hcp2.contact_point_type (+) = 'PHONE' and
620+
hcp2.phone_line_type (+) = 'FAX' and
621+
hcp2.status (+) = 'A' and
622+
hps.party_site_id = hcp3.owner_table_id (+) and
623+
hcp3.owner_table_name (+) = 'HZ_PARTY_SITES' and
624+
hcp3.contact_point_type (+) = 'EMAIL' and
625+
hcp3.primary_flag (+) = 'Y' and
626+
hcp3.status (+) = 'A' and
627+
--
628+
assa.party_site_id = zptp1.party_id (+) and
629+
'THIRD_PARTY_SITE' = zptp1.party_type_code (+) and
630+
--
631+
assa.party_site_id = iepa1.party_site_id (+) and
632+
assa.vendor_site_id = iepa1.supplier_site_id (+) and
633+
iepa1.payment_function (+) = 'PAYABLES_DISB' and
634+
--
635+
decode(:p_show_site_banks,'Y',assa.party_site_id) = ba1.party_site_id (+) and
636+
assa.org_id = nvl(ba1.org_id (+),assa.org_id) and
637+
assa.vendor_site_id = nvl(ba1.supplier_site_id (+),assa.vendor_site_id) and
638+
--
639+
decode(:p_show_site_contacts,'Y',assa.party_site_id,-99) = asco.org_party_site_id (+) and
640+
assa.vendor_site_id = nvl(asco.vendor_site_id (+),assa.vendor_site_id) and
641+
asco.per_party_id = hpc.party_id (+) and
642+
asco.rel_party_id = hpr.party_id (+)
643+
--
644+
&not_use_first_block
645+
&report_table_select
646+
&report_table_name
647+
&report_table_where_clause
648+
&success_query1
649+
&success_query2
650+
&processed_run
651+
) x
652+
order by
653+
x.supplier_name,
654+
x.supplier_number,
655+
x.operating_unit,
656+
x.country,
657+
x.site_name,
658+
x.contact_last_name,
659+
x.contact_first_name,
660+
x.site_bank_name,
661+
x.site_bank_number,
662+
x.site_bank_branch_name,
663+
x.site_bank_branch_number,
664+
x.site_bank_acct_name,
665+
x.site_bank_acct_num

AR Customer Credit Snapshot/AR Customer Credit Snapshot.sql

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,3 +620,80 @@ select /*+ ordered push_pred(curr) push_pred(qb) push_pred(qsc) */
620620
-- to_date(qc.c_last_st_date) last_statement_date,
621621
--qc.c_last_st_days_since last_statement_days_since,
622622
--to_date(qc.c_last_stmnt_next_trx_date) next_statement_date,
623+
case
624+
when qsc.statement_date is null
625+
then ar_arxccs_xmlp_pkg.rp_none_p
626+
else ar_arxccs_xmlp_pkg.rp_na_upper_p
627+
end last_statement_number,
628+
qsc.statement_type last_statement_type,
629+
qsc.statement_date last_statement_date,
630+
qsc.days_since last_statement_days_since,
631+
(select distinct
632+
first_value(ascd.statement_date) over (order by ascd.statement_date,ascd.statement_cycle_date_id)
633+
from
634+
hz_customer_profiles hcp,
635+
ar_statement_cycle_dates ascd
636+
where
637+
hcp.statement_cycle_id = ascd.statement_cycle_id and
638+
ascd.printed = 'N' and
639+
ascd.statement_date > qsc.statement_date and
640+
hcp.cust_account_id = qc.customer_id and
641+
hcp.site_use_id is null
642+
) next_statement_date,
643+
--qc.c_last_dn_formula,
644+
qc.c_last_dn_number last_dunning_number,
645+
qc.c_last_dn_type last_dunning_type,
646+
qc.c_last_dn_currency last_dunning_curr,
647+
qc.c_last_dn_amount last_dunning_amount,
648+
to_date(qc.c_last_dn_date) last_dunning_date,
649+
qc.c_last_dn_days_since last_dunning_days_since,
650+
--qc.c_last_nsf_formula,
651+
qc.c_last_nsf_number last_nsf_stop_pmt_number,
652+
qc.c_last_nsf_type last_nsf_stop_pmt_type,
653+
qc.c_last_nsf_currency last_nsf_stop_pmt_curr,
654+
qc.c_last_nsf_amount last_nsf_stop_pmt_amount,
655+
to_date(qc.c_last_nsf_date) last_nsf_stop_pmt_date,
656+
qc.c_last_nsf_days_since last_nsf_stop_pmt_days_since,
657+
--qc.c_last_contact_formula,
658+
qc.c_last_contact_number last_phone_contact_number,
659+
qc.c_last_contact_rel_invoice last_phone_contact_related_inv,
660+
qc.c_last_contact_currency last_phone_contact_curr,
661+
qc.c_last_contact_amount last_phone_contact_amount,
662+
to_date(qc.c_last_contact_date) last_phone_contact_date,
663+
qc.c_last_contact_days_since last_phone_contact_days_since,
664+
--qc.c_last_hold_formula,
665+
qc.c_last_hold_number last_credit_hold_number,
666+
qc.c_last_hold_amount last_credit_hold_amount,
667+
to_date(qc.c_last_hold_date) last_credit_hold_date,
668+
qc.c_last_hold_days_since last_credit_hold_days_since,
669+
--
670+
to_char(qc.set_of_books_id) set_of_books_id,
671+
to_char(qc.qcust_org_id) org_id,
672+
to_char(qc.customer_id) customer_id,
673+
to_char(qc.site_use_id) site_use_id,
674+
to_char(qc.c_customer_profile_id) customer_profile_id
675+
from
676+
q_cust qc,
677+
q_currencies curr,
678+
hz_cust_profile_amts hcpa,
679+
q_stmt_cycles qsc,
680+
q_buckets qb
681+
where
682+
qc.customer_id = curr.customer_id (+) and
683+
qc.site_use_id = curr.site_use_id (+) and
684+
qc.qcust_org_id = curr.org_id (+) and
685+
qc.customer_profile_id = curr.cust_account_profile_id (+) and
686+
--
687+
curr.cust_account_profile_id = hcpa.cust_account_profile_id (+) and
688+
curr.currency_code = hcpa.currency_code (+) and
689+
--
690+
curr.customer_id = qb.ps_customer_id (+) and
691+
curr.site_use_id = qb.ps_site_use_id (+) and
692+
curr.currency_code = qb.currency_bucket (+) and
693+
--
694+
qc.statement_cycle_id = qsc.statement_cycle_id (+)
695+
order by
696+
qc.customer_name,
697+
qc.primary_flag desc,
698+
qc.location,
699+
curr.currency_code

0 commit comments

Comments
 (0)