if u want easy way: consider that morning i didn't have any money but evening i have to take 400 from my personal savings so this is the first loss
then i lost a material worth 100 (given to customer without price)
so total loss is 400+100= 500