-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCode.Tests.js
More file actions
43 lines (31 loc) · 2.88 KB
/
Code.Tests.js
File metadata and controls
43 lines (31 loc) · 2.88 KB
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
function testCustomer() {
var email = "brieuc@batch.com";
var customer = Common.Stripe_FindCustomer(email);
Common.consoleLog(customer);
}
function testInc() {
var count = Common.incUses();
Common.consoleLog(count);
}
function testLogics() {
const vars = {
"logics": [
"?{{Credit Election Method}(=)the Regular Credit Method::Pursuant to IRC Section 41(a), the Regular Credit method is determined as twenty percent (20%) of the Credit Year’s qualified research expenses that exceed the base amount or half of the qualified research expenses, whichever is higher. The base amount is calculated by multiplying the fixed base percentage by the average annual gross receipts of the prior four years.}",
"?{{Credit Election Method}(=)the Alternative Simplified Credit Method::Pursuant to IRC Section 41(c)(5), the Alternative Simplified Credit is determined as fourteen percent (14%) of the Credit Year’s qualified research expenses that exceed half the average of the qualified research expenses for the three tax years immediately preceding the Credit Year (collectively referred to as the ‘Base Years’ or ‘Base Period’), which were all 12-month taxable periods.}",
"?{{Credit Election Method}(=)both the Regular Credit Method (ENTER YEARS) and the Alternative Simplified Credit Method (ENTER YEARS)::Pursuant to IRC Section 41(a), the Regular Credit method is determined as twenty percent (20%) of the Credit Year’s qualified research expenses that exceed the base amount or half of the qualified research expenses, whichever is higher. The base amount is calculated by multiplying the fixed base percentage by the average annual gross receipts of the prior four years. Pursuant to IRC Section 41(c)(5), the Alternative Simplified Credit is determined as fourteen percent (14%) of the Credit Year’s qualified research expenses that exceed half the average of the qualified research expenses for the three tax years immediately preceding the Credit Year (collectively referred to as the ‘Base Years’ or ‘Base Period’), which were all 12-month taxable periods.}"
],
"vars": [
"${Credit Election Method::options::the Regular Credit Method,the Alternative Simplified Credit Method,both the Regular Credit Method (ENTER YEARS) and the Alternative Simplified Credit Method (ENTER YEARS)}"
],
"constants": [],
"functions": []
};
var output = Common.getLogicOutput(vars.logics, {'${*Credit Election Method::options::the Regular Credit Method,the Alternative Simplified Credit Method,both the Regular Credit Method (ENTER YEARS) and the Alternative Simplified Credit Method (ENTER YEARS)}': 'the Alternative Simplified Credit Method'});
Common.consoleLog(output);
}
function testStatus() {
var email = "jesse@docvars.com";
var status = Common.getStatus(email);
var substatus = Common.getSubscriptionStatus(email);
Common.consoleLog(substatus);
}