{
global $Refs;
- begin_transaction();
+ begin_transaction(__FUNCTION__, func_get_args());
$args = func_get_args();
$args = (object)array_combine(array('wo_ref', 'loc_code', 'units_reqd', 'stock_id',
'type', 'date_', 'required_by', 'memo_', 'costs', 'cr_acc', 'labour', 'cr_lab_acc'), $args);
function update_work_order($woid, $loc_code, $units_reqd, $stock_id,
$date_, $required_by, $memo_)
{
- begin_transaction();
+ begin_transaction(__FUNCTION__, func_get_args());
$args = func_get_args();
$args = (object)array_combine(array('woid', 'loc_code', 'units_reqd', 'stock_id',
'date_', 'required_by', 'memo_'), $args);
function delete_work_order($woid, $stock_id, $qty, $date)
{
- begin_transaction();
+ begin_transaction(__FUNCTION__, func_get_args());
hook_db_prevoid(ST_WORKORDER, $woid);
// delete the work order requirements
function release_work_order($woid, $releaseDate, $memo_)
{
- begin_transaction();
+ begin_transaction(__FUNCTION__, func_get_args());
$myrow = get_work_order($woid);
$stock_id = $myrow["stock_id"];
*/
function void_work_order($woid)
{
- begin_transaction();
+ begin_transaction(__FUNCTION__, func_get_args());
hook_db_prevoid(ST_WORKORDER, $woid);
$work_order = get_work_order($woid);
void_wo_requirements($woid);
// close workorder
- // FIXME: due to bug in 2.4 db scheme (conflicting wo_ref unique key) we have to fix wo_ref here:
- $sql = "UPDATE ".TB_PREF."workorders SET closed=1,units_reqd=0,units_issued=0, wo_ref=CONCAT(wo_ref, ' ', '".uniqid()."') WHERE id = "
+ $sql = "UPDATE ".TB_PREF."workorders SET closed=1,units_reqd=0,units_issued=0 WHERE id = "
.db_escape($woid);
db_query($sql, "The work order couldn't be voided");