Add Column "Position" to offers

Hello

is it posible to add columns like “position” to offers in order to refer on it on billings?

regards

Roschi

I think yes. I have tried to modify the .odt template to list the item numbers in the invoice, but unfortunately without success.

I hope you mean line numbers before the product reference, correct ?

correct!

The customer should be able to select for example Produkt 1 and Produkt 3 in his order

Ok to be possible, it is for sure. But I have not been able to modify it to do so.

Thx

i have manualy added a column in template an display the counter of the “for section” and so I would get the position of produkt in offer table

Can you send me your template ? casaxa (at) gmail dot com.

Here is what I have changed/ Added

(I use the azur-template)

in function write_file add block between ###:

// TVA
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
	$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
	$pdf->SetXY ($this->posxtva, $curY);
	$pdf->MultiCell($this->posxup-$this->posxtva-1, 4, $vat_rate, 0, 'R');
}

//##########################################################
// Pos.
$pdf->SetXY ($this->posxpos, $curY);
$pdf->MultiCell($this->posxdesc-$this->posxpos-1, 4, $i+1, 0, 'C', 0);
//##########################################################

// Prix unitaire HT avant remise
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY ($this->posxup, $curY);
$pdf->MultiCell($this->posxqty-$this->posxup-1, 4, $up_excl_tax, 0, 'R', 0);

and in function _tableau add and correct the following lines

$pdf->SetXY ($this->posxpos-1, $tab_top+1);
//columns
$pdf->MultiCell(10,2, "Pos.",'','C');
$pdf->line($this->posxdesc-1, $tab_top, $this->posxdesc-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);

$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');

regards Roschi

1 Like

Many thanks, will try it out.

To all ODT guys out there, the solution for you is while making the template in libre.
In the table where you want your numbers to be, go to Format and then numbering just chose how you like to have your numbers :happy:.

Was a long way to think about using numbering from libre… feels stupid now, but back then it took me a long way.

Regards

This works for me … Thanks

Thank you @Roschi it helped me a lot and able to add Position no. along with my extra fields on my azure template,

I’m trying to get similar output on Sponge template but the above code is giving me ‘Pos. no.’ outside the table without a dedicated column for it