As Stuart says it's a huge subject. But if what you mean by the 'rules for credit purchases/sales' are the terms, then these are agreed between the supplier and purchaser. Standard practise is 30 days, so 30 days after the date on the invoice the purchaser must pay for the goods or services.
But it can be anything, the supplier could insist on payment before the goods/services are delivered or if it is a costly and complicated item there could be a series of payments. The point is the supplier and purchaser agree on what the terms are in advance.