/*$.fn.toggleCheck=function(){ if(this.tagName==='INPUT'){ $(this).prop('checked', !($(this).is(':checked'))); }}*/
if (MODE=='SINPUT') {
//_refreshv2('<%=masterTableName%>.STATUS',DISK_DOC_STATUS);
}
if (_setFocus!=''){
if (document.getElementById(_setFocus)){
setTimeout(function(){
document.getElementById(_setFocus).focus();
//document.getElementById("myAnchor").focus();
_setFocus='';
},500);
}
}
/*****************/
/*--*/
drop view if exists SUMMARY;
CREATE VIEW SUMMARY AS
SELECT
DATE SOH_DATE
,SALES_ORDER SO_NO
,SALES_ORDER_HEAD.QD_NO QD_NO
,if(REPLACE(REPLACE(END_USER,'&','and'),',','')=REPLACE(REPLACE(CUSTOMER.NAME,'&','and'),',','') OR END_USER='',CUSTOMER.NO_2,concat(END_USER,' [',CUSTOMER.NO_2,']')) END_USER
,SALES_ORDER_HEAD.SUBJECT
FROM SALES_ORDER_HEAD
LEFT JOIN CUSTOMER ON CUSTOMER.RECORDID=SALES_ORDER_HEAD.CUSTOMER_NO
LEFT JOIN SALES_ORDER_INV_DESC ON SALES_ORDER_INV_DESC.PARENT_RECORDID=SALES_ORDER_HEAD.RECORDID
LEFT JOIN POCOUNT ON POCOUNT.SOH_RECORDID=SALES_ORDER_HEAD.RECORDID
;
EXPLAIN SELECT * FROM SUMMARY WHERE SO_NO ='SOTC01403052';
SELECT * FROM SUMMARY WHERE SO_NO ='SOTC01403052';
DROP VIEW IF EXISTS POCOUNT;
CREATE VIEW POCOUNT AS
SELECT SUM(IF(GRN_QTY>=PO_QTY AND PO_QTY<>0,1,0)), SUM(IF(PO_QTY<>0,1,0)), SOH_RECORDID FROM POBODY GROUP BY SOH_RECORDID;
/*************************
{object}0.5,SETTINGS.CREATE,button,0,0,:Create,, {labelInLineStyle}display:inline;{/labelInLineStyle} {onclick}formRefresh=1;{/onclick}
{subform}input.jsp?mode=SINPUT&input=pvia.txt&config=pviaConfig.txt&{/subform}
{formInit}if (PROCESSING_MODE=='D'){$('button[buttonID="this.id"]').css('display','inline')} else {$('button[buttonID="this.id"]').css('display','none')} ;{/formInit}
{/object}
{object}0.5,SETTINGS.REFRESH,button,0,0,:Refresh,,{onclick}location.reload();{/onclick} {labelInLineStyle}display:inline;{/labelInLineStyle} {formInit}if (PROCESSING_MODE=='D'){$('button[buttonID="this.id"]').css('display','inline')} else {$('button[buttonID="this.id"]').css('display','none')} ;{/formInit}
{/object}
/*************************/
//SELECT SUPPLIER FROM SOQTYOS WHERE ! FIND_IN_SET(TRIM(SUPPLIER),'1394705940696,232') >0;
沒有留言:
張貼留言