⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 r_request_duetype.sql

📁 Java写的ERP系统
💻 SQL
字号:
CREATE OR REPLACE FUNCTION R_Request_DueType
(
	p_ActionDate			DATE,
	p_ToleranceDays			NUMBER	DEFAULT 1
)
RETURN VARCHAR2
AS
/*************************************************************************
 * The contents of this file are subject to the Compiere License.  You may
 * obtain a copy of the License at    http://www.compiere.org/license.html
 * Software is on an  "AS IS" basis,  WITHOUT WARRANTY OF ANY KIND, either
 * express or implied. See the License for details. Code: Compiere ERP+CRM
 * Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved.
 *************************************************************************
 * $Id: R_Request_DueType.sql,v 1.2 2001/12/04 05:30:26 jjanke Exp $
 ***
 * Title:	Return updated Request Due Type
 * Description:
 *	Set Due Type	3-Overdue	5-Due	7-Scheduled
 ************************************************************************/
BEGIN
	--	scheduled
	IF (TRUNC(p_ActionDate) > TRUNC(SysDate)) THEN
		RETURN '7';
	--	overdue
	ELSIF (TRUNC(p_ActionDate) < TRUNC(SysDate+p_ToleranceDays)) THEN
		RETURN '3';
  	END IF;
	--
	RETURN '5';
END R_Request_DueType;
/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -