From: Stroller <lin...@my...> - 2006-11-03 11:42:12
|
Hi there, I want to make an SQL-Ledger variable field display in my invoice =20 only if the value is greater than one. Is there any way to achieve =20 this? I'm guessing not, but throw it out for discussion just in case; =20= I don't want to modify SL itself to do this - it's not important =20 enough for me to maintain a patchset, but it'd be kinda cute for me =20 if it were possible. What I want to do is make the quantity & price fields display only if =20= the customer has bought more than one item: Part no. Description Price Qty = Amount FH001 French Hen =A310 x 3 = =A330=09 TD001 Turtle Dove =A310 x 2 = =A320 PA001 Partridge in a Pear Tree = =A310 TOTAL = =A360 I've laid out the above with tabs, so I hope it displays as well on =20 other clients as it does on my Mac. Anyway, I suspect this is an =20 unusual request & not possible, but I would prefer being able to use =20 such a simplified & "user friendly" format in my invoices. I have tried: \begin{tabularx}{\textwidth}{lXrlr} Part & Description & Price & & Amount \\ <%foreach number%> <%number%> & <%description%> & \pounds <%sellprice%> & <%if qty%> x <%qty%> <%end qty%> & \pounds <%linetotal%> \\ % end of table row <%end number%> \end{tabularx} But of course the minimum quantity of 1 always triggers the if-=20 statement. Stroller.= |