<% Dim WK_Zandaka_KanjyoCD() Dim WK_Zandaka_KanjyoName() Dim WK_Zandaka_KariKingaku() Dim WK_Zandaka_KashiKingaku() Dim WK_Zandaka_KanjyoKubun() Dim WK_Zandaka_TaisyakuKubun() Dim WK_Zandaka_SyukeiCD() Dim ShowCount, MaxCount Dim CSVOutput ' ' %> <% main() Sub main() Dim EnshuName, HyojiJyoken Dim Query Dim Content Dim ErrMsg If Not(SessionCheck()) Then Exit Sub End If Dim Joken Joken = Request("Joken") Dim Addr, AutoFlg Dim tmp Dim KaisyaCD, GakuseiNo, BunsyoSyuruiCD, BunsyoNaiyoCD Dim Param1, Param2 Dim KaisyaSelect KaisyaCD = Request("KaisyaCD") GakuseiNo = Request("GakuseiNo") BunsyoSyuruiCD = Request("BunsyoSyuruiCD") BunsyoNaiyoCD = Request("BunsyoNaiyoCD") Dim SakuseiKaisyaCD 'サイバー会計では自社のみ表示(091015小野)※廃止 'If KaisyaCD = "///" Or PackageMode = 1 Then If KaisyaCD = "///" Then Query = "exec SPM会社全部一覧 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & GakuseiNo & "'" Set Content = OpenQuery(Query) Do While Not(Content.BOF Or Content.EOF) If "" & Content.Fields("自社フラグ") = "1" Then KaisyaCD = Content.Fields("会社CD") Exit Do End If Content.MoveNext Loop End If AutoFlg = 0 If InStr(BunsyoSyuruiCD, ",") > 0 then tmp = Split(BunsyoSyuruiCD, ",") BunsyoSyuruiCD = tmp(0) AutoFlg = tmp(1) End If If InStr(BunsyoNaiyoCD, ",") > 0 then tmp = Split(BunsyoNaiyoCD, ",") SakuseiKaisyaCD = tmp(0) BunsyoNaiyoCD = tmp(1) End If If SakuseiKaisyaCD = "" Then SakuseiKaisyaCD = KaisyaCD End If Param1 = Request("Param1") Param2 = Request("Param2") KaisyaSelect = KaisyaCD If KaisyaCD = "///" Then Query = "exec SPM選択可能会社取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & GakuseiNo & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then KaisyaCD = Content.Fields("選択会社CD") End If End If Dim EnshuKubunmei EnshuKubunmei = GetEnshuParam(EnshuCD, "演習区分") Dim PrevKaisyaCD, NextKaisyaCD, PrevGakuseiNo, NextGakuseiNo, PrevBunsyoSyuruiCD, NextBunsyoSyuruiCD, PrevBunsyoNaiyoCD, NextBunsyoNaiyoCD Dim PrevAutoFlg, NextAutoFlg Dim KaisyaMeisyo, KaisyaRyakuMeisyo, GakuseiShimei, BunsyoMeisyo Dim bFlg Query = "exec SPM会社全部一覧 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & GakuseiNo & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then NextKaisyaCD = Content.Fields("会社CD") End If Do While Not(Content.BOF Or Content.EOF) If Content.Fields("会社CD") = KaisyaCD Then KaisyaMeisyo = Content.Fields("会社名称") KaisyaRyakuMeisyo = Content.Fields("会社略名称") Content.MoveNext If Not(Content.BOF Or Content.EOF) Then NextKaisyaCD = Content.Fields("会社CD") End If Exit Do End If PrevKaisyaCD = Content.Fields("会社CD") Content.MoveNext Loop If PrevKaisyaCD = "" Then If Not(Content.BOF Or Content.EOF) Then Content.MoveFirst End If Do While Not(Content.BOF Or Content.EOF) PrevKaisyaCD = Content.Fields("会社CD") Content.MoveNext Loop End If Dim RiyoDenpyoSu Dim SeizobuRiyo Dim InputShiwaketyoKyuVersionRiyo Query = "exec SPM演習取得 '" & GB_SystemCD & "', '" & EnshuCD & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then Session(HomeAlias & "EnshuMeisyo") = Content.Fields("演習名称") RiyoDenpyoSu = Content.Fields("利用伝票数区分") InputShiwaketyoKyuVersionRiyo = Content.Fields("手入力仕訳帳旧バージョン利用") SeizobuRiyo = "" & Content.Fields("原価会計利用") '会計開始日・終了日をセット(合計残高試算表のFromToフォームのため) GB_KaikeiKaishibi = "" & Content.Fields("会計開始日") GB_KaikeiSyuryobi = "" & Content.Fields("会計終了日") end If EnshuMeisyo = Session(HomeAlias & "EnshuMeisyo") Query = "exec SPMユーザー取得 '" & GB_SystemCD & "', '" & GakuseiNo & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then Session(HomeAlias & "GakuseiShimei") = Content.Fields("氏名") end If Session(HomeAlias & "KaisyaRyakuMeisyo") = KaisyaRyakuMeisyo Session(HomeAlias & "GakuseiNo") = GakuseiNo Session(HomeAlias & "EnshuCD") = EnshuCD Session(HomeAlias & "KaisyaCD") = KaisyaCD Query = "exec SPM演習選択ユーザー一覧 '" & GB_SystemCD & "','" & EnshuCD & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then NextGakuseiNo = Content.Fields("学生番号") End If Do While Not(Content.BOF Or Content.EOF) If Content.Fields("学生番号") = GakuseiNo Then GakuseiShimei = Content.Fields("氏名") Content.MoveNext If Not(Content.BOF Or Content.EOF) Then NextGakuseiNo = Content.Fields("学生番号") End If Exit Do End If PrevGakuseiNo = Content.Fields("学生番号") Content.MoveNext Loop If PrevGakuseiNo = "" Then If Not(Content.BOF Or Content.EOF) Then Content.MoveFirst End If Do While Not(Content.BOF Or Content.EOF) PrevGakuseiNo = Content.Fields("学生番号") Content.MoveNext Loop End If Query = "exec SPR文書種類一覧 '" & GB_SystemCD & "'" 'TC9文書種類Mから「順序」列ソートで抜き出すだけ Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then If Left(Content.Fields("文書種類CD"),1) <> "X" Then '契約書は除外 NextBunsyoSyuruiCD = Content.Fields("文書種類CD") NextAutoFlg = Content.Fields("自動フラグ") End If End If Do While Not(Content.BOF Or Content.EOF) If Left(Content.Fields("文書種類CD"),1) <> "X" Then '契約書は除外 If Content.Fields("文書種類CD") = BunsyoSyuruiCD And Content.Fields("自動フラグ") = AutoFlg Then BunsyoMeisyo = Content.Fields("文書名称") Content.MoveNext If Not(Content.BOF Or Content.EOF) And Left(Content.Fields("文書種類CD"),1) <> "X" Then '契約書は除外 NextBunsyoSyuruiCD = Content.Fields("文書種類CD") NextAutoFlg = Content.Fields("自動フラグ") End If Exit Do End If PrevBunsyoSyuruiCD = Content.Fields("文書種類CD") PrevAutoFlg = Content.Fields("自動フラグ") End If Content.MoveNext Loop If PrevBunsyoSyuruiCD = "" Then If Not(Content.BOF Or Content.EOF) Then Content.MoveFirst End If Do While Not(Content.BOF Or Content.EOF) If Left(Content.Fields("文書種類CD"),1) <> "X" Then '契約書は除外 PrevBunsyoSyuruiCD = Content.Fields("文書種類CD") PrevAutoFlg = Content.Fields("自動フラグ") End If Content.MoveNext Loop End If ' If Not(Content.BOF Or Content.EOF) Then ' NextBunsyoSyuruiCD = Content.Fields("文書種類CD") ' NextAutoFlg = Content.Fields("自動フラグ") ' End If ' Do While Not(Content.BOF Or Content.EOF) ' If Content.Fields("文書種類CD") = BunsyoSyuruiCD And Content.Fields("自動フラグ") = AutoFlg Then ' BunsyoMeisyo = Content.Fields("文書名称") ' Content.MoveNext ' If Not(Content.BOF Or Content.EOF) Then ' NextBunsyoSyuruiCD = Content.Fields("文書種類CD") ' NextAutoFlg = Content.Fields("自動フラグ") ' End If ' Exit Do ' End If ' PrevBunsyoSyuruiCD = Content.Fields("文書種類CD") ' PrevAutoFlg = Content.Fields("自動フラグ") ' Content.MoveNext ' Loop ' If PrevBunsyoSyuruiCD = "" Then ' If Not(Content.BOF Or Content.EOF) Then ' Content.MoveFirst ' End If ' Do While Not(Content.BOF Or Content.EOF) ' PrevBunsyoSyuruiCD = Content.Fields("文書種類CD") ' PrevAutoFlg = Content.Fields("自動フラグ") ' Content.MoveNext ' Loop ' End If Query = "exec SPR文書番号一覧 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & KaisyaCD & "', '" & KaisyaCD & "', '" & BunsyoSyuruiCD & "', '" & AutoFlg & "', '" & GakuseiNo & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then NextBunsyoNaiyoCD = Content.Fields("文書内容CD") If BunsyoSyuruiCD = "TY" Or BunsyoSyuruiCD = "TK" Or BunsyoSyuruiCD = "TG" Then NextBunsyoNaiyoCD = Content.Fields("作成会社CD") & "," & NextBunsyoNaiyoCD '小切手・約束手形・為替手形の場合は作成会社CDを付加(061124小野) End If End If Do While Not(Content.BOF Or Content.EOF) If Content.Fields("文書内容CD") = BunsyoNaiyoCD Then Content.MoveNext If Not(Content.BOF Or Content.EOF) Then NextBunsyoNaiyoCD = Content.Fields("文書内容CD") If BunsyoSyuruiCD = "TY" Or BunsyoSyuruiCD = "TK" Or BunsyoSyuruiCD = "TG" Then NextBunsyoNaiyoCD = Content.Fields("作成会社CD") & "," & NextBunsyoNaiyoCD '小切手・約束手形・為替手形の場合は作成会社CDを付加(061124小野) End If End If Exit Do End If PrevBunsyoNaiyoCD = Content.Fields("文書内容CD") If BunsyoSyuruiCD = "TY" Or BunsyoSyuruiCD = "TK" Or BunsyoSyuruiCD = "TG" Then PrevBunsyoNaiyoCD = Content.Fields("作成会社CD") & "," & PrevBunsyoNaiyoCD '小切手・約束手形・為替手形の場合は作成会社CDを付加(061124小野) End If Content.MoveNext Loop If PrevBunsyoNaiyoCD = "" Then If Not(Content.BOF Or Content.EOF) Then Content.MoveFirst End If Do While Not(Content.BOF Or Content.EOF) PrevBunsyoNaiyoCD = Content.Fields("文書内容CD") If BunsyoSyuruiCD = "TY" Or BunsyoSyuruiCD = "TK" Or BunsyoSyuruiCD = "TG" Then PrevBunsyoNaiyoCD = Content.Fields("作成会社CD") & "," & PrevBunsyoNaiyoCD '小切手・約束手形・為替手形の場合は作成会社CDを付加(061124小野) End If Content.MoveNext Loop End If If KaisyaMeisyo = "" Then KaisyaMeisyo = KaisyaCD End If If KaisyaRyakuMeisyo = "" Then KaisyaRyakuMeisyo = KaisyaCD End If If GakuseiShimei = "" Then GakuseiShimei = GakuseiNo End If %> <% If 0=1 Then %> <% ' 損益計算書報告書 受取手形履歴 支払手形履歴 %> <% ElseIf AutoFlg = 1 And (BunsyoSyuruiCD = "LJ" Or BunsyoSyuruiCD = "MH" Or BunsyoSyuruiCD = "MI") Then %> <% = HtmlHeader("sj3tyoboblack") %> <% ' 損益計算書販売管理費一覧 現金入出金履歴 商品在庫 (移動平均法) (総平均法) 預金入出金履歴 入庫実績 出庫実績 %> <% ElseIf AutoFlg = 1 And (BunsyoSyuruiCD = "LK" Or BunsyoSyuruiCD = "MA" Or Left(BunsyoSyuruiCD, 2) = "MG" Or Left(BunsyoSyuruiCD, 2) = "MJ" Or Left(BunsyoSyuruiCD, 2) = "MK" Or Left(BunsyoSyuruiCD, 2) = "MB" Or Left(BunsyoSyuruiCD, 2) = "MC" Or Left(BunsyoSyuruiCD, 2) = "MD") Then %> <% = HtmlHeader("sj3tyoboblack11") %> <% ' 現金出納帳 仕入帳 売上帳 商品有高帳 当座預金出納帳 売掛金元帳 買掛金元帳 %> <% ElseIf Left(BunsyoSyuruiCD, 2) = "MA" Or Left(BunsyoSyuruiCD, 2) = "MC" Or Left(BunsyoSyuruiCD, 2) = "MD" Or Left(BunsyoSyuruiCD, 2) = "MG" Or Left(BunsyoSyuruiCD, 2) = "MB" Or Left(BunsyoSyuruiCD, 2) = "ME" Or Left(BunsyoSyuruiCD, 2) = "MF" Then %> <% = HtmlHeader("sj3tyobored11") %> <% ' (自動) 現金出納帳 仕入帳 売上帳 商品有高帳 当座預金出納帳 売掛金元帳 買掛金元帳 受取手形記入帳 支払手形記入帳 %> <% ElseIf Left(BunsyoSyuruiCD, 2) = "AA" Or Left(BunsyoSyuruiCD, 2) = "AH" Or Left(BunsyoSyuruiCD, 2) = "AG" Or Left(BunsyoSyuruiCD, 2) = "AI" Or Left(BunsyoSyuruiCD, 2) = "AB" Or Left(BunsyoSyuruiCD, 2) = "AC" Or Left(BunsyoSyuruiCD, 2) = "AD" Or Left(BunsyoSyuruiCD, 2) = "AE" Or Left(BunsyoSyuruiCD, 2) = "AF" Then %> <% = HtmlHeader("sj3tyobored11") %> <% ' 合計残高試算表 8桁精算表 仕訳集計表 仕訳帳 総勘定元帳 損益計算書 貸借対照表 %> <% ElseIf Left(BunsyoSyuruiCD, 2) = "LC" Or Left(BunsyoSyuruiCD, 2) = "LG" Or Left(BunsyoSyuruiCD, 2) = "LB" Or Left(BunsyoSyuruiCD, 2) = "LA" Or Left(BunsyoSyuruiCD, 2) = "LD" Or Left(BunsyoSyuruiCD, 2) = "LF" Or Left(BunsyoSyuruiCD, 2) = "LE" Then %> <% = HtmlHeader("sj3tyobored11") %> <% ' %> <% Else %> <% = HtmlHeader("sj3tyobored") %> <% End If %>
<% Response.Write(HtmlDesign(10)) Response.Write(HttpL1(4)) If GB_Admin = 2 Then Response.Write(HttpL2("運用管理メニュー" ,"tblbtn( '/" & HomeAlias & "/admin/admenu_w.asp')", "書類一覧", "", "", "", "", "", "", "", "", "")) Else Response.Write(HttpL2("運用管理メニュー" ,"tblbtn( '/" & HomeAlias & "/admin/admenu_w.asp')", "書類一覧", "", "" , "", "", "", "", "", "", "")) End If Response.Write(HttpL3("","" ,"", "", "", "", "", "", "", "", "", "", "", "", "", "")) ' Response.Write(HttpL3_1("印刷", "PrintoutReal()", "", "", "", "", "", "", "", "")) If PackageMode = 1 And EnshuKubunmei = "P" Then Response.Write(HttpL3_1("印刷", "PrintoutReal()", " 作成書類集計一覧 ", "tblbtn('fm_tyohyo_ichiran.asp?EnshuCD=" & EnshuCD & "&GakuseiNo=" & GakuseiNo & "&KaisyaCD=" & SakuseiKaisyaCD & "&BunsyoSyuruiCD=" & BunsyoSyuruiCD & "&Joken=" & Joken & "')", " 帳票一括印刷 ", "tblbtn('fm_print_ikkatsu.asp');", "", "", "", "")) Else Response.Write(HttpL3_1("印刷", "PrintoutReal()", " 作成書類集計一覧 ", "tblbtn('fm_tyohyo_ichiran.asp?EnshuCD=" & EnshuCD & "&GakuseiNo=" & GakuseiNo & "&KaisyaCD=" & SakuseiKaisyaCD & "&BunsyoSyuruiCD=" & BunsyoSyuruiCD & "&Joken=" & Joken & "')", " 帳票一括印刷 ", "tblbtn('fm_print_ikkatsu.asp');", "送信メール一覧", "tblbtn('fm_mail_ichiran.asp?EnshuCD=" & EnshuCD & "')", "", "")) End If Response.Write(HttpL3_2("", "", "", "", "", "", "", "", "", "")) Response.Write(HttpL4("書類一覧", "")) Response.Write(HttpL5(ErrMsg)) %> <% If EnshuCD <> "" And KaisyaCD <> "" And GakuseiNo <> "" And BunsyoSyuruiCD <> "" Then '印刷ボタン表示を条件分岐(061214小野) If BunsyoSyuruiCD = "LA" Or BunsyoSyuruiCD = "LC" Or BunsyoSyuruiCD = "LG" Or BunsyoSyuruiCD = "LE" Or BunsyoSyuruiCD = "LF" Or BunsyoSyuruiCD = "MA" Or BunsyoSyuruiCD = "MC" Or BunsyoSyuruiCD = "MD" Or BunsyoSyuruiCD = "MH" Or BunsyoSyuruiCD = "MI" Or BunsyoSyuruiCD = "LI" Or BunsyoSyuruiCD = "LJ" Or BunsyoSyuruiCD = "LK" Or BunsyoSyuruiCD = "AA" Or BunsyoSyuruiCD = "AB" Or BunsyoSyuruiCD = "AC" Or BunsyoSyuruiCD = "AD" Or BunsyoSyuruiCD = "AE" Or BunsyoSyuruiCD = "AF" Or BunsyoSyuruiCD = "AG" Or BunsyoSyuruiCD = "AH" Or BunsyoSyuruiCD = "AI" Or BunsyoNaiyoCD <> "" Then %>
<% End Sub %>