modxcms/xpdo — pull request #25 by Fi1osof (2013-11-28 02:21:39+00:00)
Title: Round decimal

If datatype float or double, on xPDOQuery->set(array $fields), we got rounded value.

https://github.com/modxcms/xpdo/blob/d4bd6d617b8b755fe7c4784c12ba3e2c1be2a4a6/xpdo/om/xpdoquery.class.php#L236

For example (shopModx Extra required):

print '

';
$q = $this->modx->newQuery('ShopmodxProduct');
$q->command('update');
$q->set(array(
'sm_price' => 154.99,
));

if($q->prepare()){
print $q->toSQL();
}