JMLABS INSTITUTE ONLINE

lecture 2C2C: part 1
Updating the master records.

Now look at four more transactions. 
1. purchase inventory
2. Sale of parts
3. Cost of labor
4. Service & sale on Credit

Before computers this was all done by hand; entering business into the transaction journal and at the end of a cycle updating the books and balancing the books.  Now with PCs "everywhere" all we have to do is run the update program.  The input to the program is a transaction file and the master ledger files ("books").  The output is an updated master and a trial balance sheet.

Now the transaction records must be applied to the ledger.  Each transaction 
involves taking credit from one account and debiting it to another, so each 
transaction record has the following fields.

tran no.	description	acct_to_credit 	    	acct_to_debit     	$amount
00		owner		220				100				$50,000
01		owner		220				100				$  1,000
02		loan startup	130				100				$22,000
03		cred purch	130				120				$  1,000
04		cred purch	130				120				$  8,000
05		truck sale #1	120				100				$12,000
06		parts sale #5	170				100				$       40
07		labor#1empl	260				100				$     100
06		parts sale #1	170				100				$     100
07		parts sale #2	170				100				$       40
05		labor#3empl	260				100				$     100

TRIAL BALANCE:  Ex#1

acct no.		acct. name			debits		credits
100			CASH				$22,000															$50,000			$0
							  $1,000
							$12,000
110			ACCT.REC.				$0			$0
120			VEHICLES						$12,000
							  $8,000
130			ACCT. PAY.			    	$0		  $8,000
										  $1,000
										   $2200
140			EQUIPMENT			 $1,000 
160			INVENTORY				$0			$0
220			OWNER'S EQUITY		       	$0		$50,000
										  $1,000	
260			LABOR			    	$0		 	$0
270			PARTS			       	$0		 	$0

lecture 2C2C: part 2
Balancing the books.
In our balance sheet routine we wll put all of our master records into a loop 
and combine our debits and credits.
for x = 1 to na
.
.
.
next

To balance the books we need to combine debits with credits for each account.  

For assets accounts we will subtract credits from debits.  
For liabilty accounts we will subtract debits from credits

10  For r= 1 to na
15  if mr(r,1)>199 then 45
25  mr(r,2)=mr(r,2)-mr(r,3)
35  mr(r,3)=0
40  goto 65
45  mr(r,3)=mr(r,3)-mr(r,2)
55  mr(r,2)=0
65  next r

TRIAL BALANCE:  Ex#2

010	CASH			5000			
020	ACCT.REC		2000		
030	INVENTORY		6000		
040	SUPPLIES		 300		
050	PREPD.INS	 	 200		
210	OWN.DRAW		1000
220	OWN CAPTL				5455			
230	ACCT.PAYAB				9000
240	INCOMESUM
250	SALES					3400
255	PURCHASES		3300
260	DELIV.EXP        55
270	INSUR.EXP 		
280	SALARY.EXP
285	RENT.EXP
290	SUPPLY.EXP
________________________________
					17855	17855

OPTION: The BASIC update program will look like this:

100   REM each master record has a debit and a credit field.
110   for r = 1 to 30
120 		mc(r) = mast(r,2):rem  the debit field of the record
122 		md(r) = mast(r,3):rem  the credit field of the record
125   next r
128   REM each transaction record has a debit and a credit field
130   for t = 1 to 100
133 		cr(t) = tran(t,2):rem  rec no. to be credited 
135 		db(t) = tran(t,3):rem  rec no. to be debited
140   next t
200   REM  this is the actual update routine !!! 100 transactions
203	 for t = 1 to 100
205   	r = cr(t)
220		mc(r) = mc(r)+s(t):rem  the amount s() is added to debit field
240		r = db(t)
260		md(r) = md(r)+s(t):rem  the amout s() is added to credit field
270   next t