How to set Credit Limit in Days wise

We need to implement Credit limit for customers

  1. Amount wise = 3L
  2. 30 Days will be max age allowed for invoice.

Please help.