The foreign key for sale detail model has been fixed.
Removing trailing spaces from code