本文整理汇总了PHP中MiscLib::rePoll方法的典型用法代码示例。如果您正苦于以下问题:PHP MiscLib::rePoll方法的具体用法?PHP MiscLib::rePoll怎么用?PHP MiscLib::rePoll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MiscLib
的用法示例。
在下文中一共展示了MiscLib::rePoll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: amount
/**
Get the standard footer with total and
amount(s) saved
@param $readOnly don't update any session info
This would be set when rendering a separate,
different customer display
@return A string of HTML
*/
public static function printfooter($readOnly = False)
{
$FOOTER_MODULES = CoreLocal::get("FooterModules");
// use defaults if modules haven't been configured
// properly
if (!is_array($FOOTER_MODULES) || count($FOOTER_MODULES) != 5) {
$FOOTER_MODULES = array('SavedOrCouldHave', 'TransPercentDiscount', 'MemSales', 'EveryoneSales', 'MultiTotal');
}
$modchain = array_map(function ($class) {
return new $class();
}, $FOOTER_MODULES);
if (!$readOnly) {
CoreLocal::set("runningTotal", CoreLocal::get("amtdue"));
}
if (CoreLocal::get("End") == 1 && !$readOnly) {
CoreLocal::set("runningTotal", -1 * CoreLocal::get("change"));
}
if (CoreLocal::get("scale") == 1) {
$weight = number_format(CoreLocal::get("weight"), 2) . "lb.";
} else {
$weight = "_ _ _ _";
}
$ret = "<table>";
$ret .= "<tr class=\"heading\">";
$classes = array('first', 'reg', 'reg', 'reg', 'total');
for ($i = 0; $i < count($modchain); $i++) {
$label = $modchain[$i]->header_content();
$ret .= sprintf('<td class="%s %s" style="%s">%s</td>', $classes[$i], $modchain[$i]->header_css_class, $modchain[$i]->header_css, $label);
}
$ret .= "</tr>";
$special = CoreLocal::get("memSpecial") + CoreLocal::get("staffSpecial");
$dbldiscounttotal = 0.0;
if (is_numeric(CoreLocal::get('discounttotal'))) {
$dbldiscounttotal = number_format(CoreLocal::get("discounttotal"), 2);
}
if (CoreLocal::get("isMember") == 1) {
$dblyousaved = number_format(CoreLocal::get("transDiscount") + $dbldiscounttotal + $special, 2);
if (!$readOnly) {
CoreLocal::set("yousaved", $dblyousaved);
CoreLocal::set("couldhavesaved", 0);
CoreLocal::set("specials", number_format($dbldiscounttotal + $special, 2));
}
} else {
$dblyousaved = 0.0;
if (is_numeric(CoreLocal::get('memSpecial'))) {
$dblyousaved = number_format(CoreLocal::get("memSpecial"), 2);
}
if (!$readOnly) {
CoreLocal::set("yousaved", $dbldiscounttotal + CoreLocal::get("staffSpecial"));
CoreLocal::set("couldhavesaved", $dblyousaved);
CoreLocal::set("specials", $dbldiscounttotal + CoreLocal::get("staffSpecial"));
}
}
if (!$readOnly) {
if (CoreLocal::get("End") == 1) {
MiscLib::rePoll();
}
if (CoreLocal::get("scale") == 0 && CoreLocal::get("SNR") != 0) {
MiscLib::rePoll();
}
}
$ret .= "<tr class=\"values\">";
for ($i = 0; $i < count($modchain); $i++) {
$box = $modchain[$i]->display_content();
$ret .= sprintf('<td class="%s %s" style="%s">%s</td>', $classes[$i], $modchain[$i]->display_css_class, $modchain[$i]->display_css, $box);
}
$ret .= "</tr>";
$ret .= "</table>";
return $ret;
}