products hotfix
This commit is contained in:
@@ -624,6 +624,25 @@ class EcmProduct extends SugarBean
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
function getProductUsingComponent()
|
||||||
|
{
|
||||||
|
$db = $GLOBALS['db'];
|
||||||
|
$res = $db->query("
|
||||||
|
SELECT p.code, pc.quantity
|
||||||
|
FROM ecmproductcomponents AS pc
|
||||||
|
INNER JOIN ecmproducts AS p
|
||||||
|
ON p.id = pc.ecmproduct_id
|
||||||
|
WHERE ecmcomponent_id='$this->id';
|
||||||
|
");
|
||||||
|
$products = array();
|
||||||
|
while ($row = $db->fetchByAssoc($res)) {
|
||||||
|
$products[] = array(
|
||||||
|
'code' => $row['code'],
|
||||||
|
'quantity' => $row['quantity'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return $products;
|
||||||
|
}
|
||||||
//***************************Start Managing Positions*************************//
|
//***************************Start Managing Positions*************************//
|
||||||
function constructInsertQuery($data, $table = '')
|
function constructInsertQuery($data, $table = '')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user