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


PHP Documents::pdfGeneration方法代碼示例

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


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

示例1: HardApApprove

    /**
     * Approve AP
     * @param $docId
     * @param $userApprovalRange
     */
    public static function HardApApprove($docId, $userApprovalRange)
    {
        //check document
        $document = Documents::model()->with('client')->findByAttributes(array(
            'Client_ID' => Yii::app()->user->clientID,
            'Document_ID' => $docId,
        ));

        if ($document) {
            //get AP
            $ap = Aps::model()->with('ck_req_detail')->findByAttributes(array(
                'Document_ID' => $docId,
            ));

            if ($ap) {
                if ($ap->AP_Approval_Value < $userApprovalRange['user_appr_val']) {
                    // set AP_Approval_Value and save
                    $ap->Previous_AP_A_Val = $ap->AP_Approval_Value;
                    $ap->AP_Approval_Value = $userApprovalRange['user_appr_val'];

                    if ($userApprovalRange['user_appr_val'] == self::APPROVED) {
                        $ap->Approved = 1;
                        LibraryDocs::addDocumentToFolder($ap->Document_ID);
                    }

                    $ap->save();
                    Audits::LogAction($docId,Audits::ACTION_APPROVAL);

                    // regenerate pdf
                    if ($document->Origin == 'G') {
                        //Aps::generatePdfFpdf($ap->AP_ID, ($userApprovalRange['user_appr_val'] == Aps::APPROVED));
                        Documents::pdfGeneration($ap->Document_ID,'AP',($userApprovalRange['user_appr_val'] == Aps::APPROVED));
                        Audits::LogAction($ap->Document_ID,Audits::ACTION_REPDF);
                    }



                }

                // find and unset doc from session
                Helper::removeDocumentFromViewSession($docId, 'ap_to_review');
                Helper::removeDocumentFromViewSession($docId, 'ap_hard_approve');
            }
        }
    }
開發者ID:ranvijayj,項目名稱:htmlasa,代碼行數:50,代碼來源:Aps.php

示例2: HardPOApprove

    /**
     * Approve PO jumping over the queue
     * @param $docId
     * @param $userApprovalRange
     */
    public static function HardPOApprove($docId, $userApprovalRange)
    {
        //check document
        $document = Documents::model()->with('client')->findByAttributes(array(
            'Client_ID' => Yii::app()->user->clientID,
            'Document_ID' => $docId,
        ));

        if ($document) {
            //get AP
            $po = Pos::model()->with('dists', 'document')->findByAttributes(array(
                'Document_ID' => $docId,
            ));

            if ($po) {
                if ($po->PO_Approval_Value < $userApprovalRange['user_appr_val']) {
                    // set PO_Approval_Value and save
                    $po->PO_Previous_PO_Val = $po->PO_Approval_Value;
                    $po->PO_Approval_Value = $userApprovalRange['user_appr_val'];

                    if ($userApprovalRange['user_appr_val'] == Pos::APPROVED) {
                        $po->PO_Approved = 1;

                        LibraryDocs::addDocumentToFolder($po->Document_ID);
                        LibraryDocs::addDocumentToBinder($po->Document_ID);
                    }

                    $po->save();

                    Audits::LogAction($docId,Audits::ACTION_APPROVAL);

                    // regenerate pdf
                    if ($document->Origin == 'G') {
                        Documents::pdfGeneration($po->Document_ID,'PO',($userApprovalRange['user_appr_val'] == Pos::APPROVED));
                        Audits::LogAction($po->Document_ID,Audits::ACTION_REPDF);
                    }

                    if ($userApprovalRange['user_appr_val'] == Pos::APPROVED) {
                        $po->updateCoaCurrentBudget();
                    }
                }

                // find and unset doc from session
                Helper::removeDocumentFromViewSession($docId, 'po_to_review');
                Helper::removeDocumentFromViewSession($docId, 'po_hard_approve');
            }
        }
    }
開發者ID:ranvijayj,項目名稱:htmlasa,代碼行數:53,代碼來源:Pos.php


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