BUG 14620 Error SQL QUERY in Dynaform designer SOLVED

This commit is contained in:
Julio Cesar Laura
2014-04-30 10:29:43 -04:00
parent 5a73572fbf
commit 485537f93e

View File

@@ -2081,6 +2081,18 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText
*/
public function render ($value = null, $owner = null)
{
if (($this->pmconnection != '') && ($this->pmfield != '') && $value == null) {
$value = $this->getPMTableValue( $owner );
} else {
$this->executeSQL( $owner );
if (isset( $this->sqlOption )) {
$firstElement = key( $this->sqlOption );
}
if (isset( $firstElement )) {
$value = $firstElement;
}
}
if ($this->renderMode == '') {
$this->renderMode = $this->mode;
}
@@ -2141,6 +2153,12 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText
}
foreach ($values as $v) {
$this->executeSQL( $owner, $r );
$firstElement = key( $this->sqlOption );
if (isset( $firstElement )) {
$v = $firstElement;
}
$html = '';
$currency = preg_replace( '/([_;#,.])/', '', $this->mask );
if (! $v) {