|
処理日 |
<% If BunsyoSyuruiCD <> "SC" Then %>
取引先 |
<% End If %>
商品 |
合計額 |
|
|
<%
Dim Query
Dim Content
Dim Query2
Dim Content2
Dim ii, jj
ii = 0
If SenpoFlg = 0 Then
Query = "exec SPD入出庫一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "', '" & KaisyaCD & "', '" & BunsyoSyuruiCD & "'"
Else
Query = "exec SPD入出庫一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "', '', '" & SenpoBunsyoSyuruiCD & "'"
End If
Set Content = OpenQuery(Query)
Do While Not(Content.BOF Or Content.EOF)
If SenpoFlg = 0 Or (SenpoFlg = 1 And Content.Fields("会社CD") <> Content.Fields("作成会社CD")) Then '先方文書一覧の場合は 会社CD<>作成会社CD に絞る
If Content.Fields("処理時期区分") <> 0 Then '期首繰越商品は除く
If Content.Fields("削除フラグ") = 0 And Content.Fields("返信フラグ") = 0 Then 'フラグが立っていないものに絞る
Dim TorihikisakiCD, SakuseiKaisyaCD
SakuseiKaisyaCD = Content.Fields("作成会社CD")
TorihikisakiCD = Content.Fields("取引先CD")
If InStr(RouteType, "Henpin") > 0 Then
Response.Write("" & vbCrLf)
ElseIf SenpoFlg = 0 Then
Response.Write(" " & vbCrLf)
Else
Dim Url
Url = "fd_nyusyukko.asp?BunsyoSyuruiCD=" & BunsyoSyuruiCD & "&SenpoBunsyoSyuruiCD=" & SenpoBunsyoSyuruiCD & "&SenpoBunsyoNaiyoCD=" & Content.Fields("文書内容CD") & "&SakuseiKaisyaCD=" & SakuseiKaisyaCD
Response.Write(" " & vbCrLf)
End If
Response.Write(" | " & vbCrLf)
Response.Write("" & Content.Fields("処理日") & " | " & vbCrLf)
If BunsyoSyuruiCD <> "SC" Then
If SenpoFlg = 0 Then
If TorihikisakiCD = "SJ4ADMIN" Then '小売販売表示
Response.Write("小売販売 | " & vbCrLf)
Else
Response.Write("" & Content.Fields("取引先略名称") & " | " & vbCrLf)
End If
Else
Response.Write("" & Content.Fields("作成会社略名称") & " | " & vbCrLf)
End If
End If
Dim TmpSyohin
TmpSyohin = ""
Dim TmpSoGokei
TmpSoGokei = 0
Dim SyohinEtc
SyohinEtc = 0
If SenpoFlg = 0 Then
Query2 = "exec SPD入出庫取得 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "', '" & KaisyaCD & "', '" & BunsyoSyuruiCD & "', '" & Content.Fields("文書内容CD") & "'"
Else
Query2 = "exec SPD入出庫取得 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "', '" & Content.Fields("作成会社CD") & "', '" & SenpoBunsyoSyuruiCD & "', '" & Content.Fields("文書内容CD") & "'"
End If
Set Content2 = OpenQuery(Query2)
Do While Not(Content2.BOF Or Content2.EOF)
If TmpSyohin = "" Then
TmpSyohin = ConvSyohinRyakuMeisyo(Content2.Fields("商品CD"))
ElseIf SyohinEtc = 0 Then
TmpSyohin = TmpSyohin & "、他"
SyohinEtc = 1
End If
TmpSoGokei = TmpSoGokei + (Content2.Fields("単価") * Content2.Fields("数量"))
Content2.MoveNext
Loop
Response.Write("" & TmpSyohin & " | " & vbCrLf)
Response.Write("" & ConvintToMoney(TmpSoGokei, false, false) & " | " & vbCrLf)
Response.Write("")
If Content.Fields("返信フラグ") = 1 Then
Response.Write("済")
End If
Response.Write(" | " & vbCrLf)
ii = ii + 1
End If
End If
End If
Response.Write(" ")
Content.MoveNext
Loop
For jj = ii To 15
Response.Write("" & vbCrLf)
Response.Write(" | " & vbCrLf)
Response.Write(" | " & vbCrLf)
If BunsyoSyuruiCD <> "SC" Then
Response.Write(" | " & vbCrLf)
End If
Response.Write(" | " & vbCrLf)
Response.Write(" | " & vbCrLf)
Response.Write(" | " & vbCrLf)
Response.Write(" ")
Next
%>
|
|