//
// Exchange rate currency $curr as on date $date.
// Keep in mind FA has internally implemented 3 exrate providers
//
// Exchange rate currency $curr as on date $date.
// Keep in mind FA has internally implemented 3 exrate providers
* more than one in the cart.
*/
/* Default behavior check if there is enough quantity on hand and change the css
* more than one in the cart.
*/
/* Default behavior check if there is enough quantity on hand and change the css
static function default_get_dispatchable_quantity($line_item, $location, $date, $qoh) {
static function default_get_dispatchable_quantity($line_item, $location, $date, $qoh) {
if ($SysPrefs->allow_negative_stock() || ($line_item->qty_dispatched <= $qoh)) {
return true;
}
return array($qoh, 'stockmankobg');
if ($SysPrefs->allow_negative_stock() || ($line_item->qty_dispatched <= $qoh)) {
return true;
}
return array($qoh, 'stockmankobg');
if (file_exists($path_to_root . "/lang/" . $lang_code . "/locale.inc"))
{
include_once($path_to_root . "/lang/" . $lang_code . "/locale.inc");
if (file_exists($path_to_root . "/lang/" . $lang_code . "/locale.inc"))
{
include_once($path_to_root . "/lang/" . $lang_code . "/locale.inc");
unset($code, $hook_class);
}
// install hooks provided by active extensions
unset($code, $hook_class);
}
// install hooks provided by active extensions
$hook_class = 'hooks_'.$ext['package'];
if ($ext['active'] && class_exists($hook_class)) {
$Hooks[$ext['package']] = new $hook_class;
$hook_class = 'hooks_'.$ext['package'];
if ($ext['active'] && class_exists($hook_class)) {
$Hooks[$ext['package']] = new $hook_class;
{
foreach($Hooks as $ext => $hook)
if (method_exists($hook, $method)) {
{
foreach($Hooks as $ext => $hook)
if (method_exists($hook, $method)) {
$result = $hook->$method($data, $opts);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
$result = $hook->$method($data, $opts);
if (isset($result) && is_array($result)) {
$return = array_merge_recursive($return, $result);
$result = null;
foreach($Hooks as $ext => $hook) {
if (method_exists($hook, $method)) {
$result = null;
foreach($Hooks as $ext => $hook) {
if (method_exists($hook, $method)) {
$Reverse = array_reverse($Hooks);
foreach($Reverse as $ext => $hook) {
if (method_exists($hook, $method)) {
$Reverse = array_reverse($Hooks);
foreach($Reverse as $ext => $hook) {
if (method_exists($hook, $method)) {