Hi Lyle,

On Sun, Mar 23, 2014 at 5:37 PM, Lyle <[email protected]> wrote:

>  My first problem:
>
> [ snip ]


> At first it looked very odd as you can see NULL being passed explicitly
> for the heading column. On closer inspection of the table definition in
> Pg-database.sql:43 I can see it's a foreign key field. Looking at the
> account_save function definition in Accounts.sql:74 I can see it checks for
> NULL and swaps it for an ID from the account_headings table. So my problem
> is actually the SQL above:
>
> INSERT INTO account_heading(id, accno, description)
> SELECT id, accno, description
>   FROM lsmb12.chart WHERE charttype = 'H';
>
> That isn't actually inserting anything:
> # SELECT id, accno, description
> #   FROM lsmb12.chart WHERE charttype = 'H';
>  id | accno | description
> ----+-------+-------------
> (0 rows)
>
> # SELECT DISTINCT charttype FROM lsmb12.chart;
> charttype
> -----------
>  A
> (1 row)
>
> I don't have any H charttypes, only A. What should I do here?
>
>
You can create an account heading in your 1.2 books. The account heading
should have a number/identifier which is sorted "first" in your list of
accounts/accountheadings by "ascii" sorting.

Thanks for reporting this! We should be checking that at least one header
is indeed available (or insert one upon migration if there are none)

-- 
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to