ഈ ഘടകത്തിന്റെ വിവരണം ഘടകം:Test002/വിവരണം എന്ന താളിൽ നിർമ്മിക്കാവുന്നതാണ്

-- Test 002 : This is a module used as Sandbox by Viswam (User:Viswaprabha) for testing purposes.
--Please leave me alone. Thanks!

--=========================================================
--A set of routines to create an event expense form easily.
--A set of tables are created, each one a section of the event/program, with its own header, item rows and footer.
--However, the final calculations have to be done manually as of now. 2013/10/21
--=========================================================
local p = {}
--------------------------------

function p.getAllArgs( frame ) -- This will be used for validation of input values 
    buf = {}
    for name, value in frame:argumentPairs() do
        if #buf ~= 0 then
            table.insert( buf, ', ' )
        end
        table.insert( buf, name .. '=' .. value )
    end
    return table.concat( buf )
end
---------------------------------------------------------------------
function p.ExpenseSummaryHeader(frame) -- Adds a section Header with Section Number, SectionName (Malayalam), SectionName(English)
local sectionname  = frame.args[1]
local s = ""
s = s .."{| class=\"wikitable\" style=\"border: 1px solid black\" cellpadding=\"5\"\n"
s = s .."|-\n"
s = s .."| style = \"height: 40px; background: #b6d7ff\" colspan = \"8\" align = \"center\" | \'\'\'<big>" .. sectionname.. "</big>\'\'\'\n"
s = s .."|-\n"
s = s .."!! width=\"50\" |Code"
s = s .."!! width=\"20\"|No."
s = s .."!! width= \"500\" |Item"
s = s .."!! width = \"80\" | "
s = s .."!! width = \"90\"|INR"
s = s .."!! width= \"70\" |US$"
s = s .."!! width = \"60\" |%age"
s = s .."!! width = \"400\" |Notes"
return s
end
---------------------------------------------------------------------
function p.ExpenseSummaryItem(frame) --Adds a n itemrow
local code, number, description, qty, amount,amountDollar,share,itemnote = frame.args[1], frame.args[2], frame.args[3],frame.args[4], frame.args[5], frame.args[6], frame.args[7], frame.args[8]
local s = "|-\n|"
	s = s .. "  align = \"center\" | " .. code
	s = s .. "|| align = \"right\" | " .. number
	s = s .. "|| align = \"left\"  | " .. description
	s = s .. "|| align = \"left\"  | " .. qty
	s = s .. "|| align = \"right\" | " .. amount
	s = s .. "|| align = \"right\" | " .. amountDollar
	s = s .. "|| align = \"right\" | " .. share
	s = s .. "|| align = \"left\"  | " .. itemnote 
return s
end
---------------------------------------------------------------------
function p.ExpenseSummaryFooter(frame) -- Adds a section Footer (Must enter total manually!)
local TotalINR, TotalDollar, TotalPercent, Notes  = frame.args[1], frame.args[2], frame.args[3], frame.args[4]
local s = "|- \n"
	s = s .. "|Colspan = \"4\"  style=\"background: black; color: yellow; \" align = \"center\"|\'\'\'Total\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\"|\'\'\'" .. TotalINR .. "\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\" |\'\'\'" .. TotalDollar .. "\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\" |\'\'\'" .. TotalPercent .. "\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"left\" | " .. Notes  
	s = s .. "\n|}\n"
return s
end
---------------------------------------------------------------------
--===================================================================
---------------------------------------------------------------------
function p.ExpenseDetailHeader(frame) -- Adds a section Header with Section Number, SectionName (Malayalam), SectionName(English)
local sectionname  = frame.args[1]
local s = ""
s = s .."{| class=\"wikitable\" style=\"border: 1px solid black\" cellpadding=\"5\"\n"
s = s .."|-\n"
s = s .."| style = \"height: 40px; background: #b6d7ff\" colspan = \"8\" align = \"center\" | \'\'\'<big>" .. sectionname.. "</big>\'\'\'\n"
s = s .."|-\n"
s = s .."!! width=\"50\" |Code"
s = s .."!! width=\"20\"|No."
s = s .."!! width= \"500\" |Item"
s = s .."!! width = \"80\" |Quantity "
s = s .."!! width = \"90\"|INR"
s = s .."!! width= \"70\" |US$"
s = s .."!! width = \"60\" |Rate"
s = s .."!! width = \"400\" |Notes"
return s
end
---------------------------------------------------------------------
function p.ExpenseDetailItem(frame) --Adds a n itemrow
local code, number, description, quantity, amount,rate,share,itemnote = frame.args[1], frame.args[2], frame.args[3],frame.args[4], frame.args[5], frame.args[6], frame.args[7], frame.args[8]
local s = "|-\n|"
	s = s .. "  align = \"center\" | " .. code
	s = s .. "|| align = \"right\" | " .. number
	s = s .. "|| align = \"left\"  | " .. description
	s = s .. "|| align = \"left\"  | " .. qty
	s = s .. "|| align = \"right\" | " .. amount
	s = s .. "|| align = \"right\" | " .. amountDollar
	s = s .. "|| align = \"right\" | " .. share
	s = s .. "|| align = \"left\"  | " .. itemnote 
return s
end
---------------------------------------------------------------------
function p.ExpenseDetailFooter(frame) -- Adds a section Footer (Must enter total manually!)
local TotalINR, TotalDollar,  Notes  = frame.args[1], frame.args[2], frame.args[3]
local s = "|- \n"
	s = s .. "|Colspan = \"4\"  style=\"background: black; color: yellow; \" align = \"center\"|\'\'\'Total\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\"|\'\'\'" .. TotalINR .. "\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\" |\'\'\'" .. TotalDollar .. "\'\'\'"
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"right\" | "
	s = s .. "|| style=\"background: black; color: yellow; \" align = \"left\" | " .. Notes  
	s = s .. "\n|}\n"
return s
end

---------------------------------------------------------------------
return p
--=========================================================
"https://ml.wikipedia.org/w/index.php?title=ഘടകം:Test002&oldid=1855207" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്