Fix error in sequence in which the postings are removed to avoid foreign key error whilst removing allocated payments
Phil: Add in a check to see if there are any offers outstanding before deleting stock item
Change the stock code in the offers table at the same time as other changes
Change the stock code in the tender items table
Check whether there are any outstanding tenders for these items before deletion
Missing identifier in link on deletion of an item
Fix error where Date comparison function wrongly returns true when dates are equal
Merge pull request #76 from timschofield/develop

Some changes from webERP and various bug fixes