return $this->update_databases($company, $updates, $check_only);
}
+
+ function get_allowed_quantity($detail_id, $opts) {
+ $location = array_shift($opts);
+ $date = array_shift($opts);
+ $qoh = array_shift($opts);
+
+ $sql = "select quantity_before from ".TB_PREF."denorm_order_details_queue where id = $detail_id";
+ $result = db_query($sql);
+ $quantity_before = 0;
+ if($row=db_fetch($result)) {
+ $quantity_before = $row['quantity_before'];
+ }
+
+ return max($qoh - $quantity_before, 0);
+ }
}
?>