Beispiel #1
0
 public static function PrepareInvoiceClientInfoFormat($personTypeID)
 {
     $personTypeID = intval($personTypeID);
     if ($personTypeID <= 0) {
         return '';
     }
     if (!self::$INVOICE_PROPERTY_INFOS) {
         self::$INVOICE_PROPERTY_INFOS = CCrmInvoice::GetPropertiesInfo(0, true);
     }
     $propertyInfos = isset(self::$INVOICE_PROPERTY_INFOS[$personTypeID]) ? self::$INVOICE_PROPERTY_INFOS[$personTypeID] : null;
     if (!is_array($propertyInfos)) {
         return '';
     }
     $result = array();
     foreach ($propertyInfos as $code => &$fields) {
         $type = $fields['TYPE'];
         if ($type !== 'TEXT' && $type !== 'TEXTAREA') {
             continue;
         }
         $result[] = $code;
     }
     unset($fields);
     return implode(',', $result);
 }