<?xml version="1.0" encoding="UTF-8"?>
<ROWSET tableName="GF71">
<EXEC_SQL>delete from GF71 where SYSTEM_ID='VV' and TBLSYU = 'T' and FGOMIT='0' </EXEC_SQL>
















	
	


















	
	
		
		
			
				<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>query.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\query.jsp</FILEPATH>
    <MODIFIED>20150428102703</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID/>
    <HREF>../../../index.jsp</HREF>
    <TARGET>_top</TARGET>
    <CLM/>
    <P_KEYS>sub_menu,return,cache,buttonRequest,group</P_KEYS>
    <P_VALS>true,true,false,true,{@USER.GROUPS}</P_VALS>
    <USEGAMENID>false</USEGAMENID>
    <USEREDIRECT/>
</ROW>
			
			
				
					<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>query.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\query.jsp</FILEPATH>
    <MODIFIED>20150428102703</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID/>
    <HREF>../index.jsp</HREF>
    <TARGET>_top</TARGET>
    <CLM/>
    <P_KEYS>group</P_KEYS>
    <P_VALS>{@USER.GROUPS}</P_VALS>
    <USEGAMENID>false</USEGAMENID>
    <USEREDIRECT/>
</ROW>
				
				
					<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>query.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\query.jsp</FILEPATH>
    <MODIFIED>20150428102703</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID/>
    <HREF>../index.jsp</HREF>
    <TARGET>_top</TARGET>
    <CLM/>
    <P_KEYS>sub_menu,return,cache,buttonRequest,group</P_KEYS>
    <P_VALS>true,true,false,true,{@USER.GROUPS}</P_VALS>
    <USEGAMENID>false</USEGAMENID>
    <USEREDIRECT/>
</ROW>
				
			
			
			
				document.getElementById("toplink").href=window.top.location.href;
			
		
		
		
			
				
			
		
		
		
			
				 【】  {@SESSION.GUI_TITLE}
			
		
		
			
				
					
						
							
							
								
								
							
						
						
							
						
						
						
							
						
						
						
						
						
						
						
						User:
						
						
						LastUpdate:
					
					
						
						
						
					
						
						
						
						
						
						
					
				
			
			
		
	
	




	SELECT 
		 BASF0008('{@USER.ID}') CDJIG 
		,BASF0008('{@USER.ID}') CDJIG1 
		,BASF0008('{@USER.ID}') CDJIG2 
		,BASF0008('{@USER.ID}') CDJIG3 
		,BASF0008('{@USER.ID}') CDJIG4 
		,BASF0008('{@USER.ID}') CDJIG5 
		,BASF0008('{@USER.ID}') CDJIG6 
		,BASF0008('{@USER.ID}') CDJIG7 
		,BASF0008('{@USER.ID}') CDJIG8 
		,BASF0008('{@USER.ID}') CDJIG9 
	FROM DUAL






	
		
			
			
				
				
			
			
			
		
		
			
			
				
			
			
			
				
			
			
			
				
				
			
		
	
	
		
			
				
				
												
						
									
										
				
			
		
	







	



	addEvent( this, "load", adjustBar );






	







	
		
		
			
			
		
		
		
		
		
		
		
	




	2012/04/25 S.Li			利益率の赤表示（ﾏｲﾅｽの場合のみ）
	2012/11/01 S.MURAKAMI	ﾘｿｰｽ変更(KNJYUG ⇒ KNJYUK）
	2012/12/13 S.ENDOU		製番工程管理対応による製番-受注とのJOIN変更
	2014/05/12 S.Li			受注納期の取り方変更
	2014/05/23 LEE.M		製造原価画面への引数(画面表示ﾊﾟﾀｰﾝ)追加
	2014/10/24 S.ENDOU		画面ID「＿」→「－」対応（EDIT機能対応）







		{ call SALS1036S1( ?,?,?,?) }




	SELECT	 W.NOSZ																		NOSZ		
			,DECODE( W.KNJYUG ,0 ,0 
				,NVL( ROUND((( W.KNJYUG - ( W.KIN10 + W.KNMIKOMI )) / W.KNJYUG ) * 100 ) ,0 )) ||'%' RIEKI 	 
			,DECODE( W.KNJYUG ,0 ,0 
				,NVL( ROUND((( W.KNJYUG - ( W.KIN10 + W.KNMIKOMI )) / W.KNJYUG ) * 100 ) ,0 )) 		 RIEKI_O 
			,CASE WHEN W.KNJYUG &lt; ( W.KIN10 + W.KNMIKOMI ) THEN 1 
															  ELSE 0 
			 END 																		RIEKI_M		
			,NVL(W.KNJYUG ,0 )															KNJYUK		
			,NVL( W.KIN10 ,0 )															KIN10		
			,NVL( W.KNMIKOMI ,0 )														KNMIKOMI	
			,W.DYURI																	DYURI		
			,W.CDNON																	CDNON1		
			,W.KNJYUG																	KNJYUG_G	
			,W.KIN10																	KIN10_G		
			,W.KNMIKOMI																	KNMIKOMI_G	
			,W.JCURI																	JCURI		
			,NVL( W.SINTYOKU ,0 )														SINTYOKU_G	
			,W.SINTYOKU * 100 ||'%'														SINTYOKU 	
			,W.NOSZ																		NOSZ_2		
	FROM  (
		SELECT	 A.NOSZ																	NOSZ		
				,NVL(( SELECT NVL( B.RATE ,1 ) * NVL(SUM( C.KNJYU ) ,0 )
				   FROM SAL02 C
				   WHERE C.NOORDER = A.NOORDER
					 AND C.JCKATSU     = '1'
				   GROUP BY C.NOORDER
				 ) ,0)																	KNJYUG		
				,NVL(( SELECT NVL( SUM( D.KNJITU ) ,0 )
				   FROM  CST01 D 
				   WHERE D.NOSZ  =  A.NOSZ
				   GROUP BY D.NOSZ
				 ) ,0)																	KIN10		
				,NVL(( SELECT NVL( SUM( NVL( E.SUHZN * E.TKHC ,0 )) ,0)
				   FROM SAL02 C ,SFC04 E
				   WHERE C.NOORDER     = A.NOORDER
					 AND C.JCKATSU     = '1'
				     AND E.NOSZKN(+)   = C.NOSZKN 
				     AND E.JCKATSU(+) != '9' 
				   GROUP BY C.NOORDER
				  ) ,0)																	KNMIKOMI	
				,(  SELECT MAX( F.DYURI )
					FROM SAL08 F
					WHERE F.NOORDER = A.NOORDER
				 )																		DYURI		
				,B.CDNON																CDNON		
				,DECODE( B.JCSAL01 ,'2' ,'2' ,'1' )										JCURI		
				,CASE WHEN B.DYNOKI = B.DYJYU THEN 1
					  WHEN ROUND((( SYSDATE - TO_DATE( B.DYJYU ))) / 
								 ( TO_DATE( B.DYNOKI ) - TO_DATE( B.DYJYU )) ,2 ) &gt; 1 THEN 1
					  WHEN ROUND((( SYSDATE - TO_DATE( B.DYJYU ))) / 
								 ( TO_DATE( B.DYNOKI ) - TO_DATE( B.DYJYU )) ,2 ) &lt; 0 THEN 0
					  ELSE ROUND((( SYSDATE - TO_DATE( B.DYJYU ))) / 
								 ( TO_DATE( B.DYNOKI ) - TO_DATE( B.DYJYU )) ,2 )
				 END 																	SINTYOKU	
		FROM (SELECT NOSZ,MIN(NOORDER) NOORDER FROM BAS81 WHERE FGROOT &lt; '1' AND JCKATSU &lt; '9' GROUP BY NOSZ) A 
			,(SELECT X.NOORDER ,X.RATE ,X.CDNON ,X.JCSAL01 ,X.DYJYU ,MAX(Y.DYNOKI) DYNOKI 
			  FROM SAL01 X ,SAL02 Y 
			  WHERE X.NOORDER = Y.NOORDER 
			  GROUP BY X.NOORDER ,X.RATE ,X.CDNON ,X.JCSAL01 ,X.DYJYU ) B
		
										
										
										
						
												
			
														
												
			
													
													
													
													
		
	) W
	



	<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>result.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\result.jsp</FILEPATH>
    <MODIFIED>20150428102343</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID>CST1033</TO_GAMENID>
    <HREF/>
    <TARGET>CONTENTS</TARGET>
    <CLM>NOSZ</CLM>
    <P_KEYS>command,NOSZ,DISPTN</P_KEYS>
    <P_VALS>NEW,[NOSZ],1</P_VALS>
    <USEGAMENID/>
    <USEREDIRECT/>
</ROW>
	<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>result.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\result.jsp</FILEPATH>
    <MODIFIED>20150428102343</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID>SAL1015</TO_GAMENID>
    <HREF/>
    <TARGET>CONTENTS</TARGET>
    <CLM>KNJYUK</CLM>
    <P_KEYS>command,NOSZ</P_KEYS>
    <P_VALS>NEW,[NOSZ]</P_VALS>
    <USEGAMENID/>
    <USEREDIRECT/>
</ROW>
	<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>result.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\result.jsp</FILEPATH>
    <MODIFIED>20150428102343</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID>CST1034</TO_GAMENID>
    <HREF/>
    <TARGET>CONTENTS</TARGET>
    <CLM>KIN10</CLM>
    <P_KEYS>command,NOSZ</P_KEYS>
    <P_VALS>NEW,[NOSZ]</P_VALS>
    <USEGAMENID/>
    <USEREDIRECT/>
</ROW>
	<ROW>
    <SYSTEM_ID>VV</SYSTEM_ID>
    <TBLSYU>T</TBLSYU>
    <ADDRESS>SAL1036</ADDRESS>
    <FILENAME>result.jsp</FILENAME>
    <FILEPATH>\\mis-mnt1\UAP\GMISV6\uap\webapps\vv\jsp\SAL1036\result.jsp</FILEPATH>
    <MODIFIED>20150428102343</MODIFIED>
    <DYSET>20191115081616</DYSET>
    <PGSET>DOC18</PGSET>
    <TAGNAME>og:link</TAGNAME>
    <TO_GAMENID>PUR3102-K</TO_GAMENID>
    <HREF/>
    <TARGET>CONTENTS</TARGET>
    <CLM>KNMIKOMI</CLM>
    <P_KEYS>command,NOSZ,JCKATSU_1</P_KEYS>
    <P_VALS>NEW,[NOSZ],1</P_VALS>
    <USEGAMENID/>
    <USEREDIRECT/>
</ROW>



	
		[RIEKI]
	






	
		
					[RIEKI]					
								[SINTYOKU]				
					[NOSZ]					
					[KNJYUK]				
								[CDNON1]				
									
		
		
								[JCURI]					
								[KIN10]					
								[KNMIKOMI]				
								[DYURI]					
		
	
	
		
			[RIEKI]		
						[SINTYOKU]	
					[NOSZ]					
					[KNJYUK]				
								[CDNON1]				
			
				
						 		
				  			 			
																							
					
				 	
															
		
		
								[JCURI]					
								[KIN10]					
								[KNMIKOMI]				
								[DYURI]					
		
	



</ROWSET>
