I need some help please on how to deal with this, I am confuse and I don’t know what to do…I want to have the agents to pay in our office by weekly, base on the schedule of payment they set in their account example every monday, every friday.every tuesday.etc…The agents have clients, the clients will request or contact the agents and the clients will pay the service amount of the agents. and the agents will remit the service amount to our office base on his schedule of payment.
I have 2 tables that will store the information of client request
client_header
CREATE TABLE `client_header` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`client_id` INT(11) NOT NULL,
`daterequest` DATETIME NOT NULL,
PRIMARY KEY (`id`)
)
client_details
CREATE TABLE `client_details` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`agent_id` INT(11) NOT NULL,
`header_id` INT(11) NOT NULL,
`service_amount` FLOAT
`daterequest` DATETIME NOT NULL,
PRIMARY KEY (`id`)
)
In order to get all his total remittance and clients request information I will query and get all his previous request and store it in another table or no need for another table ? and how do I know other request which is not remitted yet ?
please enlighten my mind on this.
Thank you in advance.