Once a GV is purchased ... the amount is added to the Customer Balance, when released ...
Once a GV is sent to a Customer via the Admin ... the amount is added to the Customer Balance, when redeemed ...
Once a GV is sent from a Customer with a balance to a friend ... the amount sent is removed from the Customer Balance ...
Once a GV Balance is used to pay for an Order ... the GV amount used is removed from the Customer Balance ...
But the problem is, the amount of the specific GV cannot be tracked as it is "Cash" ...
On Gift Certificates that are purchased in an Order by the Customer ... you will see the original GV in the table:
coupon_gv_queue
Before the GV is released from the Queue, the release_flag is N, and after being released from the Queue, the release_flag is Y ...
Now all transfers of the Customer's GV Balance can be tracked in the coupons and coupon_email_track ...
Now the person who redeems the GV redeep code on the amount sent from a friend will show in the coupons as no longer available to be redeemed and in the coupon_redeem_track of being redeemed by what address and in the coupon_gv_customer as being added to the Customer GV Balance ...
In your Admin, you will see a lot of this information ...
However, some information, while available in the database tables, cannot be seen from the Admin ... example: GV Queued info only shows when you have GVs queued for release ... not old ones already released ...
You could probably write something to try to manage tracking the sources of the credits to the Customer Balance and the debits from the Customer Balance ... but it will not tell you what specific GV amount came from what ...
The customer that bought the GV from you ... now you see in the Customer account their balance ...
As they send it to friends you will see:
1 their balance go down
2 GV Sent will show they emailed to someone an amount(s)
Customers who spend their GVs on Orders you will see references in the Orders, but again do not know the source of the funds that made up the total amount as it could of been several GVs from friends, GVs that they bought, GVs sent by the Admin ... once the GV was converted to Cash in their GV Balance, you lose the specifics ...
Kind of like at a bank where you make all kinds of transactions to build up your balance and transactions to spend your balance but you don't know specifically which penny came from where and went where ...