Changes

Jump to navigation Jump to search
m
no edit summary
I tried to use [http[modules://modules.contextgarden.net/letter |Wolfgang’s letter module]] for my invoices and came up with this Lua code:
<texcode>
function userdata.InvoiceSumLine(text, printperhour)
-- print invoice cum sum line
context.HL()
context.NC("\\bf " .. text)
if userdata.invoice.hours > 0 then context.NC(userdata.numberformat(userdata.invoice.hours) .. "\\,h") else context.NC() end
if printperhour then
context.NC("à " .. userdata.numberformat(userdata.invoice.perhour) .. "\\,€/h")
The whole thing becomes obsolete with the [http://archive.contextgarden.net/message/20110220.232845.71ebb6a0.en.html preliminary spreadsheet module] by Hans in 2011-02 (I guess it will end up in the distribution soon).
[[Category:Lua]][[Category:Programmingand Databases]]

Navigation menu