Пример #1
0
 /**
  * Заказчик отказывается от сделанных ранее изменений в этапе, после того, как исполнитель от них отказался.
  *
  * @return boolean   успешно?
  */
 function cancelChanges()
 {
     $sql = "UPDATE sbr_stages SET version = frl_version WHERE id = {$this->id} AND version < frl_version";
     if ($res = $this->_eventQuery($sql, false)) {
         $res = $this->sbr->cancelChanges();
     }
     if ($res) {
         $event_upd = array('sbr_stages.FRL_ROLLBACK');
         sbr_notification::setNotificationCompleted(array('sbr_stages.FRL_ROLLBACK', 'sbr.FRL_ROLLBACK', 'sbr_stages.REFUSE'), $this->data['sbr_id'], $this->id);
         return $this->_commitXact();
     }
     $this->_abortXact();
     return false;
 }
Пример #2
0
">
                        <a href="javascript:void(0)" onclick="if(confirm('Вы действительно хотите завершить данное событие?')) xajax_aCompleteEvent('<?php 
        echo $current['xact_id'];
        ?>
')" class="b-layout__link b-layout__link_color_ee1d16 b-layout__link_bordbot_dot_ee1d16">Завершить</a>
                    </div>
                    <?php 
    }
    ?>
                </td>
            </tr>
        </table>
<?php 
    if ($greenEvent) {
        ?>
    </div>
</div>
<?php 
    }
    //if
}
//foreach
if (count($update_event) > 0) {
    sbr_notification::setNotificationCompleted($update_event, $stage->data['sbr_id'], $stage->id);
}
if (count($update_event_sbr) > 0) {
    sbr_notification::setNotificationCompleted($update_event_sbr, $stage->data['sbr_id'], $stage->data['sbr_id']);
}
if ($is_run_comment == true) {
    sbr_notification::setNotificationCommentViewCompleted($stage->data['sbr_id'], $stage->id);
}
Пример #3
0
 $g_help_id = 219;
 if ($stage->data['lc_state'] == pskb::STATE_PASSED) {
     $g_help_id = 217;
 }
 $is_filled = explode(',', preg_replace('/[}{]/', '', $sbr->user_reqvs['is_filled']));
 $isReqvsFilled[sbr::FT_PHYS] = $is_filled[sbr::FT_PHYS - 1] == 't';
 $isReqvsFilled[sbr::FT_JURI] = $is_filled[sbr::FT_JURI - 1] == 't';
 $attachedfiles = new attachedfiles($_POST['attachedfiles_session']);
 $comment_files = array();
 $feedback_sent = isset($_SESSION["thnx_block{$stage_id}"]);
 if ($feedback_sent) {
     unset($_SESSION["thnx_block{$stage_id}"]);
 }
 if ($action == 'frl_refund') {
     if ($stage->refund()) {
         sbr_notification::setNotificationCompleted(array('sbr_stages.FRL_PAID', 'sbr_stages.DOC_RECEIVED', 'sbr_stages.FRL_FEEDBACK'), $stage->data['sbr_id'], $stage->data['id']);
         header_location_exit("/" . sbr::NEW_TEMPLATE_SBR . "/?site=Stage&id={$stage->data['id']}");
     }
 }
 if ($action == 'agree_stage') {
     $ok = __paramInit('bool', NULL, 'ok');
     $version = __paramInit('int', NULL, 'version');
     $sbr_version = __paramInit('int', NULL, 'sbr_version');
     if ($ok) {
         if ($stage->agreeChanges($version, $sbr_version)) {
             header_location_exit("/" . sbr::NEW_TEMPLATE_SBR . "/?site=Stage&id={$stage->data['id']}");
         }
     } else {
         $reason = __paramInit('string', null, 'frl_refuse_reason');
         //stripslashes($_POST['frl_refuse_reason']); // !!!
         $reason = substr(pg_escape_string($reason), 0, 512);
Пример #4
0
 }
 if ($stage->sbr->status == sbr::STATUS_CLOSED && action != 'msg-add') {
     $action = '';
 }
 $is_filled = explode(',', preg_replace('/[}{]/', '', $sbr->user_reqvs['is_filled']));
 $isReqvsFilled[sbr::FT_PHYS] = $is_filled[sbr::FT_PHYS - 1] == 't';
 $isReqvsFilled[sbr::FT_JURI] = $is_filled[sbr::FT_JURI - 1] == 't';
 $attachedfiles = new attachedfiles($_POST['attachedfiles_session']);
 $comment_files = array();
 $feedback_sent = isset($_SESSION["thnx_block{$stage_id}"]);
 if ($feedback_sent) {
     unset($_SESSION["thnx_block{$stage_id}"]);
 }
 if ($action == 'emp_refund') {
     if ($stage->refund('sbr_stages.EMP_MONEY_REFUNDED', 2)) {
         sbr_notification::setNotificationCompleted(array('sbr_stages.EMP_PAID'), $stage->data['sbr_id'], $stage->data['id']);
         header_location_exit('/' . sbr::NEW_TEMPLATE_SBR . "/?site=Stage&id={$stage->data['id']}");
     }
 }
 if ($action == 'resolve_changes') {
     $resend = __paramInit('bool', NULL, 'resend');
     $cancel = __paramInit('bool', NULL, 'cancel');
     $version = __paramInit('int', NULL, 'version');
     if ($resend) {
         if ($stage->resendChanges()) {
             // !!!
             header_location_exit('/' . sbr::NEW_TEMPLATE_SBR . "/?site=Stage&id={$stage->data['id']}");
         }
     } else {
         if ($cancel) {
             if ($stage->cancelChanges()) {