Monday, April 3, 2017

LaTeX Challenges

If you familiar with sql-ledger, everybody knows that after you installed it, got the accounting scheme in place, made you opening balance etc, etc, you want to make your first invoice or packaging slip.
Yep, then you are stuck with a language called Latex.

I needed a lot of information on the invoice, this because in retailing world they want to see everything. Apart from the usual stuff like name, adres, etc I needed:

-EAN code
-Date delivered
-Shelf life cookie 
-How many pallets
-Type of package
-Price and discount
-Total weight in kg of the order

I have shared the invoice layout here. If you are stuck with a variable, hopefully you find it in the code.

In the Netherlands they use a standard cargo slip, which is pre-printed, the trick is to get the layout right that it fits in all the blocks.

In Latex you can use text block to handle this.
First declare where it origin is:
\textblockorigin{10mm}{10mm} % start everything near the top-left corner

Then enter a block with exact coordinates.

\begin{textblock}{2}(0.5,1.8)
<%name%> \\
<%address1%> \\
<%zipcode%>
<%city%>
\end{textblock}

Above example is 2 modules wide and is placed (0.5,1.8) from the origin.

See this link for more information.





No comments:

Post a Comment