[Advacs-discuss] Now able to post journal entries

Oliver Elphick olly@lfix.co.uk
Mon, 11 Oct 2004 09:21:27 +0100


--=-FDgICbKD7pjdGIiVV7++
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

As a result of the latest debugging changes, it is now possible to post
journal entries in the General ledger by inserts to the journal view.
(There's a long way to go yet, though.)

Please test the installation and let me know of any problems.

Procedure:

Save the attached init.data file under .../advacs.  ("..." represents
the path to that directory.)

Edit Makefile.defs to set correct values for PGPORT and PGBIN.  Leave
country and language as GB and en respectively.  Log in as a user who
has database creation privilege.

$ cd .../advacs/sql; make purge install              # Install advacs

$ psql -e -d advacs -f national/GB/chart/ltd.shares  # chart of accounts

$ psql -e -d advacs -f ../init.data                  # initial data

$ psql -d advacs

advacs=# INSERT INTO journal (yearend, subpd, line_cnt, ref, currency,
ldg_codes,depts, accounts, dates, amounts, lrefs, narratives) VALUES
('31 Mar 2004',1,2,'TEST2','GBP',ARRAY ['GL','GL'],ARRAY
['LF','LF'],ARRAY ['SHAREORD','PANDL'],ARRAY['1 Apr 2003'::DATE,'1 Apr
2003'::DATE],ARRAY [2713.0,-2713.00],ARRAY ['A1','A2'],ARRAY ['Narrative
1','Narrative 2']);


-- 
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "I waited patiently for the LORD; and he inclined unto 
      me, and heard my cry. He brought me up also out of an 
      horrible pit, out of the miry clay, and set my feet 
      upon a rock, and established my goings."              
                                         Psalms 40:1,2 

--=-FDgICbKD7pjdGIiVV7++
Content-Description: 
Content-Disposition: inline; filename=init.data
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

BEGIN;
INSERT INTO core.company (id, name, type) VALUES ('LF','Louche Furtive Limited','LC');
INSERT INTO core.department (id, name, company) VALUES ('LF','Company administration','LF');
UPDATE core.company SET main_dept = 'LF' WHERE id = 'LF';
INSERT INTO period (company, yearend, start, sub_pds) VALUES ('LF','31 Mar 2004','1 Apr 2003',4);
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2004',1,'30 Jun 2003');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2004',2,'30 Sep 2003');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2004',3,'31 Dec 2003');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2004',4,'31 Mar 2004');
INSERT INTO period (company, yearend, start, sub_pds) VALUES ('LF','31 Mar 2005','1 Apr 2004',4);
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2005',1,'30 Jun 2004');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2005',2,'30 Sep 2004');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2005',3,'31 Dec 2004');
INSERT INTO subperiod (company, yearend, pdno, pdend) VALUES ('LF','31 Mar 2005',4,'31 Mar 2005');
COMMIT;


--=-FDgICbKD7pjdGIiVV7++--