예제 #1
0
    $exportEngine = 'Word2007';
    $exportExtension = 'docx';
}
if ($collId) {
    $loanManager->setCollId($collId);
}
$identifier = 0;
if ($loanId) {
    $identifier = $loanId;
} elseif ($exchangeId) {
    $identifier = $exchangeId;
}
if ($institution) {
    $invoiceArr = $loanManager->getToAddress($institution);
} else {
    $invoiceArr = $loanManager->getInvoiceInfo($identifier, $loanType);
}
$addressArr = $loanManager->getFromAddress($collId);
if ($export) {
    $phpWord = new \PhpOffice\PhpWord\PhpWord();
    $phpWord->addParagraphStyle('acctnum', array('align' => 'left', 'indent' => 5.5, 'lineHeight' => 1.0, 'spaceAfter' => 0, 'keepNext' => true, 'keepLines' => true));
    $phpWord->addFontStyle('acctnumFont', array('size' => 8, 'name' => 'Arial'));
    $phpWord->addParagraphStyle('toAddress', array('align' => 'left', 'indent' => 6, 'lineHeight' => 1.0, 'spaceAfter' => 0, 'keepNext' => true, 'keepLines' => true));
    $phpWord->addFontStyle('toAddressFont', array('size' => 12, 'name' => 'Arial'));
    $section = $phpWord->addSection(array('pageSizeW' => 13662.992125984, 'pageSizeH' => 5952.755905512, 'marginLeft' => 360, 'marginRight' => 360, 'marginTop' => 360, 'marginBottom' => 360, 'headerHeight' => 0, 'footerHeight' => 0));
    $section->addTextBreak(5);
    if ($accountNum) {
        $section->addText(htmlspecialchars('Acct. #' . $accountNum), 'acctnumFont', 'acctnum');
    }
    $section->addTextBreak(1);
    $textrun = $section->addTextRun('toAddress');