本文整理汇总了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');
}
}
}
示例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');
}
}
}