A company asked me to send them a quote for a project, and very specifically asked for a fixed or flat fee. I specified the deliverables, broken down by category and provided a project cost, which they signed. 8 days into the contract, they decided that they wanted to cancel and asked that I send them an invoice for work completed. I did about 10-15 more hours of work on deliverables other than the ones that I sent them. Some of this was research to figure out how to support their (very) frugal spending limits. I feel that since they cancelled the flat fee contract, they should pay me for my research work. There was no cancellation language in the signed contract.
Wrong approach! The fixed-price contract was signed. You started work, in reliance. Maybe they don't need your work any more, or had buyer's remorse -- but you are owed the FULL price. Don't accept anything less.
If you were hourly, then it would make sense to break it down into hours (units) of work. Your customer is trying to get over on you. Unless you put milestones into the contract, it's not severable (divisible).
Send an invoice based on an hourly rate you find reasonable.
If they balk at the figure, both parties will have to negotiate a settlement.
Perhaps any future contracts should make provisions for similar situations. Personally, I prefer keeping smaller contracts simple and negotiate changes if needed, rather than attempting to cover all possible situations in a long 'legalese' contract.