[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xedemo template - serial number field wrapping howto?



Hi,

I modified the template order and invoice templates to include serial numbers on the order/packing list/invoices.

The problem is that, if there are too much serial numbers, it will be not wrapped into more lines, but shift all the layout. Check the attachment.

Here is the code from the template, in red the modification:


\begin{longtable}{@{\extracolsep{\fill}}cllccrrr@{\extracolsep{0pt}}}
\textbf{<?lsmb text('Item') ?>}
& \textbf{<?lsmb text('Number') ?>}
& \textbf{<?lsmb text('Description') ?>}
& \textbf{<?lsmb text('Qty') ?>}
& \textbf{<?lsmb text('Unit') ?>}
& \textbf{<?lsmb text('Price') ?>}
& \textbf{<?lsmb text('Disc %') ?>}
& \textbf{<?lsmb text('Amount') ?>}
\endhead
<?lsmb FOREACH number ?>
<?lsmb lc = loop.count - 1 ?>
<?lsmb runningnumber.${lc} ?>
& <?lsmb number.${lc} ?>
& <?lsmb description.${lc} ?>
& <?lsmb qty.${lc} ?>
& <?lsmb unit.${lc} ?>
& <?lsmb sellprice.${lc} ?>
& <?lsmb discountrate.${lc} ?>
& <?lsmb linetotal.${lc} ?> \\
<?lsmb IF serialnumber.${lc} ?>
& <?lsmb text('Serial No.') ?>
& \textbf{<?lsmb serialnumber.${lc} ?>}
& \\
<?lsmb END ?>

 

The main idea, the second line of the recent item contains the serial numbers in wrapped. Somehow, in sql-ledger it works well, as expected, but here not.

Any idea, how to solve this issue?

Thanks, István

Here is the sql-ledger template, just in case:

{\scriptsize
\begin{tabularx}{\textwidth}{
>{\hsize=0.4cm\fontsize{8pt}{10pt}\centering}X@{\ }
>{\hsize=2.5cm\fontsize{8pt}{10pt}\raggedright}X@{\ }
>{\hsize=8.6cm\fontsize{8pt}{10pt}\raggedright}X@{\ }
>{\hsize=1.9cm\fontsize{8pt}{10pt}\centering}X@{\ }
>{\hsize=0.9cm\fontsize{8pt}{10pt}\centering}X@{\ }
>{\hsize=0.5cm\fontsize{8pt}{10pt}\centering}X@{\ }
>{\hsize=1.6cm\fontsize{8pt}{10pt}\raggedleft}X@{\ }
>{\hsize=2.2cm\fontsize{8pt}{10pt}\raggedleft}X@{\ }
}
& \textbf{Sz..m} & \centering\textbf{Megnevez..s} &
\textbf{SZJ/VTSZ} & \textbf{Menny.} & \textbf{egys.} &
\textbf{Nett.. ..r} & \textbf{Nett.. ..sszeg}
\cr
<%foreach number%>
<%runningnumber%>
& <%number[number]%> & <%description%> &
<%bin%> & <%qty%> & <%unit%> &
<%netprice_hu%> & <%nettotal_hu%>
\cr
<%if serialnumber%>
& Gy..ri sz..mok: & <%serialnumber%> \cr
<%end if serialnumber%>



<%end foreach number%>
\end{tabularx}
}

 

Attachment: Kijelölés_129.png
Description: PNG image