Jump to content

Moving and Simplifying Tax Box into Main Price Breakdown


praisehim

Recommended Posts

Hi All,

 

I'm editing the /classes/PDF.php file, and so far, so good. I've removed the unecessary parts of code, but need help writing up one thing:

 

I would like to move the value for Total Tax into a new field that I created called taxes.

 

I'm trying to put the pretax value under the product breakdown like so:

 

Total Products (tax excluded)

Total Shipping

TAXES(My created field)

Total (tax included)

 

The pre-tax value appears at the bottom, on the Tax detail table. I want to move the value from the bottom to the top.

 

I'm not a PHP [spam-filter], but I copied and pasted the code from the tax detail box, and put it in place of the former code, but when I generate the PDF, it shows a total of zero.

 

My thinking was maybe tax rate wasn't mentioned before I wanted to call it.

 

In the end, how would I get to show the total taxes?

 

Here's the code snippet:

   $this->Cell($w[3], $lineSize, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice($priceBreakDown['totalsProductsWithTaxAndReduction'][$tax_rate] - $priceBreakDown['totalsProductsWithoutTaxAndReduction'][$tax_rate], self::$currency, true)), 0, 0, 'R');

 

Please help. I hope I provided enough information

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...