flix Posted December 14, 2011 Share Posted December 14, 2011 I'd like to edit one part of the pdf invoices that my shop generates for customers. On the bottom row of the form underneath Tax, it's displaying 20,000% - even though my tax rate is set to 20% throughout the store. All the figures are calculated and show correctly, it's just the format of the tax rate I want to change. As far as I can see there's no way to edit this figure under pdf translations, so I figure it must be classes/pdf.php that needs editing. Does any have any ideas about what needs to be changed? Thanks Link to comment Share on other sites More sharing options...
bellini13 Posted December 15, 2011 Share Posted December 15, 2011 it is the pdf.php class file. the line you want is... $this->Cell($w[1], $lineSize, number_format($tax_rate, 3, ',', ' ').' %', 0, 0, 'R'); there is a number 3 after $tax_rate. This means 3 decimals. You might try changing it to $this->Cell($w[1], $lineSize, number_format($tax_rate).' %', 0, 0, 'R'); Link to comment Share on other sites More sharing options...
flix Posted December 15, 2011 Author Share Posted December 15, 2011 Great, thanks I'll give that a try now. Link to comment Share on other sites More sharing options...
flix Posted December 15, 2011 Author Share Posted December 15, 2011 Changing that line of code worked great for the percentage figure, but it's now changed every £ sign into  Any ideas? Link to comment Share on other sites More sharing options...
bellini13 Posted December 15, 2011 Share Posted December 15, 2011 i don't believe the change to the number format would have effected the currency symbol. are you sure you did not alter the currency somehow? Link to comment Share on other sites More sharing options...
flix Posted December 16, 2011 Author Share Posted December 16, 2011 Very sure. I didn't alter currency at all, just the one line of code relating to the tax rate decimal points. Link to comment Share on other sites More sharing options...
bellini13 Posted December 16, 2011 Share Posted December 16, 2011 try to revert the change and see if it fixes it. I can't see how it effected it Link to comment Share on other sites More sharing options...
flix Posted December 21, 2011 Author Share Posted December 21, 2011 I've changed it back now, and it's displaying the £ again now. It's obviously reverted back to 20,000%. too. Link to comment Share on other sites More sharing options...
bellini13 Posted December 21, 2011 Share Posted December 21, 2011 very strange indeed. sorry, but i'm not sure I can help further on that issue. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now