<% ' ' ' %> <% main() Sub main() Dim i Dim PageType PageType = Request("PageType") MaxPage = 100 Dim Mode Mode = Request("Mode") Dim ShijoCD ShijoCD = Request("ShijoCD") Dim SyohinCD2 Dim SyohinKubun SyohinCD2 = Request("SyohinCD") SyohinKubun = Request("SyohinKubun") Dim GenkaKaikeiRiyo Dim ShohizeiMode ShohizeiMode = TaxRateSelection 'include_stasicのグローバル変数 Query = "exec SPM演習取得 '" & GB_SystemCD & "','" & EnshuCD & "'" Set Content = OpenQuery(Query) If Not(Content.BOF Or Content.EOF) Then GenkaKaikeiRiyo = "" & Content.Fields("原価会計利用") If Content.Fields("消費税") <= 0 Then ShohizeiMode = 0 '内税の場合は消費税率マスタ非利用に上書き End If End If %> <% = HtmlHeader("") %> <% = PrintScriptX %> <% Dim Title If Mode = "Zairyo" Then Title = "材料" Else Title = "商品" End If Dim RowBreakNum, RowCount Dim Page If PackageMode = "1" Then RowBreakNum = 30 Else RowBreakNum = 5 End If RowCount = 0 Dim Query Dim Content Dim ii, jj ii = 0 Query = "exec SPM" & Title & "一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & GB_GakuseiNo & "'" Set Content = OpenQuery(Query) For Page = 1 To MaxPage If Page <> 1 Then Response.Write(PageBreakBefore) End If %>
<% Response.Write(PrintHeader(0, Title & "マスター")) %> <% 'PackageMode = "1" %> <% 'TaxRateSelection = 0 %> <% If PackageMode = "1" Then %> <% If ShohizeiMode = 1 Then %> <% End If %> <% End If %> <% Dim ImageFile, Tani Dim Lot Dim SyohinCD, Shohinmei , ShohinRyakumei '商品コード、商品名称、商品略名称 Dim HanbaiTanka , ShireTnanka , UnsoTanka '標準販売単価、標準仕入単価、運送費単価 Dim SokoryoTanka , Jyuryo , Yoseki '倉庫料単価、重量、容積 Dim Bikou '備考 Dim ShijyoCD, SyoyuKaisyaRyakuMeisyo, SyoyuKaisyaCD '市場コード、所有会社略名、所有会社コード Dim TaxRate Dim ShijyoA, ShijyoB Dim iiDef ii = 0 iiDef = -1 Dim LoopFlg If Mode = "BuhinTenkai" Then 'LoopFlg = 2 LoopFlg = 1 '多段製造機能は廃止。部品展開・経費労務費の対象は製品のみ。 Else LoopFlg = 1 End If For jj = 1 To LoopFlg If jj = 2 Then Title = "材料" End If ' Query = "exec SPM" & Title & "一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & GB_GakuseiNo & "'" ' Set Content = OpenQuery(Query) 'Response.Write(Query) 'Exit Sub Do While Not(Content.BOF Or Content.EOF) If ShijoCD = "" Or "" & Content.Fields("市場CD") = ShijoCD Or (ShijoCD = "higenteietnegih" And "" & Content.Fields("市場CD") = "") Then If Mode <> "BuhinTenkai" Or (SyohinKubun = "S" And Title = "商品") Or (SyohinKubun = "Z" And Title = "材料") Then If SyohinCD2 = Content.Fields("" & Title & "CD") Then iiDef = ii End If End If SyohinCD = Content.Fields("" & Title & "CD") If GB_GakuseiNo <> "" Then SyohinCD = Replace(SyohinCD, "-" & GB_GakuseiNo, "") End If Shohinmei = Content.Fields("" & Title & "名称") ShohinRyakumei = Content.Fields("" & Title & "略名称") HanbaiTanka = ConvIntToMoney(Content.Fields("標準販売単価"),false,false) ShireTnanka = ConvIntToMoney(Content.Fields("標準仕入単価"),false,false) UnsoTanka = ConvIntToMoney(Content.Fields("運送料単価"),false,false) SokoryoTanka = ConvIntToMoney(Content.Fields("倉庫料単価"),false,false) Jyuryo = ConvIntToMoney(Content.Fields("" & Title & "重量"),false,false) Yoseki = ConvIntToMoney(Content.Fields("" & Title & "容積"),false,false) Bikou = Content.Fields("備考") ImageFile = "" If Content.Fields("画像ファイル") <> "" Then ImageFile = Fgoods & "/" & EnshuCD & "/" & Content.Fields("画像ファイル") End If Tani = Content.Fields("単位") Lot = Content.Fields("ロット") ShijyoCD = Content.Fields("市場CD") SyoyuKaisyaRyakuMeisyo = Content.Fields("所有会社略名称") SyoyuKaisyaCD = Content.Fields("所有会社CD") TaxRate = Content.Fields("標準消費税率") If ShijyoCD <> "" Then ShijyoA = "市場" ShijyoB = "" & Content.Fields("市場名称") If ShijyoB = "" Then 'ShijyoB = "設定された
市場が存在
しません
" ShijyoB = "市場コード
[ " & ShijyoCD & " ]
の市場が
存在しません
" End If Else ShijyoA = "製造会社" ShijyoB = SyoyuKaisyaRyakuMeisyo End If '製造部では自社企画及びマスターを表示 '商品企画室では自社商品のみ表示 ' If (PageType <> "Original" And PageType <> "SeizoBu") Or (PageType = "SeizoBu" And (SyoyuKaisyaCD = KaisyaCD Or SyoyuKaisyaCD = "")) Or (PageType = "Original" And SyoyuKaisyaCD = KaisyaCD) Then '製造部・商品企画室では自社商品・材料のみ表示 If (PageType <> "Original" And PageType <> "SeizoBu") Or ((PageType = "SeizoBu" Or PageType = "Original") And SyoyuKaisyaCD = KaisyaCD) Then RowCount = RowCount + 1 Response.Write("" & vbCrLf) If PackageMode = "1" Then %> <% If ShohizeiMode = 1 Then %> <% End If Else %> <% End If Response.Write("") ii = ii + 1 End If End If Content.MoveNext If RowCount <> 0 And (RowCount Mod RowBreakNum = 0) Then '終端判定のため次の同一市場商品が発生するまで行送りする(市場限定の場合) Do While Not(Content.BOF Or Content.EOF) If ShijoCD = "" Or "" & Content.Fields("市場CD") = ShijoCD Or (ShijoCD = "higenteietnegih" And "" & Content.Fields("市場CD") = "") Then Exit Do End If Content.MoveNext Loop Exit Do End If Loop Next %>
<% = Title %>CD <% = Title %>名称 <% = Title %>略名称 <% If MHMSTDSELLPRICE <> "" Then Response.Write(MHMSTDSELLPRICE) Else Response.Write("標準販売単価") End If %>標準税率
<% = SyohinCD %>  <% = Shohinmei %>   <%= ShohinRyakumei %>   <% = HanbaiTanka %>  <% = TaxRate %> % 
<% = Title %>CD <% = Title %>名称 <% = Title %>略名称 <% = ShijyoA %>
<% = SyohinCD %> <% = HardWrap(Shohinmei) %> <%= ShohinRyakumei %> <% = ShijyoB %>
<% = Title %>画像
<% If ImageFile <> "" Then %><% Else %> <% End If %>
<% If ShohizeiMode = 1 Then %> <% End If %> <% If PageType = "SeizoBu" Then %> <% End If %> <% If ShohizeiMode = 1 Then %> <% End If %> <% If PageType = "SeizoBu" Then %> <% End If %>
<% If MHMSTDSELLPRICE <> "" Then Response.Write(MHMSTDSELLPRICE) Else Response.Write("標準販売単価") End If %>税率標準仕入単価 運送料単価 倉庫料単価 <% = Title %>重量 <% = Title %>容積 単位ロット
<% = HanbaiTanka %><% = TaxRate %><% = ShireTnanka %> <% = UnsoTanka %> <% = SokoryoTanka %> <% = Jyuryo %> <% = Yoseki %> <% = Tani %><% = Lot %>
備考 <% = Bikou %>
<% Response.Write(PrintFooter()) %>
<% If (Content.BOF Or Content.EOF) Then Exit For End If Next %> <% End Sub %>