Beispiel #1
0
Datei: room.php Projekt: bhdm/Aik
 $tmp2['plan'] = 0;
 $tmp2['fact'] = 0;
 for ($i = 1; $i <= 12; $i++) {
     /**$room->getPrice()*/
     echo '<td class="text-center">' . $userCount[$i] * 1 . '<br />' . $userSale[$i] . '</td>';
     $tmp2['plan'] += $userCount[$i] * 1;
     /*$room->getPrice()*/
     $tmp2['fact'] += $userSale[$i];
 }
 echo '<td class="text-center">' . $tmp2['plan'] . ' <br /> ' . $tmp2['fact'] . '</td>';
 echo '</tr>';
 echo '<tr class="group-' . $key . '">';
 echo '<td>Аренда</td>';
 $roomRent = 0;
 foreach ($room->getGroups() as $id) {
     $roomRent = \Model\Driver::roomRent($id);
 }
 $tmp3 = 0;
 for ($i = 1; $i <= 12; $i++) {
     echo '<td class="text-center">' . $roomRent[$i] . '</td>';
     $tmp3 += $roomRent[$i];
 }
 echo '<td class="text-center">' . $tmp3 . '</td>';
 echo '</tr>';
 echo '<tr class="group-' . $key . '">';
 echo '<td>Зарплата</td>';
 $userSalary['plan'] = array();
 $userSalary['fact'] = array();
 foreach ($room->getGroups() as $id) {
     $userSalaryTmp = \Model\Driver::userSalary($id);
     //                $userSalary['plan'] = mergeArray($userSalary['plan'],$userSalaryTmp['plan']);
Beispiel #2
0
Datei: main.php Projekt: bhdm/Aik
 echo '</tr>';
 echo '<tr class="group-' . $key . '">';
 echo '<td>Выручка</td>';
 $userSale = \Model\Driver::userSales($group->getId());
 $tmp2['plan'] = 0;
 $tmp2['fact'] = 0;
 for ($i = 1; $i <= 12; $i++) {
     echo '<td class="text-center">' . $userCount[$i] * $group->getPrice() . '<br />' . $userSale[$i] . '</td>';
     $tmp2['plan'] += $userCount[$i] * $group->getPrice();
     $tmp2['fact'] += $userSale[$i];
 }
 echo '<td class="text-center">' . $tmp2['plan'] . ' <br /> ' . $tmp2['fact'] . '</td>';
 echo '</tr>';
 echo '<tr class="group-' . $key . '">';
 echo '<td>Аренда</td>';
 $roomRent = \Model\Driver::roomRent($group->getId());
 $tmp3 = 0;
 for ($i = 1; $i <= 12; $i++) {
     echo '<td class="text-center">' . $roomRent[$i] . '</td>';
     $tmp3 += $roomRent[$i];
 }
 echo '<td class="text-center">' . $tmp3 . '</td>';
 echo '</tr>';
 echo '<tr class="group-' . $key . '">';
 echo '<td>Зарплата</td>';
 $userSalary = \Model\Driver::userSalary($group->getId());
 $tmp4['plan'] = 0;
 $tmp4['fact'] = 0;
 for ($i = 1; $i <= 12; $i++) {
     echo '<td class="text-center">' . $userSalary[$i]['plan'] . ' <br /> ' . $userSalary[$i]['fact'] . '</td>';
     $tmp2['plan'] += $userSalary[$i]['plan'];