While accounting and ERP solution have wildly differing structures to record their data, this sections uses data with a relatively simple structure as a show case of how this problem may be dealt with.
Note that the encoding you use to transfer to the database depends on the settings used to create the PostgreSQL database with. A migration is a good moment to think about encodings an solve older encoding issues. Now would be a good moment to anticipate the requirement for accented characters and non-western alphabets: set up a UTF-8 encoded database and recode your data accordingly.
The source system for this section uses a structure where every company has one contact person, one address, one phone number and e-mail.
In order to understand how to migrate this data structure to LedgerSMB, it’s important to understand that:
The company from the source maps to the Company and Entity entities
The contact person maps to the Entity Credit Account entity
The address maps to the Location entity - and requires a location class: Sales, Billing or Shipping
The phone number, fax number and e-mail map to Contact items
The reason behind the separation between the Company and Entity entities is that every customer is an Entity, but not all entities are companies, since some entities are Persons - natural persons.
@@@ How to
The strategy that I used when migrating to LedgerSMB is the following:
create customers and vendors as needed
create at least the parts and services for which there are open AR or AP items in the closing balance
create the open AR/AP items in the closing balance by posting them on the original opening date (this allows you to do your aging management in LSMB from day 1)
create in addition the parts for which you have stock in the closing balance
import your stock by posting invoices against the inventory entity
make sure you ”pay” the invoices - e.g. by paying them from equity
draw up the incomplete balance you have so far
calculate the delta of the partially imported balance against the closing balance
import the delta balance on top of what you already had to make a full balance
What I did is post the transaction from the last step on the day before I wanted to start my books; say you want to start your books on 2014-01-01, then you’d post it on 2013-12-31. That way, the opening balance of your books on the starting date is exactly what you had on the closing balance of the books you left behind.