project QadFinancials > class BAPMatchingReport > business logic query PendingVoucherForUnmatched

Description

.


Parameters


icFromPurchaseOrdercharacter
icToPurchaseOrdercharacter
icFromCreditorCodecharacter
icToCreditorCodecharacter
icFromItemcharacter
icToItemcharacter
itFromReceiptDatedate
itToReceiptDatedate
icSiteCodecharacter
icDomainCodecharacter


query condition


  each pvo_mstr where
pvo_mstr.pvo_last_voucher = '' AND
pvo_mstr.pvo_order >= icFromPurchaseOrder AND
pvo_mstr.pvo_order <= icToPurchaseOrder AND
pvo_mstr.pvo_supplier >= icFromCreditorCode AND
pvo_mstr.pvo_supplier <= icToCreditorCode AND
pvo_mstr.pvo_domain = icDomainCode

      first po_mstr (inner-join) where
po_mstr.po_domain = pvo_mstr.pvo_domain AND
po_mstr.po_nbr = pvo_mstr.pvo_order AND

      each pvod_det (inner-join) where
pvod_det.pvod_domain = pvo_mstr.pvo_domain AND
pvod_det.pvod_id = pvo_mstr.pvo_id AND
pvod_det.pvod_last_voucher = '' AND
pvod_det.pvod_part >= icFromItem AND
pvod_det.pvod_part <= icToItem AND
pvod_det.pvod_eff_date >= itFromReceiptDate AND
pvod_det.pvod_eff_date <= itToReceiptDate AND
pvod_det.pvod_shipto can-do icSiteCode

          first prh_hist (outer-join) where
prh_hist.prh_domain = pvod_det.pvod_domain AND
prh_hist.prh_receiver = pvod_det.pvod_internal_ref AND
prh_hist.prh_nbr = pvod_det.pvod_order AND
prh_hist.prh_line = pvod_det.pvod_order_line AND

          first pt_mstr (inner-join) where
pt_mstr.pt_domain = pvod_det.pvod_domain AND
pt_mstr.pt_part = pvod_det.pvod_part AND

          each tx2d_det (conditional-join) where
tx2d_det.tx2d_domain = pvod_det.pvod_domain AND
((tx2d_det.tx2d_line = pvod_det.pvod_order_line AND
'01' = pvod_det.pvod_order_type) OR
(0 = pvod_det.pvod_order_line AND
pvod_det1.pvod_id_line = tx2d_det1.tx2d_line AND
'02' = pvod_det.pvod_order_type) OR
(tx2d_det.tx2d_line = 0 AND
'01' = pvod_det.pvod_order_type)) AND
tx2d_det.tx2d_ref = (if pvod_det.pvod_accrued_amt = 0 then pvod_det.pvod_internal_ref else string(pvod_det.pvod_id) ) AND
(tx2d_det.tx2d_tr_type = '21' OR
tx2d_det.tx2d_tr_type = '27' OR
tx2d_det.tx2d_tr_type = '43' OR
tx2d_det.tx2d_tr_type = '45' )

      first vd_mstr (conditional-join) where
vd_mstr.vd_addr = pvo_mstr.pvo_supplier AND
vd_mstr.vd_domain = pvo_mstr.pvo_domain AND


query resultset tqPendingVoucherForUnmatched


field namedata typedb fielddescription
tcpo_buyercharacterpo_mstr.po_buyerBuyer
tcpo_nbrcharacterpo_mstr.po_nbrPurchase Order
ttpo_ord_datedatepo_mstr.po_ord_dateOrder Date
tcpo_rmkscharacterpo_mstr.po_rmksRemarks
tcprh_currcharacterprh_hist.prh_currCurrency
tcprh_domaincharacterprh_hist.prh_domainDomain
tiprh_lineintegerprh_hist.prh_linePO Line
tcprh_nbrcharacterprh_hist.prh_nbrOrder
tcprh_receivercharacterprh_hist.prh_receiverReceiver
tcprh_shiptocharacterprh_hist.prh_shiptoShip-to
tcprh_sitecharacterprh_hist.prh_siteSite
tcprh_typecharacterprh_hist.prh_typePurchase Type
tcprh_umcharacterprh_hist.prh_umUM
tdprh_um_convdecimalprh_hist.prh_um_convUM Conversion
tcprh_vendcharacterprh_hist.prh_vendSupplier
tcpt_prod_linecharacterpt_mstr.pt_prod_lineProd Line
tcpt_sitecharacterpt_mstr.pt_siteSite
ttpvo_eff_datedatepvo_mstr.pvo_eff_dateGL Effective Date
tcpvo_lc_chargecharacterpvo_mstr.pvo_lc_chargeLogistics Charge Code
tcpvo_suppliercharacterpvo_mstr.pvo_supplierSupplier
ttpvo_trans_datedatepvo_mstr.pvo_trans_dateTransaction Date
tdpvod_accrued_amtdecimalpvod_det.pvod_accrued_amtAccrued Amount
tdpvod_ex_ratedecimalpvod_det.pvod_ex_rateExch Rate
tdpvod_ex_rate2decimalpvod_det.pvod_ex_rate2Exch Rate 2
tipvod_idintegerpvod_det.pvod_idPending Voucher ID
tipvod_id_lineintegerpvod_det.pvod_id_lineLine
tcpvod_partcharacterpvod_det.pvod_partItem Number
tcpvod_projectcharacterpvod_det.pvod_projectProject
tdpvod_pur_costdecimalpvod_det.pvod_pur_costPO Cost
tdpvod_trans_qtydecimalpvod_det.pvod_trans_qtyTransaction Qty
tdpvod_vouchered_amtdecimalpvod_det.pvod_vouchered_amtVouchered Amount
tdpvod_vouchered_qtydecimalpvod_det.pvod_vouchered_qtyVouchered Qty
tdtx2d_cur_tax_amtdecimaltx2d_det.tx2d_cur_tax_amtTax
tcvd_typecharactervd_mstr.vd_typeType


Internal usage


QadFinancials
method BAPMatchingReport.UnmatchedReceipt
dataset BAPMatchingReport.tUmatchedReceiptWithTax