Nyan Posted December 1, 2015 Share Posted December 1, 2015 I customized Order Form Template in reference to the following. http://forum.whmcs.com/showthread.php?31405-Pay-with-Credit-Balance Template: Six Order Form Template: Standard Cart <div class="total-due-today total-due-today-padded"> <span class="amt">{$total}</span> <span>{$LANG.ordertotalduetoday}</span> </div> Change the above code to the following. {if $clientsdetails.credit > 0} {assign var="inttotal" value=$total|replace:$currency.suffix:''} {assign var="inttotal" value=$inttotal|replace:$currency.prefix:''} <div class="recurring-totals clearfix"> <span class="pull-left">{$LANG.statscreditbalance}: </span> <span class="pull-right recurring-charges">{$clientsstats.creditbalance}</span> </div> {if $clientsdetails.credit > $inttotal} <div class="total-due-today total-due-today-padded"> <span class="amt">0</span> <span>{$LANG.ordertotalduetoday}</span> </div> {else} {assign var="total" value=$inttotal-$clientsdetails.credit} {assign var="total" value=$total|number_format:0} <div class="total-due-today total-due-today-padded"> <span class="amt">{$total}</span> <span>{$LANG.ordertotalduetoday}</span> </div> {/if} {else} <div class="total-due-today total-due-today-padded"> <span class="amt">{$total}</span> <span>{$LANG.ordertotalduetoday}</span> </div> {/if} It is calculated correctly if the following settings. Setup > Payments > Currencies > Format:1234.56 However if the following settings, it is not calculated correctly. Setup > Payments > Currencies > Format:1,234 or Setup > Payments > Currencies > Format:1,234.56 Please tell me how to resolve. 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.