<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Проверка на повторение регистрационного номера документа.]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=1106</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=1106&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Проверка на повторение регистрационного номера документа.».]]></description>
		<lastBuildDate>Mon, 20 Sep 2021 07:39:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Проверка на повторение регистрационного номера документа.]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124814#p124814</link>
			<description><![CDATA[<p>Есть такая задача - канцелярии нужно перед регистрацией увидеть, был ли уже&nbsp; в текущем месяце зарегистрирован документ с таким же номером?<br />Решение данной задачи сейчас такое:<br />1. Создается вид &quot;Rnom&quot; - последние регномера, категоризированный по полю &quot;fullregnom&quot; с формулой отбора:<br />SELECT ((Form = &quot;incoming&quot;) | (Form = &quot;inside&quot;) | (Form = &quot;outgoing&quot;))&nbsp; &nbsp;&amp; datereg&gt;@Adjust(@Today; 0; 0; -30; 0; 0; 0)</p><br /><p>2. В кнопке &quot;Зарегистрировать&quot; добавлен код до сохранения файла регнастроек:<br /></p><div class="codebox"><pre><code>    Dim view2 As NotesView
    Set view2 = db.GetView (&quot;Rnom&quot; )
    Dim rdoc As NotesDocument
    Key$ =     doc.doctype(0) + &quot;/&quot; + doc.regnom(0)
    Print &quot;поиск &quot;  Key$ 
    Set rdoc=view2.GetDocumentByKey(Key$)
    If Not rdoc   Is Nothing Then
        Print &quot;найден дубль&quot;
    &#039;    If Left$ (doc.datereg(0),10)  = Left$(rdoc.datereg(0),10) Then
        If ws.Prompt (PROMPT_YESNO, &quot;Продолжить регистрацию?&quot;,     &quot;Документ с №&quot; +  Key$  + &quot;  от  &quot;  + Left$ (rdoc.datereg(0),10)   + &quot;  уже был зарегистрирован!&quot;) &lt;&gt; 1 Then Exit Sub
    &#039;    End If
    End If</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Mon, 20 Sep 2021 07:39:02 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124814#p124814</guid>
		</item>
	</channel>
</rss>
