So a few comments:
1) When you are using invoiceno as the primary key, are you using our NumericIdGenerator or did you implement your own IIDGenerator? (Or if you have none, that might also explain the null insert exception.)
2) If you use Identity columns for the primary keys, you don't need to implement an IIdGenerator or call EntityManager.GenerateId().
3) For the SalesInvoice table, it may be simpler to declare the invoiceno as an Identity column, but if this invoiceno is visible to the end user, you will buy some future flexibility by having a separate column as the primary key. It's a little more work though as you still have to create a unique invoiceno for each SalesInvoice.
If you want to keep things simple, just declare everything as an Identity column and then you don't have to worry about any ID Generation. Using GUIDs as primary keys is also simple and has the advantage that the entities don't have to use a temporary ID before being assigned one from the server. Their disadvantage is of course that they are long and hard to read.