[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2655] trunk/sql/coa



Revision: 2655
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2655&view=rev
Author:   einhverfr
Date:     2009-06-12 03:13:20 +0000 (Fri, 12 Jun 2009)

Log Message:
-----------
More chart conversions

Modified Paths:
--------------
    trunk/sql/coa/tw/chart/General.sql
    trunk/sql/coa/uk/chart/General.sql
    trunk/sql/coa/us/chart/General.sql
    trunk/sql/coa/us/chart/Manufacturing.sql
    trunk/sql/coa/us/chart/Service.sql
    trunk/sql/coa/us/chart/UCOA-Form990.sql
    trunk/sql/coa/us/chart/UCOA-Form990EZ.sql
    trunk/sql/coa/ve/chart/General.sql

Modified: trunk/sql/coa/tw/chart/General.sql
===================================================================
--- trunk/sql/coa/tw/chart/General.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/tw/chart/General.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -1,76 +1,76 @@
 begin;
 -- Default chart of accounts -- sample only
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2190','æäæåç','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','éæèå','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','èäèæ','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','äççé','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','éåçé','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4300','èèçé','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4400','ååçé','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','èéææ','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5400','èèæå','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','æååççæå','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1205','åååæ','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1000','æåèç','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','èæèç','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1825','çèåæäæ - èçåèå.','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1845','çèåæäæ - éèåå','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','æåèå','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','éèåæ','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3600','æåçé','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2160','æäååç','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3590','äççé - ååå','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3350','æéèä','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','åèèç','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5615','ååèé','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5790','åå','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5700','èåçå','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5800','æåé','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','æèæå','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5685','äé','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5660','åææå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5620','åå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5680','æåç','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5690','åæåéèæçè','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5410','èè','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5420','äéæå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5430','éäéæå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5440','èåéæå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5470','ååçå','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4030','éå / èé','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4440','åæ','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5100','éè','A','','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5760','çé','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1530','åå / èé','A','','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1540','åå / äçååéä','A','','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4040','éå / äçååéä','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5030','èéææ / èé','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5010','æè','A','','E','AP_amount:IC_cogs:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5040','èéææ / äçååéä','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1065','éçé','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1820','èååèçåèå','A','','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5785','æèååæ','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2680','èæèæ','A','','L','AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5795','èåè','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5780','éäè','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5781','çèéçè','A','','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5765','çäççè','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2311','åæç','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4430','ééè','A','','I','IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1520','åå / çé','A','','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5020','èéææ / çé','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2100','æäåæ','A','','L','AP');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1840','éèåå','A','','A','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4330','çåèè','A','','I','AR_amount:IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4020','éå / çé','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4320','èè','A','','I','AR_amount:IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','ææåæ','A','','A','AR');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1061','æçæé','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2310','ååæåç','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
+SELECT account_heading_save(NULL,'2600','éæèå', NULL));
+SELECT account_heading_save(NULL,'3300','èäèæ', NULL));
+SELECT account_heading_save(NULL,'3500','äççé', NULL));
+SELECT account_heading_save(NULL,'4000','éåçé', NULL));
+SELECT account_heading_save(NULL,'4300','èèçé', NULL));
+SELECT account_heading_save(NULL,'4400','ååçé', NULL));
+SELECT account_heading_save(NULL,'5000','èéææ', NULL));
+SELECT account_heading_save(NULL,'5400','èèæå', NULL));
+SELECT account_heading_save(NULL,'5600','æååççæå', NULL));
+SELECT account_save(NULL,'1205','åååæ','A','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'1000','æåèç', NULL));
+SELECT account_heading_save(NULL,'1800','èæèç', NULL));
+SELECT account_save(NULL,'1825','çèåæäæ - èçåèå.','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'1845','çèåæäæ - éèåå','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_heading_save(NULL,'2000','æåèå', NULL));
+SELECT account_save(NULL,'2190','æäæåç','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2620','éèåæ','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3600','æåçé','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2160','æäååç','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3590','äççé - ååå','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3350','æéèä','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'1500','åèèç', NULL));
+SELECT account_save(NULL,'5615','ååèé','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5790','åå','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5700','èåçå','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5800','æåé','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5610','æèæå','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5685','äé','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5660','åææå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5620','åå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5680','æåç','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5690','åæåéèæçè','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5410','èè','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5420','äéæå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5430','éäéæå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5440','èåéæå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5470','ååçå','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4030','éå / èé','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_save(NULL,'4440','åæ','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5100','éè','E','', NULL, false,string_to_array('AP_amount:IC_expense', ':'));
+SELECT account_save(NULL,'5760','çé','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'1530','åå / èé','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1540','åå / äçååéä','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'4040','éå / äçååéä','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_save(NULL,'5030','èéææ / èé','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'5010','æè','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
+SELECT account_save(NULL,'5040','èéææ / äçååéä','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'1065','éçé','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1820','èååèçåèå','A','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5785','æèååæ','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2680','èæèæ','L','', NULL, false,string_to_array('AP_paid', ':'));
+SELECT account_save(NULL,'5795','èåè','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5780','éäè','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5781','çèéçè','E','', NULL, false,string_to_array('AP_amount:IC_expense', ':'));
+SELECT account_save(NULL,'5765','çäççè','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'2311','åæç','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'4430','ééè','I','', NULL, false,string_to_array('IC_income', ':'));
+SELECT account_save(NULL,'1520','åå / çé','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'5020','èéææ / çé','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'2100','æäåæ','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_save(NULL,'1840','éèåå','A','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'4330','çåèè','I','', NULL, false,string_to_array('AR_amount:IC_income', ':'));
+SELECT account_save(NULL,'4020','éå / çé','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_save(NULL,'4320','èè','I','', NULL, false,string_to_array('AR_amount:IC_income', ':'));
+SELECT account_save(NULL,'1200','ææåæ','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1061','æçæé','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'2310','ååæåç','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
 --
 -- exchange rate
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4450','Foreign Exchange Gain','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5810','Foreign Exchange Loss','A','','E','');
+SELECT account_save(NULL,'4450','Foreign Exchange Gain','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5810','Foreign Exchange Loss','E','', NULL, false,string_to_array('', ':'));
 --
 insert into tax (chart_id,rate) values ((select id from chart where accno = '2310'),0.07);
 insert into tax (chart_id,rate) values ((select id from chart where accno = '2311'),0.08);

Modified: trunk/sql/coa/uk/chart/General.sql
===================================================================
--- trunk/sql/coa/uk/chart/General.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/uk/chart/General.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -1,107 +1,108 @@
 begin;
 -- sample COA for UK
 --
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0010','Freehold Property','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0011','Goodwill','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0012','Goodwill Amortisation','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0020','Plant and Machinery','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link,contra) VALUES ('0021','Plant/Machinery Depreciation','A','','A','','1');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0030','Office Equipment','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link,contra) VALUES ('0031','Office Equipment Depreciation','A','','A','','1');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0040','Furniture and Fixtures','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link,contra) VALUES ('0041','Furniture/Fixture Depreciation','A','','A','','1');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('0050','Motor Vehicles','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link,contra) VALUES ('0051','Motor Vehicles Depreciation','A','','A','','1');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1001','Stock','A','','A','IC');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1002','Work in Progress','A','','A','IC');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1100','Debtors Control Account','A','','A','AR');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1102','Other Debtors','A','','A','AR');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1103','Prepayments','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1200','Bank Current Account','A','','A','AR_paid:AP_paid');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1210','Bank Deposit Account','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1220','Building Society Account','A','','A','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1230','Petty Cash','A','','A','AR_paid:AP_paid');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('1240','Company Credit Card','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2100','Creditors Control Account','A','','L','AP');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2102','Other Creditors','A','','L','AP');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2109','Accruals','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2200','VAT (17.5%)','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2205','VAT (5%)','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2210','P.A.Y.E. & National Insurance','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2220','Net Wages','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2250','Corporation Tax','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2300','Bank Loan','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2305','Directors loan account','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2310','Hire Purchase','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('2330','Mortgages','A','','L','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('3000','Ordinary Shares','A','','Q','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('3010','Preference Shares','A','','Q','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('3100','Share Premium Account','A','','Q','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('3200','Profit and Loss Account','A','','Q','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4000','Sales','A','','I','AR_amount:IC_sale:IC_income');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4010','Export Sales','A','','I','AR_amount:IC_sale:IC_income');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4009','Discounts Allowed','A','','I','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4900','Miscellaneous Income','A','','I','AR_amount:IC_sale:IC_income');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4904','Rent Income','A','','I','AR_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4906','Interest received','A','','I','AR_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('4920','Foreign Exchange Gain','A','','I','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5000','Materials Purchased','A','','E','AP_amount:IC_cogs:IC_expense');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5001','Materials Imported','A','','E','AP_amount:IC_cogs:IC_expense');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5002','Opening Stock','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5003','Closing Stock','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5200','Packaging','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5201','Discounts Taken','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5202','Carriage','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5203','Import Duty','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5204','Transport Insurance','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5205','Equipment Hire','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('5220','Foreign Exchange Loss','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('6000','Productive Labour','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('6001','Cost of Sales Labour','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('6002','Sub-Contractors','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7000','Staff wages & salaries','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7002','Directors Remuneration','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7006','Employers N.I.','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7007','Employers Pensions','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7008','Recruitment Expenses','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7100','Rent','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7102','Water Rates','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7103','General Rates','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7104','Premises Insurance','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7200','Light & heat','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7300','Motor expenses','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7350','Travelling','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7400','Advertising','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7402','P.R. (Literature & Brochures)','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7403','U.K. Entertainment','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7404','Overseas Entertainment','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7500','Postage and Carriage','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7501','Office Stationery','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7502','Telephone','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7506','Web Site costs','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7600','Legal Fees','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7601','Audit and Accountancy Fees','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7603','Professional Fees','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7701','Office Machine Maintenance','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7710','Computer expenses','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7800','Repairs and Renewals','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7801','Cleaning','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7802','Laundry','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7900','Bank Interest Paid','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7901','Bank Charges','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7903','Loan Interest Paid','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('7904','H.P. Interest','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8000','Depreciation','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8005','Goodwill Amortisation','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8100','Bad Debt Write Off','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8201','Subscriptions','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8202','Clothing Costs','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8203','Training Costs','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8204','Insurance','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8205','Refreshments','A','','E','AP_amount');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8500','Dividends','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('8600','Corporation Tax','A','','E','');
-INSERT INTO chart (accno,description,charttype,gifi_accno,category,link) VALUES ('9999','Suspense Account','A','','E','');
+SELECT account_heading_save(NULL, '0000', 'Minimal heading', NULL);
+SELECT account_save(NULL,'0010','Freehold Property','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0011','Goodwill','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0012','Goodwill Amortisation','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0020','Plant and Machinery','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0021','Plant/Machinery Depreciation','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'0030','Office Equipment','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0031','Office Equipment Depreciation','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'0040','Furniture and Fixtures','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0041','Furniture/Fixture Depreciation','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'0050','Motor Vehicles','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'0051','Motor Vehicles Depreciation','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'1001','Stock','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1002','Work in Progress','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1100','Debtors Control Account','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1102','Other Debtors','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1103','Prepayments','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1200','Bank Current Account','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1210','Bank Deposit Account','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1220','Building Society Account','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1230','Petty Cash','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1240','Company Credit Card','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2100','Creditors Control Account','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_save(NULL,'2102','Other Creditors','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_save(NULL,'2109','Accruals','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2200','VAT (17.5%)','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'2205','VAT (5%)','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'2210','P.A.Y.E. & National Insurance','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2220','Net Wages','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2250','Corporation Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2300','Bank Loan','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2305','Directors loan account','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2310','Hire Purchase','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2330','Mortgages','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3000','Ordinary Shares','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3010','Preference Shares','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3100','Share Premium Account','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'3200','Profit and Loss Account','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4000','Sales','I','', NULL, false,string_to_array('AR_amount:IC_sale:IC_income', ':'));
+SELECT account_save(NULL,'4010','Export Sales','I','', NULL, false,string_to_array('AR_amount:IC_sale:IC_income', ':'));
+SELECT account_save(NULL,'4009','Discounts Allowed','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4900','Miscellaneous Income','I','', NULL, false,string_to_array('AR_amount:IC_sale:IC_income', ':'));
+SELECT account_save(NULL,'4904','Rent Income','I','', NULL, false,string_to_array('AR_amount', ':'));
+SELECT account_save(NULL,'4906','Interest received','I','', NULL, false,string_to_array('AR_amount', ':'));
+SELECT account_save(NULL,'4920','Foreign Exchange Gain','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5000','Materials Purchased','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
+SELECT account_save(NULL,'5001','Materials Imported','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
+SELECT account_save(NULL,'5002','Opening Stock','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5003','Closing Stock','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5200','Packaging','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5201','Discounts Taken','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5202','Carriage','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5203','Import Duty','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5204','Transport Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5205','Equipment Hire','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5220','Foreign Exchange Loss','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'6000','Productive Labour','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'6001','Cost of Sales Labour','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'6002','Sub-Contractors','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7000','Staff wages & salaries','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7002','Directors Remuneration','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7006','Employers N.I.','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7007','Employers Pensions','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7008','Recruitment Expenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7100','Rent','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7102','Water Rates','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7103','General Rates','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7104','Premises Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7200','Light & heat','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7300','Motor expenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7350','Travelling','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7400','Advertising','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7402','P.R. (Literature & Brochures)','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7403','U.K. Entertainment','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7404','Overseas Entertainment','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7500','Postage and Carriage','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7501','Office Stationery','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7502','Telephone','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7506','Web Site costs','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7600','Legal Fees','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7601','Audit and Accountancy Fees','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7603','Professional Fees','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7701','Office Machine Maintenance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7710','Computer expenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7800','Repairs and Renewals','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7801','Cleaning','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7802','Laundry','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'7900','Bank Interest Paid','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'7901','Bank Charges','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'7903','Loan Interest Paid','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'7904','H.P. Interest','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'8000','Depreciation','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'8005','Goodwill Amortisation','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'8100','Bad Debt Write Off','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'8201','Subscriptions','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'8202','Clothing Costs','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'8203','Training Costs','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'8204','Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'8205','Refreshments','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'8500','Dividends','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'8600','Corporation Tax','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'9999','Suspense Account','E','', NULL, false,string_to_array('', ':'));
 --
 INSERT INTO tax (chart_id,rate) VALUES ((SELECT id FROM chart WHERE accno = '2200'),0.175);
 INSERT INTO tax (chart_id,rate) VALUES ((SELECT id FROM chart WHERE accno = '2205'),0.05);

Modified: trunk/sql/coa/us/chart/General.sql
===================================================================
--- trunk/sql/coa/us/chart/General.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/us/chart/General.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -2,88 +2,88 @@
 -- US_General COA
 -- modify as needed
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1000','CURRENT ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1060','Checking Account','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1065','Petty Cash','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','Accounts Receivables','A','','A','AR');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1205','Allowance for doubtful accounts','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','INVENTORY ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1510','Inventory','A','','A','IC');
+SELECT account_heading_save(NULL,'1000','CURRENT ASSETS', NULL));
+SELECT account_save(NULL,'1060','Checking Account','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1065','Petty Cash','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1200','Accounts Receivables','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1205','Allowance for doubtful accounts','A','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'1500','INVENTORY ASSETS', NULL));
+SELECT account_save(NULL,'1510','Inventory','A','', NULL, false,string_to_array('IC', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','CAPITAL ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1820','Office Furniture & Equipment','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1825','Accum. Amort. -Furn. & Equip.','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1840','Vehicle','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1845','Accum. Amort. -Vehicle','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','CURRENT LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2100','Accounts Payable','A','','L','AP');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','LONG TERM LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','Bank Loans','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2680','Loans from Shareholders','A','','L','AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','SHARE CAPITAL','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3350','Common Shares','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','RETAINED EARNINGS','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3590','Retained Earnings - prior years','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','SALES REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4010','Sales','A','','I','AR_amount:IC_sale');
+SELECT account_heading_save(NULL,'1800','CAPITAL ASSETS', NULL));
+SELECT account_save(NULL,'1820','Office Furniture & Equipment','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1825','Accum. Amort. -Furn. & Equip.','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'1840','Vehicle','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1845','Accum. Amort. -Vehicle','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_heading_save(NULL,'2000','CURRENT LIABILITIES', NULL));
+SELECT account_save(NULL,'2100','Accounts Payable','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_heading_save(NULL,'2600','LONG TERM LIABILITIES', NULL));
+SELECT account_save(NULL,'2620','Bank Loans','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2680','Loans from Shareholders','L','', NULL, false,string_to_array('AP_paid', ':'));
+SELECT account_heading_save(NULL,'3300','SHARE CAPITAL', NULL));
+SELECT account_save(NULL,'3350','Common Shares','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'3500','RETAINED EARNINGS', NULL));
+SELECT account_save(NULL,'3590','Retained Earnings - prior years','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'4000','SALES REVENUE', NULL));
+SELECT account_save(NULL,'4010','Sales','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4400','OTHER REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4430','Shipping & Handling','A','','I','IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4440','Interest','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4450','Foreign Exchange Gain','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','COST OF GOODS SOLD','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5010','Purchases','A','','E','AP_amount:IC_cogs:IC_expense');
+SELECT account_heading_save(NULL,'4400','OTHER REVENUE', NULL));
+SELECT account_save(NULL,'4430','Shipping & Handling','I','', NULL, false,string_to_array('IC_income', ':'));
+SELECT account_save(NULL,'4440','Interest','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4450','Foreign Exchange Gain','I','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5000','COST OF GOODS SOLD', NULL));
+SELECT account_save(NULL,'5010','Purchases','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5100','Freight','A','','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5400','PAYROLL EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5410','Wages & Salaries','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','GENERAL & ADMINISTRATIVE EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','Accounting & Legal','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5615','Advertising & Promotions','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5620','Bad Debts','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5660','Amortization Expense','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5685','Insurance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5690','Interest & Bank Charges','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5700','Office Supplies','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5760','Rent','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5765','Repair & Maintenance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5780','Telephone','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5785','Travel & Entertainment','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5790','Utilities','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5795','Registrations','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5800','Licenses','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5810','Foreign Exchange Loss','A','','E','');
+SELECT account_save(NULL,'5100','Freight','E','', NULL, false,string_to_array('AP_amount:IC_expense', ':'));
+SELECT account_heading_save(NULL,'5400','PAYROLL EXPENSES', NULL));
+SELECT account_save(NULL,'5410','Wages & Salaries','E','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5600','GENERAL & ADMINISTRATIVE EXPENSES', NULL));
+SELECT account_save(NULL,'5610','Accounting & Legal','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5615','Advertising & Promotions','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5620','Bad Debts','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5660','Amortization Expense','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5685','Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5690','Interest & Bank Charges','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5700','Office Supplies','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5760','Rent','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5765','Repair & Maintenance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5780','Telephone','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5785','Travel & Entertainment','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5790','Utilities','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5795','Registrations','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5800','Licenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5810','Foreign Exchange Loss','E','', NULL, false,string_to_array('', ':'));
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2110','Accrued Income Tax - Federal','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2120','Accrued Income Tax - State','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2130','Accrued Franchise Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2140','Accrued Real & Personal Prop Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2150','Sales Tax','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2160','Accrued Use Tax Payable','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2210','Accrued Wages','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2220','Accrued Comp Time','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2230','Accrued Holiday Pay','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2240','Accrued Vacation Pay','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2310','Accr. Benefits - 401K','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2320','Accr. Benefits - Stock Purchase','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2330','Accr. Benefits - Med, Den','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2340','Accr. Benefits - Payroll Taxes','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2350','Accr. Benefits - Credit Union','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2360','Accr. Benefits - Savings Bond','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2370','Accr. Benefits - Garnish','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2380','Accr. Benefits - Charity Cont.','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5420','Wages - Overtime','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5430','Benefits - Comp Time','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5440','Benefits - Payroll Taxes','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5450','Benefits - Workers Comp','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5460','Benefits - Pension','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5470','Benefits - General Benefits','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5510','Inc Tax Exp - Federal','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5520','Inc Tax Exp - State','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5530','Taxes - Real Estate','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5540','Taxes - Personal Property','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5550','Taxes - Franchise','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5560','Taxes - Foreign Withholding','A','','E','');
+SELECT account_save(NULL,'2110','Accrued Income Tax - Federal','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2120','Accrued Income Tax - State','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2130','Accrued Franchise Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2140','Accrued Real & Personal Prop Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2150','Sales Tax','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'2160','Accrued Use Tax Payable','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2210','Accrued Wages','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2220','Accrued Comp Time','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2230','Accrued Holiday Pay','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2240','Accrued Vacation Pay','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2310','Accr. Benefits - 401K','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2320','Accr. Benefits - Stock Purchase','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2330','Accr. Benefits - Med, Den','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2340','Accr. Benefits - Payroll Taxes','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2350','Accr. Benefits - Credit Union','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2360','Accr. Benefits - Savings Bond','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2370','Accr. Benefits - Garnish','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2380','Accr. Benefits - Charity Cont.','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5420','Wages - Overtime','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5430','Benefits - Comp Time','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5440','Benefits - Payroll Taxes','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5450','Benefits - Workers Comp','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5460','Benefits - Pension','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5470','Benefits - General Benefits','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5510','Inc Tax Exp - Federal','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5520','Inc Tax Exp - State','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5530','Taxes - Real Estate','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5540','Taxes - Personal Property','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5550','Taxes - Franchise','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5560','Taxes - Foreign Withholding','E','', NULL, false,string_to_array('', ':'));
 --
 insert into tax (chart_id,rate) values ((select id from chart where accno = '2150'),0.05);
 --

Modified: trunk/sql/coa/us/chart/Manufacturing.sql
===================================================================
--- trunk/sql/coa/us/chart/Manufacturing.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/us/chart/Manufacturing.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -2,80 +2,80 @@
 -- US_Manufacturing COA
 -- modify as needed
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1000','CURRENT ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1060','Checking Account','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1065','Petty Cash','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','Accounts Receivables','A','','A','AR');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1205','Allowance for doubtful accounts','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','INVENTORY ASSETS','H','','A','');
+SELECT account_heading_save(NULL,'1000','CURRENT ASSETS', NULL));
+SELECT account_save(NULL,'1060','Checking Account','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1065','Petty Cash','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1200','Accounts Receivables','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1205','Allowance for doubtful accounts','A','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'1500','INVENTORY ASSETS', NULL));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1520','Inventory / General','A','','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1530','Inventory / Raw Materials','A','1126','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1540','Inventory / Work in process','A','1125','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1550','Inventory / Finished Goods','A','1121','A','IC');
+SELECT account_save(NULL,'1520','Inventory / General','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1530','Inventory / Raw Materials','A','1126', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1540','Inventory / Work in process','A','1125', NULL, false,string_to_array('IC', ':'));
+SELECT account_save(NULL,'1550','Inventory / Finished Goods','A','1121', NULL, false,string_to_array('IC', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','CAPITAL ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1820','Office Furniture & Equipment','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1825','Accum. Amort. -Furn. & Equip.','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1840','Vehicle','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1845','Accum. Amort. -Vehicle','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','CURRENT LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2100','Accounts Payable','A','','L','AP');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','LONG TERM LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','Bank Loans','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2680','Loans from Shareholders','A','','L','AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','SHARE CAPITAL','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3350','Common Shares','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','RETAINED EARNINGS','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3590','Retained Earnings - prior years','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','SALES REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4020','Sales / General','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4030','Sales / Manufactured Goods','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4040','Sales / Aftermarket Parts','A','','I','AR_amount:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4400','OTHER REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4430','Shipping & Handling','A','','I','IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4440','Interest','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4450','Foreign Exchange Gain','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','COST OF GOODS SOLD','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5010','Purchases','A','','E','AP_amount:IC_cogs:IC_expense');
+SELECT account_heading_save(NULL,'1800','CAPITAL ASSETS', NULL));
+SELECT account_save(NULL,'1820','Office Furniture & Equipment','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1825','Accum. Amort. -Furn. & Equip.','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'1840','Vehicle','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1845','Accum. Amort. -Vehicle','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_heading_save(NULL,'2000','CURRENT LIABILITIES', NULL));
+SELECT account_save(NULL,'2100','Accounts Payable','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_heading_save(NULL,'2600','LONG TERM LIABILITIES', NULL));
+SELECT account_save(NULL,'2620','Bank Loans','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2680','Loans from Shareholders','L','', NULL, false,string_to_array('AP_paid', ':'));
+SELECT account_heading_save(NULL,'3300','SHARE CAPITAL', NULL));
+SELECT account_save(NULL,'3350','Common Shares','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'3500','RETAINED EARNINGS', NULL));
+SELECT account_save(NULL,'3590','Retained Earnings - prior years','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'4000','SALES REVENUE', NULL));
+SELECT account_save(NULL,'4020','Sales / General','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_save(NULL,'4030','Sales / Manufactured Goods','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_save(NULL,'4040','Sales / Aftermarket Parts','I','', NULL, false,string_to_array('AR_amount:IC_sale', ':'));
+SELECT account_heading_save(NULL,'4400','OTHER REVENUE', NULL));
+SELECT account_save(NULL,'4430','Shipping & Handling','I','', NULL, false,string_to_array('IC_income', ':'));
+SELECT account_save(NULL,'4440','Interest','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4450','Foreign Exchange Gain','I','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5000','COST OF GOODS SOLD', NULL));
+SELECT account_save(NULL,'5010','Purchases','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5020','COGS / General','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5030','COGS / Raw Materials','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5040','COGS / Direct Labor','A','','E','AP_amount:IC_cogs');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5050','COGS / Overhead','A','','E','AP_amount:IC_cogs');
+SELECT account_save(NULL,'5020','COGS / General','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'5030','COGS / Raw Materials','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'5040','COGS / Direct Labor','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
+SELECT account_save(NULL,'5050','COGS / Overhead','E','', NULL, false,string_to_array('AP_amount:IC_cogs', ':'));
 
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5100','Freight','A','','E','AP_amount:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5400','PAYROLL EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5410','Wages & Salaries','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','GENERAL & ADMINISTRATIVE EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','Accounting & Legal','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5615','Advertising & Promotions','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5620','Bad Debts','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5660','Amortization Expense','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5685','Insurance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5690','Interest & Bank Charges','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5700','Office Supplies','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5760','Rent','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5765','Repair & Maintenance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5780','Telephone','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5785','Travel & Entertainment','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5790','Utilities','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5795','Registrations','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5800','Licenses','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5810','Foreign Exchange Loss','A','','E','');
+SELECT account_save(NULL,'5100','Freight','E','', NULL, false,string_to_array('AP_amount:IC_expense', ':'));
+SELECT account_heading_save(NULL,'5400','PAYROLL EXPENSES', NULL));
+SELECT account_save(NULL,'5410','Wages & Salaries','E','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5600','GENERAL & ADMINISTRATIVE EXPENSES', NULL));
+SELECT account_save(NULL,'5610','Accounting & Legal','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5615','Advertising & Promotions','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5620','Bad Debts','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5660','Amortization Expense','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5685','Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5690','Interest & Bank Charges','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5700','Office Supplies','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5760','Rent','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5765','Repair & Maintenance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5780','Telephone','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5785','Travel & Entertainment','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5790','Utilities','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5795','Registrations','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5800','Licenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5810','Foreign Exchange Loss','E','', NULL, false,string_to_array('', ':'));
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2110','Accrued Income Tax - Federal','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2120','Accrued Income Tax - State','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2130','Accrued Franchise Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2140','Accrued Real & Personal Prop Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2150','Sales Tax','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2210','Accrued Wages','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5510','Inc Tax Exp - Federal','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5520','Inc Tax Exp - State','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5530','Taxes - Real Estate','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5540','Taxes - Personal Property','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5550','Taxes - Franchise','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5560','Taxes - Foreign Withholding','A','','E','');
+SELECT account_save(NULL,'2110','Accrued Income Tax - Federal','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2120','Accrued Income Tax - State','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2130','Accrued Franchise Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2140','Accrued Real & Personal Prop Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2150','Sales Tax','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'2210','Accrued Wages','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5510','Inc Tax Exp - Federal','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5520','Inc Tax Exp - State','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5530','Taxes - Real Estate','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5540','Taxes - Personal Property','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5550','Taxes - Franchise','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5560','Taxes - Foreign Withholding','E','', NULL, false,string_to_array('', ':'));
 --
 insert into tax (chart_id,rate) values ((select id from chart where accno = '2150'),0.05);
 --

Modified: trunk/sql/coa/us/chart/Service.sql
===================================================================
--- trunk/sql/coa/us/chart/Service.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/us/chart/Service.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -2,66 +2,66 @@
 -- US_Service_Company COA
 -- modify as needed
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1000','CURRENT ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1060','Checking Account','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1065','Petty Cash','A','','A','AR_paid:AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1200','Accounts Receivables','A','','A','AR');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1205','Allowance for doubtful accounts','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1500','INVENTORY ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1520','Inventory','A','','A','IC');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1800','CAPITAL ASSETS','H','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1820','Office Furniture & Equipment','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1825','Accum. Amort. -Furn. & Equip.','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('1840','Vehicle','A','','A','');
-insert into chart (accno,description,charttype,gifi_accno,category,link,contra) values ('1845','Accum. Amort. -Vehicle','A','','A','','1');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2000','CURRENT LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2100','Accounts Payable','A','','L','AP');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2600','LONG TERM LIABILITIES','H','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2620','Bank Loans','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2680','Loans from Shareholders','A','','L','AP_paid');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3300','SHARE CAPITAL','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3350','Common Shares','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3500','RETAINED EARNINGS','H','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('3590','Retained Earnings - prior years','A','','Q','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4000','CONSULTING REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4020','Consulting','A','','I','AR_amount:IC_income');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4400','OTHER REVENUE','H','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4410','General Sales','A','','I','AR_amount:IC_income:IC_sale');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4440','Interest','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('4450','Foreign Exchange Gain','A','','I','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5000','EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5020','Purchases','A','','E','AP_amount:IC_cogs:IC_expense');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5400','PAYROLL EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5410','Wages & Salaries','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5600','GENERAL & ADMINISTRATIVE EXPENSES','H','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5610','Accounting & Legal','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5615','Advertising & Promotions','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5620','Bad Debts','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5660','Amortization Expense','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5685','Insurance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5690','Interest & Bank Charges','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5700','Office Supplies','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5760','Rent','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5765','Repair & Maintenance','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5780','Telephone','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5785','Travel & Entertainment','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5790','Utilities','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5795','Registrations','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5800','Licenses','A','','E','AP_amount');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5810','Foreign Exchange Loss','A','','E','');
+SELECT account_heading_save(NULL,'1000','CURRENT ASSETS', NULL));
+SELECT account_save(NULL,'1060','Checking Account','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1065','Petty Cash','A','', NULL, false,string_to_array('AR_paid:AP_paid', ':'));
+SELECT account_save(NULL,'1200','Accounts Receivables','A','', NULL, false,string_to_array('AR', ':'));
+SELECT account_save(NULL,'1205','Allowance for doubtful accounts','A','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'1500','INVENTORY ASSETS', NULL));
+SELECT account_save(NULL,'1520','Inventory','A','', NULL, false,string_to_array('IC', ':'));
+SELECT account_heading_save(NULL,'1800','CAPITAL ASSETS', NULL));
+SELECT account_save(NULL,'1820','Office Furniture & Equipment','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1825','Accum. Amort. -Furn. & Equip.','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_save(NULL,'1840','Vehicle','A','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'1845','Accum. Amort. -Vehicle','A','', NULL, '1',string_to_array('', ':'));
+SELECT account_heading_save(NULL,'2000','CURRENT LIABILITIES', NULL));
+SELECT account_save(NULL,'2100','Accounts Payable','L','', NULL, false,string_to_array('AP', ':'));
+SELECT account_heading_save(NULL,'2600','LONG TERM LIABILITIES', NULL));
+SELECT account_save(NULL,'2620','Bank Loans','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2680','Loans from Shareholders','L','', NULL, false,string_to_array('AP_paid', ':'));
+SELECT account_heading_save(NULL,'3300','SHARE CAPITAL', NULL));
+SELECT account_save(NULL,'3350','Common Shares','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'3500','RETAINED EARNINGS', NULL));
+SELECT account_save(NULL,'3590','Retained Earnings - prior years','Q','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'4000','CONSULTING REVENUE', NULL));
+SELECT account_save(NULL,'4020','Consulting','I','', NULL, false,string_to_array('AR_amount:IC_income', ':'));
+SELECT account_heading_save(NULL,'4400','OTHER REVENUE', NULL));
+SELECT account_save(NULL,'4410','General Sales','I','', NULL, false,string_to_array('AR_amount:IC_income:IC_sale', ':'));
+SELECT account_save(NULL,'4440','Interest','I','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'4450','Foreign Exchange Gain','I','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5000','EXPENSES', NULL));
+SELECT account_save(NULL,'5020','Purchases','E','', NULL, false,string_to_array('AP_amount:IC_cogs:IC_expense', ':'));
+SELECT account_heading_save(NULL,'5400','PAYROLL EXPENSES', NULL));
+SELECT account_save(NULL,'5410','Wages & Salaries','E','', NULL, false,string_to_array('', ':'));
+SELECT account_heading_save(NULL,'5600','GENERAL & ADMINISTRATIVE EXPENSES', NULL));
+SELECT account_save(NULL,'5610','Accounting & Legal','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5615','Advertising & Promotions','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5620','Bad Debts','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5660','Amortization Expense','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5685','Insurance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5690','Interest & Bank Charges','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5700','Office Supplies','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5760','Rent','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5765','Repair & Maintenance','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5780','Telephone','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5785','Travel & Entertainment','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5790','Utilities','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5795','Registrations','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5800','Licenses','E','', NULL, false,string_to_array('AP_amount', ':'));
+SELECT account_save(NULL,'5810','Foreign Exchange Loss','E','', NULL, false,string_to_array('', ':'));
 --
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2110','Accrued Income Tax - Federal','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2120','Accrued Income Tax - State','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2130','Accrued Franchise Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2140','Accrued Real & Personal Prop Tax','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2150','Sales Tax','A','','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('2210','Accrued Wages','A','','L','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5510','Inc Tax Exp - Federal','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5520','Inc Tax Exp - State','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5530','Taxes - Real Estate','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5540','Taxes - Personal Property','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5550','Taxes - Franchise','A','','E','');
-insert into chart (accno,description,charttype,gifi_accno,category,link) values ('5560','Taxes - Foreign Withholding','A','','E','');
+SELECT account_save(NULL,'2110','Accrued Income Tax - Federal','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2120','Accrued Income Tax - State','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2130','Accrued Franchise Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2140','Accrued Real & Personal Prop Tax','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'2150','Sales Tax','L','', NULL, false,string_to_array('AR_tax:AP_tax:IC_taxpart:IC_taxservice', ':'));
+SELECT account_save(NULL,'2210','Accrued Wages','L','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5510','Inc Tax Exp - Federal','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5520','Inc Tax Exp - State','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5530','Taxes - Real Estate','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5540','Taxes - Personal Property','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5550','Taxes - Franchise','E','', NULL, false,string_to_array('', ':'));
+SELECT account_save(NULL,'5560','Taxes - Foreign Withholding','E','', NULL, false,string_to_array('', ':'));
 --
 insert into tax (chart_id,rate) values ((select id from chart where accno = '2150'),0.05);
 --

Modified: trunk/sql/coa/us/chart/UCOA-Form990.sql
===================================================================
--- trunk/sql/coa/us/chart/UCOA-Form990.sql	2009-06-12 02:37:23 UTC (rev 2654)
+++ trunk/sql/coa/us/chart/UCOA-Form990.sql	2009-06-12 03:13:20 UTC (rev 2655)
@@ -1,226 +1,226 @@
 begin;
 -- UCOA Form 990
 --
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1000','Cash','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1010','Cash in bank-operating','A','45','A','AR_paid:AP_paid');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1020','Cash in bank-payroll','A','45','A','AP_paid');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1040','Petty cash','A','45','A','AR_paid:AP_paid');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1070','Savings & short-term investments','A','46','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1100','Accounts receivable','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1110','Accounts receivable','A','47a','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1115','Doubtful accounts allowance','A','47b','A','AR_paid','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1200','Contributions receivable','H','','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1210','Pledges receivable','A','48a','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1215','Doubtful pledges allowance','A','48b','A','AR_paid','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1225','Discounts - long-term pledges','A','48a','A','AR_paid','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1240','Grants receivable','A','49','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1245','Discounts - long-term grants','A','49','A','AR_paid','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1300','Other receivables','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1310','Employee & trustee receivables','A','50','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1320','Notes/loans receivable','A','51a','A','AR');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1325','Doubtful notes/loans allowance','A','51b','A','AR_paid','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1400','Other assets','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1410','Inventories for sale','A','52','A','IC');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1420','Inventories for use','A','52','A','IC');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1450','Prepaid expenses','A','53','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1460','Accrued revenues','A','47a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1500','Investments','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1510','Marketable securities ','A','54','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1530','Land held for investment','A','55a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1540','Buildings held for investment','A','55a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1545','Accum deprec - bldg investment','A','55b','A','','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1580','Investments - other','A','56','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1600','Fixed operating assets','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1610','Land - operating','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1620','Buildings - operating','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1630','Leasehold improvements','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1640','Furniture, fixtures, & equip','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1650','Vehicles','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1660','Construction in progress','A','57a','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1700','Accum deprec - fixed operating assets','H','','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1725','Accum deprec - building','A','57b','A','','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1735','Accum amort - leasehold improvements','A','57b','A','','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1745','Accum deprec - furn,fix,equip','A','57b','A','','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('1755','Accum deprec - vehicles','A','57b','A','','1');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1810','Other long-term assets','A','58','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1850','Split-interest agreements','A','58','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1910','Collections - art, etc','A','58','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('1950','Funds held in trust by others','A','58','A','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2000','Payables','H','','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2010','Accounts payable','A','60','L','AP');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2020','Grants & allocations payable','A','61','L','AP');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2100','Accrued liabilities','H','','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2110','Accrued  payroll','A','60','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2120','Accrued paid leave','A','60','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2130','Accrued payroll taxes','A','60','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2140','Accrued sales taxes','A','60','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2150','Accrued expenses - other','A','60','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2300','Unearned/deferred revenue','H','','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2310','Deferred contract revenue','A','62','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2350','Unearned/deferred revenue - other','A','62','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2410','Refundable advances','A','62','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2500','Short-term notes & loans payable','H','','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2510','Trustee & employee loans payable','A','63','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2550','Line of credit','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2560','Current portion - long-term loan','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2570','Short-term liabilities - other','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2610',' Split-interest liabilities','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2700','Long-term notes & loans payable','H','','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2710','Bonds payable','A','64a','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2730','Mortgages payable','A','64b','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2750','Capital leases','A','64b','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2770','Long-term liabilities - other','A','64a','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2810','Gov\'t-owned fixed assets liability','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('2910','Custodial funds','A','65','L','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3000','Unrestricted net assets','H','','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3010','Unrestricted net assets','A','21&67','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3020','Board-designated net assets','A','21&67','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3030','Board designated quasi-endowment','A','21&67','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3040','Fixed operating net assets','A','21&67','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3100','Temporarily restricted net assets','H','','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3110','Use restricted net assets','A','21&68','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3120','Time restricted net assets','A','21&68','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3200','Permanently restricted net assets','H','','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('3210','Endowment net assets','A','21&69','Q','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('4000','Revenue from direct contributions','H','','I','');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('4010','Individual/small business contributions','A','1a','I','AR_amount:IC_income');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('4020','Corporate contributions','A','1a','I','AR_amount:IC_income');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link) VALUES ('4070','Legacies & bequests','A','1a','I','AR_amount');
-INSERT INTO chart (accno, description, charttype, gifi_accno, category, link, contra) VALUES ('4075','Uncollectible pledges - estimated','A','contra1a','I','','1');

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.