A family of Microsoft relational database management systems designed for ease of use.
I am not sure what difficulty you are having because what you describe is pretty much how to do it.
You can accumulate your costs in four ways. You have work type resources, material type resources, cost type resources, and fixed costs. There are some advantages in using resources rather than fixed cost, but assigning fixed costs to tasks is also convenient and quick for tasks for which you don't need to categorise or dissect or segregate costs by resource or plan/track the work hours.
For example, "lay 10000 bricks" might cost $14000 and if you have a fixed price subcontract with Bob's Bricklaying Inc, you might just use a fixed cost on the task. However, in this case Bob's Bricklaying Inc does not appear in the resource sheet as a resource, and neither do the bricks.
But let's say that fixed cost on the task is good enough. You then need another task or event which is "get paid for bricklaying", and has zero duration, and this is a FS0 successor to the "lay 10000 bricks" task, or maybe FS+30 days. So if the customer pays $15000 you can put this in as a negative fixed cost on a zero duration task. Your task may cost $14000 pro rata if you choose to accrue the cost for the bricklaying as the days go by, but your customer pays you after it is done, in a single payment. So your cost is continuous but your income is incremental.
Of course, in this business model, unless you get paid a deposit in advance, you are financing the construction project with your cash or overdraft, so you are cash flow negative until you get paid. This is the worst possible business model and is all you need to know to understand why construction is a very risky business. In Western Australia 24% of all business insolvencies are building companies, and they can go bust even in the middle of a construction boom if they lose control of their cash flow.