%
'
'
Function KeihiRoumuhiKanrihyo(EnshuCD, KaisyaCD, SyohinCD, SyohinKubun, Kubun, AutoFlg, PrintFlg)
Dim RowBreakNum, RowCount
Dim Page
RowCount = 0
If PrintFlg = 1 Then
RowBreakNum = 30
Else
RowBreakNum = MaxRowBreakNum
MaxPage = 1
End If
Dim Shohinmei , ShohinRyakumei '商品名称、商品略名称
Dim HanbaiTanka , ShireTnanka , UnsoTanka '標準販売単価、標準仕入単価、運送費単価
Dim SokoryoTanka , Jyuryo , Yoseki '倉庫料単価、重量、容積
Dim Bikou '備考
Dim GazoFile
Dim Tani
Dim Lot
Dim ShijyoCD, SyoyuKaisyaCD
Dim ii
Dim Query
Dim Content
Dim Title
If SyohinKubun = "Z" Then
Title = "材料"
Else
Title = "商品"
End If
Dim Label
Label = "経費"
Dim LabelSep
LabelSep = "経 費"
If Kubun <> "K" Then
Label = "労務費"
LabelSep = "労 務 費"
End If
Dim GakuseiBango
If Session(HomeAlias & "EnshuKubun") = "P" AND GB_JisyaFlag = "0" Then
Else
GakuseiBango = GB_GakuseiNo
End If
'演習名称GET
' Dim EnshuName
' EnshuName = ConvEnshuMeisyo(EnshuCD)
If SyohinCD <> "" Then
Query = "exec SPM" & Title & "取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & SyohinCD & "'"
Set Content = OpenQuery(Query)
If Not(Content.BOF Or Content.EOF) Then
ShijyoCD = Content.Fields("市場CD")
Shohinmei = Content.Fields("" & Title & "名称")
ShohinRyakumei = Content.Fields("" & Title & "略名称")
HanbaiTanka = Content.Fields("標準販売単価")
ShireTnanka = Content.Fields("標準仕入単価")
UnsoTanka = Content.Fields("運送料単価")
SokoryoTanka = Content.Fields("倉庫料単価")
Jyuryo = Content.Fields("" & Title & "重量")
Yoseki = Content.Fields("" & Title & "容積")
Bikou = Content.Fields("備考")
GazoFile = Content.Fields("画像ファイル")
Tani = Content.Fields("単位")
Lot = Content.Fields("ロット")
SyoyuKaisyaCD = Content.Fields("所有会社CD")
End If
End If
Dim jj,tmps
'改ページでリセットされないよう此処で取得する
Dim GokeiKingaku
Query = "exec SPM経費労務費取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & KaisyaCD & "', '" & SyohinKubun & "', '" & SyohinCD & "', '" & Kubun & "'"
Set Content = OpenQuery(Query)
GokeiKingaku = 0
'存在しなければ入力フォームに飛ぶ
If (Content.BOF Or Content.EOF) Then
Response.Redirect("fd_keihiroumuhi.asp?PageType=SeizoBu&SyohinCD=" & SyohinCD & "&SyohinKubun=" & SyohinKubun & "&Mode=KeihiRoumuhi" & "&Kubun=" & Kubun)
End If
For Page = 1 To MaxPage
If Page <> 1 Then
Response.Write(PageBreakBefore)
End If
%>
<%
If PrintFlg = 1 Then
Response.Write(PrintHeader1(AutoFlg))
End if
%>
 |
|
|
<% = Title %>名: |
<% = Shohinmei %> |
ロット: |
<% = Lot %><% = Tani %> |
|
|
|
|
<% If PrintFlg = 0 Then %>
276<% Else %>301<% End If %>px; z-index:1; border: 1px none #000000; overflow: auto;">
<% End If %>
<%
Do While Not(Content.BOF Or Content.EOF)
%>
<% = Content.Fields("摘要") %>
| <% = SetMoney(Content.Fields("金額"), false, true) %> |
<%
GokeiKingaku = GokeiKingaku + Content.Fields("金額")
RowCount = RowCount + 1
Content.MoveNext
'ページ上限を超えたらDoループを抜ける
If (RowCount Mod RowBreakNum = 0) Then
Exit Do
End If
Loop
For jj = RowCount + 1 To Max(12, Max(RowBreakNum, (Int((RowCount - 1) / RowBreakNum) + 1) * RowBreakNum) * PrintFlg)
' For ii = RowCnt To 11 - 1
%>
|
|
<%
Next
%>
<% If PrintFlg = 0 Then %>
<% End If %>
|
|
<% = Label %>合計 |
<% = SetMoney(GokeiKingaku, false, true) %> |
|
 |
|
<%
If PrintFlg > 0 Then
Response.Write(PrintFooter())
End if
%>
|
<%
If (Content.BOF Or Content.EOF) Then
Exit For
End If
Next
%>
<%
End Function
%>