當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contrat::active_line方法代碼示例

本文整理匯總了PHP中Contrat::active_line方法的典型用法代碼示例。如果您正苦於以下問題:PHP Contrat::active_line方法的具體用法?PHP Contrat::active_line怎麽用?PHP Contrat::active_line使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Contrat的用法示例。


在下文中一共展示了Contrat::active_line方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ExtraFields

// fetch optionals attributes lines and labels
$extrafieldsline = new ExtraFields($db);
$extralabelslines = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$permissionnote = $user->rights->contrat->creer;
// Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->contrat->creer;
// Used by the include of actions_dellink.inc.php
/*
 * Actions
 */
include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php';
// Must be include, not includ_once
include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
// Must be include, not include_once
if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) {
    $result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment'));
    if ($result > 0) {
        header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
        exit;
    } else {
        setEventMessage($object->error, 'errors');
    }
} else {
    if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) {
        if (!GETPOST('dateend')) {
            $error++;
            setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), 'errors');
        }
        if (!$error) {
            $result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment')));
            if ($result > 0) {
開發者ID:TAASA,項目名稱:Dolibarr-ERP-3.8.1,代碼行數:31,代碼來源:card.php

示例2: Contrat

if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'contrat',$contratid,'contrat');

$usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE;

$object = new Contrat($db);


/*
 * Actions
 */

if ($action == 'confirm_active' && $_REQUEST["confirm"] == 'yes' && $user->rights->contrat->activer)
{
    $object->fetch($_GET["id"]);
    $result = $object->active_line($user, $_GET["ligne"], $_GET["date"], $_GET["dateend"], $_GET["comment"]);

    if ($result > 0)
    {
        Header("Location: fiche.php?id=".$object->id);
        exit;
    }
    else {
        $mesg=$object->error;
    }
}

if ($action == 'confirm_closeline' && $_REQUEST["confirm"] == 'yes' && $user->rights->contrat->activer)
{
    $object->fetch($_GET["id"]);
    $result = $object->close_line($user, $_GET["ligne"], $_GET["dateend"], urldecode($_GET["comment"]));
開發者ID:remyyounes,項目名稱:dolibarr,代碼行數:31,代碼來源:fiche.php


注:本文中的Contrat::active_line方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。