<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL view for all posted Payables transactions in Dynamics GP</title>
	<atom:link href="http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/feed/" rel="self" type="application/rss+xml" />
	<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/</link>
	<description>Ramblings and musings of a Dynamics GP MVP</description>
	<lastBuildDate>Sat, 19 May 2012 09:34:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10840</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 17:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10840</guid>
		<description><![CDATA[Kevin,

Are you checking ALL the settings or just the settings for posting Bank Transfers?  If you are using Advanced Security, you should have an option to copy security settings from one user to another (it&#039;s there in GP 9.0, I am pretty sure it was there in 8.0)...as a test, you could create a new user, copy all the security settings from the user without the issue and test - if it works, copy all the settings from the user that is getting the error (make sure to check &#039;revert security&#039; when copying).  If it now does not work, you know there is a difference.  It might be some other related permission that is needed...

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Are you checking ALL the settings or just the settings for posting Bank Transfers?  If you are using Advanced Security, you should have an option to copy security settings from one user to another (it&#8217;s there in GP 9.0, I am pretty sure it was there in 8.0)&#8230;as a test, you could create a new user, copy all the security settings from the user without the issue and test &#8211; if it works, copy all the settings from the user that is getting the error (make sure to check &#8216;revert security&#8217; when copying).  If it now does not work, you know there is a difference.  It might be some other related permission that is needed&#8230;</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10838</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 16:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10838</guid>
		<description><![CDATA[There are no differences. Which is why it&#039;s so weird.]]></description>
		<content:encoded><![CDATA[<p>There are no differences. Which is why it&#8217;s so weird.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10837</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 16:44:43 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10837</guid>
		<description><![CDATA[Ok, then next step is to compare settings from a user than can post a bank transfer to the one that cannot - what are the differences?  

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Ok, then next step is to compare settings from a user than can post a bank transfer to the one that cannot &#8211; what are the differences?  </p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10836</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 16:37:36 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10836</guid>
		<description><![CDATA[Yes, others are able to perform bank transfers with no issues. We are on GP V8.00g19.]]></description>
		<content:encoded><![CDATA[<p>Yes, others are able to perform bank transfers with no issues. We are on GP V8.00g19.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10835</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 16:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10835</guid>
		<description><![CDATA[Kevin,

I think you may have misunderstood what I am asking.  Do you have another GP user that can perform a bank transfer with no error?  Also, what version of GP are you using?

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>I think you may have misunderstood what I am asking.  Do you have another GP user that can perform a bank transfer with no error?  Also, what version of GP are you using?</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10833</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 16:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10833</guid>
		<description><![CDATA[Hi Victoria,

I&#039;ve checked his security settings and everything is fine. He should be able to perform bank transfers since that option is checked under his security settings. Is there anything else outside of the security settings that can cause this? Thanks.]]></description>
		<content:encoded><![CDATA[<p>Hi Victoria,</p>
<p>I&#8217;ve checked his security settings and everything is fine. He should be able to perform bank transfers since that option is checked under his security settings. Is there anything else outside of the security settings that can cause this? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10831</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Mon, 30 May 2011 15:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10831</guid>
		<description><![CDATA[Kevin,

Have you determined that this is a GP user specific issue?  Security is completely different depending on what version of GP you are using, so it is hard to give you a generic test.  If you are on GP 10.0 or 2010, can you log into GP as a user with the POWERUSER role and see if that user can post a Bank Transfer?

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Have you determined that this is a GP user specific issue?  Security is completely different depending on what version of GP you are using, so it is hard to give you a generic test.  If you are on GP 10.0 or 2010, can you log into GP as a user with the POWERUSER role and see if that user can post a Bank Transfer?</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10763</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Fri, 27 May 2011 19:15:09 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10763</guid>
		<description><![CDATA[Many thanks again!! I have another questions regarding Bank transfers. I&#039;m encountering the following error message when i attempt to transfer funds from one checkbook to another. &quot;You do not have authorization to perform transaction posting&quot;. I&#039;ve checked the users account and he has access to all posting options. Both checkbooks are the same currency which is the functional currency. Not sure where the problem lies. Thanks again.]]></description>
		<content:encoded><![CDATA[<p>Many thanks again!! I have another questions regarding Bank transfers. I&#8217;m encountering the following error message when i attempt to transfer funds from one checkbook to another. &#8220;You do not have authorization to perform transaction posting&#8221;. I&#8217;ve checked the users account and he has access to all posting options. Both checkbooks are the same currency which is the functional currency. Not sure where the problem lies. Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10760</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Fri, 27 May 2011 16:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10760</guid>
		<description><![CDATA[Kevin,

Transactions &gt; Purchasing &gt; Apply Payables Documents.  You can click on the Help button on the window to get specific instructions once there.  

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Transactions &gt; Purchasing &gt; Apply Payables Documents.  You can click on the Help button on the window to get specific instructions once there.  </p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10756</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Fri, 27 May 2011 15:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10756</guid>
		<description><![CDATA[Thanks Victoria!! But pardon for my questions (i&#039;m still a rookie) I would post the entry in the manual payment entry screen but where do i apply the entry? and how? Thanks again]]></description>
		<content:encoded><![CDATA[<p>Thanks Victoria!! But pardon for my questions (i&#8217;m still a rookie) I would post the entry in the manual payment entry screen but where do i apply the entry? and how? Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10754</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Fri, 27 May 2011 15:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10754</guid>
		<description><![CDATA[Kevin,

This is because of the different currencies.  You need to post the payment first, then you will be able to apply it as a separate step.

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>This is because of the different currencies.  You need to post the payment first, then you will be able to apply it as a separate step.</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-10726</link>
		<dc:creator><![CDATA[Kevin]]></dc:creator>
		<pubDate>Thu, 26 May 2011 18:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-10726</guid>
		<description><![CDATA[hi Victoria,

I&#039;m trying enter a manual payment entry. When i select the vendor which has a currency of GBP the Apply button is grayed out. The functional current for this company is USD. Any help would be greatly appreciated. Thanks.]]></description>
		<content:encoded><![CDATA[<p>hi Victoria,</p>
<p>I&#8217;m trying enter a manual payment entry. When i select the vendor which has a currency of GBP the Apply button is grayed out. The functional current for this company is USD. Any help would be greatly appreciated. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shabnam</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-5718</link>
		<dc:creator><![CDATA[shabnam]]></dc:creator>
		<pubDate>Fri, 22 Oct 2010 05:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-5718</guid>
		<description><![CDATA[Thank you very much Victoria!]]></description>
		<content:encoded><![CDATA[<p>Thank you very much Victoria!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-5498</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Wed, 06 Oct 2010 11:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-5498</guid>
		<description><![CDATA[Hi Lulu,

Adding multicurrency details to this is quite involved and will bring up a number of additional issues/questions to be resolved.  This is not something I am planning on posting on my blog, at least in the foreseeable future, however, it may be something we can create as a consulting project.  Please let me know if this is something you would be interested in.  

&lt;i&gt;-Victoria&lt;/i&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi Lulu,</p>
<p>Adding multicurrency details to this is quite involved and will bring up a number of additional issues/questions to be resolved.  This is not something I am planning on posting on my blog, at least in the foreseeable future, however, it may be something we can create as a consulting project.  Please let me know if this is something you would be interested in.  </p>
<p><i>-Victoria</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lulu</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-5495</link>
		<dc:creator><![CDATA[Lulu]]></dc:creator>
		<pubDate>Wed, 06 Oct 2010 10:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-5495</guid>
		<description><![CDATA[Hello again Victoria

I was wondering if it was at all possible to update this view with the originating currency information please? This view is perfect for my clients request to create a check payment document - however, we are always reporting in Originating &amp; Functional currency. I&#039;ve noted the fields for the multicurrency reporting purposes below:

1. Currency ID
2. Exchange rate
3. Originating Check amount
4. Originating applied amount
5. Checkbook ID

Thank you &amp; regards]]></description>
		<content:encoded><![CDATA[<p>Hello again Victoria</p>
<p>I was wondering if it was at all possible to update this view with the originating currency information please? This view is perfect for my clients request to create a check payment document &#8211; however, we are always reporting in Originating &amp; Functional currency. I&#8217;ve noted the fields for the multicurrency reporting purposes below:</p>
<p>1. Currency ID<br />
2. Exchange rate<br />
3. Originating Check amount<br />
4. Originating applied amount<br />
5. Checkbook ID</p>
<p>Thank you &amp; regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa Armstrong</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-3722</link>
		<dc:creator><![CDATA[Lisa Armstrong]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 17:06:25 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-3722</guid>
		<description><![CDATA[Victoria,

This is a WONDERFUL website - thank you sooooooooooooo much.   I&#039;m bookmarking it!!!!

Lisa]]></description>
		<content:encoded><![CDATA[<p>Victoria,</p>
<p>This is a WONDERFUL website &#8211; thank you sooooooooooooo much.   I&#8217;m bookmarking it!!!!</p>
<p>Lisa</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-2479</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Tue, 17 Nov 2009 22:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-2479</guid>
		<description><![CDATA[Stanley,

If the payment is entered as an EFT type payment, it will have PYENTTYP = 3.

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Stanley,</p>
<p>If the payment is entered as an EFT type payment, it will have PYENTTYP = 3.</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stanley</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-2474</link>
		<dc:creator><![CDATA[stanley]]></dc:creator>
		<pubDate>Tue, 17 Nov 2009 16:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-2474</guid>
		<description><![CDATA[Victoria,
In your case for the PYENTTYP you have 3 for EFT. I am working on doing a custom app for our company to write checks and process EFT. So if I just put in the PYENTTYP = 3 will the system automatically pick it up as an EFT? Or is there more I will need to do to get the system to recognize 3 as EFT?]]></description>
		<content:encoded><![CDATA[<p>Victoria,<br />
In your case for the PYENTTYP you have 3 for EFT. I am working on doing a custom app for our company to write checks and process EFT. So if I just put in the PYENTTYP = 3 will the system automatically pick it up as an EFT? Or is there more I will need to do to get the system to recognize 3 as EFT?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victoria Yudin</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-2295</link>
		<dc:creator><![CDATA[Victoria Yudin]]></dc:creator>
		<pubDate>Thu, 29 Oct 2009 09:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-2295</guid>
		<description><![CDATA[Laura,

Thanks for the kind words!  

I am not sure I follow - are you looking to add a column with a total of all the buckets?  If so, that should just be the Current Trx Amount (CURTRXAM), why add the calculations?  Also, I would suggest 2 changes to your code:
&lt;ol&gt;
&lt;li&gt;Use Current Trx Amount (CURTRXAM) instead of the Document Amount - anything partially paid will have the amount still due in the CURTRXAM, using the Document amount will overstate your payables.&lt;/li&gt;
&lt;li&gt;Change the sign on the &#039;credit&#039; transactions (DOCTYPE 4, 5 and 6).  GP stores everything in payables as a positive number.  If you have open payments, credit memos or returns, then they will show up as positive numbers and overstate your payables.&lt;/li&gt;
&lt;/ol&gt;

Hope that helps.  Please write back if you need additional help.

&lt;em&gt;-Victoria&lt;/em&gt;]]></description>
		<content:encoded><![CDATA[<p>Laura,</p>
<p>Thanks for the kind words!  </p>
<p>I am not sure I follow &#8211; are you looking to add a column with a total of all the buckets?  If so, that should just be the Current Trx Amount (CURTRXAM), why add the calculations?  Also, I would suggest 2 changes to your code:</p>
<ol>
<li>Use Current Trx Amount (CURTRXAM) instead of the Document Amount &#8211; anything partially paid will have the amount still due in the CURTRXAM, using the Document amount will overstate your payables.</li>
<li>Change the sign on the &#8216;credit&#8217; transactions (DOCTYPE 4, 5 and 6).  GP stores everything in payables as a positive number.  If you have open payments, credit memos or returns, then they will show up as positive numbers and overstate your payables.</li>
</ol>
<p>Hope that helps.  Please write back if you need additional help.</p>
<p><em>-Victoria</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laura</title>
		<link>http://victoriayudin.com/2009/10/12/sql-view-for-all-posted-payables-transactions-in-dynamics-gp/#comment-2292</link>
		<dc:creator><![CDATA[Laura]]></dc:creator>
		<pubDate>Wed, 28 Oct 2009 23:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://victoriayudin.com/?p=1993#comment-2292</guid>
		<description><![CDATA[Hi Victoria,
Thanks for all the great GP reports and info. This site is amazing!
I am new to GP, and just started working with Smartlist Builder and SQL Views a couple weeks ago. My company needs a clean downloadable AP aging and I have just about got it right, except I am finding it difficult to create a total for the aging buckets.
I have created a view, originally because I wanted to create an aging date that would be the docdate if the open item wasn&#039;t an invoice, and the due date if it was an invoice so that I could then use the aging date to calculate which bucket the open invoice belonged to.
Then I created 5 buckets for the aging days and have the invoice amts totalling correctly in those buckets. 

Now I just want to create a total for all the buckets and SLB doesn&#039;t allow you to use calculated fields inside calculated fields. And I can&#039;t figure out an easy way to total the buckets in the view I created because it doesn&#039;t seem to allow me to use a newly created field either.
Here&#039;s my view and a couple of the bucket fields. I would really appreciate your help with creating a total for all the bucket fields.

Thanks,
Laura

CREATE VIEW [LAW_payables_aging_date] AS
SELECT
CASE DOCTYPE
WHEN 1 THEN DUEDATE
WHEN 2 THEN DOCDATE
WHEN 3 THEN DOCDATE
WHEN 4 THEN DOCDATE
WHEN 5 THEN DOCDATE
WHEN 6 THEN DOCDATE
ELSE DOCDATE
END Aging_Date,
VCHRNMBR,DOCTYPE,DOCDATE,DOCNUMBR,DUEDATE,
PORDNMBR,WROFAMNT,VOIDED,DOCAMNT, T1.VENDORID, VENDNAME
from dbo.PM20000 T1
 INNER JOIN dbo.PM00200 T2
 on 
 T2.[VENDORID] =  T1.[VENDORID]


2 of the BUCKETS which were created in calculations in SLB:

CURRENT BUCKET

CASE 
WHEN (DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}  , GETDATE()  ) &lt; &#039;0&#039; and
{*LAW_payables_aging_date:Document Type} = 5) THEN ({*LAW_payables_aging_date:Document Amount} * -1) 
WHEN (DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}  , GETDATE()  )  &#039;0&#039; and DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}, GETDATE()  )  &#039;0&#039; and DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}, GETDATE()  ) &lt; &#039;31&#039;) and
{*LAW_payables_aging_date:Document Type} = 1 THEN 
{*LAW_payables_aging_date:Document Amount}
ELSE NULL
END

I want to add the current bucket to 1 - 30 days and 31-60 days and 61-90 days, etc.]]></description>
		<content:encoded><![CDATA[<p>Hi Victoria,<br />
Thanks for all the great GP reports and info. This site is amazing!<br />
I am new to GP, and just started working with Smartlist Builder and SQL Views a couple weeks ago. My company needs a clean downloadable AP aging and I have just about got it right, except I am finding it difficult to create a total for the aging buckets.<br />
I have created a view, originally because I wanted to create an aging date that would be the docdate if the open item wasn&#8217;t an invoice, and the due date if it was an invoice so that I could then use the aging date to calculate which bucket the open invoice belonged to.<br />
Then I created 5 buckets for the aging days and have the invoice amts totalling correctly in those buckets. </p>
<p>Now I just want to create a total for all the buckets and SLB doesn&#8217;t allow you to use calculated fields inside calculated fields. And I can&#8217;t figure out an easy way to total the buckets in the view I created because it doesn&#8217;t seem to allow me to use a newly created field either.<br />
Here&#8217;s my view and a couple of the bucket fields. I would really appreciate your help with creating a total for all the bucket fields.</p>
<p>Thanks,<br />
Laura</p>
<p>CREATE VIEW [LAW_payables_aging_date] AS<br />
SELECT<br />
CASE DOCTYPE<br />
WHEN 1 THEN DUEDATE<br />
WHEN 2 THEN DOCDATE<br />
WHEN 3 THEN DOCDATE<br />
WHEN 4 THEN DOCDATE<br />
WHEN 5 THEN DOCDATE<br />
WHEN 6 THEN DOCDATE<br />
ELSE DOCDATE<br />
END Aging_Date,<br />
VCHRNMBR,DOCTYPE,DOCDATE,DOCNUMBR,DUEDATE,<br />
PORDNMBR,WROFAMNT,VOIDED,DOCAMNT, T1.VENDORID, VENDNAME<br />
from dbo.PM20000 T1<br />
 INNER JOIN dbo.PM00200 T2<br />
 on<br />
 T2.[VENDORID] =  T1.[VENDORID]</p>
<p>2 of the BUCKETS which were created in calculations in SLB:</p>
<p>CURRENT BUCKET</p>
<p>CASE<br />
WHEN (DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}  , GETDATE()  ) &lt; &#039;0&#039; and<br />
{*LAW_payables_aging_date:Document Type} = 5) THEN ({*LAW_payables_aging_date:Document Amount} * -1)<br />
WHEN (DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}  , GETDATE()  )  &#8217;0&#8242; and DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}, GETDATE()  )  &#8217;0&#8242; and DATEDIFF ( day , {*LAW_payables_aging_date:Aging Date}, GETDATE()  ) &lt; &#039;31&#039;) and<br />
{*LAW_payables_aging_date:Document Type} = 1 THEN<br />
{*LAW_payables_aging_date:Document Amount}<br />
ELSE NULL<br />
END</p>
<p>I want to add the current bucket to 1 &#8211; 30 days and 31-60 days and 61-90 days, etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

