<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE ananas_configuration SYSTEM "ananas-cfg.dtd">
<ananas_configuration>
    <info>
        <name>С&amp;К</name>
        <lastid>1204</lastid>
        <author>Алексей Ваганов </author>
        <date>2008-08-23</date>
        <remark></remark>
    </info>
    <interface>
        <toolbars/>
        <mainmenu>
            <submenu id="122" name="Справочники" >
                <command id="413" name="Дилеры" >
                    <description id="414" />
                    <menutext id="415" />
                    <key id="416" />
                    <comaction>407</comaction>
                </command>
                <command id="1049" name="Подразделения контрагентов" >
                    <description id="1050" />
                    <menutext id="1051" >Подразделения дилера</menutext>
                    <key id="1052" />
                    <comaction>1043</comaction>
                </command>
                <command id="424" name="Сотрудники" >
                    <description id="425" />
                    <menutext id="426" />
                    <key id="427" />
                    <comaction>417</comaction>
                </command>
                <command id="553" name="Пользователи" >
                    <description id="554" />
                    <menutext id="555" />
                    <key id="556" />
                    <comaction>547</comaction>
                </command>
                <command id="1160" name="БД" >
                    <description id="1161" />
                    <menutext id="1162" >Базы данных</menutext>
                    <key id="1163" />
                    <comaction>1154</comaction>
                </command>
                <separator id="311" />
                <command id="204" name="Субъекты РФ" >
                    <description id="205" />
                    <menutext id="206" />
                    <key id="207" />
                    <comaction>192</comaction>
                </command>
                <command id="123" name="Населенные пункты" >
                    <description id="124" />
                    <menutext id="125" />
                    <key id="126" />
                    <comaction>116</comaction>
                </command>
                <separator id="282" />
                <command id="208" name="Клиенты" >
                    <description id="209" />
                    <menutext id="210" />
                    <key id="211" />
                    <comaction>198</comaction>
                </command>
                <command id="765" name="Свойства клиентов" >
                    <description id="766" />
                    <menutext id="767" >Свойства клиентов</menutext>
                    <key id="768" />
                    <comaction>759</comaction>
                </command>
                <separator id="283" />
                <command id="284" name="Группы товаров" >
                    <description id="285" />
                    <menutext id="286" />
                    <key id="287" />
                    <comaction>276</comaction>
                </command>
                <command id="312" name="Товары" >
                    <description id="313" />
                    <menutext id="314" />
                    <key id="315" />
                    <comaction>305</comaction>
                </command>
                <separator id="834" />
                <command id="835" name="КП" >
                    <description id="836" />
                    <menutext id="837" >Кредитные предложения</menutext>
                    <key id="838" />
                    <comaction>828</comaction>
                </command>
                <command id="855" name="Групповой ввод" >
                    <description id="856" />
                    <menutext id="857" >Доступные кредитные предложения</menutext>
                    <key id="858" />
                    <comaction>860</comaction>
                </command>
                <command id="945" name="Выходные параметры" >
                    <description id="946" />
                    <menutext id="947" >Выходные параметры</menutext>
                    <key id="948" />
                    <comaction>939</comaction>
                </command>
                <command id="935" name="функции" >
                    <description id="936" />
                    <menutext id="937" >Функции</menutext>
                    <key id="938" />
                    <comaction>929</comaction>
                </command>
                <separator id="979" />
                <command id="980" name="Банки" >
                    <description id="981" />
                    <menutext id="982" >Банки</menutext>
                    <key id="983" />
                    <comaction>973</comaction>
                </command>
                <command id="984" name="Подразделения банков" >
                    <description id="985" />
                    <menutext id="986" >Подразделения банков</menutext>
                    <key id="987" />
                    <comaction>967</comaction>
                </command>
            </submenu>
            <submenu id="369" name="Журналы" >
                <command id="370" name="Журнал заключенных договоров страхования" >
                    <description id="371" />
                    <menutext id="372" />
                    <key id="373" />
                    <comaction>363</comaction>
                </command>
            </submenu>
            <submenu id="1019" name="Отчеты" >
                <command id="1020" name="О работе" >
                    <description id="1021" />
                    <menutext id="1022" >О работе с программой</menutext>
                    <key id="1023" />
                    <comaction>1013</comaction>
                </command>
            </submenu>
            <submenu id="1136" name="Обработки" >
                <command id="1174" name="Редактирование списка объектов для обмена" >
                    <description id="1175" />
                    <menutext id="1176" />
                    <key id="1177" />
                    <comaction>1168</comaction>
                </command>
                <command id="1137" name="ТЕСТ выгрузка" >
                    <description id="1138" />
                    <menutext id="1139" />
                    <key id="1140" />
                    <comaction>1141</comaction>
                </command>
                <command id="1201" name="ТЕСТ загрузка" >
                    <description id="1202" />
                    <menutext id="1203" />
                    <key id="1204" />
                    <comaction>1195</comaction>
                </command>
            </submenu>
        </mainmenu>
        <popupmenus/>
    </interface>
    <metadata>
        <globals>
            <sourcecode id="212" >var hostname, OS;
var formData = new Array;
var gmOrg, gmDealer;
//для извращений
var AEXTEXAMPLE;
var workDir;
var sysTimerId, sysAction;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function on_systemstart()
{
//   var SubjectRF;
//knorr       
   if(Dir.drives.length) OS = &quot;UNIX&quot;;
   else OS = &quot;WINDOWS&quot;;
   AEXTEXAMPLE = new AExtExample;
   var service = new Service;
   workDir = service.GetRcValue(&quot;workdir&quot;);
      
   var frm = sys.OpenForm(&quot;Report.service.Form.update&quot;, 2, undefined, true);   
   if(exchange())
   {
       sysTimerId = startTimer(10, sysExit);
       return;
   }
   frm = sys.OpenForm(&quot;Report.service.Form.login&quot;, 2, undefined, true);
/*   
   var pixmap = new Pixmap(workDir+&quot;/knorr.jpg&quot;);
   Application.MainForm.setBackground(pixmap);
   Application.MainForm.showFullScreen();   
*/
//knorr   
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function sysExit()
{
    killTimer(sysTimerId);
    sys.Exit();
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function on_systemstop()
{
    if(AEXTEXAMPLE) delete AEXTEXAMPLE;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function exchange()
{
    var res = false;
    var importDir = workDir+&quot;/import/&quot;;
    var exportDir = workDir+&quot;/export/&quot;;
    var exportFlag = exportDir+&quot;.export&quot;;
    var importFlag = importDir+&quot;.import&quot;;
    if(File.exists(importFlag))
    {
	formData[&quot;import&quot;] = new Array();
	formData[&quot;import&quot;][&quot;importDir&quot;] = importDir;
	sys.OpenForm(&quot;Report.Обмен данными.Form.загрузка&quot;, 2, undefined, true);
	File.remove(importFlag);
	res = true;
    }
    if(File.exists(exportFlag))
    {
	formData[&quot;export&quot;] = new Array();
	formData[&quot;export&quot;][&quot;exportDir&quot;] = exportDir;
	sys.OpenForm(&quot;Report.Обмен данными.Form.выгрузка&quot;, 2, undefined, true);
	File.remove(exportFlag);
	res = true;
    }
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmUserStart()
{
    var users = new Catalogue(&quot;Пользователи&quot;);
    var pers = new Catalogue(&quot;Сотрудники&quot;);
    
    users.Select();
    users.FindById(sys.value(&quot;currentUser&quot;));    
    if(users.Value(&quot;только заявки&quot;)==1)
    {
	pers.Select();
	pers.FindById(users.Value(&quot;сотрудник&quot;));
	formData[&quot;orgs&quot;] = new Array;
	formData[&quot;dealer&quot;] = new Array;
	gmOrg = gmULLONGValue(pers, &quot;подразделение&quot;);
	gmDealer = gmULLONGValue(pers, &quot;дилер&quot;);
	formData[&quot;orgs&quot;][&quot;filter&quot;] = gmOrg;
	formData[&quot;dealer&quot;][&quot;filter&quot;] = gmDealer;
	Application.menubar.hide();    
	sys.OpenForm(&quot;Report.Редактор сделок.Form.форма&quot;, 1);
    }
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmDumpObject(objType, obj)
{
    var res = new Array;
    var meta = new Meta;
    var fields = meta.GetUserFields(objType);    
    for(var i=0;i&lt;fields.length;i++) 
    {
	res[fields[i]] = obj.Value(fields[i]);
    }
    delete meta;
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Вычисление значений формулы
// formula - формула, согласно языку описания формул
// arrays - массивы для подстановки в выражения вида A[]
function gmEvaluate(formula, arrays)
{
    var lb = formula.find(&quot;{&quot;, 0);
    var rb = formula.findRev(&quot;}&quot;, formula.length);
    if(lb&lt;0 || rb&lt;0) return undefined;
    var func = formula.mid(lb+1, rb-lb-1);
    lb = func.find(&quot;(&quot;, 0);
    rb = func.findRev(&quot;)&quot;, func.length);
    if(rb&lt;0 &amp;&amp; lb&lt;0)
    {	
	lb = func.find(&quot;[&quot;, 0);
	rb = func.findRev(&quot;]&quot;, func.length);
	if(lb>-1 &amp;&amp; rb>-1)
	{
	    var array = gmTrim(func.left(lb));
	    var index = gmTrim(func.mid(lb+1, rb-lb-1));
	    return arrays[array][index];
	}
	if(func.indexOf(&quot;\&quot;&quot;)>-1) return func;
	else if(func.indexOf(&quot;.&quot;)>-1) return gmParseFloat(func);
	else return gmParseInt(func);
    }
    else if(rb&lt;0 || lb&lt;0) return undefined;
    var funcName = gmTrim(func.left(lb));
    var params = func.mid(lb+1, rb-lb-1);
    return gmEvalFunction(funcName, params, arrays);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmEvalFunction(func, params, arrays)
{
    var catFuncs = new Catalogue(&quot;функции&quot;);
    catFuncs.SetFilter(&quot;название&quot;, func);
    catFuncs.Select();
    if(!catFuncs.First()) return undefined;
    
    var args = new Array();
    var bc = 0, argc = 0, argp = 0;
    for(var i=0;i&lt;params.length;i++)
    {
	var ch = params.charAt(i);
	if(ch=='{')
	{
	    if(bc++==0) argp = i;
	}
	else if(ch=='}')
	{
	    if(bc--==1) args[argc++] = gmEvaluate(params.mid(argp, i-argp+1), arrays);
	}
    }
    if(args.length&lt;gmParseInt(catFuncs.Value(&quot;количество аргументов&quot;))) return undefined;
    var macro = new Function(&quot;arg&quot;, catFuncs.Value(&quot;скрипт&quot;));
    return macro(args);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Округление  с точностью до decimal знаков дробной части
function gmRound(number, decimal)
{
    var res = number * Math.pow(10, gmParseInt(decimal));
    res = Math.round(res) / Math.pow(10, gmParseInt(decimal));
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//обрезает пробелы слева и справа в строке
function gmTrim(str)
{
    while(str.charAt(0)==' ') str = str.mid(1);
    while(str.charAt(str.length-1)==' ') str = str.left(str.length-1);
    return str;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//ОСТОРОЖНО!! извращения!!
//Обход бага с возвратом Q_ULLONG из aObject::Value
function gmULLONGValue(obj, name, table)
{
    var res = undefined;
    if(!table) AEXTEXAMPLE.lastMessage = obj.Value(name);
    else AEXTEXAMPLE.lastMessage = obj.TableValue(table, name);
    res = AEXTEXAMPLE.lastMessage;
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmTranslateType(type)
{
    type = type.replace(/[Чч]исло/, &quot;N&quot;);
    type = type.replace(/[Сс]трока/, &quot;C&quot;);
    type = type.replace(/[Дд]ата/, &quot;D&quot;);
    type = type.replace(/[Бб]улево/, &quot;B&quot;);
    type = type.replace(/[Сс]правочник./, &quot;Catalogue.&quot;);
    type = type.replace(/[Дд]окумент./, &quot;Document.&quot;);
    type = type.replace(/[Пп]еречисление /, &quot;E &quot;);    
    return type;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmFieldType(type)
{
    type = gmTranslateType(type);
    if(type.charAt(1)==&quot; &quot;) return type; //простой тип
    
    var meta = new Meta;
    if(meta.GetId(type)) type = &quot;O &quot;+meta.GetId(type);
    else type = &quot;C 255&quot;;
    
    return type;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmEditorType(type)
{
    type = gmTranslateType(type);
    
    if(type.charAt(1)==&quot; &quot;)
    {
	var str = &quot; NCD-B&quot;;
	return str.indexOf(type.charAt(0));
    }
    else if(type.indexOf(&quot;Catalogue.&quot;)>-1) return 101;
    else if(type.indexOf(&quot;Document.&quot;)>-1) return 102;
    return 2;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function convertTypeString(type)	
{
    var meta = new Meta();    
    if(type.charAt(0)==&quot;O&quot;)
    {
	type = type.split(&quot; &quot;);
	type = gmParseInt(type[1]);
	type = meta.GetBaseClassName(type)+&quot;.&quot;+meta.GetClassName(type);
	type = type.charAt(0).upper() + type.mid(1);
    }
    else
    {
	type = meta.GetId(type);
	type = &quot;O &quot;+type;
    }
    delete meta;
    return type;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Ввод значения произвольного типа
// type - тип значения
// value - исходное значение
// caption - заголовок окна
// callback - ссылка на функцию с двумя параметрами: значение и его представление
function gmInputValue(type, value, caption, callback)
{
    if(&quot;inputValue&quot; in formData &amp;&amp; formData[&quot;inputValue&quot;]) return;
    if(!callback) return;
    formData[&quot;inputValue&quot;] = new Array;
    formData[&quot;inputValue&quot;][&quot;fieldType&quot;] = gmFieldType(type);
    formData[&quot;inputValue&quot;][&quot;editorType&quot;] = gmEditorType(type);
    formData[&quot;inputValue&quot;][&quot;callback&quot;] = callback;
    formData[&quot;inputValue&quot;][&quot;value&quot;] = value;
    formData[&quot;inputValue&quot;][&quot;caption&quot;] = caption;
    if(formData[&quot;inputValue&quot;][&quot;editorType&quot;]>100) sys.OpenForm(&quot;Report.service.Form.inputValue&quot;, 1);
    else sys.OpenForm(&quot;Report.service.Form.inputValue&quot;, 1, undefined, true);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Находит элемент справочника по атрибуту
// cat - объект типа Справочник
// attrName - название атрибута справочника
// val - искомое значение
function gmCatFindByAttribute(cat, attrName, val)
{
    cat.UnSelect();
    cat.SetFilter(attrName, val);
    cat.Select();
    cat.First();
    if(cat.Uid()==0) return undefined;
    return cat;
}

function GetCatalogValue(catName, elemId, fname)
  {
   var  cat = new Catalogue(catName);
   if(!cat) return &quot;&quot;;
   cat.Select();
   return cat.GetElementValue(elemId, fname);              
}

function NumberDaysInMonth(month, year)
{
    var days = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    var d = 0;    
    if((month-1) in days) d = days[month-1];
    if (month==2 &amp;&amp; !year%4) d = 29;
}

function ToDate(d,tm)
    {
    var dat = new Date();
    var dt = new String(d);
    var dn=dt.substring(8);
    var mn=dt.substring(5,7);
    var yn=dt.substring(0,4);
    dat.setDate(dn);    
    dat.setMonth(mn);
    dat.setYear(yn);

    var mk;
    var yk;
    var dk;

    if ((parseFloat(dat.getMonth())+tm)>12)
    {
	mk = (parseFloat(dat.getMonth())+tm)%12;
	yk = parseFloat(dat.getYear())+(parseFloat(dat.getMonth())+tm-((parseFloat(dat.getMonth())+tm)%12))/12;
    }
    else
    {
	mk = parseFloat(dat.getMonth())+tm;
	yk = parseFloat(dat.getYear());
    }

    if ((parseFloat(dat.getDate())==1)&amp;(mk==1))
    {
	dk = 31;
	mk=12;
	--yk;
    }
    else
    {
	if (parseFloat(dat.getDate())==1)
	{
	    dk = NumberDaysInMonth(mk-1,yk);
	    --mk;
	}
	else
	{
	    dk = parseFloat(dat.getDate())-1;
	}
    }

    dat.setDate(dk);		    
    dat.setMonth(mk);    
    dat.setYear(yk);

    return dat;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function sysMessage(msg)
{
    sys.Message(0, msg);
}
function sysWarning(msg)
{
    sys.Message(1, msg);
}
function sysError(msg)
{
    sys.Message(2, msg);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// диалог сообщения об ошибке
// msg - текст ошибки
function gmError(msg)
{
    MessageBox.critical(msg, MessageBox.Ok);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// функция вызывает диалог вопроса да/нет
// msg - текст вопроса
// возвращает истину при ответе да, ложь - нет
function gmQuestion(msg)
{
    return MessageBox.warning(msg, MessageBox.Yes, MessageBox.No) == MessageBox.Yes;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Возвращает дату на конец длня
// date - исходная дата
function gmEndOfDay(date)
{
    var res = new Date(Date.parse(date));
    res.setHours(23);
    res.setMinutes(59);
    res.setSeconds(59);
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Возвращает дату на начало длня
// date - исходная дата
function gmBegOfDay(date)
{
    var res = new Date(Date.parse(date));
    res.setHours(0);
    res.setMinutes(0);
    res.setSeconds(0);
    return res;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// то же что parseInt(), только в случае неудачи возвращается 0, а не NaN
// val - произвольное значение преобразуемое в число
function gmParseInt(val)
{
    return isNaN(parseInt(val)) ? 0 : parseInt(val);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// то же что parseFloat(), только в случае неудачи возвращается 0, а не NaN
// val - произвольное значение преобразуемое в число
function gmParseFloat(val)
{
    return isNaN(parseFloat(val)) ? 0 : parseFloat(val);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmFormatDate(value, frm)
{
    if(!value) return value;
    frm = frm.mid(1);
    var date = new DateService(new Date(value));
    value = new Date(value);
    date.SetYMD(value.getYear(), value.getMonth(), value.getDate());    
    return date.ToString(frm);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmFormatNumber(value, frm)
{
    frm = frm.mid(1);
    var lst = frm.split(&quot; &quot;);
    return String(&quot;%1&quot;).arg(gmParseFloat(value), 0, 'f', lst.length>1 ? lst[lst.length-1] : 0);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmFormatPixmap(value, frm)
{
    return new Pixmap(value);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmObjectText(value, frm)
{
    frm = frm.mid(2);
    var meta = new Meta;
    var className = meta.GetBaseClassName(gmParseInt(frm));
    var objectName = meta.GetClassName(gmParseInt(frm));
    if(className==&quot;catalogue&quot;)
    {
	var obj = new Catalogue(objectName);
	obj.Select();
	if(obj.FindById(value)) return obj.displayString();
    }
    else if(className==&quot;document&quot;)
    {
	var obj = new Document(objectName);
	if(obj.SelectDocument(value)) return obj.displayString();
    }
    return value;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmEnumText(value, frm)
{
    frm = frm.mid(2);
    var array;
    try { array = eval(&quot;new Array&quot;+frm); } catch(err) { array = new Array; }
    if((gmParseInt(value)-1) in array) return array[gmParseInt(value)-1];
    return value;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function gmFormat(value, frm)
{
    var f = frm.charAt(0);
    switch(f)
    {
    case 'D' : return gmFormatDate(value, frm);
    case 'N': return gmFormatNumber(value, frm);
    case 'P' : return gmFormatPixmap(value, frm);
    case 'O' : return gmObjectText(value, frm);
    case 'E' : return gmEnumText(value, frm);
    default : return value;
    };
    return value;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class ObjectTable
{
    var fColumns;
    var fColIndex;
    var fTable;
    var fValueTable;
    var fFormats;
    
    function ObjectTable(tab)
    {
	try { tab.numCols = 0; fTable = tab; } catch (e) { fTable = undefined; return; }
	fTable.numRows = 0;
	fColumns = new Array();
	fValueTable = new Array();
	fColIndex = new Array();
	fFormats = new Array();
	connect(fTable, &quot;valueChanged(int, int)&quot;, this.on_textchanged);
    }
    
    function on_textchanged(row, col)
    {
	fValueTable[row][col] = fTable.text(row, col);
    }
    
    function addColumn(header, width, readonly, stretch, format)
    {
	if(!fTable) return;
	if(header in fColIndex) return;
	fColumns[fColumns.length] = header;
	fColIndex[header] = fColumns.length-1;
		
	fTable.numCols++;
	this.setColumnProps(fTable.numCols-1, header, width, readonly, stretch, format);
  }
    
    //устанавливает свойства колокни таблицы
    // col - индекс  или заголовок колонки
    // header - заголовок
    // width - ширина
    // readonly - колонка доступна только для чтения
    // stretch  - колонка занимает всё свободное пространство    
    // format - формат колонки
    function setColumnProps(col, header, width, readonly, stretch, format)
    {
	if(!fTable) return;	
	if(isNaN(parseInt(col)))
	{
	    if (col in fColIndex) col = fColIndex[col];
	    else return;
	}
	
	fTable.setHeaderText(col, header);
	fTable.setColumnWidth(col, width); 
	fTable.setColumnReadOnly(col, readonly);    
	fTable.setColumnStretchable(col, stretch);  	
	fFormats[col] = format;
    }
        
    //устанавливает формат колокни таблицы
    // col - индекс  или заголовок колонки
    // format - формат колонки    
    function setColumnFormat(col, format)
    {
	if(!fTable) return;	
	if(isNaN(parseInt(col)))
	{
	    if (col in fColIndex) col = fColIndex[col];
	    else return;
	}
	fFormats[col] = format;	
    }
    
    //прячет вертикальный заголовок, восстановить его потом невозможно
    function hideVerticalHeader()
    {
	if(!fTable) return;
	fTable.setLeftMargin(0);
    }
       
    //устанавливает доступность  интерактивного редактирования таблицы
    function setReadOnly(ro)
    {
	if(!fTable) return;
	fTable.setReadOnly(ro);
    }
    
    //враппер к connect
    function connectSlot(signal, slot)
    {
	if(!fTable) return;
	connect(fTable, signal, slot);
    }
    
    //удаляет строку row или текущую, если row не задана
    function deleteRow(row)
    {
	if(!fTable) return;
	if(isNaN(row)) row = currentRow();
	fTable.removeRow(row);
	//перенумеровать строки
	var tmpArray = new Array();
	for(var r=0;r&lt;fValueTable.length;r++)
	{
	    if(r&lt;row) tmpArray[r] = fValueTable[r];
	    else if(r>row) tmpArray[r-1] = fValueTable[r];
	}
	delete fValueTable;
	fValueTable = tmpArray;
    }
    
    //удаляет все сроки из таблицы
    function deleteRows()
    {
	if(!fTable) return;
	fTable.numRows = 0;
	delete fValueTable;
	fValueTable = new Array();
    }
    
    //очищает таблицу
    function clear()
    {
	if(!fTable) return;
	fTable.numRows = 0;
	fTable.numCols = 0;
	delete fValueTable;
	fValueTable = new Array();
	delete fColumns;
	fColumns = new Array;	
	delete fColIndex;
	fColIndex = new Array;
    }
    
    //добавляет новую строку в таблицу
    function addRow()
    {
	if(!fTable) return -1;
	fTable.numRows++;
	fValueTable[fValueTable.length] = new Array();
	return fTable.numRows-1;
    }
    
    //возвращает текущую строку
    function currentRow()
    {
	if(!fTable) return undefined;
	return fTable.currentRow();
    }
        
    //устанавливает текущую строку
    function setCurrentRow(row)
    {
	if(!fTable) return;
	fTable.setCurrentCell(row, 0);
    }
    
    //устанавливает значение для ячейки таблицы
    //row - номер строки
    //col - индекс или заголовок
    //value - значение
    //display - отображаемая строка
    //type  - тип значения
    function setValue(row, col, value, display, type)
    {
	if(!fTable) return;
	if(row&lt;0 || row>numRows()-1) return;
	if(isNaN(parseInt(col)))
	{
	    if(col in fColIndex) col = fColIndex[col];
	    else return;
	}
	
	if(!display &amp;&amp; display!=&quot;&quot; &amp;&amp; display!=0) display = value;
	var text = display;
	if(fFormats[col]) text = gmFormat(display, fFormats[col]);	
	if(type) text = gmFormat(value, gmFieldType(type));
	fTable.setText(row, col, text);
	fValueTable[row][col] = value;
    }        
    
    //возвращает значение ячейки таблицы
    // rowOrHeader - если строка - заголовок столбца, если число - номер строки
    // col - столбец
    function value(rowOrCol, col)
    {
	if(!fTable) return undefined;
	var row = rowOrCol;
	if(!gmParseInt(row) &amp;&amp; row!=0)
	{
	    row = currentRow();
	    col = rowOrCol;
	}
	
	if(!gmParseInt(col))
	{
	    if(col in fColIndex) col = fColIndex[col];
	    else return undefined;
	}
	
	if(row>fTable.numRows || col>fTable.numCols || row&lt;0 || col &lt;0) return undefined;
	
	if(!(col in fValueTable[row])) return undefined;
	return fValueTable[row][col];
    }
    
    //возвращает текст из ячейки таблицы
    // rowOrHeader - если строка - заголовок столбца, если число - номер строки
    // col - столбец    
    function text(rowOrCol, col)
    {
	if(!fTable) return &quot;&quot;;
	var row = rowOrCol;
	if(isNaN(parseInt(row)))
	{
	    row = currentRow();
	    col = rowOrCol;
	}
	
	if(isNaN(parseInt(col)))
	{
	    if(col in fColIndex) col = fColIndex[col];
	    else return &quot;&quot;;
	}
	
	if(row>fTable.numRows || col>fTable.numCols || row&lt;0 || col &lt;0) return &quot;&quot;;
	
	return fTable.text(row, col);
    }
    

    //поиск значения в таблице
    // header - заголовок, если не задан ищется по всем столбцам
    // value - искомое значение
    function findValue(header, value)
    {
	if(!fTable) return undefined;
	var col = -1;
	if(header in fColIndex) col = fColIndex[header];
	for(var row=0;row&lt;fValueTable.length;row++)
	{
	    if(col&lt;0)
	    {
		for(var j=0;j&lt;fValueTable[row].length;j++) 
		{
		    if(fValueTable[row, j]==value) return row;
		}
	    }
	    else if(fValueTable[row][col]==value) return row;
	}
	return -1;
    }    
    
    //возвращает число столбцов в таблице
    function numCols()
    {
	if(!fTable) return 0;
	return fTable.numCols;
    }
    
    //возвращает число строк в таблице
    function numRows()
    {
	if(!fTable) return 0;
	return fTable.numRows;
    }
    
    //возвращает заголовок столбца с номером col
    function header(col)
    {
	if(col in fColumns) return fColumns[col];
    }
    
    //подгоняет ширину колонки col таблицы под ширину содержимого
    function adjustColumn(col)
    {
	if(!fTable) return;
	if(isNaN(parseInt(col)))
	{
	    if(col in fColIndex) col = fColIndex[col];
	    else return;
	}
	fTable.adjustColumn(col);
    }
    
    //подгоняет ширину всех колонок, кроме колонок с нулевой шириной, под ширину содержимого
    function adjustColumns()
    {
	if(!fTable) return;
	for(var col=0;col&lt;fTable.numCols;col++)
	{
	    if(fTable.columnWidth(col)) fTable.adjustColumn(col);
	}
    }
    
    //устанваливает режим выделения в таблице
    // режимы:
    // ? - без выделения
    // 0 -  выделяется одна ячека
    // 1 - несколько ячеек
    // 2 -  строка целиком
    // 3 - несколько строк
    function setSelectionMode(mode)
    {
	if(!fTable) return;
	fTable.selectionMode = mode;
    }
    
    var sortColumn;
    //сортировка таблицы по колонке
    function sort(column)
    {
	if(!fTable) return;
	if(!gmParseInt(column))
	{
	    if(column in fColIndex) column = fColIndex[column];
	    else return;
	}
	sortColumn = column;
	var idx = new Array;
	var texts = new Array;
	for(var row=0;row&lt;fValueTable.length;row++)
	{
	    idx[row] = row;	    
	    texts[row] = new Array;
	    for(var col=0;col&lt;fValueTable[row].length;col++)
	    {
		texts[row][col] = fTable.text(row, col);
	    }
	}
	idx.sort(cmp);
	var newValueTable = new Array;
	for(var row=0;row&lt;idx.length;row++)
	{
	    newValueTable[row] = fValueTable[idx[row]];
	    for(var col=0;col&lt;fValueTable[row].length;col++)
	    {
		fTable.setText(row, col, texts[idx[row]][col]);
	    }
	}
	delete fValueTable;
	fValueTable = newValueTable;
    }
    
    //функция-помощник для сортировки
    function cmp(a, b)
    {
	return text(a, sortColumn) &lt; text(b, sortColumn) ? -1 : text(a, sortColumn) > text(b, sortColumn) ? 1 : 0;
    }    
	    
    //возвращает виджет таблицы
    function widget()
    {
	return fTable;
    }    
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class ValueList
{
    var fItems;
    var fKeys;
    
    function ValueList()
    {
	fItems = new Array;
	fKeys = new Array;
    }
    
    function set(key, val)
    {
	if(!(key in fItems)) fKeys[fKeys.length] = key;
	fItems[key] = val;
    }
    
    function get(key)
    {
	if(key in fItems) return fItems[key];
	return undefined;
    }
    
    function indGet(ind)
    {
	if(ind in fKeys) return get(fKeys[ind]);
	return undefined;
    }
    
    function count()
    {
	return fKeys.length;
    }
    
    function getKey(ind)
    {
	if(ind in fKeys) return fKeys[ind];
	return undefined;
    }    
    
    function isList()
    {
	return true;
    }
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//class ValueTableRow
//{    
//}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class ValueTable
{
    var fTable;    
    var fColumns;
    var fHeaders;
    
    function ValueTable()
    {
	fTable = new Array;
	fColumns = new Array;
	fHeaders = new Array;
    }
    
    function addColumn(header)
    {
	if(header in fColumns) return false;
	fColumns[header] = fHeaders.length;
	fHeaders[fHeaders.length] = header;
	return true;
    }
    
    function addRow()
    {
	var row = fTable.length;
	fTable[row] = new Array;
	return row;
    }
    
    function set(row, col, val)
    {
	if(row&lt;0 || row>fTable.length) return false;
	if(isNaN(col) &amp;&amp; !(col in fColumns)) return false;
	if(isNaN(col)) col = fColumns[col];
	fTable[row][col] = val;
    }
    
    function get(row, col)
    {
	var numcol = -1;
	if(row&lt;0 || row>fTable.length) return undefined;
	if(isNaN(col) &amp;&amp; !(col in fColumns)) return undefined;
	if(isNaN(col)) numcol = fColumns[col];
	return fTable[row][numcol];
    }
    
    function total(col)
    {
	if(isNaN(col) &amp;&amp; !(col in fColumns)) return undefined;
	if(isNaN(col)) col = fColumns[col];
	var res = 0;
	for(var i=0;i&lt;numRows();i++) res += gmParseFloat(get(i, col));
	return res;
    }
    
    function prepareColumns(cols)
    {
	var res = new Array;
	for(var col=0;col&lt;cols.length;col++)
	{
	    res[col] = cols[col];
	    if(isNaN(cols[col]) &amp;&amp; (cols[col] in fColumns)) res[col] = fColumns[cols[col]];
	    else if(isNaN(cols[col]) &amp;&amp; !(cols[col] in fColumns)) return undefined;	    
	    if(res[col]&lt;0 || res[col]>=fHeaders.length) return undefined;
	}
	return res;
    }
        
    //сврачивание таблицы по колонкам
    // grCols - колонки сворачивания
    // sumCols - суммируемые колонки
    function groupBy(grCols, sumCols)
    {
	var scols = prepareColumns(sumCols)
	var gcols = prepareColumns(grCols);
	if(!scols || !gcols) return false;
	if(!grCols.length)
	{
	    var res = new ValueTable;
	    res.addRow();		    
	    for(var col=0;col&lt;sumCols.length;col++)
	    {
		res.addColumn(sumCols[col]);	    
		res.set(0, sumCols[col], total(sumCols[col]))
	    }
	    load(res);
	    delete res;
	    return true;
	}
	
	var tmp = new Array;
	var rows = new Array;
	var values = new Array;
	var column = grCols[0];
	for(var row=0;row&lt;numRows();row++)
	{
	    var value = get(row, column);
	    if(!(value in rows))
	    {
		rows[value] = tmp.length;		
		var tab = new ValueTable;
		for(var col=1;col&lt;grCols.length;col++) tab.addColumn(grCols[col]);
		for(var col=0;col&lt;sumCols.length;col++) tab.addColumn(sumCols[col]);
		tmp[tmp.length] = tab;
		values[values.length] = value;
	    }
	    var tab = tmp[rows[value]];
	    var nrow = tab.addRow();
	    for(var col=1;col&lt;grCols.length;col++)	tab.set(nrow, grCols[col], get(row, grCols[col]));
	    for(var col=0;col&lt;sumCols.length;col++) tab.set(nrow, sumCols[col], get(row, sumCols[col]));
	}
	
	var res = new ValueTable;
	for(var col=0;col&lt;grCols.length;col++) res.addColumn(grCols[col]);
	for(var col=0;col&lt;sumCols.length;col++) res.addColumn(sumCols[col]);	
	
	for(var t=0;t&lt;tmp.length;t++)
	{
	    var tab = tmp[t];
	    var groups = new Array;
	    for(var col=1;col&lt;grCols.length;col++) groups[groups.length] = grCols[col];
	    tab.groupBy(groups, sumCols);
	    for(var row=0;row&lt;tab.numRows();row++)
	    {
		var nrow = res.addRow();
		for(var col=1;col&lt;grCols.length;col++) res.set(nrow, grCols[col], tab.get(row, grCols[col]));
		for(var col=0;col&lt;sumCols.length;col++) res.set(nrow, sumCols[col], tab.get(row, sumCols[col]));
		res.set(nrow, grCols[0], values[t]);
	    }
	}
	load(res);
	delete res;
	return true;
    }
        		
    var sortColumns;
    //сортировка таблицы по массиву колонок
    function sort(columns)
    {
	if(!(sortColumns = prepareColumns(columns))) return false;
	fTable.sort(cmp);
    }
    
    //функция-помощник для сортировки
    function cmp(a, b)
    {
	for(var c=0;c&lt;sortColumns.length;c++)
	{
	    if(fTable[a][sortColumns[c]]&gt;fTable[b][sortColumns[c]]) return 1;
	    else if(fTable[a][sortColumns[c]]&lt;fTable[b][sortColumns[c]]) return -1;
	}
	return 0;
    }
    
    function load(tab)
    {
	delete fTable;
	delete fColumns;
	delete fHeaders;
	fTable = new Array;
	fColumns = new Array;
	fHeaders = new Array;
	for(var col=0;col&lt;tab.fHeaders.length;col++) 
	{
	    addColumn(tab.fHeaders[col]);
	    for(var row=0;row&lt;tab.numRows();row++) 
	    {
		if(row>=numRows()) addRow();
		set(row, col, tab.get(row, col));
	    }
	}
    }
    
    function numRows()
    {
	return fTable.length;
    }
    
    function dump()
    {
	for(var row=0;row&lt;numRows();row++)
	{
	    var str = row+&quot;:|&quot;;
	    for(var col=0;col&lt;fHeaders.length;col++) str += fHeaders[col]+&quot;=&quot;+get(row, col)+&quot;|&quot;;
	    print(str);
	}
    }
    
    function filter(column, value)
    {	
	var row= 0;
	while(true)
	{
	    if(get(row, column)!=value) deleteRow(row);
	    else row++;
	    if(row>=numRows()) break;
	}
    }
    
    //удалить строку по номеру
    // row - номер строки
    function deleteRow(row)
    {
	fTable.splice(row, 1);
    }
    
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class cachedMeta
{
    var meta;
    var userFields, fieldTypes, tables;
    
    function cachedMeta()
    {
	meta = new Meta();
	userFields = new Array();
	fieldTypes = new Array();
	tables = new Array();
    }
    
    function getUserFields(objectName, table)
    {
	if(!(objectName+&quot;.&quot;+table in userFields))
	{
	    var list = meta.GetUserFields(objectName, table);
	    userFields[objectName+&quot;.&quot;+table] = list;
	}
	return userFields[objectName+&quot;.&quot;+table];
    }    
        
    function getFieldTypes(objectName, table)
    {
	if(!(objectName+&quot;.&quot;+table in fieldTypes))
	{
	    var list = new Array();
	    var fields = getUserFields(objectName, table);
	    for(var i=0;i&lt;fields.length;i++) list[fields[i]] = meta.GetAttrType(objectName, fields[i], table);
	    fieldTypes[objectName+&quot;.&quot;+table] = list;
	}
	return fieldTypes[objectName+&quot;.&quot;+table];    
    }    
    
    function getTables(objectName)
    {
	if(!(objectName in tables))
	{
	    var list = meta.ObjectTables(objectName);
	    var tabList = new Array();
	    for(var i=0;i&lt;list.length;i++)
	    {
		var line = list[i].split(&quot;\t&quot;);
		if(!gmParseInt(line[0])) continue;
		tabList[tabList.length] = line[1];
	    }
	    tables[objectName] = tabList;
	}
	return tables[objectName];
    }    
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class IDs
{
    var eq;
    function IDs()
    {
	eq = new Catalogue(&quot;Соответсвия объектов&quot;);
    }
    
    function find(base, id)
    {
	eq.ClearFilter();
	eq.SetFilter(&quot;БД&quot;, base);
	eq.SetFilter(&quot;соответствие&quot;, id);
	eq.Select();
	if(eq.First()) return &quot;r&quot;+eq.Value(&quot;объект&quot;);
	return undefined;
    }
    
    function findeq(base, id)
    {
	eq.ClearFilter();
	eq.SetFilter(&quot;БД&quot;, base);
	eq.SetFilter(&quot;объект&quot;, id);
	eq.Select();
	if(eq.First()) return &quot;r&quot;+eq.Value(&quot;соответствие&quot;);
	return id;	
    }
    
    function save(base, id, baseid)
    {
	eq.New();
	eq.SetValue(&quot;БД&quot;, base);
	eq.SetValue(&quot;объект&quot;, id);
	eq.SetValue(&quot;соответствие&quot;, baseid);
	eq.Update();
    }
}
</sourcecode>
        </globals>
        <catalogues>
            <catalogue id="165" name="Субъекты РФ" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="C 50 0 *" id="166" nz="1" name="Наименование" lz="0" sort="0" vd="0" >
                        <description id="174" />
                    </field>
                    <string_view stdf="0" id="168" >
                        <svfunction id="169" />
                        <fieldid id="170" >166</fieldid>
                    </string_view>
                </element>
                <group>
                    <string_view stdf="0" id="171" >
                        <svfunction id="172" />
                        <fieldid id="173" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="175" name="Ввод элемента" >
                        <description id="176" />
                        <sourcecode id="177" />
                        <defaultmod id="178" >14</defaultmod>
                        <dialogform id="179" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>572&lt;/width>
            &lt;height>77&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Субъекты РФ&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>165&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout23&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Наименование субъекта РФ&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>166&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Наименование&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout24&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>171&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer5&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;tabstops>
    &lt;tabstop>wDBField&lt;/tabstop>
    &lt;tabstop>wActionButton&lt;/tabstop>
    &lt;tabstop>wActionButton_2&lt;/tabstop>
&lt;/tabstops>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="167" />
            </catalogue>
            <catalogue id="101" name="Населеные пункты" >
                <element>
                    <field sum="0" plus="0" type="C 50 I *" id="102" nz="1" name="Наименование" sort="1" >
                        <description id="110" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" type="O 165 0 *" validator="" id="180" nz="1" name="Субъект РФ" lz="0" sort="0" vd="0" >
                        <description id="181" />
                    </field>
                    <field sum="0" plus="0" type="N 10 0 *" id="229" nz="1" name="Код субъекта РФ" sort="0" >
                        <description id="230" />
                    </field>
                    <string_view stdf="0" id="104" >
                        <svfunction id="105" />
                        <fieldid id="106" >102</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 5 0 *" validator="" plus="0" nz="0" id="949" name="Тип" lz="0" sort="0" vd="0" >
                        <description id="950" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="107" >
                        <svfunction id="108" />
                        <fieldid id="109" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="111" name="Ввод данных" >
                        <description id="112" />
                        <sourcecode id="113" >function fillSections()
{
    var types = new Array();
    var cat = new Catalogue(&quot;Населеные пункты&quot;);    
    cat.Select();
    if(cat.First()) do
    {
	if(!(cat.Value(&quot;Тип&quot;) in types))
	{
	    types[cat.Value(&quot;Тип&quot;)] = cat.Value(&quot;Тип&quot;);
	    Widget(&quot;cbType&quot;).insertItem(cat.Value(&quot;Тип&quot;));
	}
    }while(cat.Next());    
}

function on_formstart()
{
    fillSections()
    Widget(&quot;cbType&quot;).currentText = Current().Value(&quot;Тип&quot;);
}

function on_valuechanged(name, value)
{
    if (name==&quot;Субъект РФ&quot;)
    {
	SetValue(&quot;Код субъекта РФ&quot;,  value);
    }
}

function on_button(btn) //Вызывается при нажитии на кнопку
{
    if(btn==&quot;bntOk&quot;)
    {
	var cat = new Catalogue(&quot;Населеные пункты&quot;);
	cat.SetFilter(&quot;Наименование&quot;, Value(&quot;Наименование&quot;));
	cat.Select();
	if(cat.First()) do
	{
	    if(cat.Uid()!=Current().Uid())
	    {
		sysError(&quot;Населенный пункт с таким названием уже есть в справочнике.&quot;);
		return;
	    }
	}while(cat.Next());	    
	Current().SetValue(&quot;Тип&quot;, Widget(&quot;cbType&quot;).currentText);
	UpdateDB();
	Close();
    }    
}
</sourcecode>
                        <defaultmod id="114" >14</defaultmod>
                        <dialogform id="115" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>475&lt;/width>
            &lt;height>143&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Населенные пункты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>101&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout32&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Тип&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbType&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;editable&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer17&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>101&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout33&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Наименование&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>102&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Наименование&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout34&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Субъект РФ&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>180&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 165 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Субъект РФ&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>229&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 10 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Код субъекта РФ&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer7&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>21&lt;/width>
                    &lt;height>31&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout35&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>260&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>bntOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;tabstops>
    &lt;tabstop>wDBField_2&lt;/tabstop>
    &lt;tabstop>wDBField&lt;/tabstop>
    &lt;tabstop>wActionButton_2&lt;/tabstop>
&lt;/tabstops>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form type="0" readonly="0" id="213" name="Выбор значения" >
                        <description id="214" />
                        <sourcecode id="215" >function on_formstart() 
{
    Widget(&quot;tab&quot;).readOnly = false;
//   var tname = &quot;wDBTable5&quot;;
//   var table = Widget(tname);
//
//   count = table.numRows;
//
//  for (i=0;i&lt;count; i++)     
//  {
//       if (TabDBValue(tname,i,2) !=SubjectRF)
//      {
//	  table.hideRow(i);
//      }
//          
//     }   
}</sourcecode>
                        <defaultmod id="216" >30</defaultmod>
                        <dialogform id="217" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>500&lt;/width>
            &lt;height>288&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Населенные пункты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>101&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wActionButton&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Субъект РФ&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Код субъекта РФ&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Населенный пункт&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>Субъект РФ&lt;/string>
                    &lt;string>Код субъекта РФ&lt;/string>
                    &lt;string>Наименование&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>Субъект РФ&lt;/string>
                    &lt;string>Код субъекта РФ&lt;/string>
                    &lt;string>Населенный пункт&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>200&lt;/string>
                    &lt;string>1&lt;/string>
                    &lt;string>200&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>180&lt;/string>
                    &lt;string>229&lt;/string>
                    &lt;string>102&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>201&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="103" />
            </catalogue>
            <catalogue id="139" name="Клиенты" >
                <element>
                    <field sum="0" plus="0" type="C 25 0 *" id="140" nz="1" name="Фамилия" sort="0" >
                        <description id="148" />
                    </field>
                    <string_view stdf="0" id="142" >
                        <svfunction id="143" />
                        <fieldid id="144" >458</fieldid>
                    </string_view>
                    <field sum="0" plus="0" type="C 25 0 *" id="149" nz="1" name="Имя" sort="0" >
                        <description id="150" />
                    </field>
                    <field sum="0" plus="0" type="C 25 0 *" id="151" nz="1" name="Отчество" sort="0" >
                        <description id="152" />
                    </field>
                    <field sum="0" plus="0" type="C 100 0 *" id="458" nz="1" name="ФИО" sort="0" >
                        <description id="459" />
                    </field>
                    <field sum="0" plus="0" type="C 10 0 *" id="153" nz="1" name="Серия паспорта" sort="0" >
                        <description id="154" />
                    </field>
                    <field sum="0" plus="0" type="C 10 0 *" id="155" nz="1" name="Номер паспорта" sort="0" >
                        <description id="156" />
                    </field>
                    <field sum="0" plus="0" type="C 100 0 *" id="157" nz="1" name="Паспорт выдан" sort="0" >
                        <description id="158" />
                    </field>
                    <field sum="0" plus="0" type="D 0 0 *" id="159" nz="1" name="Дата выдачи паспорта" sort="0" >
                        <description id="160" />
                    </field>
                    <field sum="0" plus="0" type="O 165 0 *" id="163" nz="1" name="Субъект РФ" sort="0" >
                        <description id="164" />
                    </field>
                    <field sum="0" plus="0" type="C 50 0 *" id="182" nz="0" name="Район" sort="0" >
                        <description id="183" />
                    </field>
                    <field sum="0" plus="0" type="O 101 0 *" id="161" nz="1" name="Населенный пункт" sort="0" >
                        <description id="162" />
                    </field>
                    <field sum="0" plus="0" type="C 50 0 *" id="184" nz="0" name="Улица" sort="0" >
                        <description id="185" />
                    </field>
                    <field sum="0" plus="0" type="C 5 0 *" id="186" nz="1" name="Дом" sort="0" >
                        <description id="187" />
                    </field>
                    <field sum="0" plus="0" type="C 5 0 *" id="188" nz="0" name="Корпус" sort="0" >
                        <description id="189" />
                    </field>
                    <field sum="0" plus="0" type="C 5 0 *" id="190" nz="0" name="Квартира" sort="0" >
                        <description id="191" />
                    </field>
                    <field sum="0" type="C 14 0 *" plus="0" nz="0" id="218" name="Телефон домашний" sort="0" >
                        <description id="219" />
                    </field>
                    <field sum="0" type="C 14 0 *" plus="0" nz="0" id="220" name="Телефон мобильный" sort="0" >
                        <description id="221" />
                    </field>
                    <field sum="0" type="C 60 0 *" plus="0" nz="0" id="222" name="E-mail" sort="0" >
                        <description id="223" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 581 0 *" validator="" plus="0" nz="0" id="815" name="Подразделение" lz="0" sort="0" vd="0" >
                        <description id="816" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="145" >
                        <svfunction id="146" />
                        <fieldid id="147" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="224" name="Ввод элемента" >
                        <description id="225" ></description>
                        <sourcecode id="226" >var tabPr;

function loadProp()
{
    tabPr.clear();
    tabPr.addColumn(&quot;свойство&quot;, 600, true, false);
    tabPr.addColumn(&quot;значение&quot;, 200, true, true);
    tabPr.addColumn(&quot;порядок&quot;, 0, true, false);
    tabPr.addColumn(&quot;тип&quot;, 0, true, false); 
    
    var prop = new Catalogue(&quot;Свойства клиента&quot;);
    prop.Select();
    if(prop.First()) do
    {
	var row = tabPr.addRow();
	tabPr.setValue(row, &quot;свойство&quot;, prop.Uid(), prop.Value(&quot;Название&quot;));
	tabPr.setValue(row, &quot;тип&quot;, prop.Value(&quot;Тип&quot;));
	tabPr.setValue(row, &quot;порядок&quot;, prop.Value(&quot;Порядок&quot;));
    }while(prop.Next());
    tabPr.sort(&quot;порядок&quot;);

    var clientprop = new Catalogue(&quot;Свойства&quot;);
    clientprop.SetFilter(&quot;Объект&quot;, Current().Uid());
    clientprop.Select();
    if(clientprop.First()) do
    {
	var row = tabPr.findValue(&quot;свойство&quot;, clientprop.Value(&quot;Свойство&quot;));
	if(row&lt;0) continue;
	tabPr.setValue(row, &quot;значение&quot;, clientprop.Value(&quot;Значение&quot;), undefined, clientprop.Value(&quot;Тип&quot;));
    }while(clientprop.Next());    
}

function saveProp()
{
    var prop = new Catalogue(&quot;Свойства клиента&quot;);    
    var clientprop = new Catalogue(&quot;Свойства&quot;);
    prop.Select();
    
    sys.startTransaction();
    if(prop.First()) do
    {
	var row = tabPr.findValue(&quot;свойство&quot;, prop.Uid());
	if(row&lt;0) continue;
	var val = tabPr.value(row, &quot;значение&quot;);
	if(val == undefined) continue;
	clientprop.SetFilter(&quot;Объект&quot;, Current().Uid());
	clientprop.SetFilter(&quot;Свойство&quot;, prop.Uid());
	clientprop.Select();
	if(!clientprop.First()) clientprop.New();
	clientprop.SetValue(&quot;Объект&quot;, Current().Uid());
	clientprop.SetValue(&quot;Тип свойства&quot;, &quot;Свойства клиента&quot;);
	clientprop.SetValue(&quot;Свойство&quot;, prop.Uid());
	clientprop.SetValue(&quot;Тип&quot;, prop.Value(&quot;Тип&quot;));
	clientprop.SetValue(&quot;Значение&quot;, val);
	clientprop.Update();
    }while(prop.Next());
    sys.commitTransaction();
}


function on_formstart()
{  
    tabPr = new ObjectTable(Widget(&quot;tabProperties&quot;));
    tabPr.setSelectionMode(2);    
    loadProp();
    
    if(gmOrg) Widget(&quot;Подразделение&quot;).setEnabled(false);
    if(!gmParseInt(DBValue(&quot;Подразделение&quot;))) SetValue(&quot;Подразделение&quot;, gmOrg);
    Widget(&quot;ФИО&quot;).setEnabled(false);
    if(!GetMode()) Widget(&quot;Дата выдачи паспорта&quot;).setValue(&quot;00.00.0000&quot;);
}

function on_valuechanged (name,value)
{  
    if(name == &quot;Субъект РФ&quot;)
    {    
	SubjectRF = value;
    }
    if ((name==&quot;Фамилия&quot;)||(name==&quot;Имя&quot;)||(name==&quot;Отчество&quot;))
    {
	SetValue(&quot;ФИО&quot;, Value(&quot;Фамилия&quot;)+&quot; &quot;+ Value(&quot;Имя&quot;)+&quot; &quot;+Value(&quot;Отчество&quot;));
    }    
}      

function on_button(btn)
{
    if(btn==&quot;btnEdit&quot;)
    {
	if(tabPr.currentRow()>-1 &amp;&amp; tabPr.currentRow()&lt;tabPr.numRows())
	    gmInputValue(tabPr.value(&quot;тип&quot;), tabPr.value(&quot;значение&quot;), &quot;Введите &quot;+tabPr.text(&quot;свойство&quot;), on_entervalue);
    }
    else if(btn==&quot;btnOk&quot;)
    {
	UpdateDB();
	saveProp();
	Close();
    }    
}

function on_entervalue(value, text)
{
    tabPr.setValue(tabPr.currentRow(), &quot;значение&quot;, value, text);
}
</sourcecode>
                        <defaultmod id="227" >10</defaultmod>
                        <dialogform id="228" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>830&lt;/width>
            &lt;height>548&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Клиенты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>139&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout22&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отчество&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>151&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 25 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Отчество&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout23&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Фамилия&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>140&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 25 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Фамилия&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout24&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Имя&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>149&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 25 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Имя&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout21&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ФИО&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_18&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>458&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 100 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>ФИО&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout37&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>660&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QToolBox&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>toolBox1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;currentIndex&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;widget class=&quot;QWidget&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>page1&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;backgroundMode&quot;>
                    &lt;enum>PaletteBackground&lt;/enum>
                &lt;/property>
                &lt;attribute name=&quot;label&quot;>
                    &lt;string>Общие&lt;/string>
                &lt;/attribute>
                &lt;grid>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>unnamed&lt;/cstring>
                    &lt;/property>
                    &lt;widget class=&quot;QGroupBox&quot; row=&quot;0&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>groupBox2&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;title&quot;>
                            &lt;string>Паспортные данные&lt;/string>
                        &lt;/property>
                        &lt;grid>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout20&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel5&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Орган, выдавший паспорт&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_6&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>157&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 100 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Паспорт выдан&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout25&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel3&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>1&lt;/hsizetype>
                                                &lt;vsizetype>5&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Серия&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_4&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>1&lt;/hsizetype>
                                                &lt;vsizetype>0&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;maximumSize&quot;>
                                            &lt;size>
                                                &lt;width>55&lt;/width>
                                                &lt;height>32767&lt;/height>
                                            &lt;/size>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>153&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;value&quot;>
                                            &lt;string>&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 10 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Серия паспорта&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel2&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>1&lt;/hsizetype>
                                                &lt;vsizetype>5&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Номер&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_5&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>3&lt;/hsizetype>
                                                &lt;vsizetype>0&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;maximumSize&quot;>
                                            &lt;size>
                                                &lt;width>70&lt;/width>
                                                &lt;height>32767&lt;/height>
                                            &lt;/size>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>155&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;value&quot;>
                                            &lt;string>&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 10 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Номер паспорта&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel4&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>1&lt;/hsizetype>
                                                &lt;vsizetype>5&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Дата выдачи&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>fPassportDate&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;sizePolicy&quot;>
                                            &lt;sizepolicy>
                                                &lt;hsizetype>1&lt;/hsizetype>
                                                &lt;vsizetype>0&lt;/vsizetype>
                                                &lt;horstretch>0&lt;/horstretch>
                                                &lt;verstretch>0&lt;/verstretch>
                                            &lt;/sizepolicy>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>159&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;value&quot;>
                                            &lt;string>&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>D 0 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>Date&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Дата выдачи паспорта&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;spacer>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>spacer3_2&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;orientation&quot;>
                                            &lt;enum>Horizontal&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;sizeType&quot;>
                                            &lt;enum>Expanding&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;sizeHint&quot;>
                                            &lt;size>
                                                &lt;width>170&lt;/width>
                                                &lt;height>21&lt;/height>
                                            &lt;/size>
                                        &lt;/property>
                                    &lt;/spacer>
                                &lt;/hbox>
                            &lt;/widget>
                        &lt;/grid>
                    &lt;/widget>
                    &lt;widget class=&quot;QGroupBox&quot; row=&quot;2&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>groupBox5&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;title&quot;>
                            &lt;string>Контакты&lt;/string>
                        &lt;/property>
                        &lt;grid>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout4&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel16&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Телефон мобильный&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_16&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>220&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 14 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Телефон мобильный&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout5&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel15&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Телефон домашний&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_15&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>218&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 14 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Телефон домашний&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot; rowspan=&quot;2&quot; colspan=&quot;1&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout3&lt;/cstring>
                                &lt;/property>
                                &lt;vbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel17&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>E-mail&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_17&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>222&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 60 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>E-mail&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/vbox>
                            &lt;/widget>
                        &lt;/grid>
                    &lt;/widget>
                    &lt;widget class=&quot;QGroupBox&quot; row=&quot;1&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>groupBox1&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;title&quot;>
                            &lt;string>Адрес регистрации&lt;/string>
                        &lt;/property>
                        &lt;grid>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout13&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel7&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Субъект РФ&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_8&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>163&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>O 165 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>Catalogue&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Субъект РФ&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout14&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel8&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Район&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_9&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>182&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 50 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Район&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout15&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel9&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Населенный пункт&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_10&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>161&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>O 101 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>Catalogue&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Населенный пункт&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;1&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout16&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel10&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Улица&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_11&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>184&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 50 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Улица&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout6&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel11&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Дом&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_12&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>186&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 5 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Дом&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;1&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout8&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel13&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Квартира&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_14&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>190&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 5 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Квартира&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                            &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>layout7&lt;/cstring>
                                &lt;/property>
                                &lt;hbox>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>unnamed&lt;/cstring>
                                    &lt;/property>
                                    &lt;widget class=&quot;QLabel&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>textLabel12&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;text&quot;>
                                            &lt;string>Корпус&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                    &lt;widget class=&quot;wDBField&quot;>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>wDBField_13&lt;/cstring>
                                        &lt;/property>
                                        &lt;property name=&quot;Id&quot;>
                                            &lt;number>188&lt;/number>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldType&quot;>
                                            &lt;string>C 5 0 *&lt;/string>
                                        &lt;/property>
                                        &lt;property name=&quot;EditorType&quot;>
                                            &lt;enum>String&lt;/enum>
                                        &lt;/property>
                                        &lt;property name=&quot;FieldName&quot;>
                                            &lt;string>Корпус&lt;/string>
                                        &lt;/property>
                                    &lt;/widget>
                                &lt;/hbox>
                            &lt;/widget>
                        &lt;/grid>
                    &lt;/widget>
                &lt;/grid>
            &lt;/widget>
            &lt;widget class=&quot;QWidget&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>page2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;backgroundMode&quot;>
                    &lt;enum>PaletteBackground&lt;/enum>
                &lt;/property>
                &lt;attribute name=&quot;label&quot;>
                    &lt;string>Дополнительные &lt;/string>
                &lt;/attribute>
                &lt;grid>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>unnamed&lt;/cstring>
                    &lt;/property>
                    &lt;widget class=&quot;wTable&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>tabProperties&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;numRows&quot;>
                            &lt;number>0&lt;/number>
                        &lt;/property>
                        &lt;property name=&quot;numCols&quot;>
                            &lt;number>0&lt;/number>
                        &lt;/property>
                    &lt;/widget>
                    &lt;spacer row=&quot;1&quot; column=&quot;1&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>spacer21&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;orientation&quot;>
                            &lt;enum>Horizontal&lt;/enum>
                        &lt;/property>
                        &lt;property name=&quot;sizeType&quot;>
                            &lt;enum>Expanding&lt;/enum>
                        &lt;/property>
                        &lt;property name=&quot;sizeHint&quot;>
                            &lt;size>
                                &lt;width>221&lt;/width>
                                &lt;height>21&lt;/height>
                            &lt;/size>
                        &lt;/property>
                    &lt;/spacer>
                    &lt;widget class=&quot;QPushButton&quot; row=&quot;1&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>btnEdit&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>Редактировать&lt;/string>
                        &lt;/property>
                        &lt;property name=&quot;iconSet&quot;>
                            &lt;iconset>image2&lt;/iconset>
                        &lt;/property>
                    &lt;/widget>
                    &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>layout22&lt;/cstring>
                        &lt;/property>
                        &lt;hbox>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QLabel&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>lOrg&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>Подразделение&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;wDBField&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>fOrg&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;sizePolicy&quot;>
                                    &lt;sizepolicy>
                                        &lt;hsizetype>7&lt;/hsizetype>
                                        &lt;vsizetype>0&lt;/vsizetype>
                                        &lt;horstretch>0&lt;/horstretch>
                                        &lt;verstretch>0&lt;/verstretch>
                                    &lt;/sizepolicy>
                                &lt;/property>
                                &lt;property name=&quot;minimumSize&quot;>
                                    &lt;size>
                                        &lt;width>0&lt;/width>
                                        &lt;height>0&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                                &lt;property name=&quot;Id&quot;>
                                    &lt;number>815&lt;/number>
                                &lt;/property>
                                &lt;property name=&quot;FieldType&quot;>
                                    &lt;string>O 581 0 *&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;EditorType&quot;>
                                    &lt;enum>Catalogue&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;FieldName&quot;>
                                    &lt;string>Подразделение&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                        &lt;/hbox>
                    &lt;/widget>
                &lt;/grid>
            &lt;/widget>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5070&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;tabstops>
    &lt;tabstop>wDBField&lt;/tabstop>
    &lt;tabstop>wDBField_2&lt;/tabstop>
    &lt;tabstop>wDBField_3&lt;/tabstop>
    &lt;tabstop>wActionButton_2&lt;/tabstop>
    &lt;tabstop>wDBField_18&lt;/tabstop>
&lt;/tabstops>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="813" name="Список" >
                        <sourcecode id="814" >function on_formstart() // вызывается непосредственно перед показом формы
{
    Widget(&quot;tab&quot;).readOnly = false;
    if(&quot;orgs&quot; in formData &amp;&amp; &quot;filter&quot; in formData[&quot;orgs&quot;])
    {
	var sql = new SQL;
	var field = sql.SqlFieldName(Current(), &quot;Подразделение&quot;);
	Widget(&quot;tab&quot;).filter = field+&quot;=&quot;+gmParseInt(formData[&quot;orgs&quot;][&quot;filter&quot;])+&quot; OR &quot;+field+&quot;=0&quot;;
	Widget(&quot;tab&quot;).refresh();
    }    
}
</sourcecode>
                        <description id="817" />
                        <defaultmod id="818" >30</defaultmod>
                        <dialogform id="819" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>604&lt;/width>
            &lt;height>381&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Клиенты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>139&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wActionButton&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>396&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>ФИО&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Серия паспорта&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Номер паспорта&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Населенный пункт&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Телефон домашний&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Телефон мобильный&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>ФИО&lt;/string>
                    &lt;string>Серия паспорта&lt;/string>
                    &lt;string>Номер паспорта&lt;/string>
                    &lt;string>Населенный пункт&lt;/string>
                    &lt;string>Телефон домашний&lt;/string>
                    &lt;string>Телефон мобильный&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>ФИО&lt;/string>
                    &lt;string>Серия паспорта&lt;/string>
                    &lt;string>Номер паспорта&lt;/string>
                    &lt;string>Населенный пункт&lt;/string>
                    &lt;string>Телефон домашний&lt;/string>
                    &lt;string>Телефон мобильный&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>458&lt;/string>
                    &lt;string>153&lt;/string>
                    &lt;string>155&lt;/string>
                    &lt;string>161&lt;/string>
                    &lt;string>218&lt;/string>
                    &lt;string>220&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="141" />
            </catalogue>
            <catalogue id="745" name="Свойства клиента" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 50 0 *" validator="" plus="0" nz="0" id="746" name="Название" lz="0" sort="0" vd="0" >
                        <description id="754" />
                    </field>
                    <string_view stdf="0" id="748" >
                        <svfunction id="749" />
                        <fieldid id="750" >0</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 254 0 *" validator="" plus="0" nz="0" id="755" name="Тип" lz="0" sort="0" vd="0" >
                        <description id="756" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 2 0 *" id="988" nz="0" name="Порядок" lz="0" sort="0" vd="0" >
                        <description id="989" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="751" >
                        <svfunction id="752" />
                        <fieldid id="753" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="0" id="757" name="Список" >
                        <sourcecode id="758" />
                        <description id="769" />
                        <defaultmod id="770" >30</defaultmod>
                        <dialogform id="771" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>tabProperties&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>tabProperties&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>771&lt;/width>
            &lt;height>359&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Свойства клиента&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>745&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Название&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Тип&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Порядок&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wDBTable3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                    &lt;string>Тип&lt;/string>
                    &lt;string>Порядок&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                    &lt;string>Тип&lt;/string>
                    &lt;string>Порядок&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>300&lt;/string>
                    &lt;string>300&lt;/string>
                    &lt;string>70&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>746&lt;/string>
                    &lt;string>755&lt;/string>
                    &lt;string>988&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>200&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>btnClose&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Esc&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="747" />
            </catalogue>
            <catalogue id="253" name="Группы товаров" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="C 30 I *" id="254" nz="1" name="Название" lz="0" sort="1" vd="0" >
                        <description id="262" />
                    </field>
                    <string_view stdf="0" id="256" >
                        <svfunction id="257" />
                        <fieldid id="258" >254</fieldid>
                    </string_view>
                </element>
                <group>
                    <string_view stdf="0" id="259" >
                        <svfunction id="260" />
                        <fieldid id="261" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="263" name="Ввод элемента" >
                        <description id="264" />
                        <sourcecode id="265" />
                        <defaultmod id="266" >14</defaultmod>
                        <dialogform id="267" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>579&lt;/width>
            &lt;height>75&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Группа товаров&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>253&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLabel&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>textLabel1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Наименование&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;wDBField&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wDBField&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;Id&quot;>
                &lt;number>254&lt;/number>
            &lt;/property>
            &lt;property name=&quot;FieldType&quot;>
                &lt;string>C 30 I *&lt;/string>
            &lt;/property>
            &lt;property name=&quot;EditorType&quot;>
                &lt;enum>String&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;FieldName&quot;>
                &lt;string>Название&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout25&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>91&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer18&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>41&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="740" name="Список" >
                        <sourcecode id="741" >function on_formstart()
{
//    Widget(&quot;fakeBtn&quot;).hide();
}
</sourcecode>
                        <description id="742" />
                        <defaultmod id="743" >20</defaultmod>
                        <dialogform id="744" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>523&lt;/width>
            &lt;height>306&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Группы товаров&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>253&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Название&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wDBTable1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;readOnly&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;autoEdit&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>300&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>254&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>280&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QPushButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>fakeBtn&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;maximumSize&quot;>
                &lt;size>
                    &lt;width>2&lt;/width>
                    &lt;height>2&lt;/height>
                &lt;/size>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Shift+Return&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>btnClose&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Esc&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="255" />
            </catalogue>
            <catalogue id="288" name="Товары" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" type="C 150 0 *" plus="0" nz="1" id="298" name="Название" lz="0" sort="0" vd="0" >
                        <description id="299" />
                    </field>
                    <string_view stdf="0" id="291" >
                        <svfunction id="292" />
                        <fieldid id="293" >298</fieldid>
                    </string_view>
                    <field sum="0" type="N 15 2 *" plus="1" nz="1" id="316" name="Стоимость" sort="0" >
                        <description id="317" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 253 0 *" validator="" plus="0" nz="0" id="956" name="Группа товаров" lz="0" sort="0" vd="0" >
                        <description id="957" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="294" >
                        <svfunction id="295" />
                        <fieldid id="296" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="300" name="Ввод Элемента" >
                        <description id="301" />
                        <sourcecode id="302" />
                        <defaultmod id="303" >14</defaultmod>
                        <dialogform id="304" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>771&lt;/width>
            &lt;height>143&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Товар&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>288&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout29&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Группа&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>956&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 253 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Группа товаров&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout28&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>298&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout22&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Стоимость&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer14&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>21&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>316&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 15 2 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Стоимость&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout26&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>230&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer16&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>31&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="733" name="Список" >
                        <sourcecode id="734" >function on_formstart()
{
    Widget(&quot;fakeBtn&quot;).hide();
    if(&quot;goods&quot; in formData &amp;&amp; &quot;filter&quot; in formData[&quot;goods&quot;])
    {
	var sql = new SQL;
	var field = sql.SqlFieldName(Current(), &quot;Группа товаров&quot;);
	Widget(&quot;tab&quot;).filter = field+&quot;=&quot;+gmParseInt(formData[&quot;goods&quot;][&quot;filter&quot;]);
	Widget(&quot;tab&quot;).refresh();	
    }
}
</sourcecode>
                        <description id="735" />
                        <defaultmod id="736" >20</defaultmod>
                        <dialogform id="737" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>522&lt;/width>
            &lt;height>402&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Товары&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>288&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Название&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Группа товаров&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Стоимость&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;readOnly&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;autoEdit&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;DefaultColWidth&quot; stdset=&quot;0&quot;>
                &lt;number>150&lt;/number>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                    &lt;string>Группа товаров&lt;/string>
                    &lt;string>Стоимость&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>Название&lt;/string>
                    &lt;string>Группа товаров&lt;/string>
                    &lt;string>Стоимость&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>200&lt;/string>
                    &lt;string>200&lt;/string>
                    &lt;string>90&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>298&lt;/string>
                    &lt;string>956&lt;/string>
                    &lt;string>316&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>pushButton2&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;maximumSize&quot;>
                &lt;size>
                    &lt;width>0&lt;/width>
                    &lt;height>0&lt;/height>
                &lt;/size>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Shift+Return&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>pushButton3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;maximumSize&quot;>
                &lt;size>
                    &lt;width>1&lt;/width>
                    &lt;height>1&lt;/height>
                &lt;/size>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>360&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>btnClose&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Esc&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QPushButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>fakeBtn&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Shift+Return&lt;/string>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;tabstops>
    &lt;tabstop>tab&lt;/tabstop>
    &lt;tabstop>btnClose&lt;/tabstop>
    &lt;tabstop>pushButton2&lt;/tabstop>
&lt;/tabstops>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="290" />
            </catalogue>
            <catalogue id="376" name="Сотрудники" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="O 392 0 *" id="428" nz="1" name="дилер" lz="0" sort="0" vd="0" >
                        <description id="429" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="C 50 0 *" id="377" nz="1" name="ФИО" lz="0" sort="0" vd="0" >
                        <description id="385" />
                    </field>
                    <string_view stdf="0" id="379" >
                        <svfunction id="380" />
                        <fieldid id="381" >377</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="C 100 0 *" id="386" nz="1" name="Должность" lz="0" sort="0" vd="0" >
                        <description id="387" />
                    </field>
                    <field sum="0" plus="0" type="C 10 0 *" id="388" nz="1" name="Номер доверенности" sort="0" >
                        <description id="389" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" validator="" plus="0" type="D 0 0 *" id="390" nz="1" name="Дата доверенности" lz="0" sort="0" vd="0" >
                        <description id="391" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 581 I *" id="800" nz="0" name="подразделение" lz="0" sort="1" vd="0" >
                        <description id="801" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="382" >
                        <svfunction id="383" />
                        <fieldid id="384" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="430" name="Ввод элемента" >
                        <description id="431" />
                        <sourcecode id="432" >function on_formstart()
{
    if(!GetMode()) Widget(&quot;Дата доверенности&quot;).setValue(&quot;00.00.0000&quot;);	
}
</sourcecode>
                        <defaultmod id="433" >14</defaultmod>
                        <dialogform id="434" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>375&lt;/width>
            &lt;height>245&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Сотрудники&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>376&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout31&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Номер доверенности&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>388&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 10 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Номер доверенности&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout33&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Должность&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>386&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 100 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Должность&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout34&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Фамилия и инициалы&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>377&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>ФИО&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout35&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Дилер&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>428&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 392 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>дилер&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout35_2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Подразделение&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fOrg&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>800&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 581 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>подразделение&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout30&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>121&lt;/width>
                            &lt;height>31&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout32&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Дата доверенности&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>390&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>D 0 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Date&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Дата доверенности&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="378" />
            </catalogue>
            <catalogue id="392" name="Контрагенты" >
                <element>
                    <field sum="0" plus="0" type="C 100 0 *" id="393" nz="1" name="наименование" sort="0" >
                        <description id="401" />
                    </field>
                    <string_view stdf="0" id="395" >
                        <svfunction id="396" />
                        <fieldid id="397" >393</fieldid>
                    </string_view>
                </element>
                <group>
                    <string_view stdf="0" id="398" >
                        <svfunction id="399" />
                        <fieldid id="400" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="402" name="Ввод элемента" >
                        <description id="403" />
                        <sourcecode id="404" />
                        <defaultmod id="405" >14</defaultmod>
                        <dialogform id="406" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>422&lt;/width>
            &lt;height>94&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Дилеры&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>392&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout36&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout38&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Наименование дилера&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>393&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 100 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>наименование&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="394" />
            </catalogue>
            <catalogue id="468" name="Пользователи" >
                <element>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 25 I *" id="469" nz="0" name="имя" lz="0" sort="1" vd="0" >
                        <description id="477" />
                    </field>
                    <string_view stdf="0" id="471" >
                        <svfunction id="472" />
                        <fieldid id="473" >0</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 25 0 *" id="478" nz="0" name="пароль" lz="0" sort="0" vd="0" >
                        <description id="479" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 376 0 *" validator="" plus="0" nz="0" id="504" name="сотрудник" lz="0" sort="0" vd="0" >
                        <description id="505" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="B 0 0 *" validator="" plus="0" nz="0" id="544" name="только заявки" lz="0" sort="0" vd="0" >
                        <description id="545" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="474" >
                        <svfunction id="475" />
                        <fieldid id="476" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="511" name="Элемент" >
                        <sourcecode id="512" >var current;
var pass;
	
function on_formstart() // вызывается непосредственно перед показом формы
{
    Widget(&quot;ePassword&quot;).text= &quot;ухогорлонос&quot;;
    connect(Widget(&quot;ePassword&quot;), &quot;textChanged(const QString&amp;)&quot;, passChanged);
    current = Current();
    pass = current.Value(&quot;пароль&quot;);
}

function on_button(btn) //Вызывается при нажитии на кнопку
{
    if(btn==&quot;btnOk&quot;)
    {
	current.SetValue(&quot;пароль&quot;, pass)
	UpdateDB();
	Close();
    }
    else if(btn==&quot;btnCancel&quot;) Close();
}

function passChanged(value) //вызывается при изменении поля с именем name.
{
    pass = value;
}

function on_formstop () // вызывается при закрытии формы
{
   sys.StatusMessage(&quot;&quot;); // Очистит строку с системным сообщением.
}

</sourcecode>
                        <description id="513" />
                        <defaultmod id="514" >14</defaultmod>
                        <dialogform id="515" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>366&lt;/width>
            &lt;height>171&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Пользователи&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>468&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lLogin&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Логин:&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fLogin&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>469&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 25 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>имя&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer5&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout9&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Скрыть меню&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>544&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>B 0 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Boolean&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>только заявки&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>71&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout5&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lWorker&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Сотрудник&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fWorker&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>504&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 376 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>сотрудник&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout4&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lPassword&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Пароль&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLineEdit&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>ePassword&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;echoMode&quot;>
                        &lt;enum>Password&lt;/enum>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout1&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>261&lt;/width>
                            &lt;height>31&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnCancel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="516" name="Список" >
                        <sourcecode id="517" >function on_button(btn) //Вызывается при нажитии на кнопку
{
    if(btn==&quot;btnClose&quot;) Close();
}
</sourcecode>
                        <description id="518" />
                        <defaultmod id="519" >30</defaultmod>
                        <dialogform id="520" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>500&lt;/width>
            &lt;height>365&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Пользователи&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>468&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>логин&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>сотрудник&lt;/string>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tabUsers&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>имя&lt;/string>
                    &lt;string>сотрудник&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>логин&lt;/string>
                    &lt;string>сотрудник&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>135&lt;/string>
                    &lt;string>300&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>469&lt;/string>
                    &lt;string>504&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;editFormName&quot;>
                &lt;string>Элемент&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout6&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>241&lt;/width>
                            &lt;height>41&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnClose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Закрыть&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;10318&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="470" />
            </catalogue>
            <catalogue id="581" name="Подразделения контрагентов" >
                <element>
                    <string_view stdf="0" id="583" >
                        <svfunction id="584" />
                        <fieldid id="585" >806</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 101 0 *" id="802" nz="0" name="город" lz="0" sort="0" vd="0" >
                        <description id="803" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 392 0 *" id="804" nz="0" name="контрагент" lz="0" sort="0" vd="0" >
                        <description id="805" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 100 0 *" id="806" nz="0" name="название" lz="0" sort="0" vd="0" >
                        <description id="807" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="586" >
                        <svfunction id="587" />
                        <fieldid id="588" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="808" name="элемент" >
                        <sourcecode id="809" />
                        <description id="810" />
                        <defaultmod id="811" >30</defaultmod>
                        <dialogform id="812" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>408&lt;/width>
            &lt;height>145&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Подразделения контрагентов&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>581&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>806&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 100 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8_2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Контрагент&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>804&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 392 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>контрагент&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8_3&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Населеный пункт&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>802&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 101 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>город&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout36&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="1058" name="список" >
                        <sourcecode id="1059" >function on_formstart() 
{
    if(&quot;dealer&quot; in formData &amp;&amp; &quot;filter&quot; in formData[&quot;dealer&quot;])
    {
	Widget(&quot;tab&quot;).readOnly = true;
	var sql = new SQL;
	var field = sql.SqlFieldName(Current(), &quot;контрагент&quot;);
	Widget(&quot;tab&quot;).filter = field+&quot;=&quot;+gmParseInt(formData[&quot;dealer&quot;][&quot;filter&quot;])+&quot; OR &quot;+field+&quot;=0&quot;;
	Widget(&quot;tab&quot;).refresh();
    }
    else
    {
	Widget(&quot;fakeBtn&quot;).accel = &quot;&quot;;
	Widget(&quot;tab&quot;).readOnly = false;
    }
}
</sourcecode>
                        <description id="1060" />
                        <defaultmod id="1061" >30</defaultmod>
                        <dialogform id="1062" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>500&lt;/width>
            &lt;height>381&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Подразделения контрагентов&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>581&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>город&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>название&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>город&lt;/string>
                    &lt;string>название&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>город&lt;/string>
                    &lt;string>название&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>100&lt;/string>
                    &lt;string>100&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>802&lt;/string>
                    &lt;string>806&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>240&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QPushButton&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>fakeBtn&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;sizePolicy&quot;>
                &lt;sizepolicy>
                    &lt;hsizetype>0&lt;/hsizetype>
                    &lt;vsizetype>0&lt;/vsizetype>
                    &lt;horstretch>0&lt;/horstretch>
                    &lt;verstretch>0&lt;/verstretch>
                &lt;/sizepolicy>
            &lt;/property>
            &lt;property name=&quot;minimumSize&quot;>
                &lt;size>
                    &lt;width>1&lt;/width>
                    &lt;height>1&lt;/height>
                &lt;/size>
            &lt;/property>
            &lt;property name=&quot;maximumSize&quot;>
                &lt;size>
                    &lt;width>1&lt;/width>
                    &lt;height>1&lt;/height>
                &lt;/size>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Shift+Return&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;wActionButton&quot; row=&quot;1&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>btnClose&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Отмена&lt;/string>
            &lt;/property>
            &lt;property name=&quot;accel&quot;>
                &lt;string>Esc&lt;/string>
            &lt;/property>
            &lt;property name=&quot;iconSet&quot;>
                &lt;iconset>image0&lt;/iconset>
            &lt;/property>
            &lt;property name=&quot;action&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionUpdate&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionTurnOn&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionClose&quot;>
                &lt;bool>true&lt;/bool>
            &lt;/property>
            &lt;property name=&quot;actionId&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;script&quot;>
                &lt;bool>false&lt;/bool>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="582" />
            </catalogue>
            <catalogue id="557" name="Банки" >
                <element>
                    <string_view stdf="0" id="559" >
                        <svfunction id="560" />
                        <fieldid id="561" >673</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 254 I *" id="673" nz="0" name="название" lz="0" sort="1" vd="0" >
                        <description id="674" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="562" >
                        <svfunction id="563" />
                        <fieldid id="564" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="839" name="элемент" >
                        <sourcecode id="840" />
                        <description id="841" />
                        <defaultmod id="842" >14</defaultmod>
                        <dialogform id="843" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>540&lt;/width>
            &lt;height>95&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Банки&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>557&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout120&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название банка&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>673&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;value&quot;>
                        &lt;string>банк&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 254 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout121&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>380&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="558" />
            </catalogue>
            <catalogue id="565" name="Подразделения банков" >
                <element>
                    <string_view stdf="0" id="567" >
                        <svfunction id="568" />
                        <fieldid id="569" >675</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 100 I *" id="675" nz="0" name="Название" lz="0" sort="1" vd="0" >
                        <description id="676" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 101 I *" id="677" nz="0" name="Город" lz="0" sort="1" vd="0" >
                        <description id="678" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 557 I *" id="679" nz="0" name="Банк" lz="0" sort="1" vd="0" >
                        <description id="680" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="681" nz="0" name="Куратор" lz="0" sort="0" vd="0" >
                        <description id="682" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="(NNN)NNN-NN-NN" numsuff="" twostate="0" plus="0" validator="" type="C 14 0 *" id="683" nz="0" name="Телефон" lz="0" sort="0" vd="0" >
                        <description id="684" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="(NNN)NNN-NN-NN" numsuff="" twostate="0" plus="0" validator="" type="C 14 0 *" id="685" nz="0" name="Факс" lz="0" sort="0" vd="0" >
                        <description id="686" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="(NNN)NNN-NN-NN" numsuff="" twostate="0" plus="0" validator="" type="C 14 0 *" id="687" nz="0" name="Мобильный" lz="0" sort="0" vd="0" >
                        <description id="688" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="689" nz="0" name="e-mail" lz="0" sort="0" vd="0" >
                        <description id="690" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="691" nz="0" name="доп e-mail" lz="0" sort="0" vd="0" >
                        <description id="692" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="570" >
                        <svfunction id="571" />
                        <fieldid id="572" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="962" name="элемент" >
                        <sourcecode id="963" />
                        <description id="964" />
                        <defaultmod id="965" >14</defaultmod>
                        <dialogform id="966" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>500&lt;/width>
            &lt;height>211&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Подразделения банков&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>565&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout6&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>банк&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>679&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 557 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Банк&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout7&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>куратор&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>681&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Куратор&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;1&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>телефон&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>683&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 14 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Телефон&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout10&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>мобильный&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>687&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 14 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Мобильный&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout9&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>факс&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>685&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 14 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Факс&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout11&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel8&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>e-mail&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_8&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>689&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>e-mail&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout12&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel9&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>доп. e-mail&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_9&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>691&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>доп e-mail&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout4&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>675&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 100 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;1&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout5&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>город&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>677&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 101 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Город&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout121&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>380&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="566" />
            </catalogue>
            <catalogue id="591" name="кредитные предложения" >
                <element>
                    <string_view stdf="0" id="593" >
                        <svfunction id="594" />
                        <fieldid id="595" >701</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="701" nz="0" name="название" lz="0" sort="0" vd="0" >
                        <description id="702" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 557 0 *" id="703" nz="0" name="банк" lz="0" sort="0" vd="0" >
                        <description id="704" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="705" nz="0" name="обязательное страхование" lz="0" sort="0" vd="0" >
                        <description id="706" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="707" nz="0" name="страхование в сумме" lz="0" sort="0" vd="0" >
                        <description id="708" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="709" nz="0" name="залог" lz="0" sort="0" vd="0" >
                        <description id="710" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 2 0 *" id="711" nz="0" name="срок одобрения" lz="0" sort="0" vd="0" >
                        <description id="712" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 1 0 *" id="713" nz="0" name="метод" lz="0" sort="0" vd="0" >
                        <description id="714" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="715" nz="0" name="полное досрочное погашение" lz="0" sort="0" vd="0" >
                        <description id="716" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="717" nz="0" name="частичное досрочное погашение" lz="0" sort="0" vd="0" >
                        <description id="718" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="596" >
                        <svfunction id="597" />
                        <fieldid id="598" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="823" name="элемент" >
                        <sourcecode id="824" >function on_formstart() 
{
    Widget(&quot;cbMethod&quot;).currentItem = Current().Value(&quot;метод&quot;);
}

function on_button(btn) 
{
    if(btn==&quot;btnOk&quot;)
    {
	Current().SetValue(&quot;метод&quot;, Widget(&quot;cbMethod&quot;).currentItem);	
	UpdateDB();
	Close();
    }
    else if(btn==&quot;btnParameters&quot;)
    {
	formData[&quot;Редактор параметров&quot;] = new Array();
	formData[&quot;Редактор параметров&quot;][&quot;предложение&quot;] = Current().Uid();
	sys.OpenForm(&quot;Report.Расчеты.Form.Редактор параметров&quot;, 1);
    }
}
</sourcecode>
                        <description id="825" />
                        <defaultmod id="826" >14</defaultmod>
                        <dialogform id="827" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>628&lt;/width>
            &lt;height>246&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>кредитные предложения&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>591&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout89&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lName&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>701&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout90&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lBank&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>банк&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>703&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 557 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>банк&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout108&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout92&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;wDBField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>wDBField_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>705&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>B 0 0 *&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Boolean&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;FieldName&quot;>
                                &lt;string>обязательное страхование&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>lInsurance&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Обязанность застраховать предмет залога&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                                &lt;cstring>wDBField_2_2&lt;/cstring>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout91&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;wDBField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>wDBField_2_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>707&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>B 0 0 *&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Boolean&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;FieldName&quot;>
                                &lt;string>страхование в сумме&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>lBank_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Возможно страхование в кредит&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                                &lt;cstring>wDBField_2_2_2&lt;/cstring>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer52&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>31&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout111&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lBank_2_2_3_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>метод расчета платежей&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QComboBox&quot;>
                    &lt;item>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>&lt;/string>
                        &lt;/property>
                    &lt;/item>
                    &lt;item>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>Возврат части кредита с уплатой процентов&lt;/string>
                        &lt;/property>
                    &lt;/item>
                    &lt;item>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>Аннуитетный платеж&lt;/string>
                        &lt;/property>
                    &lt;/item>
                    &lt;item>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>Единовременный возврат кредита с периодической уплатой процентов&lt;/string>
                        &lt;/property>
                    &lt;/item>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbMethod&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QGroupBox&quot; row=&quot;4&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>groupBox4&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;title&quot;>
                &lt;string>возможность досрочного погашения&lt;/string>
            &lt;/property>
            &lt;grid>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout115&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;wDBField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>fFull&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;sizePolicy&quot;>
                                &lt;sizepolicy>
                                    &lt;hsizetype>1&lt;/hsizetype>
                                    &lt;vsizetype>0&lt;/vsizetype>
                                    &lt;horstretch>0&lt;/horstretch>
                                    &lt;verstretch>0&lt;/verstretch>
                                &lt;/sizepolicy>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>715&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>B 0 0 *&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Boolean&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;FieldName&quot;>
                                &lt;string>полное досрочное погашение&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>lBank_2_2_3_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Полного&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                                &lt;cstring>fFull&lt;/cstring>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout116&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;wDBField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>fPartial&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;sizePolicy&quot;>
                                &lt;sizepolicy>
                                    &lt;hsizetype>1&lt;/hsizetype>
                                    &lt;vsizetype>0&lt;/vsizetype>
                                    &lt;horstretch>0&lt;/horstretch>
                                    &lt;verstretch>0&lt;/verstretch>
                                &lt;/sizepolicy>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>717&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>B 0 0 *&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Boolean&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;FieldName&quot;>
                                &lt;string>частичное досрочное погашение&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>lBank_2_2_3_2_2_3&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Частичного&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                                &lt;cstring>fPartial&lt;/cstring>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;spacer row=&quot;0&quot; column=&quot;2&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer58&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>41&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/grid>
        &lt;/widget>
        &lt;spacer row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer54&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>21&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout124&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lBank_2_2_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Срок одобрения, дней&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2_2_2_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>60&lt;/width>
                            &lt;height>32767&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>711&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;value&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 2 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>срок одобрения&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout93&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;wDBField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>wDBField_2_2_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>709&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>B 0 0 *&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Boolean&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;FieldName&quot;>
                                &lt;string>залог&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>lBank_2_2_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>залог&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                                &lt;cstring>wDBField_2_2_2_2&lt;/cstring>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer53&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>210&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnParameters&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Расчетные параметры&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image2&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4418&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="592" />
            </catalogue>
            <catalogue id="599" name="доступные кредиты" >
                <element>
                    <string_view stdf="0" id="601" >
                        <svfunction id="602" />
                        <fieldid id="603" >0</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 101 I *" id="693" nz="0" name="населенный пункт" lz="0" sort="1" vd="0" >
                        <description id="694" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 253 I *" id="697" nz="0" name="группа товаров" lz="0" sort="1" vd="0" >
                        <description id="698" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 591 I *" id="695" nz="0" name="кредитное предложение" lz="0" sort="1" vd="0" >
                        <description id="696" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B I 0 *" id="699" nz="0" name="доступность" lz="0" sort="1" vd="0" >
                        <description id="700" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="604" >
                        <svfunction id="605" />
                        <fieldid id="606" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="600" />
            </catalogue>
            <catalogue id="866" name="выходные параметры" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 10 0 *" validator="" plus="0" nz="0" id="867" name="название" lz="0" sort="0" vd="0" >
                        <description id="875" />
                    </field>
                    <string_view stdf="0" id="869" >
                        <svfunction id="870" />
                        <fieldid id="871" >867</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 100 0 *" validator="" plus="0" nz="0" id="889" name="представление" lz="0" sort="0" vd="0" >
                        <description id="890" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 2 0 I" validator="" plus="0" nz="0" id="891" name="очередность" lz="0" sort="1" vd="0" >
                        <description id="892" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="872" >
                        <svfunction id="873" />
                        <fieldid id="874" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="0" id="883" name="список" >
                        <sourcecode id="884" />
                        <description id="885" />
                        <defaultmod id="886" >30</defaultmod>
                        <dialogform id="887" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>628&lt;/width>
            &lt;height>381&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>выходные параметры&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>866&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;wDBTable&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>название&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>представление&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;column>
                &lt;property name=&quot;text&quot;>
                    &lt;string>очередность&lt;/string>
                &lt;/property>
                &lt;property name=&quot;pixmap&quot;>
                    &lt;pixmap>&lt;/pixmap>
                &lt;/property>
            &lt;/column>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>wDBTable3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;DefFields&quot;>
                &lt;stringlist>
                    &lt;string>название&lt;/string>
                    &lt;string>представление&lt;/string>
                    &lt;string>очередность&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefHeaders&quot;>
                &lt;stringlist>
                    &lt;string>название&lt;/string>
                    &lt;string>представление&lt;/string>
                    &lt;string>очередность&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;ColWidth&quot;>
                &lt;stringlist>
                    &lt;string>200&lt;/string>
                    &lt;string>300&lt;/string>
                    &lt;string>100&lt;/string>
                &lt;/stringlist>
            &lt;/property>
            &lt;property name=&quot;DefIdList&quot;>
                &lt;stringlist>
                    &lt;string>867&lt;/string>
                    &lt;string>889&lt;/string>
                    &lt;string>891&lt;/string>
                &lt;/stringlist>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="868" />
            </catalogue>
            <catalogue id="607" name="расчеты" >
                <element>
                    <string_view stdf="0" id="609" >
                        <svfunction id="610" />
                        <fieldid id="611" >0</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 591 I *" validator="" plus="0" nz="0" id="893" name="кп" lz="0" sort="1" vd="0" >
                        <description id="894" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 866 I *" validator="" plus="0" nz="0" id="895" name="выходной параметр" lz="0" sort="1" vd="0" >
                        <description id="896" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 3 0 I" validator="" plus="0" nz="0" id="897" name="порядок" lz="0" sort="1" vd="0" >
                        <description id="898" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 254 0 *" validator="" plus="0" nz="0" id="899" name="формула" lz="0" sort="0" vd="0" >
                        <description id="900" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="612" >
                        <svfunction id="613" />
                        <fieldid id="614" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="608" />
            </catalogue>
            <catalogue id="639" name="Валюты" >
                <element>
                    <string_view stdf="0" id="641" >
                        <svfunction id="642" />
                        <fieldid id="643" >958</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 20 I *" id="958" nz="0" name="название" lz="0" sort="1" vd="0" >
                        <description id="959" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 10 4 *" id="960" nz="0" name="курс" lz="0" sort="0" vd="0" >
                        <description id="961" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="644" >
                        <svfunction id="645" />
                        <fieldid id="646" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form readonly="0" type="1" id="951" name="элемент" >
                        <sourcecode id="952" />
                        <description id="953" />
                        <defaultmod id="954" >14</defaultmod>
                        <dialogform id="955" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>398&lt;/width>
            &lt;height>110&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Валюты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>639&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout26&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>230&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ОК&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer14&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>21&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout46&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>курс&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>960&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 10 3 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>курс&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer21&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>181&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout47&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wDBField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>958&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 20 I *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="640" />
            </catalogue>
            <catalogue id="772" name="Свойства" >
                <element>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 20 0 I" validator="" plus="0" nz="0" id="773" name="Объект" lz="0" sort="1" vd="0" >
                        <description id="781" />
                    </field>
                    <string_view stdf="0" id="775" >
                        <svfunction id="776" />
                        <fieldid id="777" >786</fieldid>
                    </string_view>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 32 0 *" validator="" plus="0" nz="0" id="782" name="Тип свойства" lz="0" sort="0" vd="0" >
                        <description id="783" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 20 0 *" validator="" plus="0" nz="0" id="784" name="Свойство" lz="0" sort="0" vd="0" >
                        <description id="785" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 254 0 *" validator="" plus="0" nz="0" id="788" name="Тип" lz="0" sort="0" vd="0" >
                        <description id="789" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 254 0 *" validator="" plus="0" nz="0" id="786" name="Значение" lz="0" sort="0" vd="0" >
                        <description id="787" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="778" >
                        <svfunction id="779" />
                        <fieldid id="780" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="774" />
            </catalogue>
            <catalogue id="906" name="функции" >
                <element>
                    <string_view stdf="0" id="908" >
                        <svfunction id="909" />
                        <fieldid id="910" >914</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 20 0 *" id="914" nz="0" name="название" lz="0" sort="0" vd="0" >
                        <description id="915" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 1 0 *" id="916" nz="0" name="количество аргументов" lz="0" sort="0" vd="0" >
                        <description id="917" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 254 0 *" id="918" nz="0" name="скрипт" lz="0" sort="0" vd="0" >
                        <description id="919" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 20 I *" id="920" nz="0" name="раздел" lz="0" sort="1" vd="0" >
                        <description id="921" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 254 0 *" id="922" nz="0" name="описание" lz="0" sort="0" vd="0" >
                        <description id="923" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="911" >
                        <svfunction id="912" />
                        <fieldid id="913" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="924" name="элемент" >
                        <sourcecode id="925" >function fillSections()
{
    var sects = new Array();
    var cat = new Catalogue(&quot;функции&quot;);    
    cat.Select();
    if(cat.First()) do
    {
	if(!(cat.Value(&quot;раздел&quot;) in sects))
	{
	    sects[cat.Value(&quot;раздел&quot;)] = cat.Value(&quot;раздел&quot;);
	    Widget(&quot;cbSections&quot;).insertItem(cat.Value(&quot;раздел&quot;));
	}
    } while(cat.Next());    
}

function on_formstart() // вызывается непосредственно перед показом формы
{
    fillSections()
    Widget(&quot;cbSections&quot;).currentText = Current().Value(&quot;раздел&quot;);
}

function on_button(btn) //Вызывается при нажитии на кнопку
{
    if(btn==&quot;btnOk&quot;)
    {
	Current().SetValue(&quot;раздел&quot;, Widget(&quot;cbSections&quot;).currentText);
	UpdateDB();
	Close();
    }
}
</sourcecode>
                        <description id="926" />
                        <defaultmod id="927" >14</defaultmod>
                        <dialogform id="928" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>671&lt;/width>
            &lt;height>212&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>функции&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>906&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout1&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fName&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>914&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 20 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout3&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>скрипт&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fScript&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>918&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 254 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>скрипт&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout5&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>описание&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fDescr&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>922&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 254 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>описание&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;spacer row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer7_2&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout4&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>раздел&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;buddy&quot; stdset=&quot;0&quot;>
                        &lt;cstring>cbSections&lt;/cstring>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbSections&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;focusPolicy&quot;>
                        &lt;enum>TabFocus&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;editable&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;duplicatesEnabled&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>количество аргументов&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fArgs&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>35&lt;/width>
                            &lt;height>32767&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>916&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;value&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 1 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>количество аргументов&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;0&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer9&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>61&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;2&quot; column=&quot;1&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer8&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>351&lt;/width>
                    &lt;height>21&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="907" />
            </catalogue>
            <catalogue id="1063" name="Базы данных" >
                <element>
                    <string_view stdf="0" id="1065" >
                        <svfunction id="1066" />
                        <fieldid id="1067" >1093</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="1093" nz="0" name="Название" lz="0" sort="0" vd="0" >
                        <description id="1094" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 10 0 *" id="1095" nz="0" name="ID" lz="0" sort="0" vd="0" >
                        <description id="1096" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 10 0 *" id="1108" nz="0" name="принят" lz="0" sort="0" vd="0" >
                        <description id="1109" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 10 0 *" id="1110" nz="0" name="передан" lz="0" sort="0" vd="0" >
                        <description id="1111" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="D 0 0 *" id="1152" nz="0" name="конец выгрузки" lz="0" sort="0" vd="0" >
                        <description id="1153" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="1190" nz="0" name="текущая" lz="0" sort="0" vd="0" >
                        <description id="1191" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 581 0 *" validator="" plus="0" nz="0" id="1192" name="подразделение" lz="0" sort="0" vd="0" >
                        <description id="1193" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="1068" >
                        <svfunction id="1069" />
                        <fieldid id="1070" >0</fieldid>
                    </string_view>
                </group>
                <forms>
                    <form type="1" readonly="0" id="1147" name="элемент" >
                        <sourcecode id="1148" >function on_formstart() // вызывается непосредственно перед показом формы
{
    Widget(&quot;fEnd&quot;).setDateTime(Current().Value(&quot;конец выгрузки&quot;));
}

function on_button(btn) //Вызывается при нажитии на кнопку
{
    if(btn==&quot;btnOk&quot;)
    {
	Current().SetValue(&quot;конец выгрузки&quot;, Widget(&quot;fEnd&quot;).dateTime);
	UpdateDB();
	Close();
    }
    else if(btn==&quot;btnGen&quot;)
    {
	if(Value(&quot;ID&quot;) &amp;&amp; !gmQuestion(&quot;ID для этой БД уже задан, его смена может привести к потере данных!!&quot;)) return;
	SetValue(&quot;ID&quot;, Math.floor(1000000000*Math.random()));
    }
}
</sourcecode>
                        <description id="1149" />
                        <defaultmod id="1150" >14</defaultmod>
                        <dialogform id="1151" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Catalogue&lt;/class>
&lt;widget class=&quot;wCatalogue&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Catalogue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>427&lt;/width>
            &lt;height>240&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Базы данных&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>1063&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout6&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2_2_2_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>дата последней выгрузки&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QDateTimeEdit&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fEnd&lt;/cstring>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;7&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout14&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>ID базы данных&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fID&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>1095&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 10 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>ID&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnGen&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Генерировать&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout15&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>№ принятого пакета&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>91&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fInNo&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;enabled&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>1108&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 10 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>принят&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout16&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2_2_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>№ отправленного пакета&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer8&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>51&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fOutNo&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;enabled&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>1110&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 10 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>передан&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;6&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer6&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>40&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout1_2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>название&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fName&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>1093&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 50 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>Название&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout1_2_2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2_3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>подразделение&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wDBField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fName_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>1192&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 581 0 *&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;FieldName&quot;>
                        &lt;string>подразделение&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wcatalogue.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="1064" />
            </catalogue>
            <catalogue id="1071" name="Объекты для выгрузки" >
                <element>
                    <string_view stdf="0" id="1073" >
                        <svfunction id="1074" />
                        <fieldid id="1075" >0</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 1063 0 *" id="1079" nz="0" name="получатель" lz="0" sort="0" vd="0" >
                        <description id="1080" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="1081" nz="0" name="объект" lz="0" sort="0" vd="0" >
                        <description id="1082" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="1076" >
                        <svfunction id="1077" />
                        <fieldid id="1078" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="1072" />
            </catalogue>
            <catalogue id="1085" name="Фильтры обмена" >
                <element>
                    <string_view stdf="0" id="1087" >
                        <svfunction id="1088" />
                        <fieldid id="1089" >0</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 1071 0 *" id="1179" nz="0" name="объект выгрузки" lz="0" sort="0" vd="0" >
                        <description id="1180" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 254 0 *" id="1181" nz="0" name="префильтр" lz="0" sort="0" vd="0" >
                        <description id="1182" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 254 0 *" id="1183" nz="0" name="фильтр" lz="0" sort="0" vd="0" >
                        <description id="1184" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="1090" >
                        <svfunction id="1091" />
                        <fieldid id="1092" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="1086" />
            </catalogue>
            <catalogue id="1113" name="Соответсвия объектов" >
                <element>
                    <string_view stdf="0" id="1115" >
                        <svfunction id="1116" />
                        <fieldid id="1117" >0</fieldid>
                    </string_view>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 10 I *" id="1121" nz="0" name="БД" lz="0" sort="1" vd="0" >
                        <description id="1122" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 20 0 *" id="1125" nz="0" name="объект" lz="0" sort="0" vd="0" >
                        <description id="1126" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="N 20 0 *" id="1127" nz="0" name="соответствие" lz="0" sort="0" vd="0" >
                        <description id="1128" />
                    </field>
                </element>
                <group>
                    <string_view stdf="0" id="1118" >
                        <svfunction id="1119" />
                        <fieldid id="1120" >0</fieldid>
                    </string_view>
                </group>
                <forms/>
                <webforms/>
                <description id="1114" />
            </catalogue>
        </catalogues>
        <documents>
            <document id="127" name="Страховой полис" >
                <header>
                    <field sum="0" plus="0" type="C 20 0 *" id="128" nz="1" name="Номер полиса" sort="0" >
                        <description id="134" />
                    </field>
                    <field sum="0" plus="0" type="D 0 0 *" id="135" nz="1" name="Дата заключения" sort="0" >
                        <description id="136" />
                    </field>
                    <field sum="0" plus="0" type="O 101 0 *" id="137" nz="1" name="Место выдачи" sort="0" >
                        <description id="138" />
                    </field>
                    <field sum="0" plus="0" type="O 139 0 *" id="231" nz="1" name="Страхователь" sort="0" >
                        <description id="232" />
                    </field>
                    <field sum="0" plus="0" type="C 200 0 *" id="233" nz="1" name="Выгодоприобретатель" sort="0" >
                        <description id="234" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="454" nz="0" name="Кредитный полис" sort="0" >
                        <description id="455" />
                    </field>
                    <field sum="0" plus="0" type="C 10 0 *" id="237" nz="0" name="Номер договора залога" sort="0" >
                        <description id="238" />
                    </field>
                    <field sum="0" plus="0" type="D 0 0 *" id="239" nz="0" name="Дата договора залога" sort="0" >
                        <description id="240" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="241" nz="1" name="Объект - СНТ" sort="0" >
                        <description id="242" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="243" nz="0" name="Объект - ГО" sort="0" >
                        <description id="244" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="245" nz="0" name="Объект - НС" sort="0" >
                        <description id="246" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="249" nz="1" name="Период эксплуатации и хранения" sort="0" >
                        <description id="250" />
                    </field>
                    <field sum="0" plus="0" type="B 0 0 *" id="251" nz="1" name="Период хранения" sort="0" >
                        <description id="252" />
                    </field>
                    <field sum="0" type="O 288 0 *" plus="0" nz="1" id="318" name="Модель СНТ" sort="0" >
                        <description id="319" />
                    </field>
                    <field sum="0" type="C 20 0 *" plus="0" nz="0" id="320" name="Заводской номер" sort="0" >
                        <description id="321" />
                    </field>
                    <field sum="0" type="C 20 0 *" plus="0" nz="0" id="322" name="Регистрационный номер" sort="0" >
                        <description id="323" />
                    </field>
                    <field sum="0" type="N 4 0 *" plus="1" nz="1" id="324" name="Год выпуска" sort="0" >
                        <description id="325" />
                    </field>
                    <field sum="0" type="C 200 0 *" plus="0" nz="1" id="326" name="Место хранения" sort="0" >
                        <description id="327" />
                    </field>
                    <field sum="0" type="N 14 2 *" plus="1" nz="1" id="328" name="Страховая сумма - Автокаско" sort="0" >
                        <description id="329" />
                    </field>
                    <field sum="0" type="N 14 2 *" plus="1" nz="0" id="330" name="Страховая сумма - ГО" sort="0" >
                        <description id="331" />
                    </field>
                    <field sum="0" type="N 14 2 *" plus="1" nz="0" id="332" name="Страховая сумма - НС" sort="0" >
                        <description id="333" />
                    </field>
                    <field sum="0" plus="1" type="N 10 2 *" id="435" nz="1" name="Страховая премия - Автокаско" sort="0" >
                        <description id="436" />
                    </field>
                    <field sum="0" plus="1" type="N 10 2 *" id="437" nz="0" name="Страховая премия - ГО" sort="0" >
                        <description id="438" />
                    </field>
                    <field sum="0" plus="1" type="N 10 2 *" id="439" nz="0" name="Страховая премия - НС" sort="0" >
                        <description id="440" />
                    </field>
                    <field sum="0" type="N 10 2 *" plus="1" nz="1" id="345" name="Страховая премия" sort="0" >
                        <description id="346" />
                    </field>
                    <field sum="0" plus="1" type="N 10 2 *" id="441" nz="1" name="Франшиза - Автокаско" sort="0" >
                        <description id="442" />
                    </field>
                    <field sum="0" type="B 0 0 *" plus="0" nz="1" id="334" name="Уплата - единовременно" sort="0" >
                        <description id="335" />
                    </field>
                    <field sum="0" type="B 0 0 *" plus="0" nz="1" id="336" name="Уплата - в рассрочку" sort="0" >
                        <description id="337" />
                    </field>
                    <field sum="0" type="N 2 0 *" plus="0" nz="0" id="452" name="Количество взносов" sort="0" >
                        <description id="453" />
                    </field>
                    <field sum="0" type="D 0 0 *" plus="0" nz="1" id="352" name="Начало действия" sort="0" >
                        <description id="353" />
                    </field>
                    <field sum="0" plus="0" type="N 2 0 *" id="456" nz="1" name="Срок страхования" sort="0" >
                        <description id="457" />
                    </field>
                    <field sum="0" type="D 0 0 *" plus="0" nz="1" id="354" name="Конец действия" sort="0" >
                        <description id="355" />
                    </field>
                    <field sum="0" plus="0" type="C 254 0 *" id="374" nz="0" name="Прочие сведения" sort="0" >
                        <description id="375" />
                    </field>
                    <field sum="0" plus="0" type="O 376 0 *" id="444" nz="1" name="Сотрудник" sort="0" >
                        <description id="445" />
                    </field>
                </header>
                <tables>
                    <table id="347" name="Страховые взносы" >
                        <field sum="0" type="N 10 2 *" plus="1" nz="1" id="348" name="Взнос" sort="0" >
                            <description id="349" />
                        </field>
                        <field sum="0" type="D 0 0 *" plus="0" nz="1" id="350" name="Срок уплаты" sort="0" >
                            <description id="351" />
                        </field>
                        <field sum="0" plus="0" type="D 0 0 *" id="450" nz="0" name="Оплачено" sort="0" >
                            <description id="451" />
                        </field>
                    </table>
                </tables>
                <forms>
                    <form type="0" readonly="0" id="443" name="Ввод элемента" >
                        <description id="446" />
                        <sourcecode id="447" >function on_valuechanged(name, value)
{
   if (name==&quot;Кредитный полис&quot;)
    {
	if (value==1)
	{
	    Widget(&quot;Номер договора залога&quot;).setEnabled(true);
	    Widget(&quot;Дата договора залога&quot;).setEnabled(true);	
	    SetValue(&quot;Объект - ГО&quot;,1);
	    Widget(&quot;Объект - ГО&quot;).setEnabled(false);
	    SetValue(&quot;Объект - НС&quot;,1);
	    Widget(&quot;Объект - НС&quot;).setEnabled(false);
	    SetValue(&quot;Период эксплуатации и хранения&quot;,1);
	    Widget(&quot;Период эксплуатации и хранения&quot;).setEnabled(false);
	    SetValue(&quot;Период хранения&quot;,0);
	    Widget(&quot;Период хранения&quot;).setEnabled(false);
	    SetValue(&quot;Выгодоприобретатель&quot;,&quot;&quot;);
	}
	else
	{
	    Widget(&quot;Номер договора залога&quot;).setEnabled(false);
	    Widget(&quot;Дата договора залога&quot;).setEnabled(false);
	    Widget(&quot;Объект - ГО&quot;).setEnabled(true);
	    Widget(&quot;Объект - НС&quot;).setEnabled(true);
	    Widget(&quot;Период эксплуатации и хранения&quot;).setEnabled(true);
	    Widget(&quot;Период хранения&quot;).setEnabled(true);

	}
    }
      if (name==&quot;Период эксплуатации и хранения&quot;)
   {
	  if ((value==1) &amp; (DBValue(&quot;Период хранения&quot;)==1)) SetValue(&quot;Период хранения&quot;,0);
	  if ((value==0) &amp; (DBValue(&quot;Период хранения&quot;)==0)) SetValue(&quot;Период хранения&quot;,1);
      }
       if (name==&quot;Период хранения&quot;)
   {
	  if ((DBValue(&quot;Период эксплуатации и хранения&quot;)==1) &amp; (value==1)) SetValue(&quot;Период эксплуатации и хранения&quot;,0);
	  if ((DBValue(&quot;Период эксплуатации и хранения&quot;)==0) &amp; (value==0)) SetValue(&quot;Период эксплуатации и хранения&quot;,1);
      }
        if (name==&quot;Уплата - единовременно&quot;)
   {
	  if ((value==1) &amp; (DBValue(&quot;Уплата - в рассрочку&quot;)==1)) SetValue(&quot;Уплата - в рассрочку&quot;,0);
	  if ((value==0) &amp; (DBValue(&quot;Уплата - в рассрочку&quot;)==0)) SetValue(&quot;Уплата - в рассрочку&quot;,1);
	  if (value==1) SetValue(&quot;Количество взносов&quot;,1);
      }
       if (name==&quot;Уплата - в рассрочку&quot;)
   {
	  if ((DBValue(&quot;Уплата - единовременно&quot;)==1) &amp; (value==1)) SetValue(&quot;Уплата - единовременно&quot;,0);
	  if ((DBValue(&quot;Уплата - единовременно&quot;)==0) &amp; (value==0)) SetValue(&quot;Уплата - единовременно&quot;,1);
	  if (value==1) 
	  {
	      Widget(&quot;Количество взносов&quot;).setEnabled(true);
	  }
	  else 
	  {
	      Widget(&quot;Количество взносов&quot;).setEnabled(false);
	  }
      }
          if (name==&quot;Объект - ГО&quot;)
       {
	      if (value==1)
	      {
		  Widget(&quot;Страховая сумма - ГО&quot;).setEnabled(true);
		  Widget(&quot;Страховая премия - ГО&quot;).setEnabled(true);
	      }
	      else
	      {
		  SetValue(&quot;Страховая сумма - ГО&quot;,parseFloat(0));
		  SetValue(&quot;Страховая премия - ГО&quot;,parseFloat(0));
		  Widget(&quot;Страховая сумма - ГО&quot;).setEnabled(false);
		  Widget(&quot;Страховая премия - ГО&quot;).setEnabled(false);
	      }
	  }
	   
	  if (name==&quot;Объект - НС&quot;)
       {
	      if (value==1)
	      {
		  Widget(&quot;Страховая сумма - НС&quot;).setEnabled(true);
		  Widget(&quot;Страховая премия - НС&quot;).setEnabled(true);
	      }
	      else
	      {
		  SetValue(&quot;Страховая сумма - НС&quot;,parseFloat(0));
		  SetValue(&quot;Страховая премия - НС&quot;,parseFloat(0));
		  Widget(&quot;Страховая сумма - НС&quot;).setEnabled(false);
		  Widget(&quot;Страховая премия - НС&quot;).setEnabled(false);
	      }
	  }
	   if ((name==&quot;Страховая премия - ГО&quot;) || (name==&quot;Страховая премия - Автокаско&quot;) ||  (name==&quot;Страховая премия - НС&quot;))
	  { 
	       sum = parseFloat(Value(&quot;Страховая премия - Автокаско&quot;))+parseFloat(Value(&quot;Страховая премия - ГО&quot;))+parseFloat(Value(&quot;Страховая премия - НС&quot;));
	       SetValue(&quot;Страховая премия&quot;,sum);
	   }
	  if (name==&quot;Модель СНТ&quot;)
	   {
	      SetValue(&quot;Страховая сумма - Автокаско&quot;, GetCatalogValue(&quot;Модели&quot;,DBValue(&quot;Модель СНТ&quot;),&quot;Стоимость&quot;));
	  }
  	  if ((name==&quot;Начало действия&quot;) || (name==&quot;Срок страхования&quot;))
	  {
	     	  var kd = ToDate(Value(&quot;Начало действия&quot;),parseFloat(Value(&quot;Срок страхования&quot;)));
		  SetValue(&quot;Конец действия&quot;, kd);
		  if (parseFloat(Value(&quot;Срок страхования&quot;))&lt;12)
		  {
		      SetValue(&quot;Уплата - единовременно&quot;,1);
		      Widget(&quot;Уплата - единовременно&quot;).setEnabled(false);
		      Widget(&quot;Уплата - в рассрочку&quot;).setEnabled(false);
		  }
		  else
		  {
		      Widget(&quot;Уплата - единовременно&quot;).setEnabled(true);
		      Widget(&quot;Уплата - в рассрочку&quot;).setEnabled(true);		      
		  }
	  }
	  
	 
     
}
    
//}    Пустой  С крестиком 
function on_formstart()
{
    Widget(&quot;StrVzn&quot;).setEnabled(false);
    SetValue(&quot;Объект - СНТ&quot;,1);
    Widget(&quot;Объект - СНТ&quot;).setEnabled(false);
    Widget(&quot;Дата заключения&quot;).setEnabled(false);
    Widget(&quot;Страховая премия&quot;).setEnabled(false);
    Widget(&quot;Конец действия&quot;).setEnabled(false);
    if(Value(&quot;Кредитный полис&quot;)==1)
    {
	Widget(&quot;Номер договора залога&quot;).setEnabled(true);
	Widget(&quot;Дата договора залога&quot;).setEnabled(true);
	Widget(&quot;Объект - НС&quot;).setEnabled(false);
	Widget(&quot;Объект - ГО&quot;).setEnabled(false);
	Widget(&quot;Период эксплуатации и хранения&quot;).setEnabled(false);
	Widget(&quot;Период хранения&quot;).setEnabled(false);

    }
    else
    {
	Widget(&quot;Номер договора залога&quot;).setEnabled(false);
	Widget(&quot;Дата договора залога&quot;).setEnabled(false);
	Widget(&quot;Объект - НС&quot;).setEnabled(true);
	Widget(&quot;Объект - ГО&quot;).setEnabled(true);
	Widget(&quot;Период эксплуатации и хранения&quot;).setEnabled(true);
	Widget(&quot;Период хранения&quot;).setEnabled(true);

    }
    if (DBValue(&quot;Уплата - в рассрочку&quot;)==1) 
    {
	Widget(&quot;Количество взносов&quot;).setEnabled(true);
    }
    else 
    {
	Widget(&quot;Количество взносов&quot;).setEnabled(false);
    }
    if (Value(&quot;Объект - НС&quot;)==1)
    {
	Widget(&quot;Страховая сумма - НС&quot;).setEnabled(true);
	Widget(&quot;Страховая премия - НС&quot;).setEnabled(true);
    }
    else
    {
	Widget(&quot;Страховая сумма - НС&quot;).setEnabled(false);
	Widget(&quot;Страховая премия - НС&quot;).setEnabled(false);
    }
        if (Value(&quot;Объект - ГО&quot;)==1)
    {
	  Widget(&quot;Страховая сумма - ГО&quot;).setEnabled(true);
	  Widget(&quot;Страховая премия - ГО&quot;).setEnabled(true);
	    
	}
	else
	{
	  Widget(&quot;Страховая сумма - ГО&quot;).setEnabled(false);
	  Widget(&quot;Страховая премия - ГО&quot;).setEnabled(false);
	}
    
   
    
}


function on_button(button_name)
{
    var t;
    var Strahovatel;
    var Cat;
     if (button_name==&quot;StrVzn&quot;)
	  {
	      var doc = new Document(&quot;РСТ: Страховой полис КАСКО снегоходы, квадроциклы&quot;);
	      SelectByCurrent(doc);
	      var CountVzn = TabCount(&quot;tableVznosy&quot;);
	      var i;
	      var CntYDblVzn = 0;
	      var IntVzn=0;	      
	      for (i=0;i&lt;=CountVzn;i++)
	      {
		  doc.TableFirst(&quot;Страховые взносы&quot;);
		  doc.TableDelete(&quot;Страховые взносы&quot;);
		  doc.TableUpdate(&quot;Страховые взносы&quot;);
	      }
	      doc.Update();

	      if (parseFloat(Value(&quot;Количество взносов&quot;))>parseFloat(Value(&quot;Срок страхования&quot;))/6)
	      {
		  CountVzn = parseFloat(Value(&quot;Срок страхования&quot;))/6;
	      }
	      else
	      {
		  CountVzn=parseFloat(Value(&quot;Количество взносов&quot;));
	      }
	     
	      if (CountVzn>=parseFloat(Value(&quot;Срок страхования&quot;))/12)
	      {
		  CntYDblVzn = CountVzn-parseFloat(Value(&quot;Срок страхования&quot;))/12;
	      }
	
	      var vzn=parseFloat(Value(&quot;Страховая премия&quot;))/CountVzn;
	      var sumvzn=0;
	      
	      for (i=0;i&lt;CountVzn;i++)
	      {
		  TabNewLine(&quot;tableVznosy&quot;);	
	      }
	      
	      for (i=0;i&lt;CountVzn;i++)
	      {
		  if ((sumvzn+vzn)&lt;=parseFloat(Value(&quot;Страховая премия&quot;)))
		  {
		      sumvzn=sumvzn+vzn;
		  }
		  else
		  {
		      vzn = parseFloat(Value(&quot;Страховая премия&quot;))-sumvzn;
		  }
		  doc.TableNewLine(&quot;Страховые взносы&quot;);
		  doc.TableSetValue(&quot;Страховые взносы&quot;,&quot;Взнос&quot;,vzn);	
		  doc.TableSetValue(&quot;Страховые взносы&quot;,&quot;Срок уплаты&quot;,ToDate(Value(&quot;Начало действия&quot;),IntVzn));
		  doc.TableUpdate(&quot;Страховые взносы&quot;);
		  
		  if (CntYDblVzn==0)		 
		  {
		      IntVzn=IntVzn+12;		      
		  }
		  else
		  {
		      if ((i%2)==0)	
		      {
			  IntVzn=IntVzn+3;
			  --CntYDblVzn;
		      }
		      else
		      {
			  IntVzn=IntVzn+9;
		      }
		  }
	      }
	      doc.Update();

//	      UpdateDB();
//	      Update();
	  }
     
   if(button_name == &quot;CopyStrah2Vyg&quot;)
    {
       SetValue(&quot;Выгодоприобретатель&quot;, GetCatalogValue(&quot;Страхователи&quot;, DBValue(&quot;Страхователь&quot;),&quot;Фамилия&quot;) + &quot; &quot; + GetCatalogValue(&quot;Страхователи&quot;, DBValue(&quot;Страхователь&quot;),&quot;Имя&quot;)+ &quot; &quot; + GetCatalogValue(&quot;Страхователи&quot;, DBValue(&quot;Страхователь&quot;),&quot;Отчество&quot;));
       SetValue(&quot;Номер договора залога&quot;,&quot;&quot;);
       SetValue(&quot;Кредитный полис&quot;,0);
       Widget(&quot;Номер договора залога&quot;).setEnabled(false);
       Widget(&quot;Дата договора залога&quot;).setEnabled(false);
   }
  
   if(button_name == &quot;printStatement&quot;)
   {
             report = new Report (&quot;report&quot;, &quot;1&quot;);
	report.setTable(&quot;РСТ_Заявление_СНТ.odt&quot;);
		
	t=GetCatalogValue(&quot;Населенные пункты&quot;, DBValue(&quot;Место выдачи&quot;), &quot;Наименование&quot;);
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Место выдачи&quot;);
		
	report.setValue(&quot;param&quot;,ConvertDateFromIso(DBValue(&quot;Дата заключения&quot;)));
	report.exec(&quot;Дата заявления&quot;);
		
	Cat = new Catalogue (&quot;Страхователи&quot;);
	Cat.Select;
	Strahovatel = DBValue(&quot;Страхователь&quot;);
		
	t = Cat.GetElementValue(Strahovatel, &quot;Фамилия&quot;) + &quot; &quot; + Cat.GetElementValue(Strahovatel, &quot;Имя&quot;)+ &quot; &quot; + Cat.GetElementValue(Strahovatel,  &quot;Отчество&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;ФИО&quot;);
		
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Страхователь&quot;);
		
	t = Cat.GetElementValue(Strahovatel, &quot;Серия паспорта&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Серия паспорта&quot;);
		
	t = Cat.GetElementValue(Strahovatel, &quot;Номер паспорта&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Номер паспорта&quot;);
		
	t = ConvertDateFromIso(Cat.GetElementValue(Strahovatel, &quot;Дата выдачи паспорта&quot;))+&quot; &quot;+Cat.GetElementValue(Strahovatel, &quot;Паспорт выдан&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Выдан&quot;);
		
	t = GetCatalogValue(&quot;Субъекты РФ&quot;, Cat.GetElementValue(Strahovatel, &quot;Субъект РФ&quot;), &quot;Наименование&quot;);
	if (Cat.GetElementValue(Strahovatel, &quot;Район&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Район&quot;);
	}
	
	t=t+&quot;, &quot;+GetCatalogValue(&quot;Населенные пункты&quot;, Cat.GetElementValue(Strahovatel, &quot;Населенный пункт&quot;), &quot;Наименование&quot;);
	
	if (Cat.GetElementValue(Strahovatel, &quot;Улица&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Улица&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Дом&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Дом&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Корпус&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Корпус&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Квартира&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Квартира&quot;);
	}
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Адрес страхователя&quot;);
		
	t=Cat.GetElementValue(Strahovatel, &quot;Телефон домашний&quot;)+&quot; &quot;+Cat.GetElementValue(Strahovatel, &quot;Телефон мобильный&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Телефоны&quot;);
		
	t=Cat.GetElementValue(Strahovatel, &quot;E-mail&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;E-mail&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Выгодоприобретатель&quot;));
	report.exec(&quot;Выгодоприобретатель&quot;);
	
	if (Value(&quot;Кредитный полис&quot;)==1)
	{
	    if (DBValue(&quot;Номер договора залога&quot;)==&quot;&quot;)
	{
	    t=&quot;______________________&quot;;
	}
	else
	{
	    t=DBValue(&quot;Номер договора залога&quot;);
	}
	
	if (DBValue(&quot;Дата договора залога&quot;)==&quot;&quot;)
	{
	    t=t+&quot; от __________________________&quot;;
	}
	else
	{
	    t=t+&quot; от &quot;+ConvertDateFromIso(DBValue(&quot;Дата договора залога&quot;));
	}
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Договор залога&quot;);
    }
	
	if (DBValue(&quot;Объект - СНТ&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
   	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;ОСНТ&quot;);
	
	if (DBValue(&quot;Объект - ГО&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;ОГО&quot;);
	
	if (DBValue(&quot;Объект - НС&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;ОНС&quot;);
	
	if (DBValue(&quot;Объект - СНТ&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;РКАСКО&quot;);
	
	if (DBValue(&quot;Объект - ГО&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;РГО&quot;);
	
	if (DBValue(&quot;Объект - НС&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;РНС&quot;);
	
		sys.Message(0,&quot;3&quot;);
	if (DBValue(&quot;Период эксплуатации и хранения&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;ЭХ&quot;);
	
	if (DBValue(&quot;Период хранения&quot;)==1)
	{
	    report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     report.setValue(&quot;param&quot;, &quot;&quot;);
	}
	report.exec(&quot;ТХ&quot;);

	t=GetCatalogValue(&quot;Типы СНТ&quot;, GetCatalogValue(&quot;Модели&quot;, DBValue(&quot;Модель СНТ&quot;), &quot;Тип СНТ&quot;), &quot;Наименование&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Наименование&quot;);
	
	t= GetCatalogValue(&quot;Модели&quot;, DBValue(&quot;Модель СНТ&quot;), &quot;Наименование модели&quot;);
	report.setValue(&quot;param&quot;, t);
	report.exec(&quot;Модель&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Заводской номер&quot;));
	report.exec(&quot;Заводской номер&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Регистрационный номер&quot;));
	report.exec(&quot;Регистрационный номер&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Год выпуска&quot;));
	report.exec(&quot;Год выпуска&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Место хранения&quot;));
	report.exec(&quot;Место хранения&quot;);
	
	report.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - Автокаско&quot;)));
	report.exec(&quot;ССАвтокаско&quot;);
	
	report.setValue(&quot;param&quot;, Propis(DBValue(&quot;Страховая сумма - Автокаско&quot;)));
	report.exec(&quot;ССАвтокаскоПроп&quot;);
	
	report.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - ГО&quot;)));
	report.exec(&quot;ССГО&quot;);
	
	report.setValue(&quot;param&quot;, Propis(DBValue(&quot;Страховая сумма - ГО&quot;)));
	report.exec(&quot;ССГОПроп&quot;);
	
	report.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - НС&quot;)));
	report.exec(&quot;ССНС&quot;);
	
	report.setValue(&quot;param&quot;, Propis(DBValue(&quot;Страховая сумма - НС&quot;)));
	report.exec(&quot;ССНСПроп&quot;);

	if(DBValue(&quot;Уплата - единовременно&quot;)==1)
	{
	    report.setValue(&quot;param&quot;,&quot;&quot;);
	}
	else
	{
	    report.setValue(&quot;param&quot;,&quot;&quot;);
	}
	report.exec(&quot;Единовременно&quot;);
	
	if(DBValue(&quot;Уплата - в рассрочку&quot;)==1)
	{
	    report.setValue(&quot;param&quot;,&quot;&quot;);
	}
	else
	{
	    report.setValue(&quot;param&quot;,&quot;&quot;);
	}
	report.exec(&quot;В рассрочку&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Количество взносов&quot;));
	report.exec(&quot;Количество взносов&quot;);

	report.setValue(&quot;param&quot;, ConvertDateFromIso(DBValue(&quot;Начало действия&quot;)));
	report.exec(&quot;Начало страхования&quot;);
	
	report.setValue(&quot;param&quot;, ConvertDateFromIso(DBValue(&quot;Конец действия&quot;)));
	report.exec(&quot;Конец страхования&quot;);
	
	report.setValue(&quot;param&quot;, DBValue(&quot;Прочие сведения&quot;));
	report.exec(&quot;Прочие сведения&quot;);
	
	report.setValue(&quot;param&quot;,DBValue(&quot;Номер полиса&quot;));
	report.exec(&quot;Номер полиса&quot;);
	
	report.setValue(&quot;param&quot;,ConvertDateFromIso(DBValue(&quot;Дата заключения&quot;)));
	report.exec(&quot;Дата заключения&quot;);
	
	t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Должность&quot;);
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Должность&quot;);
	
	t=GetCatalogValue(&quot;Дилеры&quot;,GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дилер&quot;),&quot;Наименование&quot;);
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Дилер&quot;);
	
	t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Фамилия И.О.&quot;);
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Сотрудник&quot;);
	
	if(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Номер доверенности&quot;)==&quot;&quot;)
	{
	    t=&quot;_____________&quot;;
	}
	else
	{
	    t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Номер доверенности&quot;);
	}
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Номер доверенности&quot;);
	
	if(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дата доверенности&quot;)==&quot;&quot;)
	{
	    t=&quot;_________________&quot;;
	}
	else
	{
	    t=ConvertDateFromIso(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дата доверенности&quot;));
	}
	report.setValue(&quot;param&quot;,t);
	report.exec(&quot;Дата доверенности&quot;);

	report.show();
	report.close();

   }  

   
      if(button_name == &quot;printPolis&quot;)
   {

	polis = new Report (&quot;report&quot;, &quot;1&quot;);
	polis.setTable(&quot;РСТ_Полис_СНТ.odt&quot;);
	
	t=GetCatalogValue(&quot;Населенные пункты&quot;, DBValue(&quot;Место выдачи&quot;), &quot;Наименование&quot;);
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Место выдачи&quot;);
		
	Cat = new Catalogue (&quot;Страхователи&quot;);
	Cat.Select;
	Strahovatel = DBValue(&quot;Страхователь&quot;);
		
	t = Cat.GetElementValue(Strahovatel, &quot;Фамилия&quot;) + &quot; &quot; + Cat.GetElementValue(Strahovatel, &quot;Имя&quot;)+ &quot; &quot; + Cat.GetElementValue(Strahovatel,  &quot;Отчество&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;ФИО&quot;);
	
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Страхователь&quot;);
	
	t = Cat.GetElementValue(Strahovatel, &quot;Серия паспорта&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Серия паспорта&quot;);
	
	t = Cat.GetElementValue(Strahovatel, &quot;Номер паспорта&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Номер паспорта&quot;);
	
	t = ConvertDateFromIso(Cat.GetElementValue(Strahovatel, &quot;Дата выдачи паспорта&quot;))+&quot; &quot;+Cat.GetElementValue(Strahovatel, &quot;Паспорт выдан&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Выдан&quot;);
	
	t = GetCatalogValue(&quot;Субъекты РФ&quot;, Cat.GetElementValue(Strahovatel, &quot;Субъект РФ&quot;), &quot;Наименование&quot;);
	if (Cat.GetElementValue(Strahovatel, &quot;Район&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Район&quot;);
	}
	
	t=t+&quot;, &quot;+GetCatalogValue(&quot;Населенные пункты&quot;, Cat.GetElementValue(Strahovatel, &quot;Населенный пункт&quot;), &quot;Наименование&quot;);
	
	if (Cat.GetElementValue(Strahovatel, &quot;Улица&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Улица&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Дом&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Дом&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Корпус&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Корпус&quot;);
	}
	if (Cat.GetElementValue(Strahovatel, &quot;Квартира&quot;)!=&quot;&quot;)
	{
	    t=t+&quot;, &quot;+Cat.GetElementValue(Strahovatel, &quot;Квартира&quot;);
	}
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Адрес страхователя&quot;);
	
	t=Cat.GetElementValue(Strahovatel, &quot;Телефон домашний&quot;)+&quot; &quot;+Cat.GetElementValue(Strahovatel, &quot;Телефон мобильный&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Телефоны&quot;);
	
	t=Cat.GetElementValue(Strahovatel, &quot;E-mail&quot;);
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;E-mail&quot;);

	polis.setValue(&quot;param&quot;, DBValue(&quot;Выгодоприобретатель&quot;));
	polis.exec(&quot;Выгодоприобретатель&quot;);
	
	if (Value(&quot;Кредитный полис&quot;)==1)
	{
	if (DBValue(&quot;Номер договора залога&quot;)==&quot;&quot;)
	{
	    t=&quot;______________________&quot;;
	}
	else
	{
	    t=DBValue(&quot;Номер договора залога&quot;);
	}
	
	if (DBValue(&quot;Дата договора залога&quot;)==&quot;&quot;)
	{
	    t=t+&quot; от __________________________&quot;;
	}
	else
	{
	    t=t+&quot; от &quot;+ConvertDateFromIso(DBValue(&quot;Дата договора залога&quot;));
	}
	polis.setValue(&quot;param&quot;, t);
	polis.exec(&quot;Договор залога&quot;);
    }

	if (DBValue(&quot;Объект - СНТ&quot;)==1)
	{
    	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;ОСНТ&quot;);	
	
	if (DBValue(&quot;Объект - ГО&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	      polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;ОГО&quot;);
	
	if (DBValue(&quot;Объект - НС&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;ОНС&quot;);
	
	if (DBValue(&quot;Объект - СНТ&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	     polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;РКАСКО&quot;);
	
	if (DBValue(&quot;Объект - ГО&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	      polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;РГО&quot;);
	
	if (DBValue(&quot;Объект - НС&quot;)==1)
	{
	     polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	      polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;РНС&quot;);

	if (DBValue(&quot;Период эксплуатации и хранения&quot;)==1)
	{
	     polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	      polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;ЭХ&quot;);
	
	if (DBValue(&quot;Период хранения&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	else
	{
	      polis.setValue(&quot;param&quot;, &quot;&quot;);
	}
	polis.exec(&quot;ТХ&quot;);
	
	polis.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - Автокаско&quot;)));
	polis.exec(&quot;ССАвтокаско&quot;);

	polis.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - ГО&quot;)));
	polis.exec(&quot;ССГО&quot;);
	
	polis.setValue(&quot;param&quot;, ConvertNumber2MoneyFormat(DBValue(&quot;Страховая сумма - НС&quot;)));
	polis.exec(&quot;ССНС&quot;);
	
	if(DBValue(&quot;Уплата - единовременно&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;,&quot;&quot;);
	}
	else
	{
	    polis.setValue(&quot;param&quot;,&quot;&quot;);
	}
	polis.exec(&quot;Единовременно&quot;);
	
	if(DBValue(&quot;Уплата - в рассрочку&quot;)==1)
	{
	    polis.setValue(&quot;param&quot;,&quot;&quot;);
	}
	else
	{
	     polis.setValue(&quot;param&quot;,&quot;&quot;);
	}
	polis.exec(&quot;В рассрочку&quot;);
	
	polis.setValue(&quot;param&quot;, ConvertDateFromIso(DBValue(&quot;Начало действия&quot;)));
	polis.exec(&quot;Начало страхования&quot;);
	
	polis.setValue(&quot;param&quot;, ConvertDateFromIso(DBValue(&quot;Конец действия&quot;)));
	polis.exec(&quot;Конец страхования&quot;);
	
	polis.setValue(&quot;param&quot;,DBValue(&quot;Номер полиса&quot;));
	polis.exec(&quot;Номер полиса&quot;);
	
	polis.setValue(&quot;param&quot;,ConvertDateFromIso(DBValue(&quot;Дата заключения&quot;)));
	polis.exec(&quot;Дата заключения&quot;);
	
	t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Должность&quot;);
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Должность&quot;);
	
	t=GetCatalogValue(&quot;Дилеры&quot;,GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дилер&quot;),&quot;Наименование&quot;);
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Дилер&quot;);
	
	t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Фамилия И.О.&quot;);
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Сотрудник&quot;);
	
	if(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Номер доверенности&quot;)==&quot;&quot;)
	{
	    t=&quot;_____________&quot;;
	}
	else
	{
	    t=GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Номер доверенности&quot;);
	}
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Номер доверенности&quot;);
	
	if(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дата доверенности&quot;)==&quot;&quot;)
	{
	    t=&quot;_________________&quot;;
	}
	else
	{
	    t=ConvertDateFromIso(GetCatalogValue(&quot;Сотрудники&quot;,DBValue(&quot;Сотрудник&quot;), &quot;Дата доверенности&quot;));
	}
	polis.setValue(&quot;param&quot;,t);
	polis.exec(&quot;Дата доверенности&quot;);

	polis.setValue(&quot;param&quot;,ConvertNumber2MoneyFormat(DBValue(&quot;Страховая премия - Автокаско&quot;)));
	polis.exec(&quot;СПАвтокаско&quot;);
	
	polis.setValue(&quot;param&quot;,ConvertNumber2MoneyFormat(DBValue(&quot;Страховая премия - ГО&quot;)));
	polis.exec(&quot;СПГО&quot;);
	
	polis.setValue(&quot;param&quot;,ConvertNumber2MoneyFormat(DBValue(&quot;Страховая премия - НС&quot;)));
	polis.exec(&quot;СПНС&quot;);
	
	polis.setValue(&quot;param&quot;,ConvertNumber2MoneyFormat(DBValue(&quot;Франшиза - Автокаско&quot;)));
	polis.exec(&quot;Франшиза Автокаско&quot;);
	
	polis.setValue(&quot;param&quot;,ConvertNumber2MoneyFormat(DBValue(&quot;Страховая премия&quot;)));
	polis.exec(&quot;СП&quot;);
	
	polis.setValue(&quot;param&quot;,Propis(DBValue(&quot;Страховая премия&quot;)));
	polis.exec(&quot;СППроп&quot;);

	stolbec=1;
	countVzn = TabCount(&quot;tableVznosy&quot;);
	
	for (stroka=0; stroka&lt;=countVzn; stroka++)
	{
	    if (!(stroka==countVzn))
	    {
		polis.setValue(&quot;f&quot;+String(stolbec), ConvertNumber2MoneyFormat(TabValue(&quot;tableVznosy&quot;,stroka,0)));
		polis.setValue(&quot;f&quot;+String(stolbec+1), ConvertDateFromIso(TabValue(&quot;tableVznosy&quot;,stroka,1)));
		if (stolbec&lt;5) 
		{
		    stolbec=stolbec+2;
		}
		else
		{
		    polis.exec(&quot;table_section&quot;);
		    polis.setValue(&quot;f1&quot;,&quot;&quot;);
		    polis.setValue(&quot;f2&quot;,&quot;&quot;);
		    polis.setValue(&quot;f3&quot;,&quot;&quot;);
		    polis.setValue(&quot;f4&quot;,&quot;&quot;);
		    polis.setValue(&quot;f5&quot;,&quot;&quot;);
		    polis.setValue(&quot;f6&quot;,&quot;&quot;);		    
		    stolbec=1;
		}
	    }
	    else
	    {
		polis.exec(&quot;table_section&quot;);
	    }

	}
	
	polis.show();
	polis.close();

   }  
}
</sourcecode>
                        <defaultmod id="448" >14</defaultmod>
                        <dialogform id="449" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Document&lt;/class>
&lt;widget class=&quot;wDocument&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Document&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>860&lt;/width>
            &lt;height>379&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>РСТ: Страховой полис КАСКО снегоходы, квадроциклы&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>127&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;widget class=&quot;QLayoutWidget&quot;>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>layout2&lt;/cstring>
        &lt;/property>
        &lt;property name=&quot;geometry&quot;>
            &lt;rect>
                &lt;x>630&lt;/x>
                &lt;y>21&lt;/y>
                &lt;width>107&lt;/width>
                &lt;height>328&lt;/height>
            &lt;/rect>
        &lt;/property>
        &lt;vbox>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>unnamed&lt;/cstring>
            &lt;/property>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>conductButton&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Ok&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>closeButton&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Закрыть&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>printStatement&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Печать заявления&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>printPolis&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Печать полиса&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
            &lt;spacer>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>spacer1&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;orientation&quot;>
                    &lt;enum>Vertical&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;sizeType&quot;>
                    &lt;enum>Expanding&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;sizeHint&quot;>
                    &lt;size>
                        &lt;width>26&lt;/width>
                        &lt;height>210&lt;/height>
                    &lt;/size>
                &lt;/property>
            &lt;/spacer>
        &lt;/vbox>
    &lt;/widget>
    &lt;widget class=&quot;QTabWidget&quot;>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>tabWidget2&lt;/cstring>
        &lt;/property>
        &lt;property name=&quot;geometry&quot;>
            &lt;rect>
                &lt;x>10&lt;/x>
                &lt;y>20&lt;/y>
                &lt;width>600&lt;/width>
                &lt;height>331&lt;/height>
            &lt;/rect>
        &lt;/property>
        &lt;widget class=&quot;QWidget&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;attribute name=&quot;title&quot;>
                &lt;string>Общие&lt;/string>
            &lt;/attribute>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel11&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>10&lt;/x>
                        &lt;y>50&lt;/y>
                        &lt;width>140&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Ответственный сотрудник&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel8&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>320&lt;/x>
                        &lt;y>10&lt;/y>
                        &lt;width>100&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Дата заключения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel7&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>70&lt;/x>
                        &lt;y>10&lt;/y>
                        &lt;width>81&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Номер полиса&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel10&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>10&lt;/x>
                        &lt;y>80&lt;/y>
                        &lt;width>81&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Место выдачи&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel36&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>430&lt;/x>
                        &lt;y>90&lt;/y>
                        &lt;width>160&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Окончание действия договора&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel35&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>430&lt;/x>
                        &lt;y>50&lt;/y>
                        &lt;width>150&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Начало действия договора&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel15&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>360&lt;/x>
                        &lt;y>250&lt;/y>
                        &lt;width>120&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Дата договора залога&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel13&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>10&lt;/x>
                        &lt;y>220&lt;/y>
                        &lt;width>120&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Выгодоприобретатель&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel14&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>10&lt;/x>
                        &lt;y>250&lt;/y>
                        &lt;width>130&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Номер договора залога&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel9&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>8&lt;/x>
                        &lt;y>136&lt;/y>
                        &lt;width>80&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Страхователь&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_5&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>160&lt;/x>
                        &lt;y>50&lt;/y>
                        &lt;width>250&lt;/width>
                        &lt;height>26&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>444&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>O 376 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Catalogue&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Сотрудник&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_4&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>160&lt;/x>
                        &lt;y>80&lt;/y>
                        &lt;width>250&lt;/width>
                        &lt;height>26&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>137&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>O 101 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Catalogue&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Место выдачи&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_3&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>98&lt;/x>
                        &lt;y>136&lt;/y>
                        &lt;width>310&lt;/width>
                        &lt;height>26&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>231&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>O 139 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Catalogue&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страхователь&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_7&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>140&lt;/x>
                        &lt;y>220&lt;/y>
                        &lt;width>440&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>233&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 200 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Выгодоприобретатель&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_8&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>140&lt;/x>
                        &lt;y>250&lt;/y>
                        &lt;width>130&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>237&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 10 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Номер договора залога&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>420&lt;/x>
                        &lt;y>10&lt;/y>
                        &lt;width>80&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>135&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>D 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Date&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Дата заключения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_22&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>430&lt;/x>
                        &lt;y>70&lt;/y>
                        &lt;width>80&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>352&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>D 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Date&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Начало действия&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_9&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>490&lt;/x>
                        &lt;y>250&lt;/y>
                        &lt;width>91&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>239&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>D 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Date&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Дата договора залога&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_6&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>10&lt;/x>
                        &lt;y>190&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>454&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Кредитный полис&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel12&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>30&lt;/x>
                        &lt;y>190&lt;/y>
                        &lt;width>100&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Кредитный полис&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>CopyStrah2Vyg&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>170&lt;/x>
                        &lt;y>190&lt;/y>
                        &lt;width>251&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Страхователь является Выгодоприобретателем&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>160&lt;/x>
                        &lt;y>10&lt;/y>
                        &lt;width>141&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>128&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 20 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Номер полиса&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_23&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>430&lt;/x>
                        &lt;y>110&lt;/y>
                        &lt;width>81&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>354&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>D 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Date&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Конец действия&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel1_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>429&lt;/x>
                        &lt;y>136&lt;/y>
                        &lt;width>130&lt;/width>
                        &lt;height>16&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Срок страхования (мес.)&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_25&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>560&lt;/x>
                        &lt;y>130&lt;/y>
                        &lt;width>31&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>456&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 2 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Срок страхования&lt;/string>
                &lt;/property>
            &lt;/widget>
        &lt;/widget>
        &lt;widget class=&quot;QWidget&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tab&lt;/cstring>
            &lt;/property>
            &lt;attribute name=&quot;title&quot;>
                &lt;string>Риски&lt;/string>
            &lt;/attribute>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel18&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>250&lt;/x>
                        &lt;y>70&lt;/y>
                        &lt;width>271&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Жизнь и здоровье водителя&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel17&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>250&lt;/x>
                        &lt;y>50&lt;/y>
                        &lt;width>287&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Ответственность страхователя перед третьими лицами&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel16&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>250&lt;/x>
                        &lt;y>30&lt;/y>
                        &lt;width>271&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Средство наземного транспорта&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel37&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>201&lt;/width>
                        &lt;height>31&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Объекты страхования&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel19&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>250&lt;/x>
                        &lt;y>130&lt;/y>
                        &lt;width>190&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Период эксплуатации и хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel20&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>250&lt;/x>
                        &lt;y>150&lt;/y>
                        &lt;width>171&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Только период хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel38&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>126&lt;/y>
                        &lt;width>191&lt;/width>
                        &lt;height>31&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Период страхования&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_10&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>30&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>241&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Объект - СНТ&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_11&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>50&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>20&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>243&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Объект - ГО&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_11_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>70&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>20&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>245&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Объект - НС&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_12&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>130&lt;/y>
                        &lt;width>16&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>249&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Период эксплуатации и хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_12_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>150&lt;/y>
                        &lt;width>16&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>251&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Период хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
        &lt;/widget>
        &lt;widget class=&quot;QWidget&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>TabPage&lt;/cstring>
            &lt;/property>
            &lt;attribute name=&quot;title&quot;>
                &lt;string>Средство транспорта&lt;/string>
            &lt;/attribute>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel24&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>438&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>70&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Год выпуска&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel23&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>308&lt;/x>
                        &lt;y>56&lt;/y>
                        &lt;width>130&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Регистрационный номер&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel22&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>56&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Заводской номер&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel25&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>106&lt;/y>
                        &lt;width>90&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Место хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel21&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>70&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Модель СНТ&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_13&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>98&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>320&lt;/width>
                        &lt;height>26&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>318&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>O 288 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Catalogue&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Модель СНТ&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_14&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>76&lt;/y>
                        &lt;width>270&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>320&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 20 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Заводской номер&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_14_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>308&lt;/x>
                        &lt;y>76&lt;/y>
                        &lt;width>260&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>322&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 20 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Регистрационный номер&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_16&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>108&lt;/x>
                        &lt;y>106&lt;/y>
                        &lt;width>460&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>326&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>C 200 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>String&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Место хранения&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_15&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>518&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>50&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>324&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 4 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Год выпуска&lt;/string>
                &lt;/property>
            &lt;/widget>
        &lt;/widget>
        &lt;widget class=&quot;QWidget&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>TabPage&lt;/cstring>
            &lt;/property>
            &lt;attribute name=&quot;title&quot;>
                &lt;string>Страховые суммы и премии&lt;/string>
            &lt;/attribute>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel28&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>78&lt;/x>
                        &lt;y>106&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>НС&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel27&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>78&lt;/x>
                        &lt;y>76&lt;/y>
                        &lt;width>20&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>ГО&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel31&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>418&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>170&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Безусловная франшиза&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel29_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>258&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>130&lt;/width>
                        &lt;height>17&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Страховая премия&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel29&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>108&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>120&lt;/width>
                        &lt;height>17&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Страховая сумма&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel30&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>28&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>81&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Риски&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel32&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>180&lt;/x>
                        &lt;y>130&lt;/y>
                        &lt;width>70&lt;/width>
                        &lt;height>30&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>ИТОГО:&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel26&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>28&lt;/x>
                        &lt;y>46&lt;/y>
                        &lt;width>70&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>АВТОКАСКО&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_17&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>108&lt;/x>
                        &lt;y>46&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>328&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 14 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая сумма - Автокаско&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_19&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>108&lt;/x>
                        &lt;y>106&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>332&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 14 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая сумма - НС&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_20&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>258&lt;/x>
                        &lt;y>46&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>435&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 10 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая премия - Автокаско&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_20_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>258&lt;/x>
                        &lt;y>76&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>437&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 10 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая премия - ГО&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_20_3&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>258&lt;/x>
                        &lt;y>106&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>439&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 10 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая премия - НС&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_20_4&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>258&lt;/x>
                        &lt;y>136&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>345&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 10 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая премия&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_20_4_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>418&lt;/x>
                        &lt;y>46&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>441&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 10 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Франшиза - Автокаско&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_18&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>108&lt;/x>
                        &lt;y>76&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>330&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 14 2 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Страховая сумма - ГО&lt;/string>
                &lt;/property>
            &lt;/widget>
        &lt;/widget>
        &lt;widget class=&quot;QWidget&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>TabPage&lt;/cstring>
            &lt;/property>
            &lt;attribute name=&quot;title&quot;>
                &lt;string>Страховые взносы&lt;/string>
            &lt;/attribute>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel39_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>50&lt;/x>
                        &lt;y>60&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>В рассрочку&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel40&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>18&lt;/x>
                        &lt;y>26&lt;/y>
                        &lt;width>190&lt;/width>
                        &lt;height>16&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Порядок оплаты страховой премии&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel39&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>50&lt;/x>
                        &lt;y>40&lt;/y>
                        &lt;width>111&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Единовременно&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_21&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>20&lt;/x>
                        &lt;y>40&lt;/y>
                        &lt;width>21&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>334&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Уплата - единовременно&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_21_2&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>20&lt;/x>
                        &lt;y>60&lt;/y>
                        &lt;width>21&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>336&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>B 0 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Boolean&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Уплата - в рассрочку&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;QLabel&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>textLabel1&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>20&lt;/x>
                        &lt;y>100&lt;/y>
                        &lt;width>110&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Количество взносов&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBField&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>wDBField_24&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>140&lt;/x>
                        &lt;y>100&lt;/y>
                        &lt;width>31&lt;/width>
                        &lt;height>22&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;Id&quot;>
                    &lt;number>452&lt;/number>
                &lt;/property>
                &lt;property name=&quot;FieldType&quot;>
                    &lt;string>N 2 0 *&lt;/string>
                &lt;/property>
                &lt;property name=&quot;EditorType&quot;>
                    &lt;enum>Numberic&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;FieldName&quot;>
                    &lt;string>Количество взносов&lt;/string>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wDBTable&quot;>
                &lt;column>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Взнос&lt;/string>
                    &lt;/property>
                &lt;/column>
                &lt;column>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Срок уплаты&lt;/string>
                    &lt;/property>
                &lt;/column>
                &lt;column>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Оплачено&lt;/string>
                    &lt;/property>
                &lt;/column>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>tableVznosy&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>230&lt;/x>
                        &lt;y>20&lt;/y>
                        &lt;width>320&lt;/width>
                        &lt;height>260&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
                    &lt;number>347&lt;/number>
                &lt;/property>
                &lt;property name=&quot;DefFields&quot;>
                    &lt;stringlist>
                        &lt;string>Взнос&lt;/string>
                        &lt;string>Срок уплаты&lt;/string>
                        &lt;string>Оплачено&lt;/string>
                    &lt;/stringlist>
                &lt;/property>
                &lt;property name=&quot;DefHeaders&quot;>
                    &lt;stringlist>
                        &lt;string>Взнос&lt;/string>
                        &lt;string>Срок уплаты&lt;/string>
                        &lt;string>Оплачено&lt;/string>
                    &lt;/stringlist>
                &lt;/property>
                &lt;property name=&quot;ColWidth&quot;>
                    &lt;stringlist>
                        &lt;string>100&lt;/string>
                        &lt;string>100&lt;/string>
                        &lt;string>100&lt;/string>
                    &lt;/stringlist>
                &lt;/property>
                &lt;property name=&quot;DefIdList&quot;>
                    &lt;stringlist>
                        &lt;string>348&lt;/string>
                        &lt;string>350&lt;/string>
                        &lt;string>450&lt;/string>
                    &lt;/stringlist>
                &lt;/property>
            &lt;/widget>
            &lt;widget class=&quot;wActionButton&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>StrVzn&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;geometry&quot;>
                    &lt;rect>
                        &lt;x>9&lt;/x>
                        &lt;y>146&lt;/y>
                        &lt;width>210&lt;/width>
                        &lt;height>21&lt;/height>
                    &lt;/rect>
                &lt;/property>
                &lt;property name=&quot;text&quot;>
                    &lt;string>Заполнить график уплаты взносов&lt;/string>
                &lt;/property>
                &lt;property name=&quot;action&quot;>
                    &lt;bool>true&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionUpdate&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionTurnOn&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionClose&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
                &lt;property name=&quot;actionId&quot;>
                    &lt;number>0&lt;/number>
                &lt;/property>
                &lt;property name=&quot;script&quot;>
                    &lt;bool>false&lt;/bool>
                &lt;/property>
            &lt;/widget>
        &lt;/widget>
    &lt;/widget>
&lt;/widget>
&lt;tabstops>
    &lt;tabstop>tabWidget2&lt;/tabstop>
    &lt;tabstop>wDBField&lt;/tabstop>
    &lt;tabstop>wDBField_2&lt;/tabstop>
    &lt;tabstop>wDBField_5&lt;/tabstop>
    &lt;tabstop>wDBField_4&lt;/tabstop>
    &lt;tabstop>wDBField_22&lt;/tabstop>
    &lt;tabstop>wDBField_23&lt;/tabstop>
    &lt;tabstop>wDBField_3&lt;/tabstop>
    &lt;tabstop>wDBField_6&lt;/tabstop>
    &lt;tabstop>wDBField_7&lt;/tabstop>
    &lt;tabstop>wDBField_8&lt;/tabstop>
    &lt;tabstop>wDBField_9&lt;/tabstop>
    &lt;tabstop>wDBField_10&lt;/tabstop>
    &lt;tabstop>wDBField_11&lt;/tabstop>
    &lt;tabstop>wDBField_11_2&lt;/tabstop>
    &lt;tabstop>wDBField_12&lt;/tabstop>
    &lt;tabstop>wDBField_12_2&lt;/tabstop>
    &lt;tabstop>wDBField_13&lt;/tabstop>
    &lt;tabstop>wDBField_15&lt;/tabstop>
    &lt;tabstop>wDBField_14&lt;/tabstop>
    &lt;tabstop>wDBField_14_2&lt;/tabstop>
    &lt;tabstop>wDBField_16&lt;/tabstop>
    &lt;tabstop>wDBField_17&lt;/tabstop>
    &lt;tabstop>wDBField_20&lt;/tabstop>
    &lt;tabstop>wDBField_20_4_2&lt;/tabstop>
    &lt;tabstop>wDBField_18&lt;/tabstop>
    &lt;tabstop>wDBField_20_2&lt;/tabstop>
    &lt;tabstop>wDBField_19&lt;/tabstop>
    &lt;tabstop>wDBField_20_3&lt;/tabstop>
    &lt;tabstop>wDBField_20_4&lt;/tabstop>
    &lt;tabstop>wDBField_21&lt;/tabstop>
    &lt;tabstop>wDBField_21_2&lt;/tabstop>
    &lt;tabstop>tableVznosy&lt;/tabstop>
    &lt;tabstop>conductButton&lt;/tabstop>
    &lt;tabstop>closeButton&lt;/tabstop>
    &lt;tabstop>printStatement&lt;/tabstop>
&lt;/tabstops>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wdocument.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbfield.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="129" />
                <sourcecode id="130" />
                <string_view stdf="0" id="131" >
                    <svfunction id="132" />
                    <fieldid id="133" >0</fieldid>
                </string_view>
            </document>
            <document id="494" name="Кредитная сделка" >
                <header>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="D I 0 *" validator="" plus="0" nz="0" id="506" name="дата" lz="0" sort="1" vd="0" >
                        <description id="507" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 376 0 *" validator="" plus="0" nz="0" id="502" name="автор" lz="0" sort="0" vd="0" >
                        <description id="503" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 392 I *" validator="" plus="0" nz="0" id="495" name="контрагент" lz="0" sort="1" vd="0" >
                        <description id="501" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 581 I *" validator="" plus="0" nz="0" id="651" name="подразделение контрагента" lz="0" sort="1" vd="0" >
                        <description id="652" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 139 0 *" validator="" plus="0" nz="0" id="508" name="клиент" lz="0" sort="0" vd="0" >
                        <description id="509" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 1 0 I" validator="" plus="1" nz="0" id="653" name="статус" lz="0" sort="1" vd="0" >
                        <description id="654" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 253 0 *" validator="" plus="0" nz="0" id="655" name="группа товаров" lz="0" sort="0" vd="0" >
                        <description id="656" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 288 0 *" validator="" plus="0" nz="0" id="657" name="товар" lz="0" sort="0" vd="0" >
                        <description id="658" />
                    </field>
                    <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="C 50 0 *" id="738" nz="0" name="название товара" lz="0" sort="0" vd="0" >
                        <description id="739" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 15 2 *" validator="" plus="1" nz="0" id="659" name="стоимость" lz="0" sort="0" vd="0" >
                        <description id="660" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="O 639 0 *" validator="" plus="0" nz="0" id="661" name="валюта" lz="0" sort="0" vd="0" >
                        <description id="662" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 10 2 *" validator="" plus="1" nz="0" id="663" name="стоимость страхования" lz="0" sort="0" vd="0" >
                        <description id="664" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 10 0 *" validator="" plus="1" nz="0" id="665" name="первоначальный взнос в валюте" lz="0" sort="0" vd="0" >
                        <description id="666" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 5 2 *" validator="" plus="0" nz="0" id="667" name="первоначальный взнос в процентах" lz="0" sort="0" vd="0" >
                        <description id="668" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 3 0 *" validator="" plus="1" nz="0" id="669" name="срок кредитования" lz="0" sort="0" vd="0" >
                        <description id="670" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 15 2 *" validator="" plus="1" nz="0" id="671" name="сумма кредита" lz="0" sort="0" vd="0" >
                        <description id="672" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="D 0 0 *" validator="" plus="0" nz="0" id="1034" name="дата одобрения" lz="0" sort="0" vd="0" >
                        <description id="1035" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 10 0 *" validator="" plus="0" nz="0" id="1026" name="кредитный договор" lz="0" sort="0" vd="0" >
                        <description id="1027" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="D 0 0 *" validator="" plus="0" nz="0" id="1030" name="дата кредитного договора" lz="0" sort="0" vd="0" >
                        <description id="1031" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="C 10 0 *" validator="" plus="0" nz="0" id="1028" name="договор залога" lz="0" sort="0" vd="0" >
                        <description id="1029" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="D 0 0 *" validator="" plus="0" nz="0" id="1032" name="дата договора залога" lz="0" sort="0" vd="0" >
                        <description id="1033" />
                    </field>
                    <field sum="0" inputmask="" numpref="" numerator="0" twostate="0" numsuff="" type="N 15 2 *" validator="" plus="0" nz="0" id="1036" name="получен кредит" lz="0" sort="0" vd="0" >
                        <description id="1037" />
                    </field>
                </header>
                <tables>
                    <table id="510" name="заявки" >
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 557 0 *" id="719" nz="0" name="Банк" lz="0" sort="0" vd="0" >
                            <description id="720" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 565 0 *" id="721" nz="0" name="Подразделение банка" lz="0" sort="0" vd="0" >
                            <description id="722" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="O 591 0 *" id="723" nz="0" name="Кредитное предложение" lz="0" sort="0" vd="0" >
                            <description id="724" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="D 0 0 *" id="725" nz="0" name="Дата заявки" lz="0" sort="0" vd="0" >
                            <description id="726" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="727" nz="0" name="Одобрена" lz="0" sort="0" vd="0" >
                            <description id="728" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="D 0 0 *" id="729" nz="0" name="Дата одобрения" lz="0" sort="0" vd="0" >
                            <description id="730" />
                        </field>
                        <field sum="0" numerator="0" numpref="" inputmask="" numsuff="" twostate="0" plus="0" validator="" type="B 0 0 *" id="731" nz="0" name="Сделка состоялась" lz="0" sort="0" vd="0" >
                            <description id="732" />
                        </field>
                    </table>
                </tables>
                <forms/>
                <webforms/>
                <description id="496" />
                <sourcecode id="497" />
                <string_view stdf="0" id="498" >
                    <svfunction id="499" />
                    <fieldid id="500" >0</fieldid>
                </string_view>
            </document>
        </documents>
        <journals>
            <journal type="1" id="338" name="Журнал заключенных договоров страхования" >
                <columns>
                    <column id="342" name="Место выдачи" >
                        <fieldid>137</fieldid>
                    </column>
                    <column id="340" name="Номер полиса" >
                        <fieldid>128</fieldid>
                    </column>
                    <column id="341" name="Дата заключения" >
                        <fieldid>135</fieldid>
                    </column>
                    <column id="343" name="Страхователь" >
                        <fieldid>231</fieldid>
                    </column>
                    <column id="356" name="Начало действия" >
                        <fieldid>352</fieldid>
                    </column>
                    <column id="357" name="Конец действия" >
                        <fieldid>354</fieldid>
                    </column>
                    <column id="344" name="Страховая премия" >
                        <fieldid>345</fieldid>
                    </column>
                    <used_doc>127</used_doc>
                </columns>
                <forms>
                    <form readonly="0" type="0" id="358" name="Журнал заключенных договоров" >
                        <description id="359" />
                        <sourcecode id="360" />
                        <defaultmod id="361" >4</defaultmod>
                        <dialogform id="362" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Journal&lt;/class>
&lt;widget class=&quot;wJournal&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Journal&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>500&lt;/width>
            &lt;height>381&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Журнал заключенных договоров страхования&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>338&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;widget class=&quot;wDBTable&quot;>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Место выдачи&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Номер полиса&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Дата заключения&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Страхователь&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Начало действия&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Конец действия&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;column>
            &lt;property name=&quot;text&quot;>
                &lt;string>Страховая премия&lt;/string>
            &lt;/property>
            &lt;property name=&quot;pixmap&quot;>
                &lt;pixmap>&lt;/pixmap>
            &lt;/property>
        &lt;/column>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>wDBTable1&lt;/cstring>
        &lt;/property>
        &lt;property name=&quot;geometry&quot;>
            &lt;rect>
                &lt;x>0&lt;/x>
                &lt;y>10&lt;/y>
                &lt;width>491&lt;/width>
                &lt;height>341&lt;/height>
            &lt;/rect>
        &lt;/property>
        &lt;property name=&quot;TableInd&quot; stdset=&quot;0&quot;>
            &lt;number>0&lt;/number>
        &lt;/property>
        &lt;property name=&quot;DefFields&quot;>
            &lt;stringlist>
                &lt;string>Место выдачи&lt;/string>
                &lt;string>Номер полиса&lt;/string>
                &lt;string>Дата заключения&lt;/string>
                &lt;string>Страхователь&lt;/string>
                &lt;string>Начало действия&lt;/string>
                &lt;string>Конец действия&lt;/string>
                &lt;string>Страховая премия&lt;/string>
            &lt;/stringlist>
        &lt;/property>
        &lt;property name=&quot;DefHeaders&quot;>
            &lt;stringlist>
                &lt;string>Место выдачи&lt;/string>
                &lt;string>Номер полиса&lt;/string>
                &lt;string>Дата заключения&lt;/string>
                &lt;string>Страхователь&lt;/string>
                &lt;string>Начало действия&lt;/string>
                &lt;string>Конец действия&lt;/string>
                &lt;string>Страховая премия&lt;/string>
            &lt;/stringlist>
        &lt;/property>
        &lt;property name=&quot;ColWidth&quot;>
            &lt;stringlist>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
                &lt;string>100&lt;/string>
            &lt;/stringlist>
        &lt;/property>
        &lt;property name=&quot;DefIdList&quot;>
            &lt;stringlist>
                &lt;string>342&lt;/string>
                &lt;string>340&lt;/string>
                &lt;string>341&lt;/string>
                &lt;string>343&lt;/string>
                &lt;string>356&lt;/string>
                &lt;string>357&lt;/string>
                &lt;string>344&lt;/string>
            &lt;/stringlist>
        &lt;/property>
    &lt;/widget>
&lt;/widget>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wjournal.h&lt;/includehint>
    &lt;includehint>wdbtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="339" />
            </journal>
            <journal type="1" id="480" name="Сделки" >
                <columns>
                    <used_doc>481</used_doc>
                </columns>
                <forms/>
                <webforms/>
                <description id="487" />
            </journal>
        </journals>
        <registers>
            <iregisters/>
            <aregisters/>
        </registers>
        <reports>
            <report id="460" name="Редактор сделок" >
                <forms>
                    <form readonly="0" type="0" id="463" name="форма" >
                        <description id="464" />
                        <sourcecode id="465" >var timerId;
var formAction;
var tabDeals, tabOffers;
var users, pers, dealers, orgs, clients, clientProps, banks, banksFilial, credoffers, calcparams, currency, doc, items;
var kurs = 1;
var dateStart, dateEnd;
var fAuthor, fOrg, fStatus, fDealer, fItem;
var docWidgetMap, docTableMap, docObjectMap, arClientProps;
var modify, filterdeals = false;
var states = Array(&quot;Расчет&quot;, &quot;Заявка&quot;, &quot;Сделка&quot;);

function adjustEditable()
{
    Widget(&quot;btnNew&quot;).enabled = !modify;
    Widget(&quot;btnEdit&quot;).enabled = !modify &amp;&amp; fStatus&lt;2 &amp;&amp; tabDeals.currentRow()>-1;
    Widget(&quot;btnSave&quot;).enabled = modify;
    Widget(&quot;btnCancel&quot;).enabled = modify;
    Widget(&quot;btnStep&quot;).enabled = modify &amp;&amp; fStatus&lt;2;
    Widget(&quot;btnStepBack&quot;).enabled = modify &amp;&amp; fStatus>0;    
    Widget(&quot;btnClose&quot;).enabled = !modify;
    Widget(&quot;mainFrame&quot;).enabled = !modify;
    Widget(&quot;page1&quot;).enabled = modify &amp;&amp; fStatus == 0;
    Widget(&quot;page2&quot;).enabled = modify &amp;&amp; fStatus == 1;
    Widget(&quot;page3&quot;).enabled = modify &amp;&amp; fStatus == 2;
    Widget(&quot;fSum&quot;).enabled = false;
    Widget(&quot;fItemName&quot;).enabled = gmParseInt(Widget(&quot;fGroup&quot;).value) &amp;&amp; !gmParseInt(Widget(&quot;fItem&quot;).value) &amp;&amp; modify;
    Widget(&quot;fDate&quot;).enabled = false;
}

function addDoc(doc)
{
    var row = tabDeals.findValue(&quot;doc&quot;,  doc.Uid());
    if(row==-1) row = tabDeals.addRow();
    clientid = clients.FindById(doc.Value(&quot;клиент&quot;)) ? clients.Uid() : 0;
    var str = new String(doc.Value(&quot;дата&quot;));        
    tabDeals.setValue(row, &quot;дата&quot;, new Date(Date.parse(str)));
    tabDeals.setValue(row, &quot;статус&quot;, states[doc.Value(&quot;статус&quot;)]);
    if(clientid) tabDeals.setValue(row, &quot;клиент&quot;, clientid, clients.Value(&quot;ФИО&quot;));
    tabDeals.setValue(row, &quot;сумма кредита&quot;, doc.Value(&quot;сумма кредита&quot;));
    tabDeals.setValue(row, &quot;doc&quot;, doc.Uid());
}

function fillDeals()
{
    dateStart = gmBegOfDay(Widget(&quot;dateStart&quot;).value);
    dateEnd = gmEndOfDay(Widget(&quot;dateEnd&quot;).value);
    tabDeals.clear();
    tabDeals.widget().updatesEnabled = false;    
    tabDeals.addColumn(&quot;статус&quot;, 56, true, false);
    tabDeals.addColumn(&quot;дата&quot;, 100, true, false, &quot;Ddd-MMM-yyyy&quot;);
    tabDeals.addColumn(&quot;клиент&quot;, 100, true, false);
    tabDeals.addColumn(&quot;банк&quot;, 100, true, false);    
    tabDeals.addColumn(&quot;кредитное предложение&quot;, 100, true, false);        
    tabDeals.addColumn(&quot;сумма кредита&quot;, 100, true, false, &quot;N 10 2&quot;);
    tabDeals.addColumn(&quot;doc&quot;, 0, true, false);
    
    var deals = new Document(&quot;Кредитная сделка&quot;);
    deals.SetFilter(&quot;подразделение контрагента&quot;, orgs.Uid());    
    if(filterdeals)
    {
	deals.SetFilter(&quot;статус&quot;, Widget(&quot;cbState&quot;).currentItem);
    }
    else
    {
//Работает только с PostgreSQL	
	deals.SetFilter(&quot;статус&quot;, &quot;ANY('{0,1}')&quot;);
    }
    
    var res = deals.Select(dateStart, dateEnd);
    if(deals.First()) do
    {
	addDoc(deals);
    } while(deals.Next());
    tabDeals.widget().updatesEnabled = true;
    tabDeals.widget().repaint();
    delete deals;
}

function fillOffers(doc)
{
    if(!doc) return;
    tabOffers.clear();
    for(var ind=0;ind&lt;docTableMap.length;ind++)
	tabOffers.addColumn(docTableMap[ind], 100, true, false);
    tabOffers.setColumnFormat(&quot;Дата заявки&quot;, &quot;Ddd-MMM-yyyy&quot;);
    tabOffers.setColumnFormat(&quot;Дата одобрения&quot;, &quot;Ddd-MMM-yyyy&quot;);    
    tabOffers.setColumnFormat(&quot;Одобрена&quot;, gmTranslateType(&quot;Перечисление (\&quot;Нет\&quot;, \&quot;Да\&quot;)&quot;));
    tabOffers.setColumnFormat(&quot;Сделка состоялась&quot;, gmTranslateType(&quot;Перечисление (\&quot;Нет\&quot;, \&quot;Да\&quot;)&quot;));    
    
    var tname = &quot;заявки&quot;;
    doc.TableSelect(tname);
    if(doc.TableFirst(tname)) do
    {
	var row = tabOffers.addRow();
	for(var ind=0;ind&lt;docTableMap.length;ind++)
	{
	    var text = doc.TableValue(tname, docTableMap[ind]);
	    var val = doc.TableValue(tname, docTableMap[ind]);
	    if(docObjectMap[ind])
	    {
		if(!docObjectMap[ind].FindById(doc.TableValue(tname, docTableMap[ind]))) sysMessage(&quot;2bed&quot;);
		text = docObjectMap[ind].displayString();
		val = docObjectMap[ind].Uid();
	    }
	    tabOffers.setValue(row, docTableMap[ind], val, text);
	}
    }while(doc.TableNext(tname));
    
    for(var ind=0;ind&lt;tabOffers.numCols();ind++)
	tabOffers.adjustColumn(ind);
}

function loadDoc(curdoc)
{    	    
    if(curdoc==doc &amp;&amp; doc) return;
    deals = new Document(&quot;Кредитная сделка&quot;);    
    if(gmParseInt(curdoc)) deals.SelectDocument(curdoc);
    Widget(&quot;lAuthor&quot;).text = &quot;Автор: &quot; + pers.Value(&quot;ФИО&quot;);
    Widget(&quot;lOrg&quot;).text = &quot;Подразделение: &quot; + orgs.Value(&quot;название&quot;);
    
    for(var i=0;i&lt;docWidgetMap.count();i++)
    {
	Widget(docWidgetMap.indGet(i)).value = deals.Value(docWidgetMap.getKey(i));
    }
    fStatus = gmParseInt(deals.Value(&quot;статус&quot;));    
    fAuthor = pers.Uid();
    fDealer = dealers.Uid();
    fOrg = orgs.Uid();
    if(Widget(&quot;fCurrency&quot;).value) 
    {
	currency.FindById(Widget(&quot;fCurrency&quot;).value);
	kurs = currency.Value(&quot;курс&quot;);
    }
    doc = deals.Uid();
    fillOffers(deals);
}

function addMapping(widget, field)
{
    docWidgetMap.set(field, widget);
}

function on_formstart()
{
    formAction = &quot;maximize(true);&quot;;
    timerId = startTimer(100, action);
    
    users = new Catalogue(&quot;Пользователи&quot;);
    pers = new Catalogue(&quot;Сотрудники&quot;);
    dealers = new Catalogue(&quot;Контрагенты&quot;);
    orgs = new Catalogue(&quot;Подразделения контрагентов&quot;);    
    clients = new Catalogue(&quot;Клиенты&quot;);
    clientProps = new Catalogue(&quot;Свойства клиента&quot;);
    banks = new Catalogue(&quot;Банки&quot;);
    banksFilial = new Catalogue(&quot;Подразделения банков&quot;);
    credoffers = new Catalogue(&quot;кредитные предложения&quot;);
    calcparams = new Catalogue(&quot;расчеты&quot;);
    items = new Catalogue(&quot;Товары&quot;);
    currency = new Catalogue(&quot;Валюты&quot;);
    
    users.Select();
    pers.Select();
    dealers.Select();
    orgs.Select();    
    clients.Select();
    banks.Select();
    banksFilial.Select();
    credoffers.Select();
    items.Select();
    currency.Select();
    
    arClientProps = new Array;
    clientProps.Select();
    if(clientProps.First()) do
    {
	arClientProps[clientProps.Uid()] = clientProps.Value(&quot;Название&quot;);
    }while(clientProps.Next());
    
    users.FindById(sys.value(&quot;currentUser&quot;));
    pers.FindById(users.Value(&quot;сотрудник&quot;));
    dealers.FindById(pers.Value(&quot;дилер&quot;));
    orgs.FindById(pers.Value(&quot;подразделение&quot;));
    
    docWidgetMap = new ValueList;
    addMapping(&quot;fDate&quot;, &quot;дата&quot;);    
    addMapping(&quot;fClient&quot;, &quot;клиент&quot;); 
    addMapping(&quot;fGroup&quot;, &quot;группа товаров&quot;);
    addMapping(&quot;fItem&quot;, &quot;товар&quot;);
    addMapping(&quot;fItemName&quot;, &quot;название товара&quot;);
    addMapping(&quot;fCost&quot;, &quot;стоимость&quot;);
    addMapping(&quot;fCurrency&quot;, &quot;валюта&quot;);
    addMapping(&quot;fInsuranceCost&quot;, &quot;стоимость страхования&quot;);
    addMapping(&quot;fFirstPayment&quot;, &quot;первоначальный взнос в валюте&quot;);
    addMapping(&quot;fFirstProcent&quot;, &quot;первоначальный взнос в процентах&quot;);
    addMapping(&quot;fSum&quot;, &quot;сумма кредита&quot;);
    addMapping(&quot;fDateAproved&quot;, &quot;дата одобрения&quot;);
    addMapping(&quot;fAgreeNumber&quot;, &quot;кредитный договор&quot;);
    addMapping(&quot;fAgreeDate&quot;, &quot;дата кредитного договора&quot;);
    addMapping(&quot;fAgreeZNumber&quot;, &quot;договор залога&quot;);
    addMapping(&quot;fAgreeZDate&quot;, &quot;дата договора залога&quot;);    
    addMapping(&quot;fFinalSum&quot;, &quot;получен кредит&quot;);
    
    docTableMap = new Array(&quot;Банк&quot;, &quot;Подразделение банка&quot;, &quot;Кредитное предложение&quot;, &quot;Дата заявки&quot;, &quot;Одобрена&quot;, &quot;Дата одобрения&quot;, &quot;Сделка состоялась&quot;);
    docObjectMap = new Array(banks, banksFilial, credoffers, undefined, undefined, undefined, undefined);
    
    tabDeals = new ObjectTable(Widget(&quot;tabDeals&quot;));
    tabDeals.setSelectionMode(2);
    tabDeals.connectSlot(&quot;currentChanged(int, int)&quot;, onDealSelect);
    fillDeals();
    
    tabOffers = new ObjectTable(Widget(&quot;tabOffers&quot;));
    modify = false;
    onDealSelect(0, 0);
    connect(Widget(&quot;fCost&quot;), &quot;valueChanged(QVariant)&quot;, on_valuechanged);            
    connect(Widget(&quot;fInsuranceCost&quot;), &quot;valueChanged(QVariant)&quot;, on_valuechanged);            
    connect(Widget(&quot;fFirstPayment&quot;), &quot;valueChanged(QVariant)&quot;, on_valuechanged);
    connect(Widget(&quot;fFirstProcent&quot;), &quot;valueChanged(QVariant)&quot;, on_valuechanged);    
    connect(Widget(&quot;fItem&quot;), &quot;valueChanged(QVariant)&quot;, on_itemchanged);
    connect(Widget(&quot;fGroup&quot;), &quot;valueChanged(QVariant)&quot;, on_groupchanged);
    connect(Widget(&quot;fCurrency&quot;), &quot;valueChanged(QVariant)&quot;, on_currency);
}

function newDeal()
{
    modify = true;
    onDealSelect(-1,0);
}

function editDeal()
{
    modify = true;
    adjustEditable();
    Widget(&quot;tDeal&quot;).currentPage = fStatus;    
}

function checkAttr(attr)
{
    if(!docWidgetMap.get(attr)) return &quot;Не найден реквизит &quot;+attr+&quot;\n&quot;;
    var msg = &quot;Не заполнен реквизит &quot;+attr+&quot;\n&quot;;
    var val = Widget(docWidgetMap.get(attr)).value;
    if(!val) return msg;
    if(val==&quot;&quot;) return msg;
    if(val==0) return msg;
    return &quot;&quot;;
}

function step()
{
    if(fStatus>1) return;
    else if(!fStatus)
    {
	msg = &quot;&quot;;
	msg+=checkAttr(&quot;клиент&quot;);
	msg+=checkAttr(&quot;группа товаров&quot;);
	msg+=checkAttr(&quot;товар&quot;);
	msg+=checkAttr(&quot;стоимость&quot;);
	msg+=checkAttr(&quot;валюта&quot;);
	msg+=checkAttr(&quot;первоначальный взнос в валюте&quot;);
	msg+=checkAttr(&quot;первоначальный взнос в процентах&quot;);
	if(msg)
	{
	    gmError(msg);
	    return;
	}
    }
    else if(fStatus==1)
    {
	var row = tabOffers.currentRow();
	if(row&lt;0) return;
	if(tabOffers.value(row, &quot;Одобрена&quot;)!=2)
	{
	    gmError(&quot;Сначала одобрите заявку&quot;);
	    return;
	}
	Widget(&quot;fDateAproved&quot;).value = tabOffers.value(row, &quot;Дата одобрения&quot;);
	tabOffers.setValue(row, &quot;Сделка состоялась&quot;, 2);
    }
    fStatus++;
    Widget(&quot;tDeal&quot;).currentPage = fStatus;
    adjustEditable();
}

function stepBack()
{
    if(!fStatus) return;
    else if(fStatus==1)
    {
	tabOffers.deleteRows();
    }
    fStatus--;
    Widget(&quot;tDeal&quot;).currentPage = fStatus;
    adjustEditable();
}

function paramArray()
{
    var exParams = new Catalogue(&quot;выходные параметры&quot;);
    exParams.Select();
    var arParam = new Array();
    var idx = new Array();
    if(exParams.First()) do
    {
	var val = exParams.Value(&quot;очередность&quot;);
	idx[idx.length] = val;
	arParam[val] = new Array;
	arParam[val][&quot;название&quot;] = exParams.Value(&quot;представление&quot;);
	arParam[val][&quot;uid&quot;] = exParams.Uid();
    }while(exParams.Next());
    idx.sort();
    var res = new Array;
    for(var i=0;i&lt;idx.length;i++)
    {
	res[i] = arParam[idx[i]];
    }
    return res;
}

function formulaArray(offer, param)
{
    calcparams.SetFilter(&quot;кп&quot;, offer);
    calcparams.SetFilter(&quot;выходной параметр&quot;, param);
    calcparams.Select();
    var frmarr = new Array;
    var idx = new Array;
    if(calcparams.First()) do
    {
	var val = gmParseInt(calcparams.Value(&quot;порядок&quot;));
	idx[idx.length] = val;
	frmarr[val] = calcparams.Value(&quot;формула&quot;);
    }while(calcparams.Next());
    idx.sort();
    var res = new Array;
    for(var i=0;i&lt;idx.length;i++)
    {
	res[i] = frmarr[idx[i]];
    }
    return res;
}

function dumpObjects()
{
    var res = new Array;
    res[&quot;К&quot;] = gmDumpObject(&quot;Catalogue.Клиенты&quot;, clients);
    res[&quot;П&quot;] = gmDumpObject(&quot;Catalogue.кредитные предложения&quot;, credoffers);
    res[&quot;Д&quot;] = new Array;
    for(var i=0;i&lt;docWidgetMap.count();i++) res[&quot;Д&quot;][docWidgetMap.getKey(i)] = Widget(docWidgetMap.indGet(i)).value;
    res[&quot;С&quot;] = new Array;
    var props = new Catalogue(&quot;Свойства&quot;);
    props.SetFilter(&quot;Объект&quot;, clients.Uid());    
    props.Select();
    if(props.First()) do
    {		
	res[&quot;С&quot;][arClientProps[gmULLONGValue(props, &quot;Свойство&quot;)]] = props.Value(&quot;Значение&quot;);
    }while(props.Next());
    return res;
}

function checkOffer(offer)
{
    var arFrm = formulaArray(offer, 0);
    if(!arFrm.length) return true;
    var arPrm = dumpObjects();
    arPrm[&quot;Р&quot;] = new Array;
    for(var i=0;i&lt;arFrm.length;i++)
    {
	arPrm[&quot;Р&quot;][i] = gmEvaluate(arFrm[i], arPrm);
    }
    return arPrm[&quot;Р&quot;][arPrm[&quot;Р&quot;].length-1];
}

function findOffers()
{
    tabOffers.deleteRows();
    
    var availOffers = new Catalogue(&quot;доступные кредиты&quot;);
    clients.FindById(Widget(&quot;fClient&quot;).value);
    availOffers.SetFilter(&quot;населенный пункт&quot;, clients.Value(&quot;Населенный пункт&quot;));
    if(gmParseInt(Widget(&quot;fGroup&quot;).value)) availOffers.SetFilter(&quot;группа товаров&quot;, Widget(&quot;fGroup&quot;).value);
    availOffers.SetFilter(&quot;доступность&quot;, 1);
    availOffers.Select();
    if(availOffers.First()) do
    {
	credoffers.FindById(gmULLONGValue(availOffers, &quot;кредитное предложение&quot;));
	var checkRes = checkOffer(gmULLONGValue(availOffers, &quot;кредитное предложение&quot;));
	if(!checkRes) continue;	
	banks.FindById(gmULLONGValue(credoffers, &quot;банк&quot;));
	banksFilial.SetFilter(&quot;Банк&quot;, banks.Uid());
	banksFilial.SetFilter(&quot;Город&quot;, gmULLONGValue(clients, &quot;Населенный пункт&quot;));
	banksFilial.Select();
	if(banksFilial.First()) do
	{	
	    var row = tabOffers.addRow();
	    tabOffers.setValue(row, &quot;Банк&quot;, banks.Uid(), banks.displayString());
	    tabOffers.setValue(row, &quot;Кредитное предложение&quot;, credoffers.Uid(), credoffers.displayString());
	    tabOffers.setValue(row, &quot;Подразделение банка&quot;, banksFilial.Uid(), banksFilial.displayString());
	    tabOffers.setValue(row, &quot;Дата заявки&quot;, Widget(&quot;fDate&quot;).value);
	    tabOffers.setValue(row, &quot;Одобрена&quot;, 1);
	    tabOffers.setValue(row, &quot;Сделка состоялась&quot;, 1);
	}while(banksFilial.Next());
    }while(availOffers.Next());
    tabOffers.adjustColumns();
}

function saveDeal()
{
    sys.startTransaction();
    var res = 0;
    docs = new Document(&quot;Кредитная сделка&quot;);
    if(gmParseInt(doc)) res = docs.SelectDocument(doc);
    else res = docs.New();
    
    for(var i=0;i&lt;docWidgetMap.count();i++)
    {
	docs.SetValue(docWidgetMap.getKey(i), Widget(docWidgetMap.indGet(i)).value);
    }    
    
    docs.SetValue(&quot;статус&quot;, fStatus);
    docs.SetValue(&quot;автор&quot;, fAuthor);
    docs.SetValue(&quot;подразделение контрагента&quot;, fOrg);
    docs.SetValue(&quot;контрагент&quot;, fDealer);    
    docs.Update();
    var tname = &quot;заявки&quot;;
    docs.TableSelect(tname);
    while(docs.TableFirst(tname)) 
    {
	docs.TableDelete(tname);
	docs.TableSelect(tname);
    }
    for(var row=0;row&lt;tabOffers.numRows();row++)
    {
	docs.TableNewLine(tname);
	for(var ind=0;ind&lt;docTableMap.length;ind++)
	{
	    docs.TableSetValue(tname, docTableMap[ind], tabOffers.value(row, docTableMap[ind]));
	}
	docs.TableUpdate(tname);	
    }
    addDoc(docs);    
    delete docs;
    sys.commitTransaction();    
    modify = false;    
    onDealSelect(tabDeals.currentRow(), 0);
}

function printTableOffers()
{
    if(!tabOffers.numRows())
    {
	sysWarning(&quot;Не найдено ни одного кредитного предложения для заданных заемщика и условий кредитования.&quot;+
		   &quot;Попробуйте изменить услвия кредитования&quot;);
	return;
    }

    var service = new Service();
    var p = new Report(&quot;ReportLabels&quot;);
    p.setTable(&quot;offers.tpl&quot;);
    p.setValue(&quot;path&quot;, service.GetRcValue('workdir'));
    p.exec(&quot;main&quot;);
    p.exec(&quot;header&quot;);
    
    var arBanks = new Array;
    for(var row=0;row&lt;tabOffers.numRows();row++)
    {
	if(tabOffers.value(row, &quot;Банк&quot;) in arBanks) continue;
	arBanks[tabOffers.value(row, &quot;Банк&quot;)] = tabOffers.value(row, &quot;Банк&quot;);
	p.setValue(&quot;Банк&quot;, tabOffers.text(row, &quot;Банк&quot;));
	p.exec(&quot;headercell&quot;);
    }
    p.exec(&quot;endheader&quot;);
    
    var arFormulsPrms = dumpObjects();
    var arParam = paramArray();
    for(var i=0;i&lt;arParam.length;i++)
    {
	p.setValue(&quot;Название&quot;, arParam[i][&quot;название&quot;]);
	p.exec(&quot;trow&quot;);
	
	arFormulsPrms[&quot;Р&quot;] = new Array;	
	for(var row=0;row&lt;tabOffers.numRows();row++)
	{
	    arFormuls = formulaArray(tabOffers.value(row, &quot;Кредитное предложение&quot;), arParam[i][&quot;uid&quot;]);
	    for(var f=0;f&lt;arFormuls.length;f++)
	    {
		arFormulsPrms[&quot;Р&quot;][f] = gmEvaluate(arFormuls[f], arFormulsPrms);
	    }
	    p.setValue(&quot;Значение&quot;, arFormulsPrms[&quot;Р&quot;][arFormulsPrms[&quot;Р&quot;].length-1]);
	    p.exec(&quot;cell&quot;);
	}
	p.exec(&quot;endrow&quot;)
    }
    
    p.exec(&quot;trailer&quot;);
    
    var currency = Widget(&quot;fCurrency&quot;).text();
    var names = new Array(&quot;Дата расчета&quot;, &quot;Валюта кредита&quot;, &quot;Группа товаров&quot;, &quot;Наименование товара&quot;, &quot;Стоимость товара, [&quot;+currency+&quot;]&quot;, 
			  &quot;Сумма первоначального взноса, [&quot;+currency+&quot;]&quot;, &quot;Сумма запрашиваемого кредита, [&quot;+currency+&quot;]&quot;, &quot;Срок кредита, мес&quot;);    
    var values = new Array(Widget(&quot;fDate&quot;).text(), currency, Widget(&quot;fGroup&quot;).text(), Widget(&quot;fItemName&quot;).text(), Widget(&quot;fCost&quot;).text(), Widget(&quot;fFirstPayment&quot;).text(),
			   Widget(&quot;fSum&quot;).text(), Widget(&quot;fDueDate&quot;).text());
    for(var i=0;i&lt;names.length;i++)
    {
	p.setValue(&quot;Название&quot;, names[i]);
	p.setValue(&quot;Значение&quot;, values[i]);
	p.exec(&quot;property&quot;);
    }
    
    p.setValue(&quot;Название&quot;, &quot;СВЕДЕНИЯ О ЗАЕМЩИКЕ:&quot;);
    p.setValue(&quot;Значение&quot;, &quot;&quot;);
    p.exec(&quot;property&quot;);
    
    var props = new Catalogue(&quot;Свойства&quot;);
    props.SetFilter(&quot;Объект&quot;, clients.Uid());    
    props.Select();
    if(props.First()) do
    {		
	p.setValue(&quot;Название&quot;, arClientProps[gmULLONGValue(props, &quot;Свойство&quot;)]);
	p.setValue(&quot;Значение&quot;, props.Value(&quot;Значение&quot;));
	p.exec(&quot;property&quot;);
    }while(props.Next());
    
    p.exec(&quot;endtrailer&quot;);
    
    p.exec(&quot;endmain&quot;);
    p.save(&quot;offers.html&quot;);
    
    var arguments = new Array(&quot;firefox&quot;, &quot;offers.html&quot;);
    Process.execute(arguments);  
    
    delete p;                 
}

function on_button(btn)
{
    if(btn==&quot;btnClose&quot;) Close();
    else if(btn==&quot;btnNew&quot;) newDeal();
    else if(btn==&quot;btnEdit&quot;) editDeal();
    else if(btn==&quot;btnStep&quot;) step();
    else if(btn==&quot;btnStepBack&quot;) stepBack();
    else if(btn==&quot;btnFindOffers&quot;)
    {
	findOffers();
	printTableOffers();
    }
    else if(btn==&quot;btnPrint&quot;) printTableOffers();
    else if(btn==&quot;btnReport&quot;) sys.OpenForm(&quot;Report.О работе подразделений.Form.отчет&quot;, 1, undefined, false);
    else if(btn==&quot;btnSave&quot;) saveDeal();
    else if(btn==&quot;btnFilter&quot;) 
    {
	filterdeals = true;
	fillDeals();
    }
    else if(btn==&quot;btnCancelFilter&quot;) 
    {
	filterdeals = false;
	fillDeals();
    }
    else if(btn==&quot;btnCancel&quot;)
    {
	modify = false;
	onDealSelect(tabDeals.currentRow(), 0);
    }
    else if(btn==&quot;btnAproved&quot;) aprove();
}

function action()
{
    eval(formAction);
    formAction = &quot;&quot;;
    killTimer(timerId);
}

function on_formstop()
{
    sys.Exit();
}

function onDealSelect(row, col)
{    
    if(row&lt;tabDeals.numRows() &amp;&amp; row>=0)
    {
	loadDoc(tabDeals.value(&quot;doc&quot;));
    }
    else
    {
	loadDoc();
    }
    adjustEditable();
}

function on_valuechanged(val, attr)
{
    if(!modify) return;    
//очень тупой способ определения измененного объекта    
    for(var ind=0;ind&lt;docWidgetMap.count();ind++)
    {
	var wname = docWidgetMap.indGet(ind);
	var widget = Widget(wname);
	if(widget.focus) attr = wname;
    }    
    if(attr==&quot;fFirstProcent&quot; &amp;&amp; gmParseFloat(val)!=0)
    {
	var pay = (gmParseFloat(Widget(&quot;fCost&quot;).value)+gmParseFloat(Widget(&quot;fInsuranceCost&quot;).value))*gmParseFloat(val)/100;		
	pay = gmRound(pay, 2);
	modify = false;
	if(pay!=gmParseFloat(Widget(&quot;fFirstPayment&quot;).value)) Widget(&quot;fFirstPayment&quot;).value = pay;
	modify = true;
    }
    if(attr==&quot;fFirstPayment&quot; &amp;&amp; gmParseFloat(val)!=0)
    {
	var procent = val * 100 / (gmParseFloat(Widget(&quot;fCost&quot;).value)+gmParseFloat(Widget(&quot;fInsuranceCost&quot;).value));
	procent = gmRound(procent, 2);
	modify = false;
	if(procent!=gmParseFloat(Widget(&quot;fFirstProcent&quot;).value)) Widget(&quot;fFirstProcent&quot;).value = procent;
	modify = true;
    }
    if(attr==&quot;fCost&quot; || attr==&quot;fInsuranceCost&quot; || attr == &quot;fFirstPayment&quot; || attr == &quot;fFirstProcent&quot;)
    {
	Widget(&quot;fSum&quot;).value = gmParseFloat(Widget(&quot;fCost&quot;).value) + gmParseFloat(Widget(&quot;fInsuranceCost&quot;).value) - gmParseFloat(Widget(&quot;fFirstPayment&quot;).value);
    }
}

function on_itemchanged(val)
{
    var found  = items.FindById(val);
    if(gmULLONGValue(items, &quot;Группа товаров&quot;)!=Widget(&quot;fGroup&quot;).value &amp;&amp; gmParseInt(Widget(&quot;fGroup&quot;).value) &amp;&amp; gmParseInt(Widget(&quot;fItem&quot;).value))
    {
	gmError(&quot;Выбранный товар не принадлжеит группе &quot;+Widget(&quot;fGroup&quot;).text());
	Widget(&quot;fItem&quot;).value = 0;
	return;
    }
    if(Widget(&quot;fGroup&quot;).value==0 &amp;&amp; found)
    {
	Widget(&quot;fGroup&quot;).value = gmULLONGValue(items, &quot;Группа товаров&quot;);
    }
    Widget(&quot;fItemName&quot;).value = items.Value(&quot;Название&quot;);    
    Widget(&quot;fCost&quot;).value = items.Value(&quot;Стоимость&quot;);
    kurs = 1;
    on_currency(Widget(&quot;fCurrency&quot;).value);    
    adjustEditable();
}

function on_groupchanged(val)
{
    if(&quot;goods&quot; in formData &amp;&amp; &quot;filter&quot; in formData[&quot;goods&quot;]) delete formData[&quot;goods&quot;][&quot;filter&quot;];
    if(gmParseInt(val))
    {
	formData[&quot;goods&quot;] = new Array;
	formData[&quot;goods&quot;][&quot;filter&quot;] = val;
//	items.FindById(Widget(&quot;fItem&quot;).value);
	if(gmULLONGValue(items, &quot;Группа товаров&quot;)!=val)
	{
	    Widget(&quot;fItem&quot;).value = 0;
	    Widget(&quot;fItemName&quot;).value = &quot;&quot;;
	    Widget(&quot;fCost&quot;).value = &quot;0.00&quot;;
	    on_itemchanged(0);
	}
    }
    adjustEditable();
}

function on_currency(val)
{
    if(val) currency.FindById(val);
    var cost = gmParseFloat(Widget(&quot;fCost&quot;).value);
    if(kurs) cost *= kurs;
    kurs = gmParseFloat(currency.Value(&quot;курс&quot;));
    if(kurs) Widget(&quot;fCost&quot;).value = cost / kurs;
    var ctext = Widget(&quot;fCurrency&quot;).text();
    Widget(&quot;lFirstPayment&quot;).text = String(&quot;Первоначальный взнос, %1&quot;).arg(ctext);
    Widget(&quot;lSum&quot;).text = String(&quot;Сумма кредита, %1&quot;).arg(ctext);
    Widget(&quot;lFinalSum&quot;).text = String(&quot;Получен кредит, %1&quot;).arg(ctext);
    on_valuechanged(Widget(&quot;fCost&quot;).value, &quot;fCost&quot;);    
}

function aprove()
{
    var row = tabOffers.currentRow();
    if(row&lt;0) return;
    tabOffers.setValue(row, &quot;Одобрена&quot;, 2);
    tabOffers.setValue(row, &quot;Дата одобрения&quot;, new Date());
}
</sourcecode>
                        <defaultmod id="466" >14</defaultmod>
                        <dialogform id="467" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>1050&lt;/width>
            &lt;height>612&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;minimumSize&quot;>
        &lt;size>
            &lt;width>0&lt;/width>
            &lt;height>0&lt;/height>
        &lt;/size>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Сделки&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>460&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QSplitter&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>splitter2&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Horizontal&lt;/enum>
            &lt;/property>
            &lt;widget class=&quot;QFrame&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>mainFrame&lt;/cstring>
                &lt;/property>
                &lt;property name=&quot;frameShape&quot;>
                    &lt;enum>StyledPanel&lt;/enum>
                &lt;/property>
                &lt;property name=&quot;frameShadow&quot;>
                    &lt;enum>Raised&lt;/enum>
                &lt;/property>
                &lt;grid>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>unnamed&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;margin&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;spacing&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;widget class=&quot;wTable&quot; row=&quot;2&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>tabDeals&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;numRows&quot;>
                            &lt;number>0&lt;/number>
                        &lt;/property>
                        &lt;property name=&quot;numCols&quot;>
                            &lt;number>0&lt;/number>
                        &lt;/property>
                    &lt;/widget>
                    &lt;widget class=&quot;QLabel&quot; row=&quot;1&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>textLabel8&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;text&quot;>
                            &lt;string>Поиск или отбор&lt;/string>
                        &lt;/property>
                    &lt;/widget>
                    &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>layout43&lt;/cstring>
                        &lt;/property>
                        &lt;hbox>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QLabel&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>textLabel6&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>С&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;wField&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>dateStart&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;Id&quot;>
                                    &lt;number>0&lt;/number>
                                &lt;/property>
                                &lt;property name=&quot;FieldType&quot;>
                                    &lt;string>D&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;EditorType&quot;>
                                    &lt;enum>Date&lt;/enum>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QLabel&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>textLabel7&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>по&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;wField&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>dateEnd&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;Id&quot;>
                                    &lt;number>0&lt;/number>
                                &lt;/property>
                                &lt;property name=&quot;FieldType&quot;>
                                    &lt;string>D&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;EditorType&quot;>
                                    &lt;enum>Date&lt;/enum>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QComboBox&quot;>
                                &lt;item>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Расчет&lt;/string>
                                    &lt;/property>
                                &lt;/item>
                                &lt;item>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Заявка&lt;/string>
                                    &lt;/property>
                                &lt;/item>
                                &lt;item>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Сделка&lt;/string>
                                    &lt;/property>
                                &lt;/item>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>cbState&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;minimumSize&quot;>
                                    &lt;size>
                                        &lt;width>0&lt;/width>
                                        &lt;height>30&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnFilter&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;maximumSize&quot;>
                                    &lt;size>
                                        &lt;width>30&lt;/width>
                                        &lt;height>30&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image0&lt;/pixmap>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnCancelFilter&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;maximumSize&quot;>
                                    &lt;size>
                                        &lt;width>30&lt;/width>
                                        &lt;height>30&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image1&lt;/pixmap>
                                &lt;/property>
                            &lt;/widget>
                            &lt;spacer>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>spacer14&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;orientation&quot;>
                                    &lt;enum>Horizontal&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeType&quot;>
                                    &lt;enum>Expanding&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeHint&quot;>
                                    &lt;size>
                                        &lt;width>16&lt;/width>
                                        &lt;height>21&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                            &lt;/spacer>
                        &lt;/hbox>
                    &lt;/widget>
                &lt;/grid>
            &lt;/widget>
            &lt;widget class=&quot;QLayoutWidget&quot;>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>layout30&lt;/cstring>
                &lt;/property>
                &lt;vbox>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>unnamed&lt;/cstring>
                    &lt;/property>
                    &lt;widget class=&quot;QLayoutWidget&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>layout18&lt;/cstring>
                        &lt;/property>
                        &lt;hbox>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnNew&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image2&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Новая заявка&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnEdit&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image3&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Новая заявка&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnStep&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image4&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Следующий шаг&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnStepBack&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image5&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Следующий шаг&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnSave&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image6&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Сохранить заявку&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnCancel&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;pixmap&quot;>
                                    &lt;pixmap>image7&lt;/pixmap>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>Esc&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;toolTip&quot; stdset=&quot;0&quot;>
                                    &lt;string>Отменить заявку&lt;/string>
                                &lt;/property>
                            &lt;/widget>
                            &lt;spacer>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>spacer11&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;orientation&quot;>
                                    &lt;enum>Horizontal&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeType&quot;>
                                    &lt;enum>Expanding&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeHint&quot;>
                                    &lt;size>
                                        &lt;width>200&lt;/width>
                                        &lt;height>31&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                            &lt;/spacer>
                        &lt;/hbox>
                    &lt;/widget>
                    &lt;widget class=&quot;QTabWidget&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>tDeal&lt;/cstring>
                        &lt;/property>
                        &lt;property name=&quot;tabShape&quot;>
                            &lt;enum>Triangular&lt;/enum>
                        &lt;/property>
                        &lt;widget class=&quot;QWidget&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>page1&lt;/cstring>
                            &lt;/property>
                            &lt;attribute name=&quot;title&quot;>
                                &lt;string>Входные данные&lt;/string>
                            &lt;/attribute>
                            &lt;grid>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>unnamed&lt;/cstring>
                                &lt;/property>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout19&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLayoutWidget&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>layout16&lt;/cstring>
                                            &lt;/property>
                                            &lt;hbox>
                                                &lt;property name=&quot;name&quot;>
                                                    &lt;cstring>unnamed&lt;/cstring>
                                                &lt;/property>
                                                &lt;widget class=&quot;QLabel&quot;>
                                                    &lt;property name=&quot;name&quot;>
                                                        &lt;cstring>textLabel2&lt;/cstring>
                                                    &lt;/property>
                                                    &lt;property name=&quot;text&quot;>
                                                        &lt;string>Дата&lt;/string>
                                                    &lt;/property>
                                                &lt;/widget>
                                                &lt;widget class=&quot;wField&quot;>
                                                    &lt;property name=&quot;name&quot;>
                                                        &lt;cstring>fDate&lt;/cstring>
                                                    &lt;/property>
                                                    &lt;property name=&quot;sizePolicy&quot;>
                                                        &lt;sizepolicy>
                                                            &lt;hsizetype>0&lt;/hsizetype>
                                                            &lt;vsizetype>0&lt;/vsizetype>
                                                            &lt;horstretch>0&lt;/horstretch>
                                                            &lt;verstretch>0&lt;/verstretch>
                                                        &lt;/sizepolicy>
                                                    &lt;/property>
                                                    &lt;property name=&quot;Id&quot;>
                                                        &lt;number>0&lt;/number>
                                                    &lt;/property>
                                                    &lt;property name=&quot;value&quot;>
                                                        &lt;string>2008-10-21T00:00:00&lt;/string>
                                                    &lt;/property>
                                                    &lt;property name=&quot;FieldType&quot;>
                                                        &lt;string>D&lt;/string>
                                                    &lt;/property>
                                                    &lt;property name=&quot;EditorType&quot;>
                                                        &lt;enum>Date&lt;/enum>
                                                    &lt;/property>
                                                &lt;/widget>
                                            &lt;/hbox>
                                        &lt;/widget>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lAuthor&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;sizePolicy&quot;>
                                                &lt;sizepolicy>
                                                    &lt;hsizetype>7&lt;/hsizetype>
                                                    &lt;vsizetype>5&lt;/vsizetype>
                                                    &lt;horstretch>0&lt;/horstretch>
                                                    &lt;verstretch>0&lt;/verstretch>
                                                &lt;/sizepolicy>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Автор:&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLabel&quot; row=&quot;1&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>lOrg&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;sizePolicy&quot;>
                                        &lt;sizepolicy>
                                            &lt;hsizetype>7&lt;/hsizetype>
                                            &lt;vsizetype>5&lt;/vsizetype>
                                            &lt;horstretch>0&lt;/horstretch>
                                            &lt;verstretch>0&lt;/verstretch>
                                        &lt;/sizepolicy>
                                    &lt;/property>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Подразделение дилера:&lt;/string>
                                    &lt;/property>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout18&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel5&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Клиент&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fClient&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>O 139&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Catalogue&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout27&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lGroup&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Группа товаров&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fGroup&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>O 253&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Catalogue&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout29&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lItem&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Товар&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fItem&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>O 288&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Catalogue&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;spacer row=&quot;13&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>spacer7&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;orientation&quot;>
                                        &lt;enum>Vertical&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeType&quot;>
                                        &lt;enum>Expanding&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeHint&quot;>
                                        &lt;size>
                                            &lt;width>20&lt;/width>
                                            &lt;height>50&lt;/height>
                                        &lt;/size>
                                    &lt;/property>
                                &lt;/spacer>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;12&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout41&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lFirstPayment_2_2_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Срок кредитования, мес&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer13&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>71&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fDueDate&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>60&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>60&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 3 0&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;10&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout39&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lFirstProcent&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Первоначальный взнос в %&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer11_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fFirstProcent&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>80&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>80&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 5 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;8&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout37&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lCurrency_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Стоимость страхования&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer9&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>21&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fInsuranceCost&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>135&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>135&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 10 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;9&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout38&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lFirstPayment&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Первоначальный взнос&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer10&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>21&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fFirstPayment&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>115&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>115&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 10 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout36&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lCost&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Стоимость&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer8&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>121&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fCost&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>160&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>160&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 15 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;11&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout40&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lSum&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Сумма кредита&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer12_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fSum&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;minimumSize&quot;>
                                                &lt;size>
                                                    &lt;width>160&lt;/width>
                                                    &lt;height>0&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;maximumSize&quot;>
                                                &lt;size>
                                                    &lt;width>160&lt;/width>
                                                    &lt;height>32767&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 15 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout18&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lItemName&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Название товара&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fItemName&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>C 50&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>String&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;7&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout51&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lCurrency&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Валюта&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer25&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>81&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fCurrency&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;value&quot;>
                                                &lt;string>&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>O 639&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Catalogue&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                            &lt;/grid>
                        &lt;/widget>
                        &lt;widget class=&quot;QWidget&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>page2&lt;/cstring>
                            &lt;/property>
                            &lt;attribute name=&quot;title&quot;>
                                &lt;string>Заявки на кредит&lt;/string>
                            &lt;/attribute>
                            &lt;grid>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>unnamed&lt;/cstring>
                                &lt;/property>
                                &lt;widget class=&quot;wTable&quot; row=&quot;1&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>tabOffers&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;numRows&quot;>
                                        &lt;number>0&lt;/number>
                                    &lt;/property>
                                    &lt;property name=&quot;numCols&quot;>
                                        &lt;number>0&lt;/number>
                                    &lt;/property>
                                &lt;/widget>
                                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>btnFindOffers&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Найти предложения&lt;/string>
                                    &lt;/property>
                                    &lt;property name=&quot;iconSet&quot;>
                                        &lt;iconset>image8&lt;/iconset>
                                    &lt;/property>
                                &lt;/widget>
                                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;1&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>btnAproved&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;text&quot;>
                                        &lt;string>Одобрено&lt;/string>
                                    &lt;/property>
                                    &lt;property name=&quot;iconSet&quot;>
                                        &lt;iconset>image9&lt;/iconset>
                                    &lt;/property>
                                &lt;/widget>
                                &lt;spacer row=&quot;0&quot; column=&quot;2&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>spacer17&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;orientation&quot;>
                                        &lt;enum>Horizontal&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeType&quot;>
                                        &lt;enum>Expanding&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeHint&quot;>
                                        &lt;size>
                                            &lt;width>260&lt;/width>
                                            &lt;height>20&lt;/height>
                                        &lt;/size>
                                    &lt;/property>
                                &lt;/spacer>
                            &lt;/grid>
                        &lt;/widget>
                        &lt;widget class=&quot;QWidget&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>page3&lt;/cstring>
                            &lt;/property>
                            &lt;attribute name=&quot;title&quot;>
                                &lt;string>Кредит&lt;/string>
                            &lt;/attribute>
                            &lt;grid>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>unnamed&lt;/cstring>
                                &lt;/property>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout24&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel3&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Дата кредитного договора&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer13_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>21&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fAgreeDate&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>D&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Date&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout25&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel2_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Номер кредитного договора&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer14_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fAgreeNumber&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>C 10&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>String&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout26&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel1&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Дата одобрения&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer15&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fDateAproved&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>D&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Date&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout27&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel4&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Номер договора залога&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer16&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>61&lt;/width>
                                                    &lt;height>21&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fAgreeZNumber&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>C 10&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>String&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout28&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>textLabel5_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Дата договора залога&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer17_2&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fAgreeZDate&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>D&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Date&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>layout29&lt;/cstring>
                                    &lt;/property>
                                    &lt;hbox>
                                        &lt;property name=&quot;name&quot;>
                                            &lt;cstring>unnamed&lt;/cstring>
                                        &lt;/property>
                                        &lt;widget class=&quot;QLabel&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>lFinalSum&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;text&quot;>
                                                &lt;string>Получен кредит&lt;/string>
                                            &lt;/property>
                                        &lt;/widget>
                                        &lt;spacer>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>spacer18&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;orientation&quot;>
                                                &lt;enum>Horizontal&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeType&quot;>
                                                &lt;enum>Expanding&lt;/enum>
                                            &lt;/property>
                                            &lt;property name=&quot;sizeHint&quot;>
                                                &lt;size>
                                                    &lt;width>51&lt;/width>
                                                    &lt;height>20&lt;/height>
                                                &lt;/size>
                                            &lt;/property>
                                        &lt;/spacer>
                                        &lt;widget class=&quot;wField&quot;>
                                            &lt;property name=&quot;name&quot;>
                                                &lt;cstring>fFinalSum&lt;/cstring>
                                            &lt;/property>
                                            &lt;property name=&quot;Id&quot;>
                                                &lt;number>0&lt;/number>
                                            &lt;/property>
                                            &lt;property name=&quot;FieldType&quot;>
                                                &lt;string>N 15 2&lt;/string>
                                            &lt;/property>
                                            &lt;property name=&quot;EditorType&quot;>
                                                &lt;enum>Numberic&lt;/enum>
                                            &lt;/property>
                                        &lt;/widget>
                                    &lt;/hbox>
                                &lt;/widget>
                                &lt;spacer row=&quot;6&quot; column=&quot;0&quot;>
                                    &lt;property name=&quot;name&quot;>
                                        &lt;cstring>spacer19&lt;/cstring>
                                    &lt;/property>
                                    &lt;property name=&quot;orientation&quot;>
                                        &lt;enum>Vertical&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeType&quot;>
                                        &lt;enum>Expanding&lt;/enum>
                                    &lt;/property>
                                    &lt;property name=&quot;sizeHint&quot;>
                                        &lt;size>
                                            &lt;width>31&lt;/width>
                                            &lt;height>81&lt;/height>
                                        &lt;/size>
                                    &lt;/property>
                                &lt;/spacer>
                            &lt;/grid>
                        &lt;/widget>
                    &lt;/widget>
                    &lt;widget class=&quot;QLayoutWidget&quot;>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>layout18&lt;/cstring>
                        &lt;/property>
                        &lt;hbox>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>unnamed&lt;/cstring>
                            &lt;/property>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnPrint&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>Предложение&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;iconSet&quot;>
                                    &lt;iconset>image10&lt;/iconset>
                                &lt;/property>
                            &lt;/widget>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnReport&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>Отчет по подразделению&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;iconSet&quot;>
                                    &lt;iconset>image11&lt;/iconset>
                                &lt;/property>
                            &lt;/widget>
                            &lt;spacer>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>spacer12&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;orientation&quot;>
                                    &lt;enum>Horizontal&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeType&quot;>
                                    &lt;enum>Expanding&lt;/enum>
                                &lt;/property>
                                &lt;property name=&quot;sizeHint&quot;>
                                    &lt;size>
                                        &lt;width>90&lt;/width>
                                        &lt;height>21&lt;/height>
                                    &lt;/size>
                                &lt;/property>
                            &lt;/spacer>
                            &lt;widget class=&quot;QPushButton&quot;>
                                &lt;property name=&quot;name&quot;>
                                    &lt;cstring>btnClose&lt;/cstring>
                                &lt;/property>
                                &lt;property name=&quot;text&quot;>
                                    &lt;string>Закрыть&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;accel&quot;>
                                    &lt;string>Esc&lt;/string>
                                &lt;/property>
                                &lt;property name=&quot;iconSet&quot;>
                                    &lt;iconset>image12&lt;/iconset>
                                &lt;/property>
                            &lt;/widget>
                        &lt;/hbox>
                    &lt;/widget>
                &lt;/vbox>
            &lt;/widget>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;2157&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;3517&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;6174&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image3&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;6094&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image4&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;3966&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image5&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;3805&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image6&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5598&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image7&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;3437&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image8&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;2067&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image9&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5550&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image10&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;1797&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image11&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;2221&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image12&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;6382&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="461" />
                <sourcecode id="462" />
            </report>
            <report id="820" name="Редактор КП" >
                <forms>
                    <form readonly="0" type="0" id="844" name="форма" >
                        <sourcecode id="845" >var tabAccess, tabOffers;

function addAccessibleOffer(el)
{
    var row = tabAccess.findValue(&quot;предложение&quot;, el.Uid());
    if(row&lt;0) row = tabAccess.addRow();
    
    var offer = gmULLONGValue(el, &quot;кредитное предложение&quot;);
    var offerRow = tabOffers.findValue(&quot;предложение&quot;, offer);
    tabAccess.setValue(row, &quot;предложение&quot;, offer, offerRow&lt;0 ? &quot;&lt;КП не найдено>&quot; : tabOffers.text(offerRow, &quot;предложение&quot;));
    tabAccess.setValue(row, &quot;доступно&quot;, gmParseInt(el.Value(&quot;доступность&quot;))+1);
    tabAccess.setValue(row, &quot;элемент&quot;, el.Uid());
}

function fillAccessibleOffers()
{
    tabAccess.clear();
    tabAccess.addColumn(&quot;предложение&quot;, 1, true, true);
    tabAccess.addColumn(&quot;доступно&quot;, 125, true, false, gmTranslateType(&quot;Перечисление (\&quot;Нет\&quot;, \&quot;Да\&quot;)&quot;));
    tabAccess.addColumn(&quot;элемент&quot;, 0, true, false);
    
    catAcc = new Catalogue(&quot;доступные кредиты&quot;);
    catAcc.SetFilter(&quot;населенный пункт&quot;, Widget(&quot;fCity&quot;).value);
    catAcc.SetFilter(&quot;группа товаров&quot;, Widget(&quot;fGroup&quot;).value);    
    catAcc.Select();
    if(catAcc.First()) do
    {
	addAccessibleOffer(catAcc);
	var row = tabOffers.findValue(&quot;предложение&quot;, gmULLONGValue(catAcc, &quot;кредитное предложение&quot;));
	if(row>-1) tabOffers.deleteRow(row);
    }while(catAcc.Next());
}

function fillOffers()
{
    tabOffers.clear();
    tabOffers.addColumn(&quot;предложение&quot;, 1, true, true);
        
    catOffers = new Catalogue(&quot;кредитные предложения&quot;);
    catOffers.Select();
    if(catOffers.First()) do
    {
	tabOffers.setValue(tabOffers.addRow(), &quot;предложение&quot;, catOffers.Uid(), catOffers.displayString());
    }while(catOffers.Next());    
}

function on_formstart() 
{
    tabAccess = new ObjectTable(Widget(&quot;tabAccessible&quot;));
    tabOffers = new ObjectTable(Widget(&quot;tabOffers&quot;));
    
    fillOffers();    
    fillAccessibleOffers();
    
    connect(Widget(&quot;fCity&quot;), &quot;valueChanged(QVariant)&quot;, fillAccessibleOffers);
    connect(Widget(&quot;fGroup&quot;), &quot;valueChanged(QVariant)&quot;, fillAccessibleOffers);    
}

function createOffer()
{
    var offer = tabOffers.value(&quot;предложение&quot;);
    if(!offer) return;
    var row = tabAccess.findValue(&quot;предложение&quot;, offer);
    var msg = &quot;&quot;;
    if(!gmParseInt(Widget(&quot;fCity&quot;).value)) msg = &quot;Необходимо выбрать город. &quot;;
    if(!gmParseInt(Widget(&quot;fGroup&quot;).value)) msg += &quot;Необходимо выбрать группу товаров. &quot;;
    if(msg!=&quot;&quot;) 
    {
	sysError(msg);
	return;
    }    
    
    var cat = new Catalogue(&quot;доступные кредиты&quot;);
    cat.New();
    cat.SetValue(&quot;населенный пункт&quot;, Widget(&quot;fCity&quot;).value);
    cat.SetValue(&quot;группа товаров&quot;, Widget(&quot;fGroup&quot;).value);    
    cat.SetValue(&quot;кредитное предложение&quot;, offer);
    cat.SetValue(&quot;доступность&quot;, 1);
    cat.Update();
    
    addAccessibleOffer(cat);    
    tabOffers.deleteRow();    
}

function deleteOffer()
{
    var id = tabAccess.value(&quot;элемент&quot;);
    if(!gmParseInt(id)) return;
    var cat = new Catalogue(&quot;доступные кредиты&quot;);
    cat.Select();
    if(cat.FindById(id)) 
    {
	tabOffers.setValue(tabOffers.addRow(), &quot;предложение&quot;, gmULLONGValue(cat, &quot;кредитное предложение&quot;), tabAccess.text(&quot;предложение&quot;));		
	cat.Delete();
	tabAccess.deleteRow();
    }
}

function on_button(btn)
{
    if(btn==&quot;btnClose&quot;) Close();
    else if(btn==&quot;btnLeft&quot;) createOffer();
    else if(btn==&quot;btnRight&quot;) deleteOffer();
}
</sourcecode>
                        <description id="846" />
                        <defaultmod id="847" >14</defaultmod>
                        <dialogform id="848" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>829&lt;/width>
            &lt;height>443&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Доступные кредитные предложения&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>820&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout127&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout125&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>textLabel6&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Город&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;wField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>fCity&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>0&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>O 101&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Catalogue&lt;/enum>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout125_2&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;widget class=&quot;QLabel&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>textLabel6_2&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Группа товаров&lt;/string>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;wField&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>fGroup&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;Id&quot;>
                                &lt;number>0&lt;/number>
                            &lt;/property>
                            &lt;property name=&quot;FieldType&quot;>
                                &lt;string>O 253&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;EditorType&quot;>
                                &lt;enum>Catalogue&lt;/enum>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer62&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>71&lt;/width>
                            &lt;height>31&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;3&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout128&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer63&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>241&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnClose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Закрыть&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout129&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Доступные кредиты&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wTable&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>tabAccessible&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;numRows&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;numCols&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout130&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel8&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Кредитные предложения&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wTable&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>tabOffers&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;numRows&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;numCols&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout131&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer64&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Vertical&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>31&lt;/width>
                            &lt;height>61&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnLeft&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image1&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnRight&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image2&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer65&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Vertical&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>21&lt;/width>
                            &lt;height>101&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/vbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;10318&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5438&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5310&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="821" />
                <sourcecode id="822" />
            </report>
            <report id="876" name="Расчеты" >
                <forms>
                    <form readonly="0" type="0" id="879" name="Редактор параметров" >
                        <sourcecode id="880" >var offer;
var tabParams, tabFormulas;

function adjustEditable(editable)
{
    Widget(&quot;tabParams&quot;).enabled = editable;
    Widget(&quot;btnClose&quot;).enabled = editable;
    Widget(&quot;btnSave&quot;).enabled = !editable;
    Widget(&quot;btnCancel&quot;).enabled = !editable;
}

function formulaDisplay(str)
{
    str = str.replace(/\{|\}/g, &quot;&quot;);
    return str;
}

function fillParams()
{
    tabParams.clear();
    tabParams.addColumn(&quot;параметр&quot;, 1, true, true);
    tabParams.hideVerticalHeader();
    tabParams.setValue(tabParams.addRow(), &quot;параметр&quot;, 0, &quot;условия предоставления кредита&quot;);
    
    var cat = new Catalogue(&quot;выходные параметры&quot;);
    cat.Select();    
    if(cat.First()) do
    {
	tabParams.setValue(tabParams.addRow(), &quot;параметр&quot;, cat.Uid(), cat.displayString());
    }while(cat.Next());
}

function fillFormulas()
{
    tabFormulas.clear();
    tabFormulas.addColumn(&quot;формула&quot;, 1, true, true);
    
    var cat = new Catalogue(&quot;расчеты&quot;);
    cat.SetFilter(&quot;кп&quot;, offer);
    cat.SetFilter(&quot;выходной параметр&quot;, tabParams.value(&quot;параметр&quot;));
    cat.Select();
    if(cat.First()) do
    {
	tabFormulas.setValue(tabFormulas.addRow(), &quot;формула&quot;, cat.Value(&quot;формула&quot;), formulaDisplay(cat.Value(&quot;формула&quot;)));
    }while(cat.Next()); 
    adjustEditable(true);
}

function on_formstart()
{
    offer  = 0;
    if(&quot;Редактор параметров&quot; in formData &amp;&amp; &quot;предложение&quot; in formData[&quot;Редактор параметров&quot;]) offer = formData[&quot;Редактор параметров&quot;][&quot;предложение&quot;];
    tabParams = new ObjectTable(Widget(&quot;tabParams&quot;));
    tabParams.connectSlot(&quot;currentChanged(int, int)&quot;, paramSelected)    
    tabFormulas = new ObjectTable(Widget(&quot;tabFormulas&quot;));        
    
    fillParams();
    tabParams.setCurrentRow(0);
    tabParams.setSelectionMode(2);
    fillFormulas();
    tabFormulas.setSelectionMode(2);
}

function paramSelected(row)
{
    fillFormulas();
}

function addFormula()
{
    var row = tabFormulas.addRow();
    tabFormulas.setCurrentRow(row);
    editFormula();
}

function editFormula()
{
    if(tabFormulas.currentRow()&lt;0) return;    
    if(&quot;Конструктор формул&quot; in formData &amp;&amp; formData[&quot;Конструктор формул&quot;]) return;
    formData[&quot;Конструктор формул&quot;] = new Array();
    formData[&quot;Конструктор формул&quot;][&quot;формула&quot;] = tabFormulas.value(&quot;формула&quot;);
    formData[&quot;Конструктор формул&quot;][&quot;callback&quot;] = formulaChanged;
    adjustEditable(false);
    sys.OpenForm(&quot;Report.Расчеты.Form.Конструктор формул&quot;, 1);
}

function delFormula()
{
    tabFormulas.deleteRow();
    adjustEditable(false);
}

function on_button(btn)
{
    if(btn==&quot;btnClose&quot;) Close();
    else if(btn==&quot;btnSave&quot;) Save();
    else if(btn==&quot;btnAdd&quot;) addFormula();
    else if(btn==&quot;btnDel&quot;) delFormula();
    else if(btn==&quot;btnEdit&quot;) editFormula();    
    else if(btn==&quot;btnCancel&quot;) fillFormulas();
}

function formulaChanged(newFormula)
{
    delete formData[&quot;Конструктор формул&quot;];
    formData[&quot;Конструктор формул&quot;] = undefined;
    if(!newFormula)
    {
	if(!tabFormulas.value(&quot;формула&quot;)) delFormula();
	return;
    }
    tabFormulas.setValue(tabFormulas.currentRow(), &quot;формула&quot;, newFormula, formulaDisplay(newFormula));        
}

function Save()
{
    var cat = new Catalogue(&quot;расчеты&quot;);
    while(true)
    {
	cat.SetFilter(&quot;кп&quot;, offer);
	cat.SetFilter(&quot;выходной параметр&quot;, tabParams.value(&quot;параметр&quot;));
	cat.Select();
	if(!cat.First()) break;
	cat.Delete();
    };
    
    for(var row=0;row&lt;tabFormulas.numRows();row++)
    {
	cat.New();
	cat.SetValue(&quot;кп&quot;, offer);
	cat.SetValue(&quot;выходной параметр&quot;, tabParams.value(&quot;параметр&quot;));
	cat.SetValue(&quot;порядок&quot;, row);
	cat.SetValue(&quot;формула&quot;, tabFormulas.value(row, &quot;формула&quot;));
	cat.Update();
    }
    adjustEditable(true);
}
</sourcecode>
                        <description id="881" />
                        <defaultmod id="882" >0</defaultmod>
                        <dialogform id="888" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>713&lt;/width>
            &lt;height>378&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Расчеты&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>876&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;wTable&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tabParams&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;numRows&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;numCols&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QFrame&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>frame24&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;frameShape&quot;>
                &lt;enum>StyledPanel&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;frameShadow&quot;>
                &lt;enum>Raised&lt;/enum>
            &lt;/property>
            &lt;grid>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer row=&quot;0&quot; column=&quot;5&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer77&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>100&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;1&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnEdit&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image0&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;0&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnAdd&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image1&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;2&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnDel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image2&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wTable&quot; row=&quot;1&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;6&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>tabFormulas&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;numRows&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;numCols&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;3&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnSave&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image3&lt;/pixmap>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot; row=&quot;0&quot; column=&quot;4&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnCancel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image4&lt;/pixmap>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/grid>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer63&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>510&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnClose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Закрыть&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image5&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;9262&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;11374&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5678&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image3&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image4&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image5&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;10318&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form type="0" readonly="0" id="901" name="Конструктор формул" >
                        <sourcecode id="902" >var tabFunctions, tabSequence;
var functions, sections, descriptions, args;
var inspoint = 0;
var formula, formulatext;
var meta;

function loadFunctions()
{
    functions = new Array();
    sections = new Array();
    descriptions = new Array();
    args = new Array();
    
    var cat = new Catalogue(&quot;функции&quot;);
    cat.Select();
    if(cat.First()) do
    {
	if(!(cat.Value(&quot;раздел&quot;) in functions)) 
	{
	    sections[sections.length] = cat.Value(&quot;раздел&quot;);
	    functions[cat.Value(&quot;раздел&quot;)] = new Array;
	}
	functions[cat.Value(&quot;раздел&quot;)][functions[cat.Value(&quot;раздел&quot;)].length] = cat.displayString();
	descriptions[cat.displayString()] = cat.Value(&quot;описание&quot;);
	args[cat.displayString()] = cat.Value(&quot;количество аргументов&quot;);
    }
    while(cat.Next());
        
    Widget(&quot;cbSections&quot;).insertStringList(sections);
    Widget(&quot;cbSections&quot;).currentItem = 0;
}

function fillFunctions()
{
    tabFunctions.clear();
    tabFunctions.hideVerticalHeader();
    tabFunctions.addColumn(&quot;функция&quot;, 1, true, true);
    tabFunctions.setSelectionMode(2);
    
    var sect = sections[Widget(&quot;cbSections&quot;).currentItem];
    for(var ind=0;ind&lt;functions[sect].length;ind++)
    {
	tabFunctions.setValue(tabFunctions.addRow(), &quot;функция&quot;, functions[sect][ind]);
    }
}

function fillParameters()
{
    var meta = new Meta;
    var fields = meta.GetUserFields(&quot;Catalogue.Клиенты&quot;);
    for(var i=0;i&lt;fields.length;i++)	 Widget(&quot;cbParams&quot;).insertItem(&quot;К[&quot;+fields[i]+&quot;]&quot;);
    fields = meta.GetUserFields(&quot;Catalogue.кредитные предложения&quot;);
    for(var i=0;i&lt;fields.length;i++)	 Widget(&quot;cbParams&quot;).insertItem(&quot;П[&quot;+fields[i]+&quot;]&quot;);
    fields = meta.GetUserFields(&quot;Document.Кредитная сделка&quot;);
    for(var i=0;i&lt;fields.length;i++)	 Widget(&quot;cbParams&quot;).insertItem(&quot;Д[&quot;+fields[i]+&quot;]&quot;);    
    var cat = new Catalogue(&quot;Свойства клиента&quot;);
    cat.Select();
    if(cat.First()) do
    {
	Widget(&quot;cbParams&quot;).insertItem(&quot;С[&quot;+cat.Value(&quot;Название&quot;)+&quot;]&quot;);	
    }while(cat.Next());
    Widget(&quot;cbParams&quot;).insertItem(&quot;Р[]&quot;);	    
}

function on_formstart() 
{
    tabFunctions = new ObjectTable(Widget(&quot;tabFunctions&quot;));
    tabFunctions.connectSlot(&quot;currentChanged(int, int)&quot;, funcSelect);
    loadFunctions();
    fillFunctions();
    fillParameters();
    
    formula = Widget(&quot;fFormula&quot;);
    if(&quot;Конструктор формул&quot; in formData &amp;&amp; &quot;формула&quot; in formData[&quot;Конструктор формул&quot;]) setFormula(formData[&quot;Конструктор формул&quot;][&quot;формула&quot;]);
    connect(Widget(&quot;cbSections&quot;), &quot;activated(int)&quot;, fillFunctions);
    
    meta = new Meta;    
    Widget(&quot;cbType&quot;).insertStringList(new Array(&quot;Число&quot;, &quot;Строка&quot;, &quot;Дата&quot;, &quot;Справочник&quot;, &quot;Документ&quot;));
    connect(Widget(&quot;cbType&quot;), &quot;activated(int)&quot;, typeSelected);
    typeSelected(1);
    connect(Widget(&quot;cbKind&quot;), &quot;activated(QString)&quot;, kindSelected);
}

function on_button(btn)
{
    if(btn==&quot;btnCancel&quot;)
    {
	formData[&quot;Конструктор формул&quot;][&quot;callback&quot;](undefined);
	Close();
    }
    else if(btn==&quot;btnOk&quot;)
    {
    	formData[&quot;Конструктор формул&quot;][&quot;callback&quot;](formulatext);
	Close();
    }
    else if(btn==&quot;btnInsFunc&quot;) tryIns(tabFunctions.value(&quot;функция&quot;));
    else if(btn==&quot;btnInsParam&quot;) tryIns(Widget(&quot;cbParams&quot;).currentText);
    else if(btn==&quot;btnInsVal&quot;)
    {
	var str = Widget(&quot;fValue&quot;).value;
	var brpos = str.find(&quot;{&quot;, 0) + str.find(&quot;}&quot;,  0);
	if(brpos>=0)
	{
	    sysError(&quot;Значение не должно содержать символы '{', '}'&quot;);
	    return;
	}
	Widget(&quot;fValue&quot;).setValue(&quot;&quot;);
	if(Widget(&quot;cbType&quot;).currentItem==1 || Widget(&quot;cbType&quot;).currentItem==2) str = &quot;\&quot;&quot;+str+&quot;\&quot;&quot;;
	tryIns(str);
    }
    else if(btn==&quot;btnDel&quot;) tryIns(&quot;{}&quot;);
    else if(btn==&quot;btnLeft&quot; || btn==&quot;btnRight&quot;) moveCursor(btn.mid(3));
}

function strdup(str, time)
{
    var res = &quot;&quot;;
    for(var i=0;i&lt;time;i++)
	res+=str;
    return res;
}

function tryIns(insertion)
{
    if(!insertion) return;
    var text = formulatext;    
    var ls = gmTrim(text.left(inspoint+1));
    var ps = gmTrim(text.mid(inspoint+1));    
    if(ps.charAt(0)!='}')
    {
	var bcount = 1;
	for(var i=0;i&lt;ps.length;i++)
	{
	    if(ps.charAt(i)=='{') bcount++;
	    if(ps.charAt(i)=='}') bcount--;
	    if(!bcount)
	    {
		ps = ps.mid(i);
		break;
	    }
	}
    }
    if(insertion==&quot;Р[]&quot;) insertion = &quot;Р[{}]&quot;;
    if(insertion==&quot;{}&quot;) insertion = &quot;&quot;;
    if(insertion in args) formulatext = ls+insertion+&quot;({}&quot;+strdup(&quot;, {}&quot;, args[insertion]-1)+&quot;)&quot;+ps; 
    else if(insertion) formulatext = ls+gmTrim(insertion)+&quot; &quot;+ps;
    else formulatext = ls+ps;
    moveCursor(&quot;Right&quot;);
    setFormula(formulatext);
}

function funcSelect(row, col)
{
    var func = tabFunctions.value(row, &quot;функция&quot;);
    if(!func) Widget(&quot;lDescription&quot;).text = &quot;&quot;;
    else Widget(&quot;lDescription&quot;).text = descriptions[func]+&quot;&lt;BR>количество аргументов: &quot;+args[func];
}

function setFormula(frml)
{
    formulatext = frml;
    if(formulatext==&quot;&quot; || !formulatext) formulatext=&quot;{}&quot;;
    var bcount = 0;
    var text = &quot;&quot;;
    for(var i=0;i&lt;formulatext.length;i++)
    {
	var ch = formulatext.charAt(i);
	var nextCh = formulatext.charAt(i+1)
	if(ch=='(' || ch ==')')
	{
	    if(ch=='(') bcount++;
	    if(ch==')') bcount--;
	    var color = new Color(0xFF, (bcount*33) % 0xFF, (bcount*22) % 0xFF );
	    var htmlcolor = String(&quot;\&quot;%1\&quot;&quot;).arg(color);
	    text+=&quot;&lt;font color=&quot;+htmlcolor+&quot;>&quot;+ch+&quot;&lt;/font>&quot;
	}
	else if(ch=='{' &amp;&amp; nextCh=='}')
	{
	    if(i==inspoint) text+=&quot;&lt;font color=\&quot;blue\&quot;>|&lt;/font>&quot;
	}
	else if(ch==&quot;{&quot; &amp;&amp; nextCh!='}')
	{
	    if(i==inspoint) text+=&quot;&lt;font color=\&quot;red\&quot;>|&lt;/font>&quot;;
	}
	else if(ch=='}'){/*skip*/}	
	else text+=ch;
    }
    formula.text = text;
}

function moveCursor(dir)
{
    var ins = 0;
    if(dir==&quot;Left&quot;) ins = formulatext.findRev(new RegExp(&quot;\\{&quot;), inspoint-1);
	else ins = formulatext.find(new RegExp(&quot;\\{&quot;), inspoint+1);
    if(ins&lt;0) return;
    inspoint = ins;
    setFormula(formulatext);    
}

function typeSelected(type)
{
    Widget(&quot;cbKind&quot;).enabled = type>2;    
    Widget(&quot;cbKind&quot;).clear();    
    if(type&lt;3)
    {
	var len = type == 0 ? &quot; 15 5&quot; : &quot; 254&quot;;
	Widget(&quot;fValue&quot;).setFieldType(String(&quot;NCD&quot;).charAt(type)+len);
	Widget(&quot;fValue&quot;).setEditorType(type+1);
    }
    else
    {
	Widget(&quot;fValue&quot;).setEditorType(0);
	Widget(&quot;cbKind&quot;).insertStringList(meta.DataTypes(type==3 ? &quot;Catalogue&quot; : &quot;Document&quot;));
    }
    Widget(&quot;fValue&quot;).setValue(&quot;&quot;);    
}

function kindSelected(kind)
{
    Widget(&quot;fValue&quot;).setFieldType(kind.left(kind.indexOf(&quot;\t&quot;)));
    Widget(&quot;fValue&quot;).setEditorType(Widget(&quot;cbType&quot;).currentItem+98);
}
</sourcecode>
                        <description id="903" />
                        <defaultmod id="904" >14</defaultmod>
                        <dialogform id="905" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>802&lt;/width>
            &lt;height>508&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;sizePolicy&quot;>
        &lt;sizepolicy>
            &lt;hsizetype>5&lt;/hsizetype>
            &lt;vsizetype>7&lt;/vsizetype>
            &lt;horstretch>0&lt;/horstretch>
            &lt;verstretch>0&lt;/verstretch>
        &lt;/sizepolicy>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Конструктор формул&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>876&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout10&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnInsFunc&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Вставить функцию&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer6&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>121&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout12&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>раздел&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbSections&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>3&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>131&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout11&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel5&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Описание&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lDescription&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>5&lt;/hsizetype>
                            &lt;vsizetype>3&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;frameShape&quot;>
                        &lt;enum>StyledPanel&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;alignment&quot;>
                        &lt;set>WordBreak|AlignTop&lt;/set>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;wTable&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tabFunctions&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;numRows&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;numCols&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnLeft&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>25&lt;/width>
                            &lt;height>25&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnRight&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>25&lt;/width>
                            &lt;height>25&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnDel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>25&lt;/width>
                            &lt;height>25&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image2&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>0&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>=&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fFormula&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>32767&lt;/width>
                            &lt;height>30&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;alignment&quot;>
                        &lt;set>WordBreak|AlignTop&lt;/set>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;7&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout9&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>430&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;enabled&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;minimumSize&quot;>
                        &lt;size>
                            &lt;width>70&lt;/width>
                            &lt;height>0&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;cursor&quot;>
                        &lt;cursor>0&lt;/cursor>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image3&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnCancel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;minimumSize&quot;>
                        &lt;size>
                            &lt;width>0&lt;/width>
                            &lt;height>30&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;cursor&quot;>
                        &lt;cursor>0&lt;/cursor>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image4&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout7&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>параметр&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbParams&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnInsParam&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Вставить&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer4&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>371&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout8&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>значение&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbType&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbKind&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fValue&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>N 254 0&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Numberic&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnInsVal&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Вставить&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5438&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5310&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5678&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image3&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4910&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image4&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="877" />
                <sourcecode id="878" />
            </report>
            <report id="521" name="service" >
                <forms>
                    <form type="0" readonly="0" id="522" name="login" >
                        <sourcecode id="523" >var tab, pass;
var user = 0;
var sysExit = true;
var timerId;

function fillUsers()
{    
    tab.deleteRows();
    var users = new Catalogue(&quot;Пользователи&quot;);
    users.Select();
    if(users.First())
    {
	do
	{
	    var row = tab.addRow();
	    tab.setValue(row, &quot;Пользователь&quot;, users.Uid(), users.Value(&quot;имя&quot;));
	}
	while(users.Next());
    }
    pass.setFocus();    
    tab.setCurrentRow(0);
}

function on_formstart()
{
    pass = Widget(&quot;lePassword&quot;);
    tab = new ObjectTable(Widget(&quot;tabUsers&quot;));
    tab.addColumn(&quot;Пользователь&quot;, 1, true, true);
    tab.addColumn(&quot;OID&quot;, 0);
    tab.hideVerticalHeader();
    tab.setReadOnly(true);
    tab.connectSlot(&quot;currentChanged(int, int)&quot;, tab_invoked);
    fillUsers();
    on_button(&quot;dummy&quot;);
}

function on_button(name)
{
    var users = new Catalogue(&quot;Пользователи&quot;);
    users.Select();
    users.FindById(tab.value(&quot;Пользователь&quot;));
    
    if(name==&quot;btnOk&quot;)
    {
	//продумать криптование	
	if(users.Value(&quot;пароль&quot;)==pass.text)
	{	    
	    if(!users.Value(&quot;сотрудник&quot;) &amp;&amp; tab.text(&quot;Пользователь&quot;)!=&quot;Administrator&quot;) 
	    {
		sysError(&quot;У пользователя &quot; + tab.text(&quot;Пользователь&quot;) + &quot; не выбран сотрудник, вход не возможен!!&quot;);
		pass.text = &quot;&quot;;
		return;
	    }	    
	    sys.setValue(&quot;currentUser&quot;, tab.value(&quot;Пользователь&quot;));
	    sysExit = false;
	}
	else
	{
	    sys.Message(1, &quot;Неверный пароль, попробуйте ещё разок.&quot;);
	    pass.text = &quot;&quot;;
	    return;
	}
	Close();
	gmUserStart();	
	return;
    }
    else if(name==&quot;btnUp&quot; &amp;&amp; tab.currentRow())
	tab.setCurrentRow(tab.currentRow()-1);
    else if(name==&quot;btnDown&quot;)
	tab.setCurrentRow(tab.currentRow()+1);
    else if(name==&quot;btnCancel&quot;)
	Close();
    
    Widget(&quot;lblPassword&quot;).text = &quot;Пароль для \&quot;&quot;+tab.text(&quot;Пользователь&quot;)+&quot;\&quot;:&quot;;
    pass.setFocus();
}

function on_formstop()
{
    if(sysExit) sys.Exit();
    return true;
}

function tab_invoked(row, col)
{
    on_button(&quot;dummy&quot;);
}
</sourcecode>
                        <description id="524" />
                        <defaultmod id="525" >0</defaultmod>
                        <dialogform id="526" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>493&lt;/width>
            &lt;height>274&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Авторизация&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>3038&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout3_2&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>321&lt;/width>
                            &lt;height>20&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;minimumSize&quot;>
                        &lt;size>
                            &lt;width>70&lt;/width>
                            &lt;height>0&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;cursor&quot;>
                        &lt;cursor>0&lt;/cursor>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnCancel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;minimumSize&quot;>
                        &lt;size>
                            &lt;width>0&lt;/width>
                            &lt;height>30&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;cursor&quot;>
                        &lt;cursor>0&lt;/cursor>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLabel&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>lblPassword&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Пароль:&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLineEdit&quot; row=&quot;2&quot; column=&quot;0&quot; rowspan=&quot;1&quot; colspan=&quot;2&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>lePassword&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;focusPolicy&quot;>
                &lt;enum>StrongFocus&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&lt;/string>
            &lt;/property>
            &lt;property name=&quot;echoMode&quot;>
                &lt;enum>Password&lt;/enum>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;1&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout22&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnUp&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;focusPolicy&quot;>
                        &lt;enum>NoFocus&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image2&lt;/pixmap>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Up&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnDown&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;focusPolicy&quot;>
                        &lt;enum>NoFocus&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image3&lt;/pixmap>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Down&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
        &lt;widget class=&quot;wTable&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tabUsers&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;numRows&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;numCols&quot;>
                &lt;number>2&lt;/number>
            &lt;/property>
            &lt;property name=&quot;selectionMode&quot;>
                &lt;enum>SingleRow&lt;/enum>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4910&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;3230&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image3&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;2253&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="539" name="update" >
                        <sourcecode id="540" >var timerId;
var formAction;

function on_formstart()
{
    formAction = &quot;Close();&quot;;
    timerId = startTimer(10, action);    
    createUsers();
    createFunctions();
    createBD();
}

function createFunction(name, args, sect, script, descr)
{
    cat = gmCatFindByAttribute(new Catalogue(&quot;функции&quot;), &quot;название&quot;, name);
    if(cat) return;
    cat = new Catalogue(&quot;функции&quot;);
    cat.New();
    cat.SetValue(&quot;название&quot;, name);
    cat.SetValue(&quot;количество аргументов&quot;, args);
    cat.SetValue(&quot;раздел&quot;, sect);
    cat.SetValue(&quot;скрипт&quot;, script);
    cat.SetValue(&quot;описание&quot;, descr);
    cat.Update();
}

function createFunctions()
{
    sys.startTransaction();
    createFunction(&quot;+&quot;, 2, &quot;математические&quot;, &quot;return gmParseFloat(arg[0])+gmParseFloat(arg[1])&quot;, &quot;сложение&quot;);
    createFunction(&quot;-&quot;, 2, &quot;математические&quot;, &quot;return gmParseFloat(arg[0])-gmParseFloat(arg[1])&quot;, &quot;вычитание&quot;);
    createFunction(&quot;/&quot;, 2, &quot;математические&quot;, &quot;return gmParseFloat(arg[0])/gmParseFloat(arg[1])&quot;, &quot;деление&quot;);
    createFunction(&quot;*&quot;, 2, &quot;математические&quot;, &quot;return gmParseFloat(arg[0])*gmParseFloat(arg[1])&quot;, &quot;умножение&quot;);
    
    createFunction(&quot;И&quot;, 2, &quot;логические&quot;, &quot;return arg[0] &amp;&amp; arg[1]&quot;, &quot;логическое И&quot;);
    createFunction(&quot;ИЛИ&quot;, 2, &quot;логические&quot;, &quot;return arg[0] || arg[1]&quot;, &quot;логическое ИЛИ&quot;);
    createFunction(&quot;НЕ&quot;, 1, &quot;логические&quot;, &quot;return !arg[0]&quot;, &quot;логическое отрицание&quot;);    
    createFunction(&quot;ЕСЛИ&quot;, 3, &quot;логические&quot;, &quot;return arg[0] ? arg[1] : arg[2]&quot;, &quot;фукнкция возвращает значение второго аргумента, если первый аргумент истина, иначе значение третьего аргумента&quot;);
    sys.commitTransaction();
}

function createUsers()
{
    var users = new Catalogue(&quot;Пользователи&quot;);
    var user = gmCatFindByAttribute(users, &quot;имя&quot;, &quot;Administrator&quot;);
    if(user!=undefined) return;
    users.New();
    users.SetValue(&quot;имя&quot;, &quot;Administrator&quot;);
    users.Update();
}

function createBD()
{
    var bd = new Catalogue(&quot;Базы данных&quot;);
    bd.SetFilter(&quot;текущая&quot;, 1);
    bd.Select();
    if(bd.First()) return;
    bd.New();
    bd.SetValue(&quot;Название&quot;, &quot;Текущая БД&quot;);
    bd.SetValue(&quot;ID&quot;, Math.floor(1000000000*Math.random()));
    bd.SetValue(&quot;текущая&quot;, 1);    
    bd.Update();
}

function action()
{
    eval(formAction);
    formAction = &quot;&quot;;
    killTimer(timerId);
}
</sourcecode>
                        <description id="541" />
                        <defaultmod id="542" >0</defaultmod>
                        <dialogform id="543" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>204&lt;/width>
            &lt;height>85&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>service&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>521&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLabel&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>update&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;&amp;lt;font color=&quot;#aa0000&quot;&amp;gt;Данный диалог не предназначен для самостоятельного использования.&amp;lt;/font&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;/string>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form type="0" readonly="0" id="790" name="inputValue" >
                        <sourcecode id="791" >var timerId;

function on_formstart()
{
    var etype = 2;
    var ftype = &quot;C 255&quot;;
    var val = undefined;
    var caption = &quot;Введите значение&quot;;
    try{ etype = formData[&quot;inputValue&quot;][&quot;editorType&quot;]; } catch(err){};
    try{ ftype = formData[&quot;inputValue&quot;][&quot;fieldType&quot;]; } catch(err) {};
    try{ val = formData[&quot;inputValue&quot;][&quot;value&quot;]; } catch(err) {};
    try{ caption = formData[&quot;inputValue&quot;][&quot;caption&quot;]; } catch(err) {};
    Widget(&quot;wField&quot;).setFieldType(ftype);
    Widget(&quot;wField&quot;).setEditorType(etype);
    
    Widget(&quot;wField&quot;).value = val;
    Widget(&quot;lCaption&quot;).text = caption;
    
    Widget(&quot;cbEnum&quot;).hide();
    print(etype);
    if(etype>100)
    {
	timerId = startTimer(1, action);	
    }
    else if(etype&lt;0)
    {
	Widget(&quot;cbEnum&quot;).show();
	Widget(&quot;wField&quot;).hide();
	Widget(&quot;cbEnum&quot;).insertItem(&quot;&quot;, 0);
	ftype = ftype.mid(2);
	var strlist;
	try { strlist = eval(&quot;new Array&quot;+ftype); } catch(err) { strlist = new Array; }
	for(var ind=0;ind&lt;strlist.length;ind++)
	{
	    Widget(&quot;cbEnum&quot;).insertItem(strlist[ind], ind+1);
	}
	Widget(&quot;cbEnum&quot;).setCurrentItem(val);
    }
}

function on_button(btn)
{
    if(btn==&quot;btnOk&quot;)
    {
	if(Widget(&quot;wField&quot;).visible) formData[&quot;inputValue&quot;][&quot;callback&quot;](Widget(&quot;wField&quot;).value, Widget(&quot;wField&quot;).text());
	else formData[&quot;inputValue&quot;][&quot;callback&quot;](Widget(&quot;cbEnum&quot;).currentItem, Widget(&quot;cbEnum&quot;).currentText);
	delete formData[&quot;inputValue&quot;];
	Close();
    }
    else if(btn==&quot;btnCancel&quot;)
    {
	Close();
    }
}

function selected(val)
{
    on_button(&quot;btnOk&quot;);
}

function on_formstop()
{
    formData[&quot;inputValue&quot;] = undefined;
    return true;
}

function action()
{
    killTimer(timerId);    
    connect(Widget(&quot;wField&quot;), &quot;valueChanged(QVariant)&quot;, selected);
    Widget(&quot;wField&quot;).fieldSelect();    
}
</sourcecode>
                        <description id="792" ></description>
                        <defaultmod id="793" >8</defaultmod>
                        <dialogform id="794" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>inputValue&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>inputValue&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>342&lt;/width>
            &lt;height>147&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;sizePolicy&quot;>
        &lt;sizepolicy>
            &lt;hsizetype>1&lt;/hsizetype>
            &lt;vsizetype>1&lt;/vsizetype>
            &lt;horstretch>0&lt;/horstretch>
            &lt;verstretch>0&lt;/verstretch>
        &lt;/sizepolicy>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>inputValue&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>521&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout3&lt;/cstring>
            &lt;/property>
            &lt;vbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lCaption&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Очень длинное название Очень длинное название Очень длинное название&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;alignment&quot;>
                        &lt;set>WordBreak|AlignVCenter&lt;/set>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wField&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>C 254&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>String&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbEnum&lt;/cstring>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLayoutWidget&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>layout2&lt;/cstring>
                    &lt;/property>
                    &lt;hbox>
                        &lt;property name=&quot;name&quot;>
                            &lt;cstring>unnamed&lt;/cstring>
                        &lt;/property>
                        &lt;spacer>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>spacer3&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;orientation&quot;>
                                &lt;enum>Horizontal&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;sizeType&quot;>
                                &lt;enum>Expanding&lt;/enum>
                            &lt;/property>
                            &lt;property name=&quot;sizeHint&quot;>
                                &lt;size>
                                    &lt;width>166&lt;/width>
                                    &lt;height>20&lt;/height>
                                &lt;/size>
                            &lt;/property>
                        &lt;/spacer>
                        &lt;widget class=&quot;QPushButton&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>btnOk&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>OK&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;iconSet&quot;>
                                &lt;iconset>image0&lt;/iconset>
                            &lt;/property>
                        &lt;/widget>
                        &lt;widget class=&quot;QPushButton&quot;>
                            &lt;property name=&quot;name&quot;>
                                &lt;cstring>btnCancel&lt;/cstring>
                            &lt;/property>
                            &lt;property name=&quot;text&quot;>
                                &lt;string>Отмена&lt;/string>
                            &lt;/property>
                            &lt;property name=&quot;iconSet&quot;>
                                &lt;iconset>image1&lt;/iconset>
                            &lt;/property>
                        &lt;/widget>
                    &lt;/hbox>
                &lt;/widget>
            &lt;/vbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4910&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="537" />
                <sourcecode id="538" />
            </report>
            <report id="990" name="О работе подразделений" >
                <forms>
                    <form readonly="0" type="0" id="993" name="отчет" >
                        <sourcecode id="994" >function Generate()
{
    var docs = new Document(&quot;Кредитная сделка&quot;);
    if(gmDealer) docs.SetFilter(&quot;контрагент&quot;, gmDealer);    
    if(gmParseInt(Widget(&quot;fSubdivision&quot;).value)) docs.SetFilter(&quot;подразделение контрагента&quot;, Widget(&quot;fSubdivision&quot;).value);
    var dateStart = gmBegOfDay(Widget(&quot;fDateFrom&quot;).value);
    var dateEnd = gmEndOfDay(Widget(&quot;fDateTo&quot;).value);    
    docs.Select(dateStart, dateEnd);
    
    var p = new Report(&quot;ReportLabels&quot;);
    p.setTable(&quot;subdivisions.tpl&quot;);
    p.setValue(&quot;НачДень&quot;, gmFormatDate(dateStart, &quot;dd&quot;));
    p.setValue(&quot;НачМесяц&quot;, gmFormatDate(dateStart, &quot;MMMM&quot;));
    p.setValue(&quot;НачГод&quot;, gmFormatDate(dateStart, &quot;yyy&quot;));    
    p.setValue(&quot;КонДень&quot;, gmFormatDate(dateEnd, &quot;dd&quot;));
    p.setValue(&quot;КонМесяц&quot;, gmFormatDate(dateEnd, &quot;MMMM&quot;));
    p.setValue(&quot;КонГод&quot;, gmFormatDate(dateEnd, &quot;yyy&quot;));        
    p.setValue(&quot;Поразделения&quot;, Widget(&quot;fSubdivision&quot;).text);
    
    p.exec(&quot;main&quot;);
    
    var data = new Array;
    if(docs.First()) do
    {
	var division = docs.Value(&quot;подразделение контрагента&quot;);
	if(!(division in data))
	{
	    data[division] = new Array();
	    data[division][0] = 0;
	    data[division][1] = 0;
	    data[division][2] = 0;
	    data[division][&quot;сумма&quot;] = 0;
	}
	data[division][docs.Value(&quot;статус&quot;)]++;
	data[division][&quot;сумма&quot;] += gmParseFloat(docs.Value(&quot;получен кредит&quot;));
    }while(docs.Next());
    
    var totals = new Array;
    totals[&quot;ЗаявокВсего&quot;] = 0;
    totals[&quot;ЗаявокОтправлено&quot;] = 0;
    totals[&quot;ЗаявокОдобрено&quot;] = 0;
    totals[&quot;Сумма&quot;] = 0;
    
    var cat = new Catalogue(&quot;Подразделения контрагентов&quot;);
    cat.Select();
    if(cat.First()) do
    {
	var division = cat.Uid();
	if(!(division in data)) continue;
	p.setValue(&quot;Подразделение&quot;, cat.displayString());
	p.setValue(&quot;ЗаявокВсего&quot;, data[division][0]+data[division][1]+data[division][2]);
	p.setValue(&quot;ЗаявокОтправлено&quot;, data[division][1]);
	p.setValue(&quot;ЗаявокОдобрено&quot;, data[division][2]);	
	p.setValue(&quot;Сумма&quot;, data[division][&quot;сумма&quot;]);
	p.exec(&quot;row&quot;);
	totals[&quot;ЗаявокВсего&quot;] += data[division][0]+data[division][1]+data[division][2];
	totals[&quot;ЗаявокОтправлено&quot;] += data[division][1];
	totals[&quot;ЗаявокОдобрено&quot;] += data[division][2];
	totals[&quot;Сумма&quot;] += data[division][&quot;сумма&quot;];
    }while(cat.Next());
           
    p.setValue(&quot;Подразделение&quot;, &quot;Итого:&quot;);
    p.setValue(&quot;ЗаявокВсего&quot;, totals[&quot;ЗаявокВсего&quot;]);
    p.setValue(&quot;ЗаявокОтправлено&quot;, totals[&quot;ЗаявокОтправлено&quot;]);
    p.setValue(&quot;ЗаявокОдобрено&quot;, totals[&quot;ЗаявокОдобрено&quot;]);	
    p.setValue(&quot;Сумма&quot;, totals[&quot;Сумма&quot;]);
    p.exec(&quot;row&quot;);
    
    p.setValue(&quot;Дата&quot;, sys.Date());
    p.exec(&quot;endmain&quot;);
    p.save(&quot;subdivisions.html&quot;);    
    
    var arguments = new Array(&quot;firefox&quot;, &quot;subdivisions.html&quot;);
    Process.execute(arguments);          
}

function on_formstart()
{
}

function on_button(btn)
{
    if(btn==&quot;btnGenerate&quot;) Generate();
    else if(btn==&quot;btnClose&quot;) Close();
}
</sourcecode>
                        <description id="995" />
                        <defaultmod id="996" >14</defaultmod>
                        <dialogform id="997" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>451&lt;/width>
            &lt;height>138&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>О работе подразделений&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>990&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout20&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Период с:&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fDateFrom&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>D&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Date&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>по:&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fDateTo&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>D&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Date&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer13&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>51&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;spacer row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer15&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout23&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Подразделение&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fSubdivision&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 581&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout22&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer14&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>141&lt;/width>
                            &lt;height>31&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnGenerate&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnClose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Закрыть&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4910&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;10318&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="991" />
                <sourcecode id="992" />
            </report>
            <report id="998" name="О работе с программой" >
                <forms>
                    <form type="0" readonly="0" id="1001" name="отчет" >
                        <sourcecode id="1002" >var p;

function group(tmp)
{
    var states = new Array(0, 0, 0);
    for(var row=0;row&lt;tmp.numRows();row++)
    {
	states[tmp.get(row, &quot;Статус&quot;)]++;
    }
    p.setValue(&quot;ЗаявокВсего&quot;, states[0]+states[1]+states[2]);
    p.setValue(&quot;ЗаявокОтправлено&quot;, states[1]);
    p.setValue(&quot;ЗаявокОдобрено&quot;, states[2]);	    
}

function Generate()
{
    var docs = new Document(&quot;Кредитная сделка&quot;);
    var dateStart = gmBegOfDay(Widget(&quot;fDateFrom&quot;).value);
    var dateEnd = gmEndOfDay(Widget(&quot;fDateTo&quot;).value);    
    docs.Select(dateStart, dateEnd);
    
    p = new Report(&quot;ReportLabels&quot;);
    p.setTable(&quot;full.tpl&quot;);
    p.setValue(&quot;НачДень&quot;, gmFormatDate(dateStart, &quot;dd&quot;));
    p.setValue(&quot;НачМесяц&quot;, gmFormatDate(dateStart, &quot;MMMM&quot;));
    p.setValue(&quot;НачГод&quot;, gmFormatDate(dateStart, &quot;yyy&quot;));    
    p.setValue(&quot;КонДень&quot;, gmFormatDate(dateEnd, &quot;dd&quot;));
    p.setValue(&quot;КонМесяц&quot;, gmFormatDate(dateEnd, &quot;MMMM&quot;));
    p.setValue(&quot;КонГод&quot;, gmFormatDate(dateEnd, &quot;yyy&quot;));        
    
    p.exec(&quot;main&quot;);
    
    var data = new ValueTable;
    data.addColumn(&quot;Контрагент&quot;);
    data.addColumn(&quot;Подразделение&quot;);    
    data.addColumn(&quot;Статус&quot;)
    data.addColumn(&quot;Сумма&quot;);
    
    if(docs.First()) do
    {
	var contr = docs.Value(&quot;контрагент&quot;);
	var division = docs.Value(&quot;подразделение контрагента&quot;);
	var row = data.addRow();
	data.set(row, &quot;Контрагент&quot;, contr);
	data.set(row, &quot;Подразделение&quot;, division);
	data.set(row, &quot;Статус&quot;, docs.Value(&quot;статус&quot;));
	data.set(row, &quot;Сумма&quot;, gmParseFloat(docs.Value(&quot;получен кредит&quot;)));
    }while(docs.Next());    
    
    var contr = new Catalogue(&quot;Контрагенты&quot;);
    contr.Select();
    if(contr.First()) do
    {
	var subs = new Catalogue(&quot;Подразделения контрагентов&quot;);
	subs.SetFilter(&quot;контрагент&quot;, contr.Uid());
	subs.Select();
	if(subs.First()) do
	{
	    var tmp = new ValueTable;
	    tmp.load(data);
	    tmp.filter(&quot;Контрагент&quot;, contr.Uid());
	    tmp.filter(&quot;Подразделение&quot;, subs.Uid());
	    group(tmp);	    
	    p.setValue(&quot;Дилер&quot;, contr.displayString());	    
	    p.setValue(&quot;Подразделение&quot;, subs.displayString());	    
	    p.setValue(&quot;Сумма&quot;, tmp.total(&quot;Сумма&quot;));
	    p.exec(&quot;row&quot;);	    
	    delete tmp;
	} while(subs.Next());
	var tmp = new ValueTable;
	tmp.load(data);
	tmp.filter(&quot;Контрагент&quot;, contr.Uid());
	tmp.groupBy(new Array(&quot;Дилер&quot;, &quot;Подразделение&quot;, &quot;Статус&quot;), new Array(&quot;Сумма&quot;));
	p.setValue(&quot;Дилер&quot;, &quot;&lt;b>&quot;+contr.displayString()+&quot; итого:&lt;/b>&quot;);
	group(tmp);
	p.setValue(&quot;Сумма&quot;, tmp.total(&quot;Сумма&quot;));
	p.exec(&quot;total&quot;);	
	delete tmp;
    } while(contr.Next());
    var tmp = new ValueTable;
    tmp.load(data);
    tmp.groupBy(new Array(&quot;Дилер&quot;, &quot;Подразделение&quot;, &quot;Статус&quot;), new Array(&quot;Сумма&quot;));
    p.setValue(&quot;Дилер&quot;, &quot;&lt;b>Итого:&lt;/b>&quot;);
    group(tmp);
    p.setValue(&quot;Сумма&quot;, tmp.total(&quot;Сумма&quot;));
    p.exec(&quot;total&quot;);
    delete tmp;
    
    p.setValue(&quot;Дата&quot;, sys.Date());
    p.exec(&quot;endmain&quot;);
    p.save(&quot;subdivisions.html&quot;);    
    
    var arguments = new Array(&quot;firefox&quot;, &quot;subdivisions.html&quot;);
    Process.execute(arguments);          
}

function on_formstart()
{
}

function on_button(btn)
{
    if(btn==&quot;btnGenerate&quot;) Generate();
    else if(btn==&quot;btnClose&quot;) Close();
}
</sourcecode>
                        <description id="1003" />
                        <defaultmod id="1004" >14</defaultmod>
                        <dialogform id="1005" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>427&lt;/width>
            &lt;height>101&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>О работе с программой&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>998&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;spacer row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer15&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>16&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout20&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Период с:&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fDateFrom&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>D&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Date&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>по:&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fDateTo&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>D&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Date&lt;/enum>
                    &lt;/property>
                &lt;/widget>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer13&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>51&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout22&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer14&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>141&lt;/width>
                            &lt;height>31&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnGenerate&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>OK&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Ctrl+Return&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnClose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Закрыть&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4910&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;10318&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="999" />
                <sourcecode id="1000" />
            </report>
            <report id="1097" name="Обмен данными" >
                <forms>
                    <form type="0" readonly="0" id="1100" name="выгрузка" >
                        <sourcecode id="1101" >var timerId;
var formAction;
var version = &quot;0.0.1&quot;;
var pack;
var bd, curbd = undefined, objects, filters;
var listExport, userFields = new Array(), fieldTypes = new Array(), tables = new Array();
var uids = new Array();
var exportDir;
var meta, eq;
var dateEnd;

//Описание формата выгрузки
// корневой элемент - Package
// атрибуты: Version Sender Reciver MessageNo
function header()
{
    pack.createNew(&quot;Package&quot;);
    pack.setAttr(&quot;Version&quot;, version);
    pack.setAttr(&quot;Sender&quot;,  curbd.Value(&quot;ID&quot;));
    pack.setAttr(&quot;Reciever&quot;, bd.Value(&quot;ID&quot;));    
    pack.setAttr(&quot;MessageNo&quot;, bd.Value(&quot;передан&quot;));
}

function value(obj, attr, type, table)
{
    var res = undefined;
    if(type.charAt(0)==&quot;O&quot;)
    {
	res = gmParseInt(gmULLONGValue(obj, attr, table));
	if(gmParseInt(res) in uids) return res;
	type = convertTypeString(type);
	type = type.split(&quot;.&quot;);
	if(type[0]==&quot;Catalogue&quot;)
	{
	    var obj = new Catalogue(type[1]);
	    obj.Select();
	    obj.FindById(res);
	    exportCatalogue(type[1], obj);
	}
	else if(type[0]==&quot;Document&quot;)
	{
	    var obj = new Document(type[1]);
	    obj.SelectDocument(res);
	    exportDocument(type[1], obj);
	}
	res = eq.findeq(bd.Value(&quot;ID&quot;), res);	
    }
    else
    {
	if(!table) res =  obj.Value(attr);
	else res = obj.TableValue(table, attr);
    }
    return res;
}

function createAttribute(value)
{
    var attr = new ValueList();
    attr.set(&quot;tag&quot;, &quot;Attribute&quot;);
    attr.set(&quot;value&quot;, value);    
    return attr;
}

function exportAObject(objName, obj, table)	
{
    objName = objName.split(&quot;.&quot;);
    var tag = objName[0];
    var objects = listExport.get(tag);
    if(!objects)
    {	
	objects = new ValueList();
	objects.set(&quot;tag&quot;, tag+&quot;s&quot;);
    }
    var object = objects.get(objName[1]);
    if(!object) 
    {
	object = new ValueList();
	object.set(&quot;tag&quot;, tag);
	objects.set(objName[1], object);
	listExport.set(tag, objects);	
    }
    
    var list = meta.getUserFields(objName[0]+&quot;.&quot;+objName[1], table);
    var types = meta.getFieldTypes(objName[0]+&quot;.&quot;+objName[1], table);
    var attrList = new ValueList();
    for(var i=0;i&lt;list.length;i++) 
    {
	attrList.set(list[i], createAttribute(value(obj, list[i], types[list[i]], table)));
    }
    
    uids[gmParseInt(obj.Uid())] = true;
    
    return attrList;    
}

//Catalogues
//	Catalogue  name=&quot;name&quot;
//		Element ID=&quot;uid&quot; ID - uid  в базе-приемнике, если есть, если нет - свой
//			Attribute name=&quot;attr_name&quot; value=&quot;attr_value&quot;
function exportCatalogue(catName, cat)
{
    var attrList = exportAObject(&quot;Catalogue.&quot;+catName, cat, undefined);
    var el = new ValueList();
    el.set(&quot;tag&quot;, &quot;Element&quot;);
    el.set(&quot;attr&quot;, attrList);
    
    var catalogues = listExport.get(&quot;Catalogue&quot;);
    var catalogue = catalogues.get(catName);
    catalogue.set(eq.findeq(bd.Value(&quot;ID&quot;), cat.Uid()), el); 
    catalogues.set(catName, catalogue);
    listExport.set(&quot;Catalogue&quot;, catalogues);
}

//Documents
//	Document  name=&quot;name&quot;
//		Element ID=&quot;uid&quot; ID - uid  в базе-приемнике, если есть, если нет - свой
//			Table name = &quot;name'
//				Row
//					Attribute
//попробовать универсальную выгрузку
function exportDocument(docName, doc)
{
    var el = new ValueList();
    
    el.set(&quot;tag&quot;, &quot;Element&quot;);    
    
    var table = new ValueList();
    table.set(&quot;tag&quot;, &quot;Table&quot;);
    var attrList = exportAObject(&quot;Document.&quot;+docName, doc, undefined);
    attrList.set(&quot;DocDate&quot;, createAttribute(doc.sysValue(&quot;DocDate&quot;)));
    attrList.set(&quot;DocNumber&quot;, createAttribute(doc.sysValue(&quot;DocNumber&quot;)));
    attrList.set(&quot;SerialNumber&quot;, createAttribute(doc.sysValue(&quot;SerialNumber&quot;)));
    
    table.set(&quot;attr&quot;, attrList);
    el.set(&quot;header&quot;, table);
    
    var tabList = meta.getTables(&quot;Document.&quot;+docName);
    for(var i=0;i&lt;tabList.length;i++)
    {
	table = new ValueList();
	table.set(&quot;tag&quot;, &quot;Table&quot;);
	doc.TableSelect(tabList[i]);
	if(doc.TableFirst(tabList[i]))
	{
	    var row = new ValueList();
	    attrList= exportAObject(&quot;Document.&quot;+docName, doc, tabList[i]);
	    row.set(&quot;tag&quot;, &quot;Row&quot;);
	    row.set(&quot;attr&quot;, attrList);
	    table.set(doc.TableValue(tabList[i], &quot;TableLine&quot;), row);
	}while(doc.TableNext(tabList[i]));
	el.set(tabList[i], table);
    }
    var documents = listExport.get(&quot;Document&quot;);
    var document = documents.get(docName);    
    
    document.set(eq.findeq(bd.Value(&quot;ID&quot;), doc.Uid()), el);
    documents.set(docName, document);
    listExport.set(&quot;Document&quot;, documents);
}

function writeItem(item, key)
{
    var tag = item.get(&quot;tag&quot;);
    if(tag) 
    {
	pack.newChild(tag);
	pack.setAttr(&quot;key&quot;, key);
    }
    for(var i=0;i&lt;item.count();i++)
    {
	var key = item.getKey(i);
	if(key==&quot;tag&quot;) continue;
	var value = item.indGet(i);
	var isList = false;
	try { isList = value.isList(); } catch(e) {};
	if(isList)
	{	    
	    writeItem(value, key);
	    delete value;
	}
	else
	{
	    pack.setAttr(key, value);
	}	
    }    
    if(tag) pack.parent();	        
}

function exportObject()
{
    var filterfunc;
    var object = objects.Value(&quot;объект&quot;);
    if(object==&quot;Справочник.Базы данных&quot;)  return;
    object = object.split(&quot;.&quot;);
    if(object.length&lt;2) return;    
    var type = object[0];
    var kind = object[1];
    if(type==&quot;Справочник&quot;) object = new Catalogue(kind);
    else if(type==&quot;Документ&quot;) object = new Document(kind);
    else return;
    
    filters.ClearFilter();
    filters.SetFilter(&quot;объект выгрузки&quot;, objects.Uid());
    filters.Select();
    if(!filters.First()) //если фильтры не заданы - целиком
    {
	filterfunc = new Function(&quot;return true;&quot;);
    }
    else
    {
	var prefilter = filters.Value(&quot;префильтр&quot;);
	prefilter = prefilter.split(&quot;=&quot;);
	if(prefilter.length==2) object.SetFilter(prefilter[0], prefilter[1]);
	filterfunc = filters.Value(&quot;фильтр&quot;);
	if(!filterfunc.length) filterfunc = new Function(&quot;return true;&quot;);
	else filterfunc = new Function(&quot;object, source, dest&quot;, filterfunc);
    }
    if(type==&quot;Справочник&quot;) object.Select();
    else if(type==&quot;Документ&quot;) object.Select(bd.Value(&quot;конец выгрузки&quot;), dateEnd);
    if(object.First()) do
    {
	if(!filterfunc(object, curbd, bd)) continue;
	if(type==&quot;Справочник&quot;) exportCatalogue(kind, object);
	else if(type==&quot;Документ&quot;) exportDocument(kind, object);
    } while(object.Next());
    delete object;
}

function exportObjects()
{
    curbd.SetValue(&quot;текущая&quot;, 0);
    exportCatalogue(&quot;Базы данных&quot;, curbd);    
    curbd.SetValue(&quot;текущая&quot;, 1);    
    objects.ClearFilter();
    objects.SetFilter(&quot;получатель&quot;, bd.Uid());
    objects.Select();
    if(objects.First()) do
    {
	exportObject();
    }while(objects.Next());    
}

function exportData()
{    
    bd = new Catalogue(&quot;Базы данных&quot;);
    bd.SetFilter(&quot;текущая&quot;, 1);
    bd.Select();
    if(!bd.First())
    {
	gmError(&quot;Не определена текущая БД, выгрузка невозможна&quot;);
	return;
    }
    curbd = new Catalogue(&quot;Базы данных&quot;);
    curbd.Select();
    curbd.FindById(bd.Uid());
    
    objects = new Catalogue(&quot;Объекты для выгрузки&quot;);    
    filters = new Catalogue(&quot;Фильтры обмена&quot;);
    bd.ClearFilter();
    bd.Select();
    if(bd.First()) do
    {
	if(bd.Uid()==curbd.Uid()) continue;
	dateEnd = new Date;	
	listExport = new ValueList();
	pack = new XML();	
	header();	
	exportObjects();
	writeItem(listExport, &quot;&quot;);
	pack.write(exportDir+&quot;msg_&quot;+curbd.Value(&quot;ID&quot;)+&quot;_&quot;+bd.Value(&quot;ID&quot;)+&quot;.xml&quot;);
	bd.SetValue(&quot;конец выгрузки&quot;, dateEnd);
	bd.SetValue(&quot;передан&quot;, gmParseInt(bd.Value(&quot;передан&quot;))+1);
	bd.Update();
	delete pack;
	delete listExport;
    } while(bd.Next());        
    
    delete filters;    
    delete objects;
}

function on_formstart()
{
    formAction = &quot;Close();&quot;;    
    var stop = false;
    stop = !(&quot;export&quot; in formData);
    if(!stop) stop = !(&quot;exportDir&quot; in formData[&quot;export&quot;]);
    if(stop)
    {
	timerId = startTimer(10, action);    
	return;
    }
    
    exportDir = formData[&quot;export&quot;][&quot;exportDir&quot;];
    meta = new cachedMeta();
    eq = new IDs();
    exportData();
    timerId = startTimer(10, action);        
}

function action()
{
    eval(formAction);
    formAction = &quot;&quot;;
    killTimer(timerId);
}
</sourcecode>
                        <description id="1102" />
                        <defaultmod id="1103" >8</defaultmod>
                        <dialogform id="1112" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>175&lt;/width>
            &lt;height>125&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Выгрузка&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>1097&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLabel&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>textLabel1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;&amp;lt;font color=&quot;#aa0000&quot;&amp;gt;Данная форма не предназначена для самотоятельного использования и вызывается автоматически&amp;lt;/font&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;/string>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form type="0" readonly="0" id="1104" name="загрузка" >
                        <sourcecode id="1105" >var timerId;
var formAction;
var version = &quot;0.0.1&quot;, messageNo;
var pack;
var bd, curbd = undefined, sender;
var importList;
var importDir;
var objects;
var meta, eq;

function strchr(chr, count)
{
    if(!count || count&lt;0) return &quot;&quot;;
    var res = chr;
    while(res.length&lt;count)	res += res;
    res = res.left(count);
    return res;
}

function readItem(item, fullpath)
{
    do
    {
	if(pack.childExists())
	{
	    var list =new ValueList();
	    var key = pack.attr(&quot;key&quot;);
	    pack.firstChild();	    
	    readItem(list, fullpath + (fullpath.length>0 ? &quot;.&quot; : &quot;&quot;) + key);
	    pack.parent();
	    item.set(pack.attr(&quot;key&quot;), list);	    
	    if(pack.nodeName()==&quot;Element&quot;)
	    {
		list.set(&quot;type&quot;, fullpath);
		objects.set(pack.attr(&quot;key&quot;), list);
	    }
	}
	else
	{
	    item.set(pack.attr(&quot;key&quot;), pack.attr(&quot;value&quot;));
	}
    }while(pack.next());
}

function checkFile(file)
{
    var dir = new Dir();
    if(!dir.fileExists(file)) return false;
    pack = new XML();
    pack.read(file);
    var packVersion = pack.attr(&quot;Version&quot;);
    if(packVersion!=version) 
    {
	sysWarning(file+&quot; неверная версия файла обмена, требуется \&quot;&quot;+version+&quot;\&quot; имеем \&quot;&quot;+packVersion+&quot;\&quot;&quot;);
	return false;
    }
    var recv = pack.attr(&quot;Reciever&quot;);
    if(curbd.Value(&quot;ID&quot;)!=recv)
    {
	sysWarning(file+&quot; предназначается для другой БД.&quot;);
	return false;
    }
    
    bd.ClearFilter();
    sender = pack.attr(&quot;Sender&quot;);
    messageNo = pack.attr(&quot;MessageNo&quot;);
    return true;
}

// префикс r обозначает, что данный элемент должен сущестовать в текущй БД
// в случае его отсутсвия (допустим, удалён вручную) создаётся новый, но в базе соответствия ставится 
// старый id с префиксом r

function setValue(obj, field, type, value, table)
{
    if(type.charAt(0)==&quot;O&quot;)
    {
	uid = importObject(value);
	objects.set(value, uid);
	value = uid;
    }
    if(table) obj.TableSetValue(table, field, value);
    else obj.SetValue(field, value);
}

function importAObject(objName, obj, attr, table)
{    
    var fields = meta.getUserFields(objName, table);
    var types = meta.getFieldTypes(objName, table);
    for(var i=0;i&lt;attr.count();i++) 
    {
	var field = attr.getKey(i);
	if(!(field in fields)) continue;
	var value = attr.indGet(i);
	setValue(obj, field, types[field], value, table);
    }        
}

function importCatalogue(catName, uid, attr)
{
    var obj = new Catalogue(catName);
    if(catName==&quot;Базы данных&quot;)
    {
	bd.ClearFilter();
	bd.SetFilter(&quot;ID&quot;, attr.get(&quot;ID&quot;));
	bd.Select();
	if(bd.First()) uid = &quot;r&quot;+bd.Uid();
    }
    if(uid.charAt(0)==&quot;r&quot;)
    {
	uid = uid.mid(1);
	obj.Select();
	if(!obj.FindById(uid)) return importCatalogue(catName, uid, attr);
    }
    else
    {
	fid = eq.find(sender, uid);
	if(fid!=undefined) return importCatalogue(catName, &quot;r&quot;+fid, attr);
	obj.New();
	eq.save(sender, obj.Uid(), uid);
    }
    importAObject(&quot;Catalogue.&quot;+catName, obj, attr);
    obj.Update();
    return obj.Uid();
}

function importDocument(docName, uid, tables)
{
    var obj = new Document(docName);
    if(uid.charAt(0)==&quot;r&quot;)
    {
	uid = uid.mid(1);
	if(obj.SelectDocument(uid)) return importDocument(docName, uid, tables);
    }
    else
    {
	fid = eq.find(sender, uid);
	if(fid!=undefined) return importDocument(docName, &quot;r&quot;+fid, tables);
	obj.New();
	eq.save(sender, obj.Uid(), uid);
    }
    var attr = tables.get(&quot;header&quot;);
    if(attr) importAObject(&quot;Document.&quot;+docName, obj, attr);
    obj.setSysValue(&quot;DocDate&quot;, attr.get(&quot;DocDate&quot;));
    obj.setSysValue(&quot;DocNumber&quot;, attr.get(&quot;DocNumber&quot;));
    obj.setSysValue(&quot;SerialNumber&quot;, attr.get(&quot;SerialNumber&quot;));
    obj.Update();    
    for(var i=0;i&lt;tables.count();i++)
    {
	var key = tables.getKey(i);
	if(key==&quot;type&quot; ||  key==&quot;header&quot;) continue;
	var table = tables.get(key);
	try{ table.isList(); } catch(e) { continue; };
	obj.TableSelect(key);
	while(obj.TableFirst(key)) obj.TableDelete(key);
	for(var r=0;r&lt;table.count();r++)
	{
	    attr = table.indGet(r);
	    obj.TableNewLine(key);
	    importAObject(&quot;Document.&quot;+docName, obj, attr, key);
	    obj.TableUpdate(key);
	}
    }
    return obj.Uid();    
}

function importObject(uid)
{
    var list = objects.get(uid);
    if(!isNaN(list) || list==undefined) return list;
    var type = list.get(&quot;type&quot;);
    type = type.split(&quot;.&quot;);
    if(type.length&lt;2) return undefined;
    if(type[0]==&quot;Catalogue&quot;) return importCatalogue(type[1], uid, list);
    else if(type[0]==&quot;Document&quot;) return importDocument(type[1], uid, list);
    return undefined;
}

function importObjects()
{
    for(var i=0;i&lt;objects.count();i++)
    {
	var uid = objects.getKey(i);
	objects.set(uid, importObject(uid));
    }
}

function importData()
{
    bd = new Catalogue(&quot;Базы данных&quot;);
    bd.SetFilter(&quot;текущая&quot;, 1);
    bd.Select();
    if(!bd.First())
    {
	gmError(&quot;Не определена текущая БД, загрузка невозможна&quot;);
	return;
    }
    curbd = new Catalogue(&quot;Базы данных&quot;);
    curbd.Select();
    curbd.FindById(bd.Uid());
    
    importList = new ValueList();
    
    var dir = new Dir(importDir);
    var files = dir.entryList(&quot;*.xml&quot;);
    for(var i=0;i&lt;files.length;++i)
    {
	if(checkFile(importDir+files[i]))
	{
	    objects = new ValueList();    
	    readItem(importList, &quot;&quot;);
	    importObjects();
	    File.remove(importDir+files[i]);
	    bd.SetValue(&quot;принят&quot;, messageNo);
	    bd.Update();	    
	}
    }
}

function on_formstart()
{
    formAction = &quot;Close();&quot;;    
    var stop = false;
    stop = !(&quot;import&quot; in formData);
    if(!stop) stop = !(&quot;importDir&quot; in formData[&quot;import&quot;]);
    if(stop)
    {
	timerId = startTimer(10, action);    
	return;
    }
    importDir = formData[&quot;import&quot;][&quot;importDir&quot;];
    
    bd = new Catalogue(&quot;Базы данных&quot;);
    sys.startTransaction();	      
    meta = new cachedMeta();
    eq = new IDs();
    importData();
    sys.commitTransaction();
    timerId = startTimer(10, action);    
}

function action()
{
    eval(formAction);
    formAction = &quot;&quot;;
    killTimer(timerId);
}
</sourcecode>
                        <description id="1106" />
                        <defaultmod id="1107" >0</defaultmod>
                        <dialogform id="1194" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>168&lt;/width>
            &lt;height>123&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Загрузка&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>1097&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLabel&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>textLabel1&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&amp;lt;b&amp;gt;&amp;lt;u&amp;gt;&amp;lt;font color=&quot;#aa0000&quot;&amp;gt;Данная форма не предназначена для самотоятельного использования и вызывается автоматически&amp;lt;/font&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/b&amp;gt;&lt;/string>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form readonly="0" type="0" id="1164" name="объекты для выгрузки" >
                        <sourcecode id="1165" >var tab;
var exclude = &quot;Объекты для выгрузки, Фильтры обмена, Соответсвия объектов&quot;;

function initObjectList()
{
    while(Widget(&quot;cbObjects&quot;).count) Widget(&quot;cbObjects&quot;).removeItem(0);
    var meta = new Meta();
    var catList = meta.DataTypes(&quot;Catalogue&quot;);
    for(var i=0;i&lt;catList.length;i++)
    {
	var tiles = catList[i].split(&quot;\t&quot;);
	if(tiles.length&lt;2) continue;
	tiles = tiles[1].split(&quot;.&quot;);
	if(tiles.length&lt;2) continue;
	if(exclude.indexOf(tiles[1])>=0) continue;
	if(tab.findValue(&quot;объект&quot;, &quot;Справочник.&quot;+tiles[1])>=0) continue;
	Widget(&quot;cbObjects&quot;).insertItem(&quot;Справочник.&quot;+tiles[1]);
    }
    catList = meta.DataTypes(&quot;Document&quot;);
    for(var i=0;i&lt;catList.length;i++)
    {
	var tiles = catList[i].split(&quot;\t&quot;);
	if(tiles.length&lt;2) continue;
	tiles = tiles[1].split(&quot;.&quot;);
	if(tiles.length&lt;2) continue;
	if(tab.findValue(&quot;объект&quot;, tiles[1])>=0) continue;	
	Widget(&quot;cbObjects&quot;).insertItem(&quot;Документ.&quot;+tiles[1]);
    }    
}

function on_formstart() 
{
    tab = new ObjectTable(Widget(&quot;tabObjects&quot;));
    tab.addColumn(&quot;объект&quot;, 1, true, true);
    initObjectList();
    connect(Widget(&quot;fBD&quot;), &quot;valueChanged(const QVariant&amp;)&quot;, on_valuechanged);
}

function fillTab(value)
{
    tab.deleteRows();
    var cat = new Catalogue(&quot;Объекты для выгрузки&quot;);
    cat.SetFilter(&quot;получатель&quot;, value);
    cat.Select();
    if(cat.First()) do
    {
	var row = tab.addRow();
	tab.setValue(row, &quot;объект&quot;, cat.Value(&quot;объект&quot;));
    }while(cat.Next());
}

function on_button(btn)
{
    if(btn==&quot;btnOk&quot;)
    {
	sys.startTransaction();
	var cat = new Catalogue(&quot;Объекты для выгрузки&quot;);
	for(var row=0;row&lt;tab.numRows();row++)
	{
	    var str = tab.value(row, &quot;объект&quot;);
	    cat.SetFilter(&quot;получатель&quot;, Widget(&quot;fBD&quot;).value);
	    cat.SetFilter(&quot;объект&quot;, str);
	    cat.Select();
	    if(!cat.First())
	    {
		cat.New();
		cat.SetValue(&quot;получатель&quot;, Widget(&quot;fBD&quot;).value);
		cat.SetValue(&quot;объект&quot;, str);
		cat.Update();
	    }
	}
	sys.commitTransaction();
    }
    else if(btn==&quot;btnAdd&quot;)
    {
	if(!gmParseInt(Widget(&quot;fBD&quot;).value)) return;
	if(!Widget(&quot;cbObjects&quot;).count) return;
	var row = tab.addRow();
	tab.setValue(row, &quot;объект&quot;, Widget(&quot;cbObjects&quot;).currentText);
	Widget(&quot;cbObjects&quot;).removeItem(Widget(&quot;cbObjects&quot;).currentItem);
    }
    else if(btn==&quot;btnDel&quot;)
    {
	var cat = new Catalogue(&quot;Объекты для выгрузки&quot;);
	var str = tab.value(&quot;объект&quot;);
	cat.SetFilter(&quot;получатель&quot;, Widget(&quot;fBD&quot;).value);
	cat.SetFilter(&quot;объект&quot;, str);
	cat.Select();
	if(cat.First()) cat.Delete();
	tab.deleteRow(tab.currentRow());
    }
    else if(btn==&quot;btnEdit&quot;)
    {
	var cat = new Catalogue(&quot;Объекты для выгрузки&quot;);
	var str = tab.value(&quot;объект&quot;);
	cat.SetFilter(&quot;получатель&quot;, Widget(&quot;fBD&quot;).value);
	cat.SetFilter(&quot;объект&quot;, str);
	cat.Select();
	if(!cat.First())
	{
	    gmError(&quot;Сначала запишите справочник!!&quot;);
	    return;
	}
	formData[&quot;filters&quot;] = cat;
	sys.OpenForm(&quot;Report.Обмен данными.Form.фильтры&quot;, 2, undefined);
    }
}

function on_valuechanged(value)
{
    fillTab(value);
    initObjectList();
}
</sourcecode>
                        <description id="1166" />
                        <defaultmod id="1167" >14</defaultmod>
                        <dialogform id="1178" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>471&lt;/width>
            &lt;height>343&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Обмен данными&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>1097&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout1&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel1&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>База данных&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wField&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>fBD&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;Id&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;FieldType&quot;>
                        &lt;string>O 1063&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;EditorType&quot;>
                        &lt;enum>Catalogue&lt;/enum>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;wTable&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>tabObjects&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;numRows&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
            &lt;property name=&quot;numCols&quot;>
                &lt;number>0&lt;/number>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Сохранить&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout4&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Объекты&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbObjects&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnAdd&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>34&lt;/width>
                            &lt;height>34&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image2&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnEdit&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>34&lt;/width>
                            &lt;height>34&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image3&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnDel&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;maximumSize&quot;>
                        &lt;size>
                            &lt;width>34&lt;/width>
                            &lt;height>34&lt;/height>
                        &lt;/size>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;pixmap&quot;>
                        &lt;pixmap>image4&lt;/pixmap>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image2&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4250&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image3&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;9262&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image4&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;5678&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>wfield.h&lt;/includehint>
    &lt;includehint>wtable.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                    <form type="0" readonly="0" id="1185" name="фильтры" >
                        <sourcecode id="1186" >var timerId;
var formAction;
var bd, filters;
var preAttr = &quot;&quot;, preVal = undefined, preStr = undefined;
var object;

function on_formstart() 
{
    if(!(&quot;filters&quot; in formData)) 
    {
	formAction = &quot;Close();&quot;;
	timerId = startTimer(10, action);        
	return;
    }
    object = formData[&quot;filters&quot;];
    formData[&quot;filters&quot;] = undefined;
    
    bd = new Catalogue(&quot;Базы данных&quot;);
    bd.Select();
    bd.FindById(gmULLONGValue(object, &quot;получатель&quot;));
    Widget(&quot;lHeader&quot;).text = String(&quot;Фильтр выгрузки \&quot;%1\&quot; для БД \&quot;%2\&quot;&quot;).arg(object.Value(&quot;объект&quot;)).arg(bd.displayString());
    
    filters = new Catalogue(&quot;Фильтры обмена&quot;);
    filters.SetFilter(&quot;объект выгрузки&quot;, object.Uid());
    filters.Select();
    if(filters.First())
    {
	Widget(&quot;fScript&quot;).text = filters.Value(&quot;фильтр&quot;);
	preVal = filters.Value(&quot;префильтр&quot;).split(&quot;=&quot;);
	if(preVal.length>1)
	{
	    preAttr = preVal[0];
	    preVal = preVal[1];
	}
    }    
    initAttrList();
    showPrefilter();
}

function initAttrList()
{
    var meta = new Meta();
    var strObject = object.Value(&quot;объект&quot;);
    strObject = gmTranslateType(strObject);
    Widget(&quot;cbAttr&quot;).insertStringList(meta.GetUserFields(strObject));
    if(preAttr) Widget(&quot;cbAttr&quot;).setCurrentText(preAttr);
}

function on_button(btn)
{
    if(btn==&quot;btnOk&quot;)
    {
	if(!gmParseInt(filters.Uid())) 
	{
	    filters.New();
	    filters.SetValue(&quot;объект выгрузки&quot;, object.Uid());
	}
	filters.SetValue(&quot;префильтр&quot;, preAttr+&quot;=&quot;+preVal);
	filters.SetValue(&quot;фильтр&quot;, Widget(&quot;fScript&quot;).text);
	filters.Update();
	Close();
    }
    if(btn==&quot;btnChoose&quot;)
    {
	chooseValue();
    }
}

function attrType()
{
    var strObject = object.Value(&quot;объект&quot;);
    strObject = gmTranslateType(strObject);
    var meta = new Meta();
    var type = meta.GetAttrType(strObject, preAttr);
    return type;
}

function chooseValue()
{
    preAttr = Widget(&quot;cbAttr&quot;).currentText;
    type = attrType();
    if(type.charAt(0)==&quot;O&quot;) type = convertTypeString(type);
    gmInputValue(type, preVal, &quot;Значение фильтра&quot;, setFilterVal);
}

function setFilterVal(val, str)
{
    preVal = val;
    preStr = str;
    showPrefilter();
}

function showPrefilter()
{
    if(!preStr) preStr = gmFormat(preVal, attrType());
    Widget(&quot;lPrefilter&quot;).text = preStr;
}

function action()
{
    eval(formAction);
    formAction = &quot;&quot;;
    killTimer(timerId);
}
</sourcecode>
                        <description id="1187" />
                        <defaultmod id="1188" >14</defaultmod>
                        <dialogform id="1189" >&lt;!DOCTYPE UI>&lt;UI version=&quot;3.2&quot; stdsetdef=&quot;1&quot;>
&lt;class>Report&lt;/class>
&lt;widget class=&quot;wReport&quot;>
    &lt;property name=&quot;name&quot;>
        &lt;cstring>Report&lt;/cstring>
    &lt;/property>
    &lt;property name=&quot;geometry&quot;>
        &lt;rect>
            &lt;x>0&lt;/x>
            &lt;y>0&lt;/y>
            &lt;width>583&lt;/width>
            &lt;height>361&lt;/height>
        &lt;/rect>
    &lt;/property>
    &lt;property name=&quot;caption&quot;>
        &lt;string>Обмен данными&lt;/string>
    &lt;/property>
    &lt;property name=&quot;Id&quot;>
        &lt;number>1097&lt;/number>
    &lt;/property>
    &lt;property name=&quot;Name&quot; stdset=&quot;0&quot;>
        &lt;cstring>&lt;/cstring>
    &lt;/property>
    &lt;grid>
        &lt;property name=&quot;name&quot;>
            &lt;cstring>unnamed&lt;/cstring>
        &lt;/property>
        &lt;widget class=&quot;QLabel&quot; row=&quot;0&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>lHeader&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>&amp;lt;u&amp;gt;textLabel1&amp;lt;/u&amp;gt;&lt;/string>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLabel&quot; row=&quot;1&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>textLabel2&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Префильтр (фильтрация по реквизиту на момент выборки из БД, ускоряет выборку)&lt;/string>
            &lt;/property>
            &lt;property name=&quot;alignment&quot;>
                &lt;set>WordBreak|AlignVCenter&lt;/set>
            &lt;/property>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;2&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout5&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;widget class=&quot;AComboBox&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>cbAttr&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;sizePolicy&quot;>
                        &lt;sizepolicy>
                            &lt;hsizetype>7&lt;/hsizetype>
                            &lt;vsizetype>0&lt;/vsizetype>
                            &lt;horstretch>0&lt;/horstretch>
                            &lt;verstretch>0&lt;/verstretch>
                        &lt;/sizepolicy>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>textLabel3&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>=&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QLabel&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>lPrefilter&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>&amp;lt;ПУСТО&amp;gt;&lt;/string>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnChoose&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>...&lt;/string>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLayoutWidget&quot; row=&quot;6&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>layout143&lt;/cstring>
            &lt;/property>
            &lt;hbox>
                &lt;property name=&quot;name&quot;>
                    &lt;cstring>unnamed&lt;/cstring>
                &lt;/property>
                &lt;spacer>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>spacer7&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;orientation&quot;>
                        &lt;enum>Horizontal&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeType&quot;>
                        &lt;enum>Expanding&lt;/enum>
                    &lt;/property>
                    &lt;property name=&quot;sizeHint&quot;>
                        &lt;size>
                            &lt;width>240&lt;/width>
                            &lt;height>21&lt;/height>
                        &lt;/size>
                    &lt;/property>
                &lt;/spacer>
                &lt;widget class=&quot;QPushButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>btnOk&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Сохранить&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image0&lt;/iconset>
                    &lt;/property>
                &lt;/widget>
                &lt;widget class=&quot;wActionButton&quot;>
                    &lt;property name=&quot;name&quot;>
                        &lt;cstring>wActionButton_2&lt;/cstring>
                    &lt;/property>
                    &lt;property name=&quot;text&quot;>
                        &lt;string>Отмена&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;accel&quot;>
                        &lt;string>Esc&lt;/string>
                    &lt;/property>
                    &lt;property name=&quot;iconSet&quot;>
                        &lt;iconset>image1&lt;/iconset>
                    &lt;/property>
                    &lt;property name=&quot;action&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionUpdate&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionTurnOn&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionClose&quot;>
                        &lt;bool>true&lt;/bool>
                    &lt;/property>
                    &lt;property name=&quot;actionId&quot;>
                        &lt;number>0&lt;/number>
                    &lt;/property>
                    &lt;property name=&quot;script&quot;>
                        &lt;bool>false&lt;/bool>
                    &lt;/property>
                &lt;/widget>
            &lt;/hbox>
        &lt;/widget>
        &lt;widget class=&quot;QLabel&quot; row=&quot;3&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>textLabel5&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;text&quot;>
                &lt;string>Фильтр (скрипт на встроенном языке). В скрипте доступна переменная &quot;object&quot; - текущий объект в выборке, а также переменные source, dest - БД-отправители и БД-получатель соответсвенно. Скрипт должен заканчиваться оператором return [булево значение]. В случае возврата true - объект выгружается. Пример:&amp;lt;br&amp;gt;
&amp;lt;code&amp;gt;&amp;lt;nobreak&amp;gt;
return object.Value(&quot;подразделение&quot;)==dest.Value(&quot;подразделение&quot;);
&amp;lt;/nobreak&amp;gt;&amp;lt;/code&amp;gt;&lt;/string>
            &lt;/property>
            &lt;property name=&quot;alignment&quot;>
                &lt;set>WordBreak|AlignVCenter&lt;/set>
            &lt;/property>
        &lt;/widget>
        &lt;spacer row=&quot;5&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>spacer3&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;orientation&quot;>
                &lt;enum>Vertical&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeType&quot;>
                &lt;enum>Expanding&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;sizeHint&quot;>
                &lt;size>
                    &lt;width>20&lt;/width>
                    &lt;height>20&lt;/height>
                &lt;/size>
            &lt;/property>
        &lt;/spacer>
        &lt;widget class=&quot;QTextEdit&quot; row=&quot;4&quot; column=&quot;0&quot;>
            &lt;property name=&quot;name&quot;>
                &lt;cstring>fScript&lt;/cstring>
            &lt;/property>
            &lt;property name=&quot;textFormat&quot;>
                &lt;enum>PlainText&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;wordWrap&quot;>
                &lt;enum>NoWrap&lt;/enum>
            &lt;/property>
            &lt;property name=&quot;autoFormatting&quot;>
                &lt;set>AutoNone&lt;/set>
            &lt;/property>
        &lt;/widget>
    &lt;/grid>
&lt;/widget>
&lt;images>
    &lt;image name=&quot;image0&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;8750&quot;> &lt;/data>
    &lt;/image>
    &lt;image name=&quot;image1&quot;>
        &lt;data format=&quot;XPM.GZ&quot; length=&quot;4046&quot;> &lt;/data>
    &lt;/image>
&lt;/images>
&lt;layoutdefaults spacing=&quot;5&quot; margin=&quot;5&quot;/>
&lt;includehints>
    &lt;includehint>wreport.h&lt;/includehint>
    &lt;includehint>acombobox.h&lt;/includehint>
    &lt;includehint>wactionbutton.h&lt;/includehint>
&lt;/includehints>
&lt;/UI>
</dialogform>
                    </form>
                </forms>
                <webforms/>
                <description id="1098" />
                <sourcecode id="1099" />
            </report>
        </reports>
    </metadata>
    <actions>
        <action type="0" id="116" name="Редактирование СПР:Населенных пунктов" >
            <description id="117" />
            <argument id="118" />
            <actiontype id="119" >2</actiontype>
            <objectid id="120" >101</objectid>
            <formid id="121" >1</formid>
        </action>
        <action type="0" id="192" name="Редактирование СПР:Субъектов РФ" >
            <description id="193" />
            <argument id="194" />
            <actiontype id="195" >2</actiontype>
            <objectid id="196" >165</objectid>
            <formid id="197" >1</formid>
        </action>
        <action type="0" id="198" name="Редактирование СПР:Клиентов" >
            <description id="199" />
            <argument id="200" />
            <actiontype id="201" >0</actiontype>
            <objectid id="202" >139</objectid>
            <formid id="203" >1</formid>
        </action>
        <action type="0" id="276" name="Редактирование СПР:Группы товаров" >
            <description id="277" />
            <argument id="278" />
            <actiontype id="279" >2</actiontype>
            <objectid id="280" >253</objectid>
            <formid id="281" >1</formid>
        </action>
        <action type="0" id="305" name="Редактирование СПР:Товары" >
            <description id="306" />
            <argument id="307" />
            <actiontype id="308" >2</actiontype>
            <objectid id="309" >288</objectid>
            <formid id="310" >1</formid>
        </action>
        <action type="0" id="363" name="Открытие журнала заключенных договоров" >
            <description id="364" />
            <argument id="365" />
            <actiontype id="366" >2</actiontype>
            <objectid id="367" >338</objectid>
            <formid id="368" >358</formid>
        </action>
        <action type="0" id="407" name="Редактирование СПР:Дилеры" >
            <description id="408" />
            <argument id="409" />
            <actiontype id="410" >2</actiontype>
            <objectid id="411" >392</objectid>
            <formid id="412" >1</formid>
        </action>
        <action type="0" id="417" name="Редактирование СПР:Сотрудники" >
            <description id="418" />
            <argument id="419" />
            <actiontype id="420" >2</actiontype>
            <objectid id="421" >376</objectid>
            <formid id="422" >1</formid>
        </action>
        <actiongroup id="546" name="Справочники" >
            <action type="0" id="547" name="Пользователи" >
                <description id="548" />
                <argument id="549" />
                <actiontype id="550" >1</actiontype>
                <objectid id="551" >468</objectid>
                <formid id="552" >516</formid>
            </action>
            <action type="0" id="759" name="Свойства клиентов" >
                <description id="760" />
                <argument id="761" />
                <actiontype id="762" >1</actiontype>
                <objectid id="763" >745</objectid>
                <formid id="764" >757</formid>
            </action>
            <action type="0" id="828" name="Кредитные предложения" >
                <description id="829" />
                <argument id="830" />
                <actiontype id="831" >1</actiontype>
                <objectid id="832" >591</objectid>
                <formid id="833" >1</formid>
            </action>
            <action type="0" id="929" name="Функции" >
                <description id="930" />
                <argument id="931" />
                <actiontype id="932" >2</actiontype>
                <objectid id="933" >906</objectid>
                <formid id="934" >1</formid>
            </action>
            <action type="0" id="939" name="Выходные параметры" >
                <description id="940" />
                <argument id="941" />
                <actiontype id="942" >1</actiontype>
                <objectid id="943" >866</objectid>
                <formid id="944" >883</formid>
            </action>
            <action type="0" id="973" name="Банки" >
                <description id="974" />
                <argument id="975" />
                <actiontype id="976" >1</actiontype>
                <objectid id="977" >557</objectid>
                <formid id="978" >1</formid>
            </action>
            <action type="0" id="967" name="Подразделения банков" >
                <description id="968" />
                <argument id="969" />
                <actiontype id="970" >1</actiontype>
                <objectid id="971" >565</objectid>
                <formid id="972" >1</formid>
            </action>
            <action type="0" id="1043" name="Подразделения контрагентов" >
                <description id="1044" />
                <argument id="1045" />
                <actiontype id="1046" >1</actiontype>
                <objectid id="1047" >581</objectid>
                <formid id="1048" >1058</formid>
            </action>
            <action type="0" id="1154" name="БД" >
                <description id="1155" />
                <argument id="1156" />
                <actiontype id="1157" >1</actiontype>
                <objectid id="1158" >1063</objectid>
                <formid id="1159" >1</formid>
            </action>
        </actiongroup>
        <actiongroup id="859" name="Обработки" >
            <action type="0" id="860" name="Группен ввод КП" >
                <description id="861" />
                <argument id="862" />
                <actiontype id="863" >1</actiontype>
                <objectid id="864" >820</objectid>
                <formid id="865" >844</formid>
            </action>
            <action type="0" id="1141" name="выгрузка" >
                <description id="1142" />
                <argument id="1143" />
                <actiontype id="1144" >0</actiontype>
                <objectid id="1145" >1097</objectid>
                <formid id="1146" >1100</formid>
            </action>
            <action type="0" id="1168" name="Объеты для обмена" >
                <description id="1169" />
                <argument id="1170" />
                <actiontype id="1171" >1</actiontype>
                <objectid id="1172" >1097</objectid>
                <formid id="1173" >1164</formid>
            </action>
            <action type="0" id="1195" name="загрузка" >
                <description id="1196" />
                <argument id="1197" />
                <actiontype id="1198" >1</actiontype>
                <objectid id="1199" >1097</objectid>
                <formid id="1200" >1104</formid>
            </action>
        </actiongroup>
        <actiongroup id="1012" name="Отчеты" >
            <action type="0" id="1013" name="О работе" >
                <description id="1014" />
                <argument id="1015" />
                <actiontype id="1016" >1</actiontype>
                <objectid id="1017" >998</objectid>
                <formid id="1018" >1001</formid>
            </action>
        </actiongroup>
    </actions>
    <languages/>
    <roles/>
    <image_collection/>
</ananas_configuration>
