📄 c_payment_check.sql
字号:
/*************************************************************************
* 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-2004 Jorg Janke, ComPiere, Inc. All Rights Reserved.
*************************************************************************
* $Id: C_Payment_Check.sql,v 1.3 2005/04/27 17:50:34 jjanke Exp $
***
* Title: Check Payments
* Description:
* Check Is Allocated Flag for Payments (no transfers)
************************************************************************/
/** Test
SELECT DocumentNo, PayAmt, C_Payment_Allocated(C_Payment_ID, C_Currency_ID)
FROM C_Payment
WHERE IsAllocated <> DECODE(C_Payment_Allocated(C_Payment_ID, C_Currency_ID), PayAmt, 'Y', 'N')
AND TenderType<>'X';
**/
UPDATE C_Payment
SET IsAllocated = DECODE(C_Payment_Allocated(C_Payment_ID, C_Currency_ID), PayAmt, 'Y', 'N')
WHERE IsAllocated <> DECODE(C_Payment_Allocated(C_Payment_ID, C_Currency_ID), PayAmt, 'Y', 'N')
AND TenderType<>'X';
COMMIT;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -