Ken hace 1 semana
padre
commit
be4a5132ad
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Models/Rebate.php

+ 1 - 1
app/Models/Rebate.php

@@ -26,7 +26,7 @@ class Rebate extends BaseModel
         Log::error(json_encode($data));
         $rebate = static::where('date', $data['date'])
             ->where('member_id', $data['member_id'])->first();
-        if(!$rebate){
+        if($rebate){
             $profit = bcadd($rebate->profit, $data['profit'], 2);
             $rebate->profit = $profit;
             $rebate->save();