$institution = array_key_exists('institution', $_POST) ? $_POST['institution'] : 0; $international = array_key_exists('international', $_POST) ? $_POST['international'] : 0; $accountNum = array_key_exists('mailaccnum', $_POST) ? $_POST['mailaccnum'] : 0; $searchTerm = array_key_exists('searchterm', $_POST) ? $_POST['searchterm'] : ''; $displayAll = array_key_exists('displayall', $_POST) ? $_POST['displayall'] : 0; $formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : ''; $export = false; $exportEngine = ''; $exportExtension = ''; if ($printMode == 'doc') { $export = true; $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();