PrestashopTrackglobe Posted December 26, 2010 Share Posted December 26, 2010 At the store I am creating http://www.eluniversodelperro.com store I added a new button in the "Bills" to generate the invoice or order from suppliers; gusari me know:1 - I have to change so that instead of calling a function / class / call me PDF2.php PDF.php2 - I would like to appear the purchase price to the supplier (if I quivoco 'wholesale_price')the thing is that the file pdf.php see this piece (which if I remember correctly is that I have to change, I've got to show me the reference pro /** * Product table with references, quantities... */ public function ProdReturnTab() { global $ecotax; $header = array( array(self::l('Description'), 'L'), array(self::l('Reference'), 'L'), array(self::l('Qty'), 'C') ); $w = array(110, 25, 20); $this->SetFont(self::fontname(), 'B', 8); $this->SetFillColor(240, 240, 240); for ($i = 0; $i < sizeof($header); $i ) $this->Cell($w[$i], 5, $header[$i][0], 'T', 0, $header[$i][1], 1); $this->Ln(); $this->SetFont(self::fontname(), '', 7); $products = OrderReturn::getOrdersReturnProducts(self::$orderReturn->id, self::$order); foreach ($products AS $product) { $before = $this->GetY(); $this->MultiCell($w[0], 5, Tools::iconv('utf-8', self::encoding(), $product['product_name']), 'B'); $lineSize = $this->GetY() - $before; $this->SetXY($this->GetX() $w[0], $this->GetY() - $lineSize); $this->Cell($w[1], $lineSize, ($product['product_reference'] != '' ? Tools::iconv('utf-8', self::encoding(), $product['product_reference']) : '---'), 'B'); $this->Cell($w[2], $lineSize, $product['product_quantity'], 'B', 0, 'C'); $this->Ln(); } } ........................ I liked that all I calculate everything as the price of the purchase price from the wholesaler, but do not know what exactly I have to change, finally, I also like that when you generate the PDF, if there are 4 clients shopping, I'll generate the same but priced provider, and I want at the very end, I calculate the sum of all products excluding VAT, of all the taxes, and total.Anybody can help me a bit to accomplish this?Thank you very much and best regards Link to comment Share on other sites More sharing options...
Recommended Posts