Bug in "credits"

My subjective opinion is:
The user must have credits, but they must be managed flexibly, ie:

  1. As previously written (TTL (Time To Live) for for credits), loans should have a lifetime, i.e. they should be calculated for a period of use of a certain period (the manager should have the option to set the days interval within which a valid number of SMS will be valid);
    1.1. At the end of the SMS package term, the subscriber’s balance must be zeroed (if this is the only deposit) or return to the initial position ie. if, for example, there were 100 on the balance sheet, and with this, 200 units were added and when the expiration date of the added 200-units SMS should remain 100;
    1.2 If it is monolithic (one large deposit, after the end, the user’s balance must be 0;
  2. When deleting credits, they must be reset. those. on the balance sheet should be 0 (if this is all the loans that it has on the balance sheet) and certainly should not go into minus, or if he, in addition to the number of CMCs to be deleted, there are still, the unites to be deleted must be deducted and should remain exactly how much does the rest of the deposit.

Regards,
Jamshid