Пример #1
0
 /**
  * Function to get the value of the entity 
  * @param integer $value
  * @return string $retval
  */
 public static function get_value($value)
 {
     $retval = '';
     if ((int) $value > 0) {
         $object = new SalesOrder();
         $retrun_fields = $object->popup_selection_return_field;
         $retrun_field_list = explode(",", $retrun_fields);
         $object->query("select " . $retrun_fields . " from sales_order where idsales_order = ?", array($value));
         if ($object->getNumRows() > 0) {
             $object->next();
             $cnt_return_fields = 0;
             foreach ($retrun_field_list as $retrun_fields) {
                 if ($cnt_return_fields > 0) {
                     $retval .= ' ';
                 }
                 $retval .= $object->{$retrun_fields};
                 $cnt_return_fields++;
             }
         }
     }
     return $retval;
 }