Files
crm.twinpol.com/modules/EcmProductB2Bs/updatecr.php

7 lines
288 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00:00
<?
$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);
}
?>