Jump to content

tblinvoiceitems relid in setup fee


Recommended Posts

Hi Everyone,

 

I've been developing modules for WHMCS for quiet some time - however during this time I have always wondered what the logic was behind setup fees having the relid and hosting type instead of the line item that is the actual product?

 

Two examples:

 

ex1, without a setup fee.

 

*************************** 21. row ***************************

id: 21

invoiceid: 20

userid: 1

type: Hosting

relid: 5

description: TestProduct - testKarl2 (16/04/2013 - 15/07/2013)

amount: 200.00

taxed: 0

duedate: 2013-04-16

paymentmethod: directdebit

notes:

*************************************************************

 

ex2, With Setup fee:

 

*************************** 36. row ***************************

id: 36

invoiceid: 27

userid: 1

type: Hosting

relid: 12

description: TestProduct Setup Fee

amount: 50.00

taxed: 0

duedate: 2013-04-17

paymentmethod: directdebit

notes:

*************************** 37. row ***************************

id: 37

invoiceid: 27

userid: 1

type:

relid: 0

description: TestProduct - hgjhghj (17/04/2013 - 16/05/2013)

amount: 100.00

taxed: 0

duedate: 2013-04-17

paymentmethod: directdebit

notes:

**************************************************************

 

I don't understand why the setup item would contain the relid + type yet you exclude it from the actual product line?

This doesn't make any logical sense to me, plus I've found no comfortable way to really work these relationships out.

 

Is there a standard practice that WHMCS uses for this? because my concern is that if people have multiple products in an invoice + these products all have setups, what''s a proper way to really identify the setup that relates to the product line?

Surely people aren't just using regex or something to match the product name?

 

Your thoughts?

Karl Kloppenborg.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated