Files
crm.e5.pl/modules/EcmProducts/updatecr.php

7 lines
288 B
PHP
Raw Permalink Normal View History

2024-04-27 09:23:34 +02: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);
}
?>