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

7 lines
380 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00:00
<?
$w=$GLOBALS['db']->query("select id,vat_value from ecmproducts");
while($r=$GLOBALS['db']->fetchByAssoc($w)){
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmvats where value='".$r['vat_value']."' and deleted='0'"));
$GLOBALS['db']->query("update ecmproducts set vat_name='".$rr['name']."',vat_id='".$rr['id']."' where id='".$r['id']."'");
}
?>