Hi there,

I want to make an SQL-Ledger variable field display in my invoice  
only if the value is greater than one. Is there any way to achieve  
this? I'm guessing not, but throw it out for discussion just in case;  
I don't want to modify SL itself to do this - it's not important  
enough for me to maintain a patchset, but it'd be kinda cute for me  
if it were possible.

What I want to do is make the quantity & price fields display only if  
the customer has bought more than one item:

Part no.        Description                             Price   Qty     Amount
FH001   French Hen                              £10             x 3     £30     
TD001   Turtle Dove                             £10             x 2     £20
PA001   Partridge in a Pear Tree                                        £10
TOTAL                                                                           
£60

I've laid out the above with tabs, so I hope it displays as well on  
other clients as it does on my Mac. Anyway, I suspect this is an  
unusual request & not possible, but I would prefer being able to use  
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- 
statement.

Stroller.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sql-ledger-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sql-ledger-users

Reply via email to