Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub formi_e()
- Dim ôàéë As Object
- Dim end_t As String
- Dim tek_ch_zn As String
- name_txt = "result.xml"
- Set xl_osn = ActiveWorkbook
- Set xl_nastr = xl_osn.Sheets("nastr")
- Set xl_kontr = xl_osn.Sheets("kontra_list")
- Set mDU = CreateObject("scripting.dictionary")
- mDU.comparemode = 1 ''ñðàâíåíèå áåç ó÷¸òà ðåãèñòðà
- count_xl_kontr = xl_kontr.Cells(Rows.Count, "A").End(xlUp).Row
- '-----
- Dim wb As Workbook
- Dim sSH As Worksheet, t As String
- name_open_f = GetFileName("Âûáîð ôàéëà", ThisWorkbook.Path)
- If name_open_f = "" Then
- MsgBox ("Íå÷åãî îáðàáàòûâàòü")
- Exit Sub
- End If
- 'name_open_f = "D:\all_alex\xls_xml\test.xlsx"
- Set wbs = Workbooks.Open(name_open_f)
- Set xl_first = wbs.Sheets(1)
- For Each ws In wbs.Worksheets
- If InStr(1, ws.Name, "ÓÏÄ", vbTextCompare) > 0 Then
- Set xl_upd = wbs.Sheets(ws.Name)
- End If
- If InStr(1, ws.Name, "ÊÌ-", vbTextCompare) > 0 Then
- Set sSH = wbs.Sheets(ws.Name)
- End If
- Next ws
- e = sSH.Range("A" & sSH.Rows.Count).End(xlUp).Row
- For xx = 15 To e
- t = sSH.Range("I" & xx)
- If t <> "" Then mDU(t) = Mid(sSH.Range("A" & xx), 1, 31)
- Next
- '-----îïðåäåëÿåñ ïîçèöèþ âñåãî ïî óïä
- poz_vsego = 15
- For i = 15 To 2000
- tek_cell = xl_upd.Range("R" & i)
- If InStr(1, tek_cell, "Âñåãî ê îïëàòå", vbTextCompare) > 0 Then
- poz_vsego = i - 1
- Exit For
- End If
- Next i
- '----îïðåäåëÿåì ïî ïåðâîìó ëèñòó
- For i = 15 To 2000
- tek_cell = xl_first.Range("A" & i)
- If Trim(tek_cell) = "" Then
- poz_vsego_first = i - 1
- Exit For
- End If
- Next i
- '----ýòî âñåãäà 2 ñòðîêà íà ëìèñòå êîíòû
- id_otpr = xl_kontr.Range("B2") ' ïîñòîÿííî() '"2BM-3702148437-370201001-201709141106289622657"
- pîkup_name_org = xl_upd.Range("AB5")
- id_pol = "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx"
- For rr = 3 To count_xl_kontr
- If xl_kontr.Cells(rr, 1) = pîkup_name_org Then
- id_pol = xl_kontr.Cells(rr, 2)
- Exit For
- End If
- Next rr
- 'id_pol = "2AEE11608B4-C441-48AD-B8D1-4F1751EB7694"
- GUID_str = Mid(CreateGuidString(), 2, 36)
- Dim tek_date As Date
- tek_date = Date
- dd = Day(Now)
- mm = Month(Now)
- If mm <= 9 Then mm_str = "0" & Trim(Str(mm)) Else mm_str = Trim(Str(mm))
- gg = Year(Now)
- If dd <= 9 Then dd_str = "0" & Trim(Str(dd)) Else dd_str = Trim(Str(dd))
- time_all = gg & mm_str & dd_str
- id_file = "ON_NSCHFDOPPRMARK_" & id_pol & "_" & id_otpr & "_" & time_all & "_" & GUID_str
- path_tek = xl_osn.Path & "\" & id_file & ".xml" 'name_txt
- Set file_l = CreateObject("Scripting.FileSystemObject").CreateTextFile(path_tek, True)
- xl_osn.Save
- file_l.WriteLine "<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "windows-1251" & Chr(34) & "?>"
- file_l.WriteLine "<Ôàéë ÈäÔàéë=" & Chr(34) & id_file & Chr(34) & " ÂåðñÔîðì=" & Chr(34) & "5.01" & Chr(34) & " ÂåðñÏðîã=" & Chr(34) & "Diadoc 1.0" & Chr(34) & ">"
- file_l.WriteLine "<ÑâÓ÷ÄîêÎòáîð ÈäÎòïð=" & Chr(34) & id_otpr & Chr(34) & " ÈäÏîë=" & Chr(34) & id_pol & Chr(34) & ">"
- file_l.WriteLine "</ÑâÓ÷ÄîêÎòáîð>"
- knd = "1115131"
- fun_n = "Ñ×ÔÄÎÏ"
- pofactHG = "Äîêóìåíò îá îòãðóçêå òîâàðîâ (âûïîëíåíèè ðàáîò), ïåðåäà÷å èìóùåñòâåííûõ ïðàâ (äîêóìåíò îá îêàçàíèè óñëóã)"
- NaimDocOPr = "Ñ÷åò-ôàêòóðà è äîêóìåíò îá îòãðóçêå òîâàðîâ (âûïîëíåíèè ðàáîò), ïåðåäà÷å èìóùåñòâåííûõ ïðàâ (äîêóìåíò îá îêàçàíèè óñëóã)"
- DateInfPr = "22.03.2024"
- VremInfPr = "08.05.28"
- prod_name_org = Rep_all(xl_upd.Range("S5"))
- NaimEkonSubSost = prod_name_org '"ÎÎÎ "ÀËÜÔÀ-ÒÐÅÉÄ", ÈÍÍ/ÊÏÏ 3702148437/370201001"
- file_l.WriteLine "<Äîêóìåíò ÊÍÄ=" & Chr(34) & knd & Chr(34) & " Ôóíêöèÿ=" & Chr(34) & fun_n & Chr(34) & " ÏîÔàêòÕÆ=" & Chr(34) & pofactHG & Chr(34) & " ÍàèìÄîêÎïð=" & Chr(34) & NaimDocOPr & Chr(34) & " ÄàòàÈíôÏð=" & Chr(34) & DateInfPr & Chr(34) & " ÂðåìÈíôÏð=" & Chr(34) & VremInfPr & Chr(34) & " ÍàèìÝêîíÑóáÑîñò=" & Chr(34) & NaimEkonSubSost & Chr(34) & ">"
- num_sf = xl_upd.Range("s2") '"32501"
- date_sf = xl_upd.Range("v2") '"25.03.2024"
- kod_okv = "643"
- file_l.WriteLine "<ÑâÑ÷Ôàêò ÍîìåðÑ÷Ô=" & Chr(34) & num_sf & Chr(34) & " ÄàòàÑ÷Ô=" & Chr(34) & date_sf & Chr(34) & " ÊîäÎÊÂ=" & Chr(34) & kod_okv & Chr(34) & ">"
- prod_name_org = Rep_all(xl_upd.Range("S5")) '"ÎÎÎ "ÀËÜÔÀ-ÒÐÅÉÄ""
- If InStr(1, xl_upd.Range("S7"), "/", vbTextCompare) > 0 Then
- rez1 = Split(xl_upd.Range("S7"), "/")
- prod_innul = rez1(0)
- prod_kpp = rez1(1)
- Else
- prod_innul = xl_upd.Range("S7")
- prod_kpp = ""
- End If
- 'prod_innul = "3702148437"
- 'prod_kpp = "370201001"
- prod_okopo = xl_nastr.Range("B7") '"01154260"
- prod_kod_str = xl_nastr.Range("B2") '"643"
- prod_adres_txt = xl_upd.Range("S6") '"153005, Èâàíîâñêàÿ îáëàñòü, ã.î. Èâàíîâî, ã Èâàíîâî, óë Ñîñíîâàÿ, ä. 28"
- prod_tlf = xl_nastr.Range("B8") '"(4932) 938522"
- prod_num_scheta = xl_nastr.Range("B4") '"40702810606200029655"
- prod_namebank = xl_nastr.Range("B3") '"ÏÀÎ ÀÊÁ "ÀÂÀÍÃÀÐÄ""
- prod_bik = xl_nastr.Range("B5") '"044525201"
- prod_kor_sch = xl_nastr.Range("B6") '"30101810000000000201"
- file_l.WriteLine "<ÑâÏðîä ÎÊÏÎ=" & Chr(34) & prod_okopo & Chr(34) & ">"
- file_l.WriteLine "<ÈäÑâ>"
- file_l.WriteLine "<ÑâÞËÓ÷ ÍàèìÎðã=" & Chr(34) & prod_name_org & Chr(34) & " ÈÍÍÞË=" & Chr(34) & prod_innul & Chr(34) & " ÊÏÏ=" & Chr(34) & prod_kpp & Chr(34) & " />"
- file_l.WriteLine "</ÈäÑâ>"
- file_l.WriteLine "<Àäðåñ>"
- file_l.WriteLine "<ÀäðÈíô ÊîäÑòð=" & Chr(34) & prod_kod_str & Chr(34) & " ÀäðÒåêñò=" & Chr(34) & prod_adres_txt & Chr(34) & " />"
- file_l.WriteLine "</Àäðåñ>"
- file_l.WriteLine "<Êîíòàêò Òëô=" & Chr(34) & prod_tlf & Chr(34) & " />"
- file_l.WriteLine "<ÁàíêÐåêâ ÍîìåðÑ÷åòà=" & Chr(34) & prod_num_scheta & Chr(34) & ">"
- file_l.WriteLine "<ÑâÁàíê ÍàèìÁàíê=" & Chr(34) & prod_namebank & Chr(34) & " ÁÈÊ=" & Chr(34) & prod_bik & Chr(34) & " ÊîðÑ÷åò=" & Chr(34) & prod_kor_sch & Chr(34) & " />"
- file_l.WriteLine "</ÁàíêÐåêâ>"
- file_l.WriteLine "</ÑâÏðîä>"
- '---------------ãðóçî îòïðàâèòåëü
- If xl_upd.Range("S8") = "îí æå" Then
- gruz_otprav_name_org = prod_name_org ' "ÎÎÎ "ÀËÜÔÀ-ÒÐÅÉÄ""
- gruz_otprav_innul = prod_innul ' "3702148437"
- gruz_otprav_kpp = prod_kpp ' "370201001"
- gruz_otprav_okopo = prod_okopo '"01154260"
- gruz_otprav_kod_str = prod_kod_str '"643"
- gruz_otprav_adres_txt = prod_adres_txt ' "153005, Èâàíîâñêàÿ îáëàñòü, ã.î. Èâàíîâî, ã Èâàíîâî, óë Ñîñíîâàÿ, ä. 28"
- gruz_otprav_tlf = prod_tlf '"(4932) 938522"
- End If
- file_l.WriteLine "<ÃðóçÎò>"
- file_l.WriteLine "<ÃðóçÎòïð ÎÊÏÎ=" & Chr(34) & gruz_otprav_okopo & Chr(34) & ">"
- file_l.WriteLine "<ÈäÑâ>"
- file_l.WriteLine "<ÑâÞËÓ÷ ÍàèìÎðã=" & Chr(34) & gruz_otprav_name_org & Chr(34) & " ÈÍÍÞË=" & Chr(34) & gruz_otprav_innul & Chr(34) & " ÊÏÏ=" & Chr(34) & gruz_otprav_kpp & Chr(34) & " />"
- file_l.WriteLine "</ÈäÑâ>"
- file_l.WriteLine "<Àäðåñ>"
- file_l.WriteLine "<ÀäðÈíô ÊîäÑòð=" & Chr(34) & gruz_otprav_kod_str & Chr(34) & " ÀäðÒåêñò=" & Chr(34) & gruz_otprav_adres_txt & Chr(34) & " />"
- file_l.WriteLine "</Àäðåñ>"
- file_l.WriteLine "<Êîíòàêò Òëô=" & Chr(34) & gruz_otprav_tlf & Chr(34) & " />"
- file_l.WriteLine "</ÃðóçÎòïð>"
- file_l.WriteLine " </ÃðóçÎò>"
- '---------------ãðóçî ïîëó÷àòåëü
- gruz_polych_name_org = Rep_all(xl_upd.Range("S9")) '"ÎÎÎ "ÀËÜÔÀ-ÒÐÅÉÄ""
- '--ñ÷èòàåì ÷òî îí æå --ïðîäàâåö
- '-------------------ïðîäîâåö
- name_org = Rep_all(xl_upd.Range("AB5")) ' "ÎÎÎ "Òðèêîòàæ ÍÀÒÀËÈ""
- If InStr(1, xl_upd.Range("AB7"), "/", vbTextCompare) > 0 Then
- rez1 = Split(xl_upd.Range("AB7"), "/")
- innul = Replace(rez1(0), "ÈÍÍ", "")
- kpp = Replace(rez1(1), "ÊÏÏ", "")
- Else
- innul = Replace(xl_upd.Range("ab7"), "ÈÍÍ", "")
- kpp = ""
- End If
- okopo = xl_nastr.Range("C7") '"01154260"
- 'innul = "3702703225"
- 'kpp = "370201001"
- kod_str = xl_nastr.Range("c2") '"643"
- adress_txt = xl_upd.Range("AB6") ' "153007, Èâàíîâñêàÿ îáë, ã.î. Èâàíîâî, ã Èâàíîâî, óë Ôðóíçå, ä. 97"
- num_scheta = xl_nastr.Range("C4") '"40702810917000006966"
- namebank = xl_nastr.Range("C3") ' "Èâàíîâñêîå îòäåëåíèå ¹8639 ÏÀÎ Ñáåðáàíê"
- bik = xl_nastr.Range("C5") '"042406608"
- korr_num = xl_nastr.Range("C6") ' "30101810000000000608"
- gruz_polych_innul = innul ' "3702148437"
- gruz_polych_kpp = kpp '"370201001"
- gruz_polych_okopo = okopo '"01154260"
- gruz_polych_kod_str = "643"
- gruz_polych_adres_txt = xl_upd.Range("v9") '"153005, Èâàíîâñêàÿ îáëàñòü, ã.î. Èâàíîâî, ã Èâàíîâî, óë Ñîñíîâàÿ, ä. 28"
- gruz_polych_tlf = "(4932) 938522"
- gruz_polych_num_scheta = num_scheta '"40702810606200029655"
- gruz_polych_namebank = namebank '"ÏÀÎ ÀÊÁ "ÀÂÀÍÃÀÐÄ""
- gruz_polych_bik = bik '"044525201"
- gruz_polych_kor_sch = korr_num '"30101810000000000201"
- file_l.WriteLine "<ÃðóçÏîëó÷>"
- file_l.WriteLine "<ÈäÑâ>"
- file_l.WriteLine "<ÑâÞËÓ÷ ÍàèìÎðã=" & Chr(34) & gruz_polych_name_org & Chr(34) & " ÈÍÍÞË=" & Chr(34) & gruz_polych_innul & Chr(34) & " ÊÏÏ=" & Chr(34) & gruz_polych_kpp & Chr(34) & " />"
- file_l.WriteLine "</ÈäÑâ>"
- file_l.WriteLine "<Àäðåñ>"
- file_l.WriteLine "<ÀäðÈíô ÊîäÑòð=" & Chr(34) & gruz_polych_kod_str & Chr(34) & " ÀäðÒåêñò=" & Chr(34) & gruz_polych_adres_txt & Chr(34) & " />"
- file_l.WriteLine "</Àäðåñ>"
- file_l.WriteLine "<ÁàíêÐåêâ ÍîìåðÑ÷åòà=" & Chr(34) & gruz_polych_num_scheta & Chr(34) & ">"
- file_l.WriteLine "<ÑâÁàíê ÍàèìÁàíê=" & Chr(34) & gruz_polych_namebank & Chr(34) & " ÁÈÊ=" & Chr(34) & gruz_polych_bik & Chr(34) & " ÊîðÑ÷åò=" & Chr(34) & gruz_polych_kor_sch & Chr(34) & " />"
- file_l.WriteLine "</ÁàíêÐåêâ>"
- file_l.WriteLine "</ÃðóçÏîëó÷>"
- nameovk = "Ðîññèéñêèé ðóáëü"
- ÍàèìÄîêÎòãð = "Ðåàëèçàöèÿ (àêò, íàêëàäíàÿ, ÓÏÄ)"
- numdok_otgr = xl_upd.Range("S11") '"ï/ï 1 - 6 ¹ 32501"
- date_dok_otgr = xl_upd.Range("w11") '"25.03.2024"
- file_l.WriteLine "<ÑâÏîêóï>"
- file_l.WriteLine "<ÈäÑâ>"
- file_l.WriteLine "<ÑâÞËÓ÷ ÍàèìÎðã=" & Chr(34) & name_org & Chr(34) & " ÈÍÍÞË=" & Chr(34) & innul & Chr(34) & " ÊÏÏ=" & Chr(34) & kpp & Chr(34) & " />"
- file_l.WriteLine "</ÈäÑâ>"
- file_l.WriteLine "<Àäðåñ>"
- file_l.WriteLine "<ÀäðÈíô ÊîäÑòð=" & Chr(34) & kod_str & Chr(34) & " ÀäðÒåêñò=" & Chr(34) & adress_txt & Chr(34) & " />"
- file_l.WriteLine "</Àäðåñ>"
- file_l.WriteLine "<ÁàíêÐåêâ ÍîìåðÑ÷åòà=" & Chr(34) & num_scheta & Chr(34) & ">"
- file_l.WriteLine "<ÑâÁàíê ÍàèìÁàíê=" & Chr(34) & namebank & Chr(34) & " ÁÈÊ=" & Chr(34) & bik & Chr(34) & " ÊîðÑ÷åò=" & Chr(34) & korr_num & Chr(34) & " />"
- file_l.WriteLine "</ÁàíêÐåêâ>"
- file_l.WriteLine "</ÑâÏîêóï>"
- file_l.WriteLine "<ÄîïÑâÔÕÆ1 ÍàèìÎÊÂ=" & Chr(34) & nameovk & Chr(34) & " />"
- file_l.WriteLine "<ÄîêÏîäòâÎòãð ÍàèìÄîêÎòãð=" & Chr(34) & numdok_otgr & Chr(34) & " ÍîìÄîêÎòãð=" & Chr(34) & numdok_otgr & Chr(34) & " ÄàòàÄîêÎòãð=" & Chr(34) & date_dok_otgr & Chr(34) & " />"
- file_l.WriteLine "</ÑâÑ÷Ôàêò>"
- '---òàáë òîâàðîâ
- file_l.WriteLine "<ÒàáëÑ÷Ôàêò>"
- sum_kol_vo_tov = 0
- For ii = 15 To poz_vsego
- '--- áëîê ïî òîâàðó
- n_str = xl_upd.Range("q" & ii) '"6"
- name_tov = xl_upd.Range("r" & ii) '"Ïðîñòûíÿ Íî÷ü Íåæíà Ãðàíü (ñåðûé) îñí. 7352-2 Ïîïëèí ÅÂÐÎ 240õ215 ïîëîñà íîâàÿ"
- tov_price = xl_upd.Range("W" & ii) '"23"
- okey_tov = xl_upd.Range("T" & ii) '"786"
- kol_vo_tov = (Val(xl_upd.Range("V" & ii))) '"4.0"
- tek_bez_nds = CStr(xl_upd.Range("X" & ii)) '"999999.99"
- Nalst = CStr(xl_upd.Range("Z" & ii)) '"20%"
- St_tov_ych_nal = CStr(xl_upd.Range("AB" & ii)) '"999999.99"
- sum_nal_tek = CStr(Val(xl_upd.Range("AA" & ii))) '"3424"
- tek_akcis = xl_upd.Range("Y" & ii)
- kod_proisx = "643"
- num_td = "-"
- PrtovRab = "1"
- Kod_tek_tov = xl_upd.Range("P" & ii) '"4660056137608"
- Name_ed_izm = "øò."
- KrnameCountry = "ÐÎÑÑÈß"
- sum_kol_vo_tov = sum_kol_vo_tov + kol_vo_tov
- file_l.WriteLine "<ÑâåäÒîâ ÍîìÑòð=" & Chr(34) & n_str & Chr(34) & " ÍàèìÒîâ=" & Chr(34) & name_tov & Chr(34) & " ÎÊÅÈ_Òîâ=" & Chr(34) & okey_tov & Chr(34) & " ÊîëÒîâ=" & Chr(34) & kol_vo_tov & Chr(34) & " ÖåíàÒîâ=" & Chr(34) & tov_price & Chr(34) & " ÑòÒîâÁåçÍÄÑ=" & Chr(34) & tek_bez_nds & Chr(34) & " ÍàëÑò=" & Chr(34) & Nalst & Chr(34) & " ÑòÒîâÓ÷Íàë=" & Chr(34) & St_tov_ych_nal & Chr(34) & ">"
- file_l.WriteLine "<Àêöèç>"
- file_l.WriteLine "<ÁåçÀêöèç>" & tek_akcis & "</ÁåçÀêöèç>"
- file_l.WriteLine "</Àêöèç>"
- file_l.WriteLine "<ÑóìÍàë>"
- file_l.WriteLine "<ÑóìÍàë>" & sum_nal_tek & "</ÑóìÍàë>"
- file_l.WriteLine "</ÑóìÍàë>"
- file_l.WriteLine "<ÑâÒÄ ÊîäÏðîèñõ=" & Chr(34) & kod_proisx & Chr(34) & " ÍîìåðÒÄ=" & Chr(34) & num_td & Chr(34) & " />"
- file_l.WriteLine "<ÄîïÑâåäÒîâ ÏðÒîâÐàá=" & Chr(34) & PrtovRab & Chr(34) & " ÊîäÒîâ=" & Chr(34) & Kod_tek_tov & Chr(34) & " ÍàèìÅäÈçì=" & Chr(34) & Name_ed_izm & Chr(34) & " ÊðÍàèìÑòðÏð=" & Chr(34) & KrnameCountry & Chr(34) & ">"
- file_l.WriteLine "<ÍîìÑðåäÈäåíòÒîâ>"
- For jj = 15 To poz_vsego_first
- If Kod_tek_tov = xl_first.Range("I" & jj) Then
- tek_ch_zn = CStr(xl_first.Range("a" & jj))
- tek_ch_zn = Mid(tek_ch_zn, 1, 31)
- tek_ch_zn = Rep_all(tek_ch_zn)
- file_l.WriteLine "<ÊÈÇ>" & tek_ch_zn & "</ÊÈÇ>"
- End If
- Next jj
- file_l.WriteLine "</ÍîìÑðåäÈäåíòÒîâ>"
- file_l.WriteLine "</ÄîïÑâåäÒîâ>"
- zn_tved = "<>"
- zn_shtrh = Kod_tek_tov '"4660056137608"
- file_l.WriteLine "<ÈíôÏîëÔÕÆ2 Èäåíòèô=" & Chr(34) & "òíâýä" & Chr(34) & " Çíà÷åí=" & Chr(34) & zn_tved & Chr(34) & " />"
- file_l.WriteLine "<ÈíôÏîëÔÕÆ2 Èäåíòèô=" & Chr(34) & "ID òîâàðà" & Chr(34) & " Çíà÷åí=" & Chr(34) & zn_shtrh & Chr(34) & " />"
- t = zn_shtrh
- file_l.WriteLine "<ÈíôÏîëÔÕÆ2 Èäåíòèô=" & Chr(34) & "øòðèõêîä" & Chr(34) & " Çíà÷åí=" & Chr(34) & mDU(t) & Chr(34) & " />"
- file_l.WriteLine "</ÑâåäÒîâ>"
- 'end--- áëîê ïî òîâàðó
- Next ii
- '--------áëîê âñåãî
- 'poz_vsego
- sttov_bez_nds_all = xl_upd.Range("X" & poz_vsego + 1) '"999999.99"
- Sttov_ych_nal_all = xl_upd.Range("AB" & poz_vsego + 1) '"999999.99"
- Sum_nal = xl_upd.Range("AA" & poz_vsego)
- If Sum_nal <> "" Then
- str_Sum_nal = CStr(Val(Sum_nal)) ' "999999.99"
- Else
- str_Sum_nal = "0"
- End If
- kol_netto_all = CStr(Round(Val(sum_kol_vo_tov), 2)) ' "31"
- file_l.WriteLine "<ÂñåãîÎïë ÑòÒîâÁåçÍÄÑÂñåãî=" & Chr(34) & sttov_bez_nds_all & Chr(34) & " ÑòÒîâÓ÷ÍàëÂñåãî=" & Chr(34) & Sttov_ych_nal_all & Chr(34) & ">"
- file_l.WriteLine "<ÑóìÍàëÂñåãî>"
- file_l.WriteLine "<ÑóìÍàë>" & Chr(34) & str_Sum_nal & Chr(34) & "</ÑóìÍàë>"
- file_l.WriteLine "</ÑóìÍàëÂñåãî>"
- file_l.WriteLine "<ÊîëÍåòòîÂñ>" & Chr(34) & kol_netto_all & Chr(34) & "</ÊîëÍåòòîÂñ>"
- file_l.WriteLine "</ÂñåãîÎïë>"
- file_l.WriteLine "</ÒàáëÑ÷Ôàêò>"
- '------<ÑâÏðîäÏåð>
- file_l.WriteLine "<ÑâÏðîäÏåð>"
- file_l.WriteLine "<ÑâÏåð ÑîäÎïåð=" & Chr(34) & "Òîâàðû ïåðåäàíû, ðàáîòû ñäàíû, óñëóãè îêàçàíû" & Chr(34) & ">"
- type_zak_doc = xl_nastr.Range("B9") ' "Çàêàç êëèåíòà"
- nom_osn = xl_nastr.Range("B10") '"19101"
- date_osn = xl_nastr.Range("B11") '"21.03.2024"
- file_l.WriteLine "<ÎñíÏåð ÍàèìÎñí=" & Chr(34) & type_zak_doc & Chr(34) & " ÍîìÎñí=" & Chr(34) & nom_osn & Chr(34) & " ÄàòàÎñí=" & Chr(34) & date_osn & Chr(34) & " />"
- If (type_zak_doc <> "") Or (nom_osn <> "") Or (date_osn <> "") Then
- file_l.WriteLine "<ÑâËèöÏåð>"
- dolg_prod = xl_nastr.Range("B12") '"Äèðåêòîð"
- p_fio_fio = xl_nastr.Range("B13") '"Êóïðèíà"
- p_fio_name = xl_nastr.Range("B14") '"Îëüãà"
- p_fio_otch = xl_nastr.Range("B15") '"Ñòàíèñëàâîâíà"
- file_l.WriteLine "<ÐàáÎðãÏðîä Äîëæíîñòü=" & Chr(34) & dolg_prod & Chr(34) & ">"
- file_l.WriteLine "<ÔÈÎ Ôàìèëèÿ=" & Chr(34) & p_fio_fio & Chr(34) & " Èìÿ=" & Chr(34) & p_fio_name & Chr(34) & " Îò÷åñòâî=" & Chr(34) & p_fio_otch & Chr(34) & " />"
- file_l.WriteLine "</ÐàáÎðãÏðîä>"
- file_l.WriteLine "</ÑâËèöÏåð>"
- file_l.WriteLine "</ÑâÏåð>"
- End If
- file_l.WriteLine "</ÑâÏðîäÏåð>"
- '------Ïîäïèñàíò
- Status = "1"
- osnPoln = "Äîëæíîñòíûå îáÿçàííîñòè"
- oblpoln = "6"
- file_l.WriteLine "<Ïîäïèñàíò ÎñíÏîëí=" & Chr(34) & osnPoln & Chr(34) & " ÎáëÏîëí=" & Chr(34) & oblpoln & Chr(34) & " Ñòàòóñ=" & Chr(34) & Status & Chr(34) & ">"
- innul = prod_innul ' "3702148437"
- dolgn = xl_nastr.Range("B16") '"Ñîòðóäíèê"
- If dolgn <> "" Then
- nameorg = prod_name_org '"ÎÎÎ "ÀËÜÔÀ-ÒÐÅÉÄ""
- file_l.WriteLine "<ÞË ÈÍÍÞË=" & Chr(34) & innul & Chr(34) & " Äîëæí=" & Chr(34) & dolgn & Chr(34) & " ÍàèìÎðã=" & Chr(34) & nameorg & Chr(34) & ">"
- fio_f = xl_nastr.Range("B17") '"Áàííîâà"
- fio_name = xl_nastr.Range("B18") '"Àííà"
- fio_otch = xl_nastr.Range("B19") '"Âëàäèìèðîâíà"
- file_l.WriteLine "<ÔÈÎ Ôàìèëèÿ=" & Chr(34) & fio_f & Chr(34) & " Èìÿ=" & Chr(34) & fio_name & Chr(34) & " Îò÷åñòâî=" & Chr(34) & fio_otch & Chr(34) & " />"
- file_l.WriteLine "</ÞË>"
- End If
- file_l.WriteLine "</Ïîäïèñàíò"
- file_l.WriteLine "</Äîêóìåíò>"
- file_l.WriteLine "</Ôàéë>"
- file_l.Close
- Set file_l = Nothing
- xl_osn.Save
- wbs.Close SaveChanges:=False
- MsgBox ("Ãîòîâî")
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement