壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 914|回复: 0

如何在2007 A里生成针对付款的所有按科目付款的部分付款的列表

[复制链接]
发表于 2009/8/7 15:34:11 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x
How to generate a list of all partially applied 'Payment on Account' from the 'Incoming Payments' in 2007 A?
This is a new functionality in SAP Business One 2007 (A & B) & is not applicable to lower versions.
If an incoming payment is made via 'Payment on Account', then this payment will appear in the 'Incoming Payment' window for the selected 'Business Partner' (BP). It can then be used against other open invoices to reduce the balance due on those selected open invoices.
There can be a business requirement to determine either of the following:
-          Incoming Payments (paid via 'Payment on Account') that have been partially applied
-          How much of that total has been applied.
This can be achieved with a simple query.
Example:

1. Post an incoming payment transaction. Tick the 'Payment on Account' box.

2. To use payment No. 74 against other open invoices, enter the BP code in the 'Incoming Payments' window. Notice that payment No. 74 appears as 'Document Type'  'JE' (Journal Entry), with Transaction No. 1091 in the 'Document No.' field. Select the payment along with other open invoices.

  

A query can be created to display the required information. This query will provide a list of not fully applied 'Payment on Account' incoming payments. In our previous example, GBP 700.00 of Incoming Payment No. 74 had been partially applied.
Query:
SELECT
                -- Document Number of payment where 'Payment on Account' transaction was applied.
                T0.[DocNum],
                -- Busines Partner Code in the Payment transaction.
                T0.CardCode,
                -- Journal Entry ID of the 'Payment on Account' transaction used in the above Document Number.
              T1.[DocEntry],
                -- 'Payment on Account' Amount Applied
                T1.[SumApplied] as [Applied Amount],
                -- 'Payment on Account' Amount
                (SELECT T5.[NoDocSum]  FROM ORCT T5 WHERE T5.[PayNoDoc]  = 'y' and T5.transid = T1.docentry )['Payment on Account' Amount],
                -- Original Document Number of the 'Payment on Account' Transaction
                (SELECT T5.[DocNum]  FROM ORCT T5 WHERE T5.[PayNoDoc]  = 'y' and T5.transid = T1.docentry) ['Payment on Account' Payment No.]
                  
FROM
                ORCT T0  
                INNER JOIN RCT2 T1 ON T0.DocEntry = T1.DocNum
WHERE  
                --Only select the rows of the incoming payment which arise from a previous incoming payment made via payment on account
                T1. Invtype = 24
                --Select only those incoming payments where the total amount of the payment on account has not been applied.
                and
                T1.[SumApplied] <>
                (SELECT
                                 ((-1)*(T6.[NoDocSum]))  FROM ORCT T6 WHERE T6.[PayNoDoc]  = 'y'and T6.transid = T1.docentry  )


Query result:

This query shows what target Incoming Payment the initial Payment on Account transaction was applied in and its partial amount.  Note:This query only displays not fully applied payments on account transactions. Save the query to the 'Query Manager' and may be used as the basis for a 'User Report'.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 03:57 , Processed in 0.013205 second(s), 14 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表