pat_ads Posted July 29, 2013 Share Posted July 29, 2013 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! 0 Quote Link to comment Share on other sites More sharing options...
pat_ads Posted August 1, 2013 Author Share Posted August 1, 2013 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 1, 2013 Share Posted August 1, 2013 i've never played with a billable items invoice - what does it look like ? if the only issue is that it's saying hours and you want it to say quantity, that should be easily fixed. 0 Quote Link to comment Share on other sites More sharing options...
pat_ads Posted August 6, 2013 Author Share Posted August 6, 2013 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): 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! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 6, 2013 Share Posted August 6, 2013 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! 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.