andre há 4 anos atrás
pai
commit
85459e465b

+ 9 - 9
app/Libs/Zimbra/Components/Api/Soap/Services/Update/ChangePackage.php

@@ -48,15 +48,6 @@ class ChangePackage extends ApiService
             $acc_new = $this->formData['configoptions']['acc_new'];
             $acc_add = $acc_add + $acc_new;
             $acc_new = 0;
-
-            logModuleCall(
-                'zimbraEmail',
-                __FUNCTION__,
-                $acc_add,
-                $acc_limit,
-                $acc_base
-            );
-            
             $accountLimit = $acc_base + $acc_add;
             if (($this->productManager->get('acc_limit') > 0) && ($accountLimit > $this->productManager->get('acc_limit'))) {
                 $acc_add = $this->productManager->get('acc_limit') - $acc_base;
@@ -70,6 +61,15 @@ class ChangePackage extends ApiService
                 $configOption->updateConfigurableOption($acc_newObj->id, ['qty' => $acc_new]);
             }
         } else {
+
+            logModuleCall(
+                'zimbraEmail',
+                __FUNCTION__,
+                $acc_add,
+                $acc_limit,
+                $acc_base
+            );
+            
             $accountLimit = $this->productManager->get('acc_limit');
         }
         foreach($accounts as $account)