- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 - 31
 - 32
 - 33
 - 34
 - 35
 - 36
 
                        //-----------------------------------------------------------------------------------------------------------
// Создаю ПОСВИДЧЕННЯ ПРО ВИДРЯДЖЕННЯ
// Создаю тело документа
FunForServices.writeToLog(2, ps, "create PPV");
rs1 = stat1.executeQuery("Select D.DEPAR_Name As Dep, rtrim(L.LDAP_Name) as FIO, P.PEOP_Posit As Pos From IPS..PEOP P, IPS..LDAP L, IPS..DEPAR D Where L.LDA_LDAP_Login=D.LDAP_Login and L.LDAP_Login=P.LDAP_Login and L.LDAP_Login='"+rs.getString("Login")+"'");
rs1.next();
rez1="<?xml version=''1.0'' ?><u1><st><![CDATA[";
rez1+="<table width=\"100%\" border=0><tr><td width=\"33%\" align=right><table width=\"33%\"><tr>";
rez1+="<td style=\"FONT-WEIGHT: bold; FONT-SIZE: x-small; FONT-FAMILY: Arial; TEXT-ALIGN: center\">";
rez1+="ЗАТВЕРДЖЕНО</td></tr><tr><td style=\"FONT-WEIGHT: bold; FONT-SIZE: x-small; FONT-FAMILY: Arial; TEXT-ALIGN: center\">";
rez1+="наказом Державної податкової</td></tr><tr><td style=\"FONT-WEIGHT: bold; FONT-SIZE: x-small; FONT-FAMILY: Arial; TEXT-ALIGN: center\">";
rez1+="адмiнiстрацiї України вiд</td></tr><tr><td style=\"FONT-WEIGHT: bold; FONT-SIZE: x-small; FONT-FAMILY: Arial; TEXT-ALIGN: center\">";
rez1+="28.07.97 г. N 260</td></tr></table></td></tr><tr><td><br><br></td></tr><tr><td align=middle><I><B><FONT face=Arial size=4>ПОСВIДЧЕННЯ ПРО ВIДРЯДЖЕННЯ N</FONT></B></I>";
rez1+="<td>                     </td>";
//////////////////////////////////////
//	строк 30 такого
//////////////////////////////////////
rez1+="<TR><TD> </TD></TR><TR><TD><TABLE cellSpacing=0 cellPadding=0 width=\"100%\"><TR><TD align=left><STRONG><EM><FONT face=Arial>КЕРIВНИК</FONT></EM></STRONG></TD><TD align=middle id=pod>Пiдпис</TD>";
rez1+="<TD align=right onclick=StampUtv(\""+sign+"\")><B>"+utvfio+"</B></TD></TR></TABLE></TD></TR><TR><TD> </TD></TR><TR><TD><STRONG><FONT face=Arial>М.П.</FONT></STRONG></TD></TR></TABLE></TD></TR>";
rez1+="</table>";
rez1+="]]></tp></u1>";
rs1 = stat1.executeQuery("Declare @Rez int exec GetCardNum "+FunForServices.Year+", '"+rs.getString("Login")+"', 'A', @Rez out Select @Rez");
rs1.next();
annNumb1 = rs1.getInt(1);
rs1 = stat1.executeQuery("Declare @Rez int exec GetCardNum "+FunForServices.Year+", '"+rs.getString("Login")+"' , 'C', @Rez out Select @Rez");
rs1.next();
ndoc1=rs1.getInt(1);
FunForServices.CreateBody(ndoc1, 0, "DocB", rez1, stat1);
FunForServices.writeToLog(2, ps, ndoc1+" for "+rs.getString("Login"));
rs1=stat1.executeQuery("AddDocCard "+rs.getInt("Act")+", '"+utv+"', "+ndoc+", "+rs.getInt("Grup")+", 1, 4,'"+regndoc.substring(0,regndoc.lastIndexOf("-"))+"', 'ПОСВIДЧЕННЯ ПРО ВIДРЯДЖЕННЯ', null,'"+annot+"', 'Нормальный', 4, null, null, null, null, null, null, '"+pk+"', ';"+utv+"', null, ';"+rs.getString("Login")+"', '"+pkdat+"', @IIdDocCard="+ndoc1+", @IIdAttending = "+annNumb1);
stat1.executeUpdate("Constatation "+ndoc1+", '"+utv+"'");
FunForServices.writeToLog(6, ps, "");