Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Payment terms - splitting values to months

Author  Topic 

cidr
Posting Yak Master

207 Posts

Posted - 2012-01-14 : 09:02:36
Hi folks and happy new year!!

I'm working on a budget app that has months of year along each column. each month column has values and I have to break the value into payment terms (payment terms are how they plan; they take a value on a particular month, split it into percentages, and then move each percentage of that number forward to other months).

This means that when a user applies percentages to a value to break it up (i.e. first month 25%, second month 25%, third month 50%) I have to move each payment from that month forward to subsequent months depending on the payment profile. Please see example below

Jan - £100
Payment terms: ( +1 means one month forward, +2 means two months forward...)
+1 = 25%
+2 = 25%
+3 = 50%

A calculation should produce this (on another spread sheet)
Feb = £25
Mar = £25
Apr = £50

Hope someone can help

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-14 : 09:41:20
so what are values that user passes as input?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

cidr
Posting Yak Master

207 Posts

Posted - 2012-01-14 : 10:35:46
sorry visakh, I messed that thread up as I specified a spread sheet. This is what the users originally planned from.

The table would have columns - Jan - Dec. Lets just say it's an Access front-end. If the column January had a balance sheet line and there was £100, I'd do the calculations in SQL to automate the movement of payment terms.

I'm just not sure how to break the £100 up into amounts by percentages. If the user inputs the amounts in an Access table, I'd need to calculate the movements in SQL (SQL tabels being the backend)

Columns = months
rows = Balance sheet lines

Hope that helps

:)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-14 : 12:29:26
it will only have month names? no sequence value?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -