Jump to content

Invoicing for multiple transactions (gateway fees)


pat_ads

Recommended Posts

Hi! We are using WHMCS to sell our subscription based software application and credit card gateway services. I was trying to find an easy way to enter invoices each month for customers for certain line-item charges.

For example, customer "A" is charged $.05 per transaction through our gateway, and we get the # of transactions from our gateway processor (not to be confused with the WHMCS gateway and associated fees - this is a point of sale gateway at a physical store).

 

I tried entering "orders" but when the transactions number in the 1,000's, that didn't work as each quantity resulted in a separate line item. I tried "billable items" but that makes the invoice look like we are charging for hours, not quantity.

 

Any ideas?

 

Thanks in advance!

Link to comment
Share on other sites

Hmmm, well, I see that the problem is that I should be creating a new Order, rather than an Invoice. Check. But, when I enter the 1,500 transaction fees @ $.02 each, the Order Confirmation email and New Order Notification emails list each transaction separately, making for one heck of a long email.

Link to comment
Share on other sites

Hi brian! sorry for the delay getting back to you. When you use billable items, the interface "assumes" that you're billing for hours, even though the quantity field shows "Hours/Qty". There is no setting to use the interface as Qty and both the Order Confirmation and Invoice emails list the quantity as Hours. Additionally, the system generated Invoice (the one generated by viewinvoice.php) shows hours (see below):

invoicescreen.png

 

What I need is to find a way to replace the "hours" text so that instead of reading "xx Hours @ $x.xx/Hour" I get something more like "xx X $x.xx", just like a regular product invoice would read.

 

I can't use product invoices because, as you can imagine, if I place an order for 100 gateway transaction fees at $.05 each, the customer then has 100 "products" listed as active in their account - which we could not work with. Billable items is the way to go, but the formatting has to change. If you have any suggestions, please let me know. Thanks!

Link to comment
Share on other sites

I think the solution is in three parts, so let's start with the easy step first.

 

"Hours" and "Hour" are defined in the language files, so editing them (or using overrides) should remove that text from the invoice.

 

$_LANG['billableitemshours'] = "Hours";

$_LANG['billableitemshour'] = "Hour";

 

so having done that, the next step is tweaking viewinvoice.tpl - I assume by replacing..

 

<td>{$item.description}{if $item.taxed eq "true"} *{/if}</td>

with

 

<td>{$item.description|replace:'@':'X'|replace:'/':' '}{if $item.taxed eq "true"} *{/if}</td>

technically, if you don't want to mess with language files (and only have one language), you could probably do...

 

<td>{$item.description|replace:'Hours':''|replace:'@':'X'|replace:'/Hour':''}{if $item.taxed eq "true"} *{/if}</td>

 

 

the third step is trickier and concerns how to change the output of the invoicepdf.tpl file..

 

<td align="left">'.nl2br($item['description']).'<!br /></td>

 

the answer will be similar to the previous quote, but you can't use 'replace' directly in that line, so you may need to do some array/variable manipulation - I think it can be done using smarty or php (rather than messing with tcpdf), but i'll leave that to someone more knowledgeable about that than me!

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