Internet Expense – Error faced Expense Report Line and Distribution totals do not match


Program – Expense report export – Expense report with exception
Exception message: Expense Report Line and Distribution totals do not match.
We would have to check for the AP_EXP_REPORT_DISTS_ALL table for the
Particular expense report header id for receipt_currency_code column in this table .

--Validation: Run this query by providing report header id as parameter
SELECT report_header_id, CASE WHEN total = (SELECT NVL(SUM(amount),0) FROM ap_expense_report_lines_all WHERE report_header_id = :1 AND (itemization_parent_id IS NULL OR itemization_parent_id <> -1)) AND
total = amt_due_ccard_company + amt_due_employee AND
total = (SELECT NVL(SUM(amount),0) FROM ap_exp_report_dists_all WHERE report_header_id = :1)
THEN 'Totals match'
ELSE 'Totals do not match'
END AS "Result"
FROM ap_expense_report_headers_all WHERE report_header_id = :1;



No comments:

Post a Comment