query($sql_s);
$s_w=$db->fetchByAssoc($s);
$total=round($s_w['quantity']*0.6,2);
$documents[]=$s_w['ecmstockdocinsideout_id'];
$sql2="update ecmstockdocinsideoutitems set price=0.60, total='".$total."' where id = '".$id."'";
echo $sql1."
;".$sql2.';
';
$db->query($sql1);
$db->query($sql2);
}
$documents = array_unique($documents);
foreach($documents as $doc){
$query="update ecmstockdocinsideouts set total=(select sum(quantity*price) from
ecmstockdocinsideoutitems where ecmstockdocinsideout_id ='".$doc."') where id='".$doc."'";
$db->query($query);
}
*/
?>