本文整理匯總了PHP中float::mod_amount方法的典型用法代碼示例。如果您正苦於以下問題:PHP float::mod_amount方法的具體用法?PHP float::mod_amount怎麽用?PHP float::mod_amount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類float
的用法示例。
在下文中一共展示了float::mod_amount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _calculate_taxes
/**
* calculate taxes
* @access private
* @return array
*/
private function _calculate_taxes()
{
$tax_totals = array();
foreach ($this->_taxes as $taxes) {
foreach ($taxes as $tax) {
if ($tax instanceof EE_Price) {
// create ticket price object from tax data
$tax_object = new EE_Price_Composite($tax, $this->PRC_MDL()->get_one_by_ID($tax->type()));
$this->_grand_total = new EE_Ticket_Price_Modifier($this->_grand_total, $tax_object);
// template args
$this->_calculated_taxes[$tax->ID()] = array('name' => $tax->name(), 'percent' => $tax->amount(), 'amount' => $this->_grand_total->mod_amount());
$tax_totals[$tax->ID()] = $this->_grand_total->mod_amount();
}
}
}
// add tax data to session
EE_Registry::instance()->SSN->set_session_data(array('taxes' => $this->_calculated_taxes, 'tax_totals' => $tax_totals, 'grand_total_price_object' => $this->_grand_total, '_cart_grand_total_amount' => $this->_grand_total->price()));
}