public function actionMailvznos() { $all_name = ""; $n = 0; $kvaratal = Vznos::getKvartal(); $year = date('Y'); $vznos = Vznos::find()->select('ur_id')->where(['year' => $year])->andWhere(['kvartal' => $kvaratal])->column(); //Убрать лиимит $ur_array = Ur::find()->where(['not in', 'id', $vznos])->andWhere(['plat' => 1])->orderBy('name')->all(); //->limit(1) print "<h4>" . count($ur_array) . "</h4>"; foreach ($ur_array as $ur) { // print $ur['id']; print $ur['name']; // print "<br>"; Vznos::greatePDF($ur); // $ur['contact_mail']="*****@*****.**"; $file = \Yii::$app->basePath . '/temp/vznos/' . $ur['id'] . '.pdf'; $Subject = 'Оплата взносов ' . $kvaratal . " квартал " . $year . ' г.'; if (strpos($ur['contact_mail'], "@") !== false) { \Yii::$app->mail->compose('vznos', ['name' => $ur['name']])->setFrom([\Yii::$app->params['infoEmail'] => 'ААУ "СоюзФарма-ТМ"'])->setTo($ur['contact_mail'])->setSubject($Subject)->attach($file)->send(); sleep(1); $all_name .= $ur['name'] . " " . $ur['contact_mail'] . "\n<br>"; $n++; } } // $pdf = Vznos::greatePDF('Пукась Анна Андреевич'); \Yii::$app->mail->compose('infovznos', ['info' => $all_name, 'n' => $n])->setFrom([\Yii::$app->params['infoEmail'] => 'СоюзФарма'])->setTo("*****@*****.**")->setSubject('Рассылка произведена')->send(); \Yii::$app->mail->compose('infovznos', ['info' => $all_name, 'n' => $n])->setFrom([\Yii::$app->params['infoEmail'] => 'СоюзФарма'])->setTo("*****@*****.**")->setSubject('Рассылка произведена')->send(); }
public static function Oplatalili($ids) { return Vznos::find()->where(['ur_id' => $ids])->all(); }
} ?> <tr> <td><h3>Всего:</h3></td> <td></td> <td align="center"><h3><?php echo $c_u; ?> </h3></td> <td align="center"><h3><?php echo $c_a; ?> </h3></td> <?php foreach ($kv = Vznos::getKvartals(null, 3) as $date) { $array_date = $date['year'] . $date['kvartal']; print "<td align=\"right\"><h3>"; print $count_n[$array_date]; print "</h3></td>"; } ?> </tr> </tbody> </table>
</strong></span><br><br> <br> <table class="table tableVisitors vznos"> <thead> <tr> <th width="120">ИНН</th> <th>Название юр.лица</th> <th width="50" align="center">Ⅰ</th> <th width="50" align="center">Ⅱ</th> <th width="50" align="center">Ⅲ</th> <th width="50" align="center">Ⅳ</th> </tr> </thead> <tbody> <?php $nowKvartal = Vznos::getKvartal(); foreach ($ur as $u) { foreach ($vznos as $vz) { if ($vz->ur_id == $u->id) { $vvz[$vz->ur_id][$vz->kvartal] = $vz->date_plat; $vvz_summa[$vz->ur_id][$vz->kvartal] = $vz->summa; } } $style = ""; if ($scroll == $u->id) { $style = "bgcolor='#fdf579'"; } print "<tr {$style}>"; print "<td>" . $u->inn . "</td>"; print "<td><a href='/ur/update/?id={$u->id}' id='" . $u->id . "'>" . $u->name . "</a></td>"; for ($n = 1; $n < 5; $n++) {
public function actionModalplat($regional_id, $region_id) { $return = Vznos::getUr_l_in_region($regional_id, $region_id); $this->layout = 'modal_400'; return $this->render('modalplat', compact(['return'])); // return $this->render('index'); }