本文整理匯總了PHP中Sections::createPettyCashFolder方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sections::createPettyCashFolder方法的具體用法?PHP Sections::createPettyCashFolder怎麽用?PHP Sections::createPettyCashFolder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sections
的用法示例。
在下文中一共展示了Sections::createPettyCashFolder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addDocumentToFolder
//.........這裏部分代碼省略.........
$libDoc->Subsection_ID = $subsectionId;
$libDoc->Access_Type = Storages::HAS_ACCESS;
$libDoc->Sort_Numb = 0;
if ($libDoc->validate()) {
$libDoc->save();
}
}
}
} elseif ($document->Document_Type == Documents::PO) {
$po = Pos::model()->findByAttributes(array(
'Document_ID' => $docId,
));
$year = substr($po->PO_Date, 0, 4);
$subsectionId = Sections::createVendorFolder($document->Project_ID, $po->Vendor_ID, $year);
if ($po->PO_Backup_Document_ID != 0) {
$bu = LibraryDocs::model()->findByAttributes(array(
'Document_ID' => $po->PO_Backup_Document_ID,
'Subsection_ID' => $subsectionId,
));
if (!$bu) {
$libDoc = new LibraryDocs();
$libDoc->Document_ID = $po->PO_Backup_Document_ID;
$libDoc->Subsection_ID = $subsectionId;
$libDoc->Access_Type = Storages::HAS_ACCESS;
$libDoc->Sort_Numb = 0;
if ($libDoc->validate()) {
$libDoc->save();
}
}
}
} elseif ($document->Document_Type == Documents::BU) {
//get po or ap date
$ap = Aps::model()->findByAttributes(array(
'AP_Backup_Document_ID' => $docId,
));
if ($ap) {
$year = substr($ap->Invoice_Date, 0, 4);
} else {
$po = Pos::model()->findByAttributes(array(
'PO_Backup_Document_ID' => $docId,
));
if ($po) {
$year = substr($po->PO_Date, 0, 4);
}
}
$subsectionId = Sections::createVendorFolder($document->Project_ID, $vendorID, $year);
} elseif ($document->Document_Type == Documents::PR) {
$payroll = Payrolls::model()->findByAttributes(array(
'Document_ID' => $document->Document_ID,
));
$year = substr($payroll->Week_Ending, 0, 4);
$subsectionId = Sections::createPayrollFolder($document->Project_ID, $year, $payroll->Week_Ending);
} elseif ($document->Document_Type == Documents::JE) {
$je = Journals::model()->findByAttributes(array(
'Document_ID' => $document->Document_ID,
));
$subsectionId = Sections::createJournalEntryFolder($document->Project_ID, $je->JE_Date);
} elseif ($document->Document_Type == Documents::PC) {
$pc = Pcs::model()->findByAttributes(array(
'Document_ID' => $document->Document_ID,
));
$year = substr($pc->Envelope_Date, 0, 4);
$subsectionId = Sections::createPettyCashFolder($document->Project_ID, $year, $pc->Employee_Name);
} elseif ($document->Document_Type == Documents::AR) {
$ar = Ars::model()->findByAttributes(array(
'Document_ID' => $document->Document_ID,
));
$year = substr($ar->Invoice_Date, 0, 4);
$subsectionId = Sections::createAccountsReceivableFolder($document->Project_ID, $year, $ar->Invoice_Date);
}
$libDoc = LibraryDocs::model()->findByAttributes(array(
'Document_ID' => $docId,
'Subsection_ID' => $subsectionId,
));
if (!$libDoc) {
$libDoc = new LibraryDocs();
$libDoc->Document_ID = $docId;
$libDoc->Subsection_ID = $subsectionId;
$libDoc->Access_Type = Storages::HAS_ACCESS;
$libDoc->Sort_Numb = 0;
if ($libDoc->validate()) {
$libDoc->save();
}
}
LibraryDocs::sortDocumentsInSubsection($subsectionId);
}
}