Mike84 Posted January 5, 2011 Share Posted January 5, 2011 Well i got one problem and one question.My problem as you can see in the picture is that the invoice at the end says:Total ( tax incl )Total ( tax excl )Normally it should be first tax excl and then tax incl.How can i change this so it is written down right?My question:In the same picture you see that the "tax details" are directly bellow the total price..For the customer that can be quiet confusing so is it possible to move it a bit loweror even at the footer of the invoice?Thnx already,Mike (Holland) Using Prestashop 1.3.2.3 Link to comment Share on other sites More sharing options...
rocky Posted January 6, 2011 Share Posted January 6, 2011 To switch the totals, change lines 532-537 of classes/PDF.php from: $pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax incl.)') : self::l(' (tax excl.)')).' : ', 0, 0, 'R'); $pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithTax'] : $priceBreakDown['totalWithoutTax']), self::$currency, true, false)), 0, 0, 'R'); $pdf->Ln(4); $pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax excl.)') : self::l(' (tax incl.)')).' : ', 0, 0, 'R'); $pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithoutTax'] : $priceBreakDown['totalWithTax']), self::$currency, true, false)), 0, 0, 'R'); $pdf->Ln(4); to: $pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax excl.)') : self::l(' (tax incl.)')).' : ', 0, 0, 'R'); $pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithoutTax'] : $priceBreakDown['totalWithTax']), self::$currency, true, false)), 0, 0, 'R'); $pdf->Ln(4); $pdf->Cell($width, 0, self::l('Total').' '.(self::$_priceDisplayMethod == PS_TAX_EXC ? self::l(' (tax incl.)') : self::l(' (tax excl.)')).' : ', 0, 0, 'R'); $pdf->Cell(0, 0, (self::$orderSlip ? '-' : '').self::convertSign(Tools::displayPrice((self::$_priceDisplayMethod == PS_TAX_EXC ? $priceBreakDown['totalWithTax'] : $priceBreakDown['totalWithoutTax']), self::$currency, true, false)), 0, 0, 'R'); $pdf->Ln(4); Link to comment Share on other sites More sharing options...
Mike84 Posted January 6, 2011 Author Share Posted January 6, 2011 Rocky many thanks to you!!!!!!!!!!!!!It's now in the right way. first exl vat and then incl vatow only the second thing is left, to put the tax details lower on the invoiceAnyone an idea? Link to comment Share on other sites More sharing options...
rocky Posted January 7, 2011 Share Posted January 7, 2011 Change line 876-878 of classes/PDF.php from: $this->SetFont(self::fontname(), 'B', 8); for($i = 0; $i < sizeof($header); $i++) $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R'); to: $this->Ln(48); $this->SetFont(self::fontname(), 'B', 8); for($i = 0; $i < sizeof($header); $i++) $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R'); This will add a new line of height 48 above the tax detail section. You can adjust 48 until you are happy with the amount of space. Link to comment Share on other sites More sharing options...
Mike84 Posted January 7, 2011 Author Share Posted January 7, 2011 Rocky! Again great thnx for your answers!!!!!!Worked very good, exactly what i needed Link to comment Share on other sites More sharing options...
enihat Posted March 18, 2011 Share Posted March 18, 2011 Hi All, I need help for the VAT calcualtion please?As I have showed in the picture, i need some adjustment, I dont mind paying someone reasonable fee, thanks Change line 876-878 of classes/PDF.php from: $this->SetFont(self::fontname(), 'B', 8); for($i = 0; $i < sizeof($header); $i++) $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R'); to: $this->Ln(48); $this->SetFont(self::fontname(), 'B', 8); for($i = 0; $i < sizeof($header); $i++) $this->Cell($w[$i], 5, $header[$i], 0, 0, 'R'); This will add a new line of height 48 above the tax detail section. You can adjust 48 until you are happy with the amount of space. 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