本文整理汇总了PHP中sbr_meta::getReqvsStr方法的典型用法代码示例。如果您正苦于以下问题:PHP sbr_meta::getReqvsStr方法的具体用法?PHP sbr_meta::getReqvsStr怎么用?PHP sbr_meta::getReqvsStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sbr_meta
的用法示例。
在下文中一共展示了sbr_meta::getReqvsStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateFrlAppl
/**
* Генерирует Заявление о выплате в FM
*
* @param array $error вернет массив с ошибками.
* @return CFile загруженный документ.
*/
function generateFrlAppl(&$error)
{
require_once dirname(__FILE__) . '/fpdf/fpdf.php';
define('FPDF_FONTPATH', dirname(__FILE__) . '/fpdf/font/');
require_once dirname(__FILE__) . '/num_to_word.php';
$error = NULL;
$rq = $this->sbr->getFrlReqvs(true);
if (!$this->sbr->checkUserReqvs($this->sbr->frl_reqvs)) {
$error['frl'] = 'Для формирования заявления о выплате в FM<br/> необходимо заполнить реквизиты на странице "Финансы"';
}
$params = array();
$params['$date_statement'] = date("d {$GLOBALS['MONTHA'][date('n')]} Y");
$params['$fio'] = $this->getFioFromReqvs($rq);
$rq = $rq[1];
foreach ($rq as $k => $v) {
$params["\$" . $k] = $v;
}
$payout_sum = $this->getPayoutSum(sbr::FRL, exrates::BANK);
$reserved_tm = strtotime($this->sbr->reserved_time);
$params['$sbr_summ'] = sbr_meta::view_cost($payout_sum, NULL, false, ',', ' ');
$params['$sbr_summ_str'] = num2strEx($payout_sum);
$params['$sbr_num'] = $this->sbr->getContractNum();
$params['$ssnum'] = $this->getOuterNum4Docs();
$params['$sbr_date'] = date('d ' . $GLOBALS['MONTHA'][date('n', $reserved_tm)] . ' Y г.', $reserved_tm);
$account = new account();
$account->GetInfo($this->sbr->uid);
$params['$fmid'] = $account->id;
$params['$nds_rate'] = '18%';
$params['$nds_sum'] = sbr_meta::view_cost(18 * $payout_sum / 118, NULL, false, ',', ' ');
$params['$nds_str'] = num2strEx(18 * $payout_sum / 118);
$tpl_name = 'fm_appl_fiz.xml';
if ($this->sbr->frl_reqvs['form_type'] == sbr::FT_JURI) {
$tpl_name = 'fm_appl_jur.xml';
$rq = $this->sbr->frl_reqvs[sbr::FT_JURI];
$params['$org_name'] = $rq['full_name'];
$params['$reqvs'] = sbr_meta::getReqvsStr($this->sbr->frl_reqvs, $params['$bossname']);
} else {
$params['$idcard_name'] = $rq['idcard_name'];
$params['$idcard'] = $rq['idcard'];
$params['$idcard_by'] = $rq['idcard_from'] . ' ' . $rq['idcard_by'];
}
$pdf = sbr::xml2pdf($_SERVER['DOCUMENT_ROOT'] . "/norisk2/xml/{$tpl_name}", $params);
if (!($file = $this->sbr->_saveDocFile($pdf->Output(NULL, 'S')))) {
$error['fatal'] = "Ошибка при формировании заявления о выплате в FM";
}
return $file;
}