RCV3950.php
3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?PHP
//*****************************************************************************
//* プログラム名:請求・入金管理
//* プログラムID:RCV3950.php
//* 機能 :入金処理
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("./inc/session_start.inc");
include("./inc/SessionChk.inc");
include("./inc/dbcon.inc");
$chkDay = split("#", $Inp_Day);
$chkMoney = split("#", $Inp_Money);
//モード 1:売上 2:外注
$uriageMode = $_REQUEST["uriageMode"];
for ($intI = 0; $intI < 12; $intI++) {
if($chkMoney[$intI] == ""){
$chkMoney[$intI] = "NULL";
}
if ($chkDay[$intI]!=""){
$DateTitle[$intI] = date("Y/m", mktime(0,0,0,$Kijyun_Month+$intI,"01",$Kijyun_Year));
//seq設定
$strSQL = "SELECT * FROM rcv_tbl ORDER BY rcv_id DESC";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if(pg_numrows($objRec) > 0){
$objData = pg_fetch_object($objRec, 0);
$rcv_id = $objData->rcv_id + 1;
}else{
$rcv_id = 1;
}
$strSQL = "INSERT INTO ";
$strSQL .= " rcv_tbl (";
$strSQL .= " rcv_id ,";
$strSQL .= " rcv_area_id ,";
$strSQL .= " rcv_gyousya_id ,";
$strSQL .= " rcv_gyoumu_id ,";
$strSQL .= " rcv_seikyukbn ,";
$strSQL .= " seikyu_money ,";
$strSQL .= " seikyu_kigen ,";
$strSQL .= " nyukin_money ,";
$strSQL .= " nyukin_date ,";
$strSQL .= " memo_txt ,";
$strSQL .= " inp_user ";
$strSQL .= " )values(";
$strSQL .= $rcv_id.",";
$strSQL .= $cboInpArea.",";
$strSQL .= $cboInpGyousya.",";
$strSQL .= $cboInpGyoumu.",";
// $strSQL .= $optSeikyukbn.",";
$strSQL .= $uriageMode.",";
$strSQL .= $chkMoney[$intI].",";
$strSQL .= "'".$DateTitle[$intI]."/".$chkDay[$intI]."',";
$strSQL .= "0,";
$strSQL .= "'',";
$strSQL .= "'',";
$strSQL .= $PHP_USER_SEQ;
$strSQL .= ")";
//echo $strSQL."<hr>";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>請求・入金管理</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function chk(){
document.frm.action="RCV3000.php";
document.frm.method="POST";
document.frm.submit();
return false;
}
-->
</SCRIPT></HEAD>
<BODY onLoad="return chk();">
<form name="frm">
<input name="Kijyun_Year" type="hidden" value="<?PHP echo $Kijyun_Year; ?>">
<input name="Kijyun_Month" type="hidden" value="<?PHP echo $Kijyun_Month; ?>">
<input name="cboMode" type="hidden" value="<?PHP echo $cboMode; ?>">
<input name="cboBunrui" type="hidden" value="<?PHP echo $cboBunrui; ?>">
<input name="cboGyoumu" type="hidden" value="<?PHP echo $cboGyoumu; ?>">
<input name="cboArea" type="hidden" value="<?PHP echo $cboArea; ?>">
<input name="uriageMode" type="hidden" value="<?PHP echo $uriageMode; ?>">
<input name="modeGyoumu" type="hidden" value="<?PHP echo $modeGyoumu; ?>">
<!-- 資金繰り -->
<input name="SIM_cboYaer" type="hidden" value="<?PHP echo $SIM_cboYaer; ?>">
<input name="SIM_cboMon" type="hidden" value="<?PHP echo $SIM_cboMon; ?>">
<input name="SIM_cboKikan" type="hidden" value="<?PHP echo $SIM_cboKikan; ?>">
</form>
</BODY>
</HTML>