Jump to content

Module:GS pay

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Bulhis899 (talk | contribs) at 17:57, 12 February 2020 (Created page with '-- -- This module implements {{GS pay}} -- There are 150 cells in the GS Pay table. This LUA reduces the amount of -- manual input needed to 46 -- local p = {...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

--
-- This module implements {{GS pay}}
-- There are 150 cells in the GS Pay table. This LUA reduces the amount of
--   manual input needed to 46
--

local p = {}
local stepOnePay = {}
local GSOnePay = {}
local GSTwoPay = {}
local WIGIncrease = {}

-- UPDATE THESE. Last Update: 2020
	--For GS [Grade] Step 1 pay
	stepOnePay[3] = 23976
	stepOnePay[4] = 26915
	stepOnePay[5] = 30113
	stepOnePay[6] = 33567
	stepOnePay[7] = 37301
	stepOnePay[8] = 41310
	stepOnePay[9] = 45627
	stepOnePay[10] = 50246
	stepOnePay[11] = 55204
	stepOnePay[12] = 66167
	stepOnePay[13] = 78681
	stepOnePay[14] = 92977
	stepOnePay[15] = 109366
	-- Within Grade increase for GS [Grade]
	WIGIncrease[3] = 799
	WIGIncrease[4] = 897
	WIGIncrease[5] = 1004
	WIGIncrease[6] = 1119
	WIGIncrease[7] = 1243
	WIGIncrease[8] = 1377
	WIGIncrease[9] = 1521
	WIGIncrease[10] = 1675
	WIGIncrease[11] = 1840
	WIGIncrease[12] = 2206
	WIGIncrease[13] = 2623
	WIGIncrease[14] = 3099
	WIGIncrease[15] = 3646
	-- GS1 Pay Table (because it has inconsistent WIG)
	GSOnePay[1] = 19543
	-- GS2 Pay Table (because it has inconsistent WIG}
	GSTwoPay[1] = 21974

function p.basePay(grade, step)
	if step == nil then
		if grade > 2 then
			return stepOnePay[grade]
		elseif grade == 1 then
			return GSOnePay[1]
		else
			return GSTwoPay[2]
		end
	else
		return stepOnePay[grade] + (WIGIncrease[grade] * step)
	end
end
	
function p.get(frame)
	return p.basePay( frame.args[1], frame.args[2] )
end
	
return p