opusinteractive Posted May 9, 2016 Share Posted May 9, 2016 I'm trying to figure out *specifically* the values in the tblinvoiceitems type column come from. The values I see as being in use are the following, including a blank: AddFunds Addon Domain DomainRegister DomainTransfer Hosting Invoice Item LateFee PromoDomain PromoHosting Upgrade Is there a way to add additional types? If so where? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 10, 2016 Share Posted May 10, 2016 You can add extra type, ex: ExtraPromo or GatewayCharge "where?" using simple SQL query inserting in this table directly if you need to 0 Quote Link to comment Share on other sites More sharing options...
opusinteractive Posted May 10, 2016 Author Share Posted May 10, 2016 That's fine, but my question falls more along the lines of what is the logic that auto-fills those fields right now? Is it just hard-coded into whmcs? How do I know what will fill that field when I add a line item to an invoice? Sure, I get that I can just use direct sql queries to add anything that falls withing the constraints of varchar(30). I was hoping I could use some logic to do reports down the line that tells me what kind of product is producing what kind of revenue. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 10, 2016 Share Posted May 10, 2016 Is it hard-coded? Yes. If you need to generate reports based on this table, use "type" along with "relid" columns to query information. If "tblinvoiceitems.type" = "Item", then "tblinvoiceitems.relid" = "tblbillableitems.id" If "tblinvoiceitems.type" = "Hosting", then "tblinvoiceitems.relid" = "tblhosting.id" is it clear, or I missed what you mean 0 Quote Link to comment Share on other sites More sharing options...
opusinteractive Posted May 10, 2016 Author Share Posted May 10, 2016 Ah, ok now I get it. I didn't understand the type determined what table relid linked to. That doesn't quite do what I'm after, but it is super useful info none the less. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.