<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.standart-n.ru/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wiki.standart-n.ru/wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0</id>
		<title>Обновление процедур проведения документа - маркировка - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.standart-n.ru/wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0"/>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;action=history"/>
		<updated>2026-05-09T08:05:28Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=9122&amp;oldid=prev</id>
		<title>Agk в 13:36, 18 марта 2021</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=9122&amp;oldid=prev"/>
				<updated>2021-03-18T13:36:03Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;amp;diff=9122&amp;amp;oldid=8977&quot;&gt;Внесённые изменения&lt;/a&gt;</summary>
		<author><name>Agk</name></author>	</entry>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8977&amp;oldid=prev</id>
		<title>Avo в 04:53, 15 декабря 2020</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8977&amp;oldid=prev"/>
				<updated>2020-12-15T04:53:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 04:53, 15 декабря 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if ((select D.DOC_TYPE&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if ((select D.DOC_TYPE&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  from DOCS D&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  from DOCS D&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  where D.ID = :DOC_ID) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;&amp;gt; &lt;/del&gt;8) then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  where D.ID = :DOC_ID) &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;not in (&lt;/ins&gt;8&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;,58)&lt;/ins&gt;) then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; begin&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; begin&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; update MARK_DETAIL&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; update MARK_DETAIL&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Avo</name></author>	</entry>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8941&amp;oldid=prev</id>
		<title>Avo в 09:26, 26 ноября 2020</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8941&amp;oldid=prev"/>
				<updated>2020-11-26T09:26:09Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 09:26, 26 ноября 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SET TERM ^ ;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;create or alter procedure PR_UPDATEMARKBYPART (&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; DOC_ID DM_ID,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; PART_ID DM_ID,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; ACTIVE_ID DM_ID)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;as&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;begin&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--Если не переоценка то&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;--Обновляем партию привязанную к SGTIN&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; if ((select D.DOC_TYPE&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160;  from DOCS D&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160;  where D.ID = :DOC_ID) &amp;lt;&amp;gt; 8) then&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; begin&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; update MARK_DETAIL&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; set PART_ID = :PART_ID&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; where DDA_ID = :ACTIVE_ID;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; else&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-- При переоценки вставляем записи в mark_detail&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; begin&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; insert into MARK_DETAIL (DOC_ID, PART_ID, MARK_DATA, QUANT, DOCNUM, DOC_DATE, DDA_ID, PLACE_ID_IN, PLACE_ID_OUT,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  GTIN, SERIES_NUMBER, EXPIRATION_DATE, ACTIVEPOS, SERIA, KIZ, SSCC, ACCEPTED, MDLP_STATUS,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  ERRORTEXT)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; select :DOC_ID, :PART_ID, MARK_DATA, -QUANT, DOCNUM, DOC_DATE, DDA_ID, PLACE_ID_IN, PLACE_ID_OUT, GTIN,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;  SERIES_NUMBER, EXPIRATION_DATE, 1, SERIA, KIZ, SSCC, ACCEPTED, 1, ''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; from MARK_DETAIL MD&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; where MD.DDA_ID = :ACTIVE_ID;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; suspend;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;end^&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SET TERM ; ^&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/* Следующие операторы GRANT сгенерированы автоматически */&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GRANT SELECT ON DOCS TO PROCEDURE PR_UPDATEMARKBYPART;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GRANT SELECT,INSERT,UPDATE ON MARK_DETAIL TO PROCEDURE PR_UPDATEMARKBYPART;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/* Существующие привилегии на эту процедуру */&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GRANT EXECUTE ON PROCEDURE PR_UPDATEMARKBYPART TO SYSDBA;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SET TERM ^ ;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SET TERM ^ ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Avo</name></author>	</entry>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8940&amp;oldid=prev</id>
		<title>Avo: Новая страница: «&lt;pre&gt; SET TERM ^ ;  create or alter procedure PR_DOC_DETAIL_INSERT (     PARENT_ID bigint,     DOC_ID bigint,     PART_ID bigint,     QUANT type of DM_DOUBLE,…»</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%9E%D0%B1%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D0%B4%D1%83%D1%80_%D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0_-_%D0%BC%D0%B0%D1%80%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0&amp;diff=8940&amp;oldid=prev"/>
				<updated>2020-11-26T09:25:37Z</updated>
		
		<summary type="html">&lt;p&gt;Новая страница: «&amp;lt;pre&amp;gt; SET TERM ^ ;  create or alter procedure PR_DOC_DETAIL_INSERT (     PARENT_ID bigint,     DOC_ID bigint,     PART_ID bigint,     QUANT type of DM_DOUBLE,…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SET TERM ^ ;&lt;br /&gt;
&lt;br /&gt;
create or alter procedure PR_DOC_DETAIL_INSERT (&lt;br /&gt;
    PARENT_ID bigint,&lt;br /&gt;
    DOC_ID bigint,&lt;br /&gt;
    PART_ID bigint,&lt;br /&gt;
    QUANT type of DM_DOUBLE,&lt;br /&gt;
    DISCOUNT double precision,&lt;br /&gt;
    SUMMA double precision,&lt;br /&gt;
    SUMMA_O double precision,&lt;br /&gt;
    PRICE numeric(15,4),&lt;br /&gt;
    SUM_NDSO numeric(15,4),&lt;br /&gt;
    SUM_NDSR DM_DOUBLE,&lt;br /&gt;
    NAC numeric(15,4),&lt;br /&gt;
    COMMITDATE type of DM_DATE,&lt;br /&gt;
    HUMAN_QUANT type of DM_TEXT,&lt;br /&gt;
    SUM_DSC type of DM_DOUBLE,&lt;br /&gt;
    DCARD type of DM_TEXT,&lt;br /&gt;
    ACTIVE_ID type of DM_ID,&lt;br /&gt;
    PART_TYPE DM_STATUS,&lt;br /&gt;
    MAKE_ID DM_ID_NULL = null,&lt;br /&gt;
    ACCEPTANCE DM_TEXT = null,&lt;br /&gt;
    AGENT_FIRST DM_TEXT = null,&lt;br /&gt;
    DATE_FIRST_PRIHOD DM_DATETIME = null,&lt;br /&gt;
    MARKING DM_ID_NULL = null,&lt;br /&gt;
    DATEPROD DM_DATE = null,&lt;br /&gt;
    GTIN_SUBJ DM_TEXT = null,&lt;br /&gt;
    ACCEPTTYPE DM_ID = null)&lt;br /&gt;
as&lt;br /&gt;
declare variable NEW_ID type of DM_ID;&lt;br /&gt;
begin&lt;br /&gt;
  new_id=gen_id(gen_doc_detail_id,1);&lt;br /&gt;
  insert into doc_detail&lt;br /&gt;
    (id,PARENT_ID,DOC_ID,PART_ID,QUANT,DISCOUNT,SUMMA,summa_o, sum_ndso,SUM_NDSR, price, nac, doc_commitdate, human_quant,SUM_DSC,dcard, part_type,make_id,&lt;br /&gt;
    acceptance,agent_first,date_first_prihod&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
    ,MARKING,DATEPROD,GTIN_SUBJ,ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    )&lt;br /&gt;
    /* (PARENT_ID,DOC_ID,PART_ID,QUANT,DISCOUNT,SUMMA,summa_o) */&lt;br /&gt;
   values&lt;br /&gt;
    /* (:PARENT_ID,:DOC_ID,:PART_ID,:QUANT,:DISCOUNT,:SUMMA,:summa_o); */&lt;br /&gt;
    (:new_id,:PARENT_ID,:DOC_ID,:PART_ID,:QUANT,:DISCOUNT,:SUMMA,:summa_o, :sum_ndso,:SUM_NDSR, :price, :nac, :commitdate, :human_quant,:SUM_DSC,:dcard, :part_type,:make_id,&lt;br /&gt;
    :acceptance,:agent_first,:DATE_FIRST_PRIHOD&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
    ,:MARKING,:DATEPROD,:GTIN_SUBJ,:ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    );&lt;br /&gt;
   execute procedure PR_DOC_DETAIL_ACTIVE_ONCOMMIT(:active_id,:new_id,:doc_id,:commitdate);&lt;br /&gt;
end^&lt;br /&gt;
&lt;br /&gt;
SET TERM ; ^&lt;br /&gt;
&lt;br /&gt;
/* Следующие операторы GRANT сгенерированы автоматически */&lt;br /&gt;
&lt;br /&gt;
GRANT INSERT ON DOC_DETAIL TO PROCEDURE PR_DOC_DETAIL_INSERT;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_ACTIVE_ONCOMMIT TO PROCEDURE PR_DOC_DETAIL_INSERT;&lt;br /&gt;
&lt;br /&gt;
/* Существующие привилегии на эту процедуру */&lt;br /&gt;
&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO PROCEDURE PR_DOC_RASHOD_COMMIT;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO &amp;quot;PUBLIC&amp;quot;;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO STANDART;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO SYSDBA;&lt;br /&gt;
&lt;br /&gt;
SET TERM ^ ;&lt;br /&gt;
&lt;br /&gt;
create or alter procedure PR_DOC_PRIHOD_COMMIT_RECURSE (&lt;br /&gt;
    DOC_ID type of DM_ID,&lt;br /&gt;
    DOC_PARENT_ID type of DM_ID,&lt;br /&gt;
    PART_PARENT_ID type of DM_ID,&lt;br /&gt;
    DOC_COMMITDATE type of DM_DATE,&lt;br /&gt;
    CONTRACT_ID DM_ID)&lt;br /&gt;
as&lt;br /&gt;
declare variable PART_ID type of DM_ID;&lt;br /&gt;
declare variable WARE_ID type of DM_UUID_NULL;&lt;br /&gt;
declare variable SNAME type of DM_TEXT;&lt;br /&gt;
declare variable SIZG type of DM_TEXT;&lt;br /&gt;
declare variable SCOUNTRY type of DM_TEXT;&lt;br /&gt;
declare variable ORIG_CODE type of DM_TEXT;&lt;br /&gt;
declare variable SORIG_NAME type of DM_TEXT;&lt;br /&gt;
declare variable SORIG_IZG type of DM_TEXT;&lt;br /&gt;
declare variable SORIG_COUNTRY type of DM_TEXT;&lt;br /&gt;
declare variable BARCODE type of DM_TEXT;&lt;br /&gt;
declare variable Z_ID type of DM_ID;&lt;br /&gt;
declare variable SKLAD_ID DM_TEXT;&lt;br /&gt;
declare variable PRICE type of DM_DOUBLE;&lt;br /&gt;
declare variable PRICE_O type of DM_DOUBLE;&lt;br /&gt;
declare variable PRICE_Z type of DM_DOUBLE;&lt;br /&gt;
declare variable PRICE_R type of DM_DOUBLE;&lt;br /&gt;
declare variable QUANT type of DM_DOUBLE;&lt;br /&gt;
declare variable BARCODE1 type of DM_TEXT;&lt;br /&gt;
declare variable DEP type of DM_ID;&lt;br /&gt;
declare variable KRITK type of DM_DOUBLE;&lt;br /&gt;
declare variable GODENDO type of DM_DATETIME;&lt;br /&gt;
declare variable SERIA type of DM_TEXT;&lt;br /&gt;
declare variable NDS type of DM_DOUBLE;&lt;br /&gt;
declare variable SUM_NDSO type of DM_DOUBLE;&lt;br /&gt;
declare variable SUM_NDSR DM_DOUBLE;&lt;br /&gt;
declare variable SERT type of DM_TEXT;&lt;br /&gt;
declare variable DATESERT type of DM_DATETIME;&lt;br /&gt;
declare variable KEMVSERT type of DM_TEXT;&lt;br /&gt;
declare variable SDSERT type of DM_DATETIME;&lt;br /&gt;
declare variable REGN type of DM_TEXT;&lt;br /&gt;
declare variable NGTD type of DM_TEXT;&lt;br /&gt;
declare variable EDIZM type of DM_TEXT;&lt;br /&gt;
declare variable PARENT_ID type of DM_ID;&lt;br /&gt;
declare variable SUMMA type of DM_DOUBLE;&lt;br /&gt;
declare variable SUMMA_O type of DM_DOUBLE;&lt;br /&gt;
declare variable DISCOUNT type of DM_DOUBLE;&lt;br /&gt;
declare variable ACTIVE_ID type of DM_ID;&lt;br /&gt;
declare variable NAC type of DM_DOUBLE;&lt;br /&gt;
declare variable DOC_DETAIL_ID type of DM_ID;&lt;br /&gt;
declare variable MOTHERPART_ID type of DM_ID;&lt;br /&gt;
declare variable BCODE_IZG type of DM_TEXT;&lt;br /&gt;
declare variable HUMAN_QUANT type of DM_TEXT;&lt;br /&gt;
declare variable SUM_DSC type of DM_DOUBLE;&lt;br /&gt;
declare variable DCARD type of DM_TEXT;&lt;br /&gt;
declare variable PART_TYPE DM_STATUS;&lt;br /&gt;
declare variable BASE_AGENT_ID DM_ID;&lt;br /&gt;
declare variable GROUP_ID DM_ID;&lt;br /&gt;
declare variable MAKE_ID DM_ID_NULL;&lt;br /&gt;
declare variable MNN DM_TEXT;&lt;br /&gt;
declare variable MOTHERPART_UUID DM_UUID_NULL;&lt;br /&gt;
declare variable EGAIS_ID DM_TEXT1024;&lt;br /&gt;
declare variable EGAIS_BREGID DM_TEXT1024;&lt;br /&gt;
declare variable EGAIS_REGID DM_TEXT1024;&lt;br /&gt;
declare variable EGAIS_ALCCODE DM_TEXT1024;&lt;br /&gt;
declare variable CAPACITY DM_DOUBLE;&lt;br /&gt;
declare variable ALC_VOLUME DM_DOUBLE;&lt;br /&gt;
declare variable EGAIS_PRODUCER_ID DM_TEXT1024;&lt;br /&gt;
declare variable EGAIS_QUANT DM_DOUBLE;&lt;br /&gt;
declare variable EGAIS_BARCODE DM_TEXT1024;&lt;br /&gt;
declare variable EGAIS_TYPE DM_TEXT;&lt;br /&gt;
declare variable PRODUCER_INN DM_TEXT1024;&lt;br /&gt;
declare variable PRODUCER_KPP DM_TEXT1024;&lt;br /&gt;
declare variable BOTTLINGDATE DM_DATETIME;&lt;br /&gt;
declare variable EGAIS_PRODUCT_VCODE DM_TEXT;&lt;br /&gt;
declare variable DATE_FIRST_PRIHOD DM_DATETIME = null;&lt;br /&gt;
declare variable AGENT_FIRST DM_TEXT = null;&lt;br /&gt;
declare variable ACCEPTANCE DM_TEXT = null;&lt;br /&gt;
declare variable DATEPROD DM_DATE;&lt;br /&gt;
declare variable MARKING DM_ID_NULL;&lt;br /&gt;
declare variable GTIN_SUBJ DM_TEXT;&lt;br /&gt;
declare variable ACCEPTTYPE DM_ID_NULL;&lt;br /&gt;
begin&lt;br /&gt;
    --whith SUM_NDSR&lt;br /&gt;
    for&lt;br /&gt;
    select&lt;br /&gt;
    /*ware_id*/  sname,sizg,scountry,orig_code,sorig_name,sorig_izg,sorig_country,barcode,z_id,sklad_id,&lt;br /&gt;
    /*part_id*/  PRICE,PRICE_O,PRICE_Z,PRICE_R,QUANT,BARCODE1,/*KRITK,*/GODENDO,SERIA,NDS,SUM_NDSO,SUM_NDSR,SERT,DATESERT,KEMVSERT,SDSERT,REGN,NGTD,EDIZM,&lt;br /&gt;
    PARENT_ID,DISCOUNT,SUMMA,summa_o, id, part_id, nac, doc_detail_id, motherpart_id, dep, bcode_izg, human_quant, SUM_DSC, dcard,&lt;br /&gt;
    part_type, BASE_AGENT_ID, group_id, make_id, mnn, motherpart_uuid,&lt;br /&gt;
    EGAIS_ID, EGAIS_BREGID, EGAIS_REGID, EGAIS_ALCCODE, CAPACITY, ALC_VOLUME, EGAIS_PRODUCER_ID, EGAIS_QUANT, EGAIS_BARCODE,&lt;br /&gt;
    EGAIS_TYPE, PRODUCER_INN, PRODUCER_KPP, BOTTLINGDATE, EGAIS_PRODUCT_VCODE,acceptance,agent_first,DATE_FIRST_PRIHOD&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
    ,MARKING,DATEPROD,GTIN_SUBJ,ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    from doc_detail_active where doc_id=:doc_id and part_parent_id=:doc_parent_id&lt;br /&gt;
    into&lt;br /&gt;
    :sname,:sizg,:scountry,:orig_code,:sorig_name,:sorig_izg,:sorig_country,:barcode,:z_id,:sklad_id,&lt;br /&gt;
    :PRICE,:PRICE_O,:PRICE_Z,:PRICE_R,:QUANT,:BARCODE1,/*:KRITK,*/:GODENDO,:SERIA,:NDS,:SUM_NDSO,:SUM_NDSR,:SERT,:DATESERT,:KEMVSERT,:SDSERT,:REGN,:NGTD,:EDIZM,&lt;br /&gt;
    :PARENT_ID,:DISCOUNT,:SUMMA,:summa_o, :active_id, :part_id, :nac, :doc_detail_id, :motherpart_id, :dep, :bcode_izg, :human_quant, :SUM_DSC, :dcard,&lt;br /&gt;
    :part_type, :BASE_AGENT_ID, :group_id,:make_id, :mnn, :motherpart_uuid,&lt;br /&gt;
    :EGAIS_ID, :EGAIS_BREGID, :EGAIS_REGID, :EGAIS_ALCCODE, :CAPACITY, :ALC_VOLUME, :EGAIS_PRODUCER_ID, :EGAIS_QUANT, :EGAIS_BARCODE,&lt;br /&gt;
    :EGAIS_TYPE, :PRODUCER_INN, :PRODUCER_KPP, :BOTTLINGDATE, :EGAIS_PRODUCT_VCODE,:acceptance,:agent_first,:DATE_FIRST_PRIHOD&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
    ,:MARKING,:DATEPROD,GTIN_SUBJ,ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    do&lt;br /&gt;
    begin&lt;br /&gt;
    if ((price&amp;lt;0) or (price is null)) then exception EX_PRICE;&lt;br /&gt;
    if (/*(price_o&amp;lt;0.001) or */(price_o is null)) then exception EX_PRICE_O;&lt;br /&gt;
    if (/*(quant&amp;lt;0.00001) or */(quant is null)) then exception EX_QUANT;&lt;br /&gt;
    if (/*(summa&amp;lt;0.00001) or */(summa is null)) then exception EX_SUMMA;&lt;br /&gt;
    if (/*(summa_o&amp;lt;0.00001) or */(summa_o is null)) then exception EX_SUMMA_O;&lt;br /&gt;
    --    if ((NDS&amp;lt;0.00001) or (NDS is null)) then exception EX_NDS;&lt;br /&gt;
    if (/*(SUM_NDSO&amp;lt;0) or */(SUM_NDSO is null or SUM_NDSR is null )) then exception EX_SUM_NDSO;&lt;br /&gt;
    select w_id from pr_get_ware(:sname,:sizg,:scountry,:orig_code,:sorig_name,:sorig_izg,:sorig_country,:bcode_izg,:z_id,:sklad_id,:part_type,:mnn)&lt;br /&gt;
    into :ware_id;&lt;br /&gt;
    if ((part_id=0) or (part_id is NULL)) then&lt;br /&gt;
        select p_id from pr_new_part(:DOC_ID,:part_parent_id,:WARE_ID,:PRICE,:PRICE_O,:PRICE_Z,:PRICE_R,:QUANT,:BARCODE,:BARCODE1,:DEP,:GODENDO,:SERIA,:NDS,&lt;br /&gt;
        :SUM_NDSO,:SERT,:DATESERT,:KEMVSERT,:SDSERT,:REGN,:NGTD,:EDIZM,:NAC,:motherpart_id, :part_type,:BASE_AGENT_ID, :sklad_id, :contract_id, :active_id, :group_id,&lt;br /&gt;
        :motherpart_uuid, :EGAIS_ID, :EGAIS_REGID, :EGAIS_BREGID, :EGAIS_ALCCODE, :EGAIS_QUANT, :CAPACITY, :ALC_VOLUME, :EGAIS_PRODUCER_ID, :EGAIS_BARCODE,&lt;br /&gt;
        :EGAIS_TYPE, :PRODUCER_INN, :PRODUCER_KPP, :BOTTLINGDATE, :EGAIS_PRODUCT_VCODE,:date_first_prihod,:agent_first) into :part_id;&lt;br /&gt;
&lt;br /&gt;
    execute procedure PR_DOC_DETAIL_INSERT(:doc_detail_id,:DOC_ID,:PART_ID,:QUANT,:DISCOUNT,:SUMMA,:summa_o,:price,:sum_ndso,:sum_ndsr,:nac,:doc_commitdate,:human_quant,:SUM_DSC,:dcard,:active_id,:part_type,:make_id,:acceptance,:agent_first,:DATE_FIRST_PRIHOD&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
    ,:MARKING,:DATEPROD,:GTIN_SUBJ,:ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    );&lt;br /&gt;
    -- обновляем членство в группах&lt;br /&gt;
    execute procedure PR_UPDGROUPDETAIL_ACTIVE2PARTS(:active_id,:part_id);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    --25/11/2020 Обновляем партию привязанную к SGTIN&lt;br /&gt;
    execute procedure PR_UPDATEMARKBYPART(:DOC_ID, :PART_ID, :ACTIVE_ID);&lt;br /&gt;
    --update  MARK_DETAIL   set part_id=:part_id&lt;br /&gt;
    --           where DDA_ID = :ACTIVE_ID;&lt;br /&gt;
    -- 24/03/2020 &amp;lt;--&lt;br /&gt;
&lt;br /&gt;
    -- Обновляем атрибут для партии&lt;br /&gt;
    -- execute procedure PR_UPGRADE_ATTR(:active_id,:part_id);&lt;br /&gt;
&lt;br /&gt;
    -- присваиваем ценам партии&lt;br /&gt;
    update prices set part_id=:part_id where dda_id=:active_id;&lt;br /&gt;
    update or insert into prices (part_id,price_type,currency_id, price,dda_id) values (:part_id,0,0,:price,:active_id) matching (PART_ID,PRICE_TYPE);&lt;br /&gt;
    execute procedure PR_DOC_PRIHOD_COMMIT_RECURSE(:doc_id,:active_id,:part_id,:doc_commitdate,:contract_id);&lt;br /&gt;
    end&lt;br /&gt;
    end^&lt;br /&gt;
&lt;br /&gt;
SET TERM ; ^&lt;br /&gt;
&lt;br /&gt;
/* Следующие операторы GRANT сгенерированы автоматически */&lt;br /&gt;
&lt;br /&gt;
GRANT SELECT ON DOC_DETAIL_ACTIVE TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_GET_WARE TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_NEW_PART TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_UPDGROUPDETAIL_ACTIVE2PARTS TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_UPDATEMARKBYPART TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT SELECT,INSERT,UPDATE ON PRICES TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
&lt;br /&gt;
/* Существующие привилегии на эту процедуру */&lt;br /&gt;
&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE TO PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE TO &amp;quot;PUBLIC&amp;quot;;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE TO STANDART;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_PRIHOD_COMMIT_RECURSE TO SYSDBA;&lt;br /&gt;
&lt;br /&gt;
SET TERM ^ ;&lt;br /&gt;
&lt;br /&gt;
create or alter procedure PR_DOC_RASHOD_COMMIT (&lt;br /&gt;
    DOC_ID type of DM_ID,&lt;br /&gt;
    DBG type of DM_STATUS)&lt;br /&gt;
as&lt;br /&gt;
declare variable PARENT_ID type of DM_ID;&lt;br /&gt;
declare variable PART_ID type of DM_ID;&lt;br /&gt;
declare variable PRICE type of DM_DOUBLE;&lt;br /&gt;
declare variable QUANT type of DM_DOUBLE;&lt;br /&gt;
declare variable DISCOUNT type of DM_DOUBLE;&lt;br /&gt;
declare variable SUMMA type of DM_DOUBLE;&lt;br /&gt;
declare variable SUMMA_O type of DM_DOUBLE;&lt;br /&gt;
declare variable SUM_NDSO type of DM_DOUBLE;&lt;br /&gt;
declare variable SUM_NDSR DM_DOUBLE;&lt;br /&gt;
declare variable NAC type of DM_DOUBLE;&lt;br /&gt;
declare variable DOC_COMMITDATE type of DM_DATE;&lt;br /&gt;
declare variable HUMAN_QUANT type of DM_TEXT;&lt;br /&gt;
declare variable SUM_DSC type of DM_DOUBLE;&lt;br /&gt;
declare variable DCARD type of DM_TEXT;&lt;br /&gt;
declare variable ACTIVE_ID type of DM_ID;&lt;br /&gt;
declare variable PART_TYPE DM_STATUS;&lt;br /&gt;
declare variable BASE_AGENT_ID DM_ID;&lt;br /&gt;
declare variable MAKE_ID DM_ID_NULL;&lt;br /&gt;
declare variable ACCEPTTYPE DM_ID_NULL;&lt;br /&gt;
declare variable MARKING DM_ID_NULL;&lt;br /&gt;
declare variable DATEPROD DM_DATE;&lt;br /&gt;
declare variable GTIN_SUBJ DM_TEXT;&lt;br /&gt;
begin&lt;br /&gt;
  select cast(commitdate as date) from docs where id=:doc_id into :doc_commitdate;&lt;br /&gt;
  for select PARENT_ID,DOC_ID,PART_ID,PRICE,QUANT,DISCOUNT,SUMMA,summa_o, sum_ndso,SUM_NDSR, nac, human_quant, SUM_DSC, dcard, part_type, id, make_id&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
   ,MARKING,DATEPROD,GTIN_SUBJ,ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
  from doc_detail_active where doc_id=:doc_id&lt;br /&gt;
  into :PARENT_ID,:DOC_ID,:PART_ID,:PRICE,:QUANT,:DISCOUNT,:SUMMA,:summa_o, :sum_ndso,:SUM_NDSR, :nac, :human_quant, :SUM_DSC, :dcard, :part_type, :active_id, :make_id&lt;br /&gt;
/*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
  ,:MARKING,:DATEPROD,:GTIN_SUBJ,:ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
  do&lt;br /&gt;
   execute procedure PR_DOC_DETAIL_INSERT(:PARENT_ID,:DOC_ID,:PART_ID,QUANT,:DISCOUNT,:SUMMA,:summa_o, :price,:sum_ndso,:SUM_NDSR, :nac, :doc_commitdate, :human_quant, :SUM_DSC,:dcard,:active_id,:part_type,:make_id&lt;br /&gt;
   /*26/06/2020 AVO Добавлены поля для маркировки*/&lt;br /&gt;
   ,null, null, null, :MARKING,:DATEPROD,:GTIN_SUBJ,:ACCEPTTYPE&lt;br /&gt;
/* end 26/06/2020 AVO*/&lt;br /&gt;
    );&lt;br /&gt;
  execute procedure GM$PR_PRIHOD_DOC_TREB(:doc_id);&lt;br /&gt;
end^&lt;br /&gt;
&lt;br /&gt;
SET TERM ; ^&lt;br /&gt;
&lt;br /&gt;
/* Следующие операторы GRANT сгенерированы автоматически */&lt;br /&gt;
&lt;br /&gt;
GRANT SELECT ON DOCS TO PROCEDURE PR_DOC_RASHOD_COMMIT;&lt;br /&gt;
GRANT SELECT ON DOC_DETAIL_ACTIVE TO PROCEDURE PR_DOC_RASHOD_COMMIT;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_DETAIL_INSERT TO PROCEDURE PR_DOC_RASHOD_COMMIT;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE GM$PR_PRIHOD_DOC_TREB TO PROCEDURE PR_DOC_RASHOD_COMMIT;&lt;br /&gt;
&lt;br /&gt;
/* Существующие привилегии на эту процедуру */&lt;br /&gt;
&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_RASHOD_COMMIT TO PROCEDURE PR_DOC_COMMIT;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_RASHOD_COMMIT TO &amp;quot;PUBLIC&amp;quot;;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_RASHOD_COMMIT TO STANDART;&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE PR_DOC_RASHOD_COMMIT TO SYSDBA;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Avo</name></author>	</entry>

	</feed>