]> git.stg.codes - stg.git/commitdiff
Make fee charging rules inclusive (2 includes 0 and 3 includes fee)
authorMaxim Mamontov <faust.madf@gmail.com>
Mon, 19 Sep 2011 07:57:28 +0000 (10:57 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Mon, 19 Sep 2011 07:57:28 +0000 (10:57 +0300)
projects/stargazer/user_impl.cpp

index 1278afa2de947124d604681a7617349cb3fa28f5..ca2e2cae221ae28f2ed807c4e5924381873b8da6 100644 (file)
@@ -1243,11 +1243,11 @@ switch (settings->GetFeeChargeType())
         property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     case 1:
-        if (c > 0)
+        if (c >= 0)
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     case 2:
-        if (c > fee)
+        if (c >= fee)
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
         break;
     }
@@ -1297,14 +1297,14 @@ switch (settings->GetFeeChargeType())
         SetPrepaidTraff();
         break;
     case 1:
-        if (c > 0)
+        if (c >= 0)
             {
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
             SetPrepaidTraff();
             }
         break;
     case 2:
-        if (c > fee)
+        if (c >= fee)
             {
             property.cash.Set(c - fee, sysAdmin, login, store, "Subscriber fee charge");
             SetPrepaidTraff();