4 create ( <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="expense" name="modified expeses" counterWeight="debit" /> );
5 create ( <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="expense@tim.com" name="modified expeses" counterWeight="debit" /> );
6 create ( <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="create" name="modified expeses" counterWeight="debit" /> );
7 create ( <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="create:id" name="modified expeses" counterWeight="debit" /> );
9 var abc = create ( <debit xmlns='com/interrupt/bookkeeping/account' id='abc' amount='10.00' entryid='e1' accountid='1' currency='CDN' /> );
10 update ( (@abc) <debit xmlns='com/interrupt/bookkeeping/account' id='def' amount='10.00' entryid='e1' accountid='1' currency='CDN' /> );
14 <entries id='' xmlns='com/interrupt/bookkeeping/journal'
15 xmlns:account='com/interrupt/bookkeeping/account'
16 xmlns:journal='com/interrupt/bookkeeping/journal' >
18 <journal:entry id='e1' entrynum='' state='' journalid='' date='' currency='CDN' >
19 <account:debit id='abc' amount='10.00' entryid='e1' accountid='1' currency='CDN' />
20 <account:debit id='def' amount='1.50' entryid='e1' accountid='2' currency='CDN' />
21 <account:credit id='ghi' amount='11.50' entryid='e1' accountid='3' currency='CDN' />
27 login ( user -username root -password password );
28 find ( ( load ( user -id twashing ) ) profileDetails -id user.details );
33 list ( ( load ( bookkeeping -id main.bookkeeping ) ) accounts -id main.accounts );
39 login ( user -username root -password password );
44 #var aauthUsers = add ( (load ( users -id aauth.users ))
45 var aauthUsers = add ( (load ( `/system[ @id='main.system' ]/aauthentication[ @id='main.authentication' ]/users[ @id='aauth.users' ]` ))
46 <user xmlns='com/interrupt/bookkeeping/users' id='twashing' username='twashing' password='password' >
47 <profileDetails xmlns='com/interrupt/bookkeeping/users' id='user.details' >
48 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='first.name' value='Timothy' />
49 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='last.name' value='Washington' />
50 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='email' value='twashing-gmail.com' />
51 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='country' value='U.S.A' />
56 commit ( ( `/system[ @id='main.system' ]/aauthentication[ @id='main.authentication' ]/users[ @id='aauth.users' ]` ) @aauthUsers );
59 var mainSystem = add ( (load ( system -id main.system ) )
60 <user xmlns='com/interrupt/bookkeeping/users' id='twashing' username='twashing' password='password' >
61 <profileDetails xmlns='com/interrupt/bookkeeping/users' id='user.details' >
62 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='first.name' value='Timothy' />
63 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='last.name' value='Washington' />
64 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='email' value='twashing-gmail.com' />
65 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='country' value='U.S.A' />
70 ...TODO: var aauthUsers = add ( (load ( users -id aauth.users ))
71 <user xmlns='com/interrupt/bookkeeping/users' id='twashing' username='twashing' password='password' >
72 <profileDetails xmlns='com/interrupt/bookkeeping/users' id='user.details' >
73 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='first.name' value='Timothy' />
74 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='last.name' value='Washington' />
75 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='email' value='twashing-gmail.com' />
76 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='country' value='U.S.A' />
78 <profileDetails xmlns='com/interrupt/bookkeeping/users' id='group.details' >
79 <profileDetail xmlns='com/interrupt/bookkeeping/users' name='defaultCurrency' value='USD' />
91 # expr to list account details
92 var timUserDetails = find ( ( find ((@aauthUsers) user -username twashing) ) profileDetails -id user.details );
93 var timGroupDetails = find ( ( find ((@aauthUsers) group -username twashing) ) profileDetails -id user.details );
98 # exprs to update account details
99 update ( ( @timUserDetails )
100 <profileDetails xmlns='com/interrupt/bookkeeping/users' id='user.details' >
101 <profileDetail name='first.name' value='Timothy' />
102 <profileDetail name='last.name' value='Washington' />
103 <profileDetail name='email' value='timothyjwashington-yahoo.ca' />
104 <profileDetail name='country' value='Canada' />
108 update ( ( load ( group -id group.twashing ) )
109 <profileDetails id='group.details' >
110 <profileDetail name='defaultCurrency' value='CDN' />
117 # expressions to list account(s) / find / update / create / remove
118 var mainAccounts = load ( accounts -id main.accounts );
119 add ( ( @mainAccounts )
120 <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="expense" name="regular expeses" counterWeight="debit" /> );
121 var expenseAccount = find ( (@mainAccounts) account -id expense );
122 update ( (@expenseAccount)
123 <account xmlns='com/interrupt/bookkeeping/account' type="asset" id="expense" name="modified expeses" counterWeight="debit" /> );
124 remove ( (load ( accounts -id main.accounts )) account -id expense );
127 # expressions to list journal(s) / find / update / create / remove
128 var mainJournals = load ( journals -id main.journals );
129 add ( (@mainJournals)
130 <journal xmlns='com/interrupt/bookkeeping/journal' id='specialledger' name='specialledger' type='' balance='' /> );
131 var specialLedger = find ( (@mainJournals) journal -id specialledger );
132 update ( (@specialLedger)
133 <journal xmlns='com/interrupt/bookkeeping/journal' id='specialledger' name='modified ledger' type='' balance='' /> );
134 remove ( (load ( journals -id main.journals )) journal -id specialledger );
137 login ( user -username root -password password );
140 # expressions to list entry(s) / find / update / create / remove
141 var mainEntries = find ( ( load ( journals -id main.journals ) ) entries -id main.entries );
142 add ( ( @mainEntries )
143 <entry xmlns='com/interrupt/bookkeeping/journal' id='' entrynum='' state='' journalid='' date='2/1/2006' currency='CDN' >
144 <debit xmlns='com/interrupt/bookkeeping/account' id='' amount='10.00' entryid='' accountid='1' account='office equipment' currency='CDN' />
145 <debit xmlns='com/interrupt/bookkeeping/account' id='' amount='1.50' entryid='' accountid='2' account='tax' currency='CDN' />
146 <credit xmlns='com/interrupt/bookkeeping/account' id='' amount='11.50' entryid='' accountid='3' account='bank' currency='CDN' />
150 find ( ( load ( ( load ( journals -id main.journals ) ) entries -id main.entries ) ) )
152 update ( ( load ( ( load ( journals -id main.journals ) ) entry -id ... ) ) )
153 <entry xmlns='com/interrupt/bookkeeping/journal' id='' entrynum='' state='' journalid='' date='2/11/2006' >
154 <debit xmlns='com/interrupt/bookkeeping/account' id='' amount='10.00' entryid='' accountid='1' account="office equipment" />
155 <debit xmlns='com/interrupt/bookkeeping/account' id='' amount='2.50' entryid='' accountid='2' account="tax" />
156 <credit xmlns='com/interrupt/bookkeeping/account' id='' amount='12.50' entryid='' accountid='3' account="bank" />
159 remove ( ( load ( ( load ( journals -id main.journals ) ) entries -id main.entries ) ) )