Untitled

mail@pastecode.io avatar
unknown
php
2 years ago
1.3 kB
1
Indexable
Never
       //         if ($rdv->quote && $rdv->quote->status=="completed") {

                //             $month_complete[$i]+=1;

                //         }

                //    }

                // }

                for ($i=0; $i <6 ; $i++) {

                   if($rdv->quote && $rdv->quote->status=="completed"){

                        if ($dateset[$i] === $date_->format('Y-m')) {

                            $total_in_six+=1;

                            $month_complete[$i]+=1;

                        }

                   }

                }

                $i=0;

                foreach ($six_month as $key =>$thismonth) {

                   $six_month[$key]=$month_complete[$i]*100/$total_in_six;

                   $i+=1;

                }

            }

 

 

            if (!$rdv->traite){

                $rdv["type"]="rdv";

                $rdv["prospect"]=$rdv->lead?$rdv->lead->name =="null null"?"":$rdv->lead->name:"";

                $rdv["sujet"]=$rdv->product?$rdv->product->name:"";

 

                if ($date_<$NOW) {

                    array_push($tache_en_retard, $rdv);

                }else {

                    array_push($tache_a_faire, $rdv);

                }