I'm stuck trying to link credits in Transcend/TPAU to the t_payment table. The stored procedure I'm trying to tweak links the CCREF_NO field in t_payment to tpau's TransactionID in the t_batch_details table. This works fine when the Transaction Type is 'Auth Only' but for our credit transaction types the tpau transactionid does not exist in tessitura's CCREF_NO.
Does anybody have an example of linking credit card credits from tessitura to TPAU?
Here's the current query (many thanks to Lucie from FGO for the original stored procedure!)..
select distinct p.description as payment_method_group, m.description as payment_method, a.RowID, a.BatchID, --g.BatchName, --g.BatchRunTime, a.TransactionID, b.TransactionRowID, b.OrderNumber, b.MerchantID, --f.MerchantName, b.DepartmentID, b.AuthAmount, b.TransactionTypeID, d.VerbalDesc as VerbalDescTranType, b.TransactionStatusID, c.VerbalDesc as VerbalDescStatus, b.CardTypeID, e.VerbalDesc as VerbalDescCardType, b.AuthorizedTime, b.ApprovalCode, h.account_nofrom tpau.dbo.t_batch_details ajoin tpau.dbo.t_transaction_browser_info bon a.TransactionID = b.TransactionIDjoin tpau.dbo.t_ref_transaction_status c on b.TransactionStatusID = c.TransactionStatusIDjoin tpau.dbo.t_ref_transaction_type don b.TransactionTypeID = d.TransactionTypeID -- credit vs auth onlyjoin tpau.dbo.t_ref_card_types eon b.CardTypeID = e.CardTypeID--join tpau.dbo.t_merchant_info f--on-- b.MerchantID = f.MerchantIDjoin tpau.dbo.t_batch_summary_records gon a.BatchID = g.BatchIDjoin impresario.dbo.t_payment hon a.TransactionID = h.ccref_nojoin impresario.dbo.tr_payment_method mon m.id = h.pmt_methodjoin impresario.dbo.tr_pmt_method_group pon p.id = m.pmt_method_group--where b.MerchantID in (2,3,4,5) and g.BatchRunTime between impresario.dbo.lf_get_midnight(@start_dt) and impresario.dbo.lf_get_endofday(@end_dt)order by b.MerchantID, p.description, m.description, e.VerbalDesc, b.AuthorizedTime
OrderNumber in T_TRANSACTION_ID links to payment_no in T_payment
That worked perfectly! Thanks Julie!