7 lines
288 B
PHP
Executable File
7 lines
288 B
PHP
Executable File
<?
|
|
$w=$GLOBALS['db']->query("select id from ecmproducts");
|
|
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
|
$sql = "update ecmproducts set commission_rate=(srp_price/(1+vat_value/100)-purchase_price)/(srp_price/(1-vat_value/100)); where id='".$r['id']."'";
|
|
$GLOBALS['db']->query($sql);
|
|
}
|
|
?>
|