legalese / legalese.github.io

Static assets for legalese.com
https://legalese.com/
70 stars 27 forks source link

Round is undefined when calling inWords() with ordinary_share_subscription, series_aa_sg #237

Open jobchong opened 7 years ago

jobchong commented 7 years ago

Have not determined whether this is a template issue or whether the security type issued by both agreements are breaking something somewhere.

Logs stop here for both templates: [16-11-21 19:59:23:243 PST] templates fillTemplate: starting ordinary_share_subscription (01 - Ordinary Share Subscription Agreement for Mister Moneybags moneybags@example.com)

All associated document XML except for the investment agreement itself will generate in both instances.

mengwong commented 7 years ago

successfully reproduced! Running against a fresh copy of the Demo Master, using the Ordinary Shares Subscription Agreement template, under Tools / Script Editor, the Execution log shows:


<schedule_header xname="schedule_shareholding">Shareholding Structure</schedule_header>

<schedule_parts>Existing Shareholders</schedule_parts>
]) [0 seconds]
[16-11-25 08:09:14:227 PST] Execution failed: TypeError: Cannot call method "inWords" of undefined. (line 421, file "captable", project "legaleseMain") [14.571 seconds total runtime]
mengwong commented 7 years ago

ok, i have solved this for the ordinary_share_subscription template but i have not solved it for the other sg aa template – will need to look at that later.

i think we need to deprecate the data.parties.shareholder approach everywhere, and access via round.() instead. I have started to update the documentation in the google-apps readme as well.

jobchong commented 7 years ago

Should I assume that wherever data.parties.shareholder is called to list current members of the company, the members are equivalent to old investors? If so, I'll replace the rest of the occurrences with getOldInvestors()