
Originally Posted by
vkd1980
is there an bug/duplication of function
@DivaVocals
Please find the two functions in same name ,Pls revert they can cause this error? 
function in super_orders_functions.php
PHP Code:
/////////////////
// Function : update_status
// Arguments : oID, new_status, notified(optional), comments(optional)
// Return : none
// Description : Adds a new status entry to an order
/////////////////
function update_status($oID, $new_status, $notified = 0, $comments = '') {
global $db;
if($notified== -1){
$cust_notified = -1;
}
elseif ($notified==1)
$cust_notified = 1;
else
$cust_notified = 0;
$db->Execute("INSERT INTO " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES ('" . (int)$oID . "',
'" . $new_status . "',
now(),
'" . $cust_notified . "',
'" . $comments . "')");
$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "', last_modified = now()
WHERE orders_id = '" . (int)$oID . "'");
}
function in purchaseorder.php
PHP Code:
// class methods
function update_status() {
global $order, $db;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PURCHASE_ORDER_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PURCHASE_ORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$this->enabled = false;
}
}
}
Bookmarks