When selling goods: debit: accounts receivable loan: main business income.

Carry forward costs while recognizing revenue.

Debit: main business cost

Loans: Goods in stock

The question you asked is very good, because you are thinking about how the profits come out. At the end of the period, the income and the amount of the undergraduate course will be transferred to this year's profit, so that the ending balance of this year's profit will be profit. The entries are as follows:

Debit: main business income

Loan: profit this year

Debit: this year's profit

Loan: main business cost