-
Notifications
You must be signed in to change notification settings - Fork 1
/
pseudocode.js
75 lines (65 loc) · 1.7 KB
/
pseudocode.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* In Pseudocode
*
function getData()
create fundata object
date
greg: from system
hijri: from system
currency
local from Currency input
signloc: call getCurrSign() of input
savings: from Currency input
signsav: call getCurrSign() of input
rate
usd: from Rates input
gold: from Rates input
silver: from Rates input
quorum
gold
qcrloc: (gold * 85) in local currency
qcrsav: calculate gold quorum in other currency
silver
qcrloc: (silver * 600) in local currency
qcrsav: calculate silver quorum in other currency
},
end function
onclick currencey submit button
call submitforms()
onclick savings submit button
call submitforms()
function zakalc()
if formValidator() with currency form is true
call getDates(): injects date into inputs
call defineCurrencyData(): injects currency into inputs
show msgSuccess()
show msgError(): next form
if formValidator() with rates form is true
show msgSuccess()
show msgError(): next form
if formValidator() with savings form is true
if savings form has no inputs[required]
show msgError()
return false
else
hide all msgSuccess()'s
hide all msgError()'s
call printRatesNQuorum()
call printSavings()
call printZakat( totalSavings() >= getData.gold_quorum )
return true
end if
else
show msgError()
return false
end if
else
show msgError()
return false
end if
else
show msgError()
return false
end if
end function
*/