예제 #1
0
     $op_code_pay = new_projects::OPCODE_PAYED_KON;
 } else {
     $op_code = new_projects::OPCODE_PAYED;
     $op_code_pay = new_projects::OPCODE_PAYED;
 }
 if ($items) {
     $bill->start();
     // Офис первым делом создаем
     if ($items['office'] > 0) {
         $bill->setPromoCodes('SERVICE_VACANCY', $promo);
         $option['items'] = array('office' => $items['office']);
         $bill->setOptions($option);
         $op_code_vacancy = $tmpPrj->getVacancyOpCode();
         $success = $bill->addServiceToCart($op_code_vacancy);
         $items['office'] = 0;
         $bill->unsetPromoCodes();
     }
     // Конкурс
     if ($items['contest'] > 0) {
         $bill->setPromoCodes('SERVICE_CONTEST', $promo);
         $option['items'] = array('contest' => $items['contest']);
         $bill->setOptions($option);
         $success = $bill->addServiceToCart($op_code);
         $items['contest'] = 0;
         $bill->unsetPromoCodes();
     }
     $bill->setPromoCodes('SERVICE_PROJECT', $promo);
     // Создаем услуги по отдельности
     foreach ($items as $opt => $value) {
         if (is_array($value) && $value["no_pro"] <= 0) {
             continue;