allow ZS edit for everyone
This commit is contained in:
@@ -53,8 +53,24 @@ if ($_GET['ajax']) {
|
|||||||
SELECT a.ecmproduct_id, p.name, p.code, p.ems_qty_in_stock AS stock_state, a.is_not_full FROM ecmproducts_stock_addresses AS a
|
SELECT a.ecmproduct_id, p.name, p.code, p.ems_qty_in_stock AS stock_state, a.is_not_full FROM ecmproducts_stock_addresses AS a
|
||||||
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
||||||
WHERE stock_address='$address';"));
|
WHERE stock_address='$address';"));
|
||||||
|
if ($product) {
|
||||||
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='" . $product['ecmproduct_id'] . "'"));
|
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='" . $product['ecmproduct_id'] . "'"));
|
||||||
$product['stock_state'] = $state['qty'];
|
$product['stock_state'] = $state['qty'];
|
||||||
|
}
|
||||||
|
$smarty->assign("PROCESS", "ADDRESS");
|
||||||
|
$smarty->assign("PRODUCT", $product);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen($_GET['searchType']) > 0 && $_GET['searchType'] == 'address') {
|
||||||
|
$address = $_GET['address'];
|
||||||
|
$product = $db->fetchByAssoc($db->query("
|
||||||
|
SELECT a.ecmproduct_id, p.name, p.code, p.ems_qty_in_stock AS stock_state, a.is_not_full FROM ecmproducts_stock_addresses AS a
|
||||||
|
INNER JOIN ecmproducts as p ON p.id=a.ecmproduct_id
|
||||||
|
WHERE stock_address='$address';"));
|
||||||
|
if ($product) {
|
||||||
|
$state = $db->fetchByAssoc($db->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='" . $product['ecmproduct_id'] . "'"));
|
||||||
|
$product['stock_state'] = $state['qty'];
|
||||||
|
}
|
||||||
$smarty->assign("PROCESS", "ADDRESS");
|
$smarty->assign("PROCESS", "ADDRESS");
|
||||||
$smarty->assign("PRODUCT", $product);
|
$smarty->assign("PRODUCT", $product);
|
||||||
}
|
}
|
||||||
@@ -167,7 +183,8 @@ ORDER BY s.stock_address;");
|
|||||||
}
|
}
|
||||||
|
|
||||||
$headers = [
|
$headers = [
|
||||||
'Indeks', 'Adres'
|
'Indeks',
|
||||||
|
'Adres'
|
||||||
];
|
];
|
||||||
|
|
||||||
$sheetData = array_merge([$headers], $result);
|
$sheetData = array_merge([$headers], $result);
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ if (
|
|||||||
$r = $db->fetchByAssoc ( $rows );
|
$r = $db->fetchByAssoc ( $rows );
|
||||||
if($r['id']!='')$can_edit=false;
|
if($r['id']!='')$can_edit=false;
|
||||||
|
|
||||||
$edit->ss->assign("CAN_EDIT", $can_edit);
|
$edit->ss->assign("CAN_EDIT", true);
|
||||||
|
|
||||||
$edit->ss->assign("CREATED_BY_NAME", $focus->created_by_name);
|
$edit->ss->assign("CREATED_BY_NAME", $focus->created_by_name);
|
||||||
$edit->ss->assign("MODIFIED_BY_NAME", $focus->modified_by_name);
|
$edit->ss->assign("MODIFIED_BY_NAME", $focus->modified_by_name);
|
||||||
|
|||||||
@@ -864,7 +864,7 @@ class EcmSale extends SugarBean
|
|||||||
$where = " and " . implode(" and ", $field_array);
|
$where = " and " . implode(" and ", $field_array);
|
||||||
else
|
else
|
||||||
$where = "";
|
$where = "";
|
||||||
$z = "select * from ecmsales where deleted='0' and status!='s10' " . $where . " ORDER BY send_date DESC";
|
$z = "select * from ecmsales where deleted='0' and status!='s10' " . $where . " ORDER BY send_date";
|
||||||
return $z;
|
return $z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user