Can I use CALL:X to get the result of an SQL query?
I have tried using {CALL:@@CostPrice }
I also tried creating a function to handle this for me
Handler: PriceList
function costprice() { var costprice = sql.Query(@@CostPrice).First; return costprice }
and calling the result using {CALL:PriceList.costprice}
@@CostPrice returns the correct result
Jesse
February 25, 2016, 10:34pm
2
You can put the SQL into the script and call the script. Or you can use REPORT SQL DETAILS tag.
Hello all back form Melbourne after spending some time with my team training in what I know in SambaPOS so far. Of course during training I get “How do I print a product price list?”
So funny thing, there is not a lot on this topic so I used it as a training exercise using the concepts in the link below. To conclude this I have some questions at the end to wrap up.
From the discussion from How do I print a product list? :
#{REPORT SQL DETAILS} report tag
So we decided to use the {REPORT S…
{REPORT SQL DETAILS} report tag
This tag is useful to execute an SQL and use custom report features inside printer templates or other places that does not have custom report tag support. For Example…
{REPORT SQL DETAILS:Select TicketId,Date from Tickets:F.TicketId,F.Date}
tag will list all ticket’s ids and dates. Syntax for that tag is…
{REPORT SQL DETAILS:<sql or handler>:<fields>:<expression>:<line format>}
i was missing the fields & line format {REPORT SQL DETAILS:@@CostPrice :F.Price::{0}}
Thanks