Exemplo n.º 1
0
         $op_code = new_projects::getContestTaxOpCode($tmpPrj->getCostRub(), is_pro());
         $items['contest']['no_pro'] = $tmpPrj->isEdit() ? 0 : new_projects::getContestTax($cost, is_pro());
         $items['contest']['pro'] = $tmpPrj->isEdit() ? 0 : new_projects::getContestTax($cost, true);
     } else {
         //Здесь счет создастся при редактировании конкурса
         $items['contest']['no_pro'] = $tmpPrj->isEdit() ? 0 : 3300;
         $items['contest']['pro'] = $tmpPrj->isEdit() ? 0 : 3000;
         $op_code = is_pro() ? new_projects::OPCODE_KON : new_projects::OPCODE_KON_NOPRO;
     }
     $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['contest'] > 0) {
         $option['items'] = array('contest' => $items['contest']);
         $bill->setOptions($option);
         $success = $bill->create($op_code, 0, false);
         $items['contest'] = 0;
     }
     // Создаем услуги по отдельности
     foreach ($items as $opt => $value) {
         if (is_array($value) && $value['no_pro'] <= 0) {
             continue;
         }
         if ($value <= 0) {
             continue;
         }