A copy of the log after the fact (sometimes called an AsRun Report) is used for reconciliation to determine what actually aired and then can be sent to accounting to bill the advertisers..
Some software systems are end-to-end and manage the whole spectrum of tasks required to broadcast a television or radio station, others specialize in specific areas, such as sales, programming, traffic, or automation for master control.
The agreement is called a sales order and it defines the dates when spots (advertisements) are run and the commercial terms of the campaign.
At the station, a traffic person collects the sales orders and enters them into a computer system that will help to generate the daily logs.
The traffic person also links the sales order with the possible media, such as an audio tape which contains the actual spot.