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

Re: 1.2 to 1.3 Upgrade fun



Hi Lyle,


On Sun, Mar 23, 2014 at 5:37 PM, Lyle <..hidden..> 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.