mori Posted November 11, 2021 Share Posted November 11, 2021 Hi I want to create the amount of product displayed in the invoice percentage The amount displayed <td class="text-center">{$item.amount}</td> And I show this command in the PHP extension But it gives an error in the viewinvoice.tpl file Php command% <?php function Percentage($tota, $percentage){ return $tota * ($percentage / 100); } echo Percentage(9, 1000000) ?> please guide me 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted November 16, 2021 Share Posted November 16, 2021 https://www.smarty.net/docs/en/language.function.math.tpl 0 Quote Link to comment Share on other sites More sharing options...
mori Posted November 29, 2021 Author Share Posted November 29, 2021 I asked for the address you sent, but I did not resolve the issue I dialed this code, the tax problem was solved {($item.amount|replace:'£':'' * 90.0)|string_format:"%.0f"} But in our country, the official invoice must be registered I can not add two variables please guide 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.