Files
crm.twinpol.com/modules/EcmProducts/updatecr.php
2025-05-12 15:44:39 +00:00

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);
}
?>