magnussolution / magnusbilling7

MagnusBilling is a fast, secure, efficient, high availability, VOIP Billing.
https://www.magnusbilling.org
GNU Lesser General Public License v3.0
181 stars 106 forks source link

the balance on the user does not change when the Refill is deleted #384

Closed ezhevak closed 4 years ago

ezhevak commented 4 years ago

Describe the bug The balance on the user does not change when the Refill is deleted

To Reproduce Steps to reproduce the behavior:

  1. Go to 'billing'->'Refill'
  2. Click on 'New' and add 10.00 USD to some user (save it)
  3. Go to users and find the user you added Refill (Credit 10.00 USD)
  4. Go to 'billing'->'Refill' and delete Refill created in step 2.
  5. Go to users. Credit will 10.00 USD.

Expected behavior A credit must be 0.00 USD

How i can reset the user balance???

magnussolution commented 4 years ago

to remove user credit you need add a new negative refill

example -10,00

ezhevak commented 4 years ago

Different number of decimal. At User->Credit (10.002 USD) At Billing->Refill (10.10 USD) A can't Refill correct sum. :)

ezhevak commented 4 years ago

i find a solution. Go to database mbilling and use update sql.

update pkg_user set credit = '0.0000' where id_user = 'userId';