Below query can be used to get the commission amount for the given period for a salesperson.
select sum(CCL.commission_amount) from cn_commission_headers_all CHR,
cn_commission_lines_all CCL
where CHR.commission_header_id = CCL.commission_header_id and
CCL.credited_salesrep_id = &Salesperson_Id and
CCL.processed_period_id = &Period_Id and
CHR.status like 'ROLL' and
CCL.status like 'CALC'
Below query can be used to get the total transaction amount for the given period for a salesperson.
select sum(CHR.transaction_amount) from cn_commission_headers_all CHR,
cn_commission_lines_all CCL
where CHR.commission_header_id = CCL.commission_header_id and
CCL.credited_salesrep_id = &Salesperson_Id and
CCL.processed_period_id = &Period_Id and
CHR.status like 'ROLL' and
CCL.status like 'CALC'
&Salesperson_Id - Can be taken from JTF_RS_SALESREPS table
&Period_Id - e.g., 2010001 for Jan 2010, 2009012 for Dec 2009
Tuesday, November 23, 2010
Subscribe to:
Post Comments (Atom)
pandora charms
ReplyDeletecoach outlet online
beats by dre
adidas nmd r1
fred perry shirts
christian louboutin pas cher
coach outlet online
true religion outlet online
longchamp handbags
ray ban sunglasses cheap
xushengda0406
cheap jordans
ReplyDeletecurry 4
moncler
converse outlet
yeezy
stephen curry shoes
ferragamo belts
golden goose
lebron 15 shoes
birkin bag
navigate to this site their explanation hop over to this web-site my link navigate to this web-site have a peek at this site
ReplyDeletebags replica gucci v19 x8x52n6s59 best replica bags online q48 g9b53r6n85 replica designer bags wholesale a31 a4h96s8w39
ReplyDelete