Praise be to Allah.
What is required in the case of zakaah for trade is: to work out the value of the goods that have been prepared for sale every time one year has passed, and that is done on the basis of the price for which they are sold – not the price for which they were bought. If the dealer sells goods wholesale, then the value should be worked out based on the wholesale price; if he sells them retail, then the value should be worked out based on the retail price.
If the trader has profits in hand (i.e., cash in hand at the end of the year), that profit should be added to the value of the goods, as well as outstanding debts owed by people that he still hopes to get back. Then from this total he should pay one quarter of one tenth (2.5 %)
He should not pay any attention to the capital with which he bought the goods.
Based on that, if you work out the value of the goods that you still have at the end of the year, based on the price for which you sell them, and it amounts to 370,536; then you take out one quarter of one tenth from that, you have to give 9263.4
With regard to the profits that you mentioned, if this money is still with you at the end of the year, then you should also pay one quarter of one tenth of it. But if you have spent it during the year, or spent some of it, then no zakaah is due on it, apart from whatever is left of it at the end of the year.
So the zakaah of a dealer or trader is worked out according to the following formula:
Zakaah = (2.5% of cash in hand at the end of the year + the value of the goods that you still have at the end of the year + outstanding debts that are owed to you by people that you still hope to get back).
Debts owed by the trader are not to be deducted, according to the more correct scholarly opinion.
And Allah knows best.