Billing Extension Release 1.3.34

Changelog

Type Description
New
Extended support for Level 2 taxes with fixed rate. Viewcart page now shows correct amounts
New
The module now handles and stores tax2 and taxrate2 in preparation of a new feature that will be released later
New
New section in Integration page where you can find tips and tricks of the module
Improved
Apply Credit now works better when used in combination with Apply tax to credit option
Improved
Enormous amount of improvements for Credit management
Changed
All functions related to Credit have been entirely redesigned
Changed
Automatic Integration code has been updated in line with recent changes
Fixed
Fatal error when using simultaneously the standard Late Fee system and the advanced one included in the module
Fixed
Fixed many small bugs

Upgrade instructions

Steps Description
1 Backup your database and files inside modules/addons/BillingExtension directory before continuing.
2 Run this query from PHPMyAdmin to your WHMCS database:
ALTER TABLE `mod_billingextensiontrans` ADD `tax2` DECIMAL( 10, 2 ) NOT NULL AFTER `taxrate` , ADD `taxrate2` DECIMAL( 10, 2 ) NOT NULL AFTER `tax2` ;
3 The Dev Team of WHMCS has unilaterally changed the way WHMCS interacts with AddTransaction events from version 6.0.2. Now the system requires an unique transaction ID for every payment (for more informations click here). Because of this change we have been forced to redesign some parts of the module and now it's necessary that you update the integration code in your viewinvoice.tpl and invoicepdf.tpl files.
4 Open viewinvoice.tpl. Find:

{$transaction.amount}
OR
{if $transaction.gateway eq $creditgateway}{$transaction.transid}{else}{$transaction.amount}{/if}

Replace it with this very long string:

{if $transaction.gateway eq $creditgateway}{if $smarty.now|date_format:"%Y/%m/%d" > "2016/01/04"|date_format:"%Y/%m/%d"}{assign var=temp value='|'|explode:$transaction.transid}{$temp[1]}{else}{$transaction.transid}{/if}{else}{$transaction.amount}{/if}
5 Open invoicepdf.tpl. Find:

if($trans['gateway']==$creditgateway): $trans['amount'] = $trans['transid']; endif;

Replace it with:

if($trans['gateway']==$creditgateway): if($benow>$befix): $temp = explode("|",$trans['transid']); $trans['amount'] = $temp[1]; else: $trans['amount'] = $trans['transid']; endif; endif;