accounting

Calculate fiscal year in SQL Server

我的未来我决定 提交于 2019-11-30 11:29:38
How would you calculate the fiscal year from a date field in a view in SQL Server? I suggest you use a User-Defined Function based on the Fiscal year of your application. CREATE FUNCTION dbo.fnc_FiscalYear( @AsOf DATETIME ) RETURNS INT AS BEGIN DECLARE @Answer INT -- You define what you want here (September being your changeover month) IF ( MONTH(@AsOf) < 9 ) SET @Answer = YEAR(@AsOf) - 1 ELSE SET @Answer = YEAR(@AsOf) RETURN @Answer END GO Use it like this: SELECT dbo.fnc_FiscalYear('9/1/2009') SELECT dbo.fnc_FiscalYear('8/31/2009') Mouli Here is Australian Financial year start date code

Accounting Software Design Patterns [closed]

隐身守侯 提交于 2019-11-30 10:05:47
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Are there any good resources (books, authoritative guides, etc.) for design patterns or other best practices for software that includes financial accounting features? Specifically, where is good information about handling issues like the following: Internal representations of money quantities Internal

Accounting Database - storing credit and debit?

让人想犯罪 __ 提交于 2019-11-28 05:32:25
When you store a transaction into a database 1) Do you store Credit and debit in the same record under two different columns? (without the positive or the negative sign) Example 1A TABLENAME ... ... (Credit) null (Debit) 100 Example 1B TABLENAME ... ... (Credit) 250 (Debit) null Or 2) Do you store 1 value with a positive for credit, and a negative sign for debit? Example 2A TABLENAME ... ... (Amount) -100 Example 2B TABLENAME ... ... (Amount) 250 Accountants (and many bookkeepers, if they're any good) know that there is absolutely no difference between credits and debits. They're simply

Database schema design for a double entry accounting system?

我们两清 提交于 2019-11-27 16:43:42
Does anybody know or have any links to websites describing details of how to design a database schema for a double entry accounting system ??. I did find a bunch of articles but non were very explanatory enough. Would appreciate it if someone could help me on this. Leslie Here's one link that you may find helpful: http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html Updated: Alternative links (as original one seems to be broken): https://medium.com/@RobertKhou/double-entry-accounting-in-a-relational-database-2b7838a5d7f8 (Complete article with images) https://vikrampareek.wordpress.com/2012/09

Find out which combinations of numbers in a set add up to a given total

佐手、 提交于 2019-11-27 04:00:28
问题 I've been tasked with helping some accountants solve a common problem they have - given a list of transactions and a total deposit, which transactions are part of the deposit? For example, say I have this list of numbers: 1.00 2.50 3.75 8.00 And I know that my total deposit is 10.50 , I can easily see that it's made up of the 8.00 and 2.50 transaction. However, given a hundred transactions and a deposit in the millions, it quickly becomes much more difficult. In testing a brute force solution

Accounting Database - storing credit and debit?

冷暖自知 提交于 2019-11-27 00:57:45
问题 When you store a transaction into a database 1) Do you store Credit and debit in the same record under two different columns? (without the positive or the negative sign) Example 1A TABLENAME ... ... (Credit) null (Debit) 100 Example 1B TABLENAME ... ... (Credit) 250 (Debit) null Or 2) Do you store 1 value with a positive for credit, and a negative sign for debit? Example 2A TABLENAME ... ... (Amount) -100 Example 2B TABLENAME ... ... (Amount) 250 回答1: Accountants (and many bookkeepers, if

Database schema design for a double entry accounting system?

巧了我就是萌 提交于 2019-11-26 18:43:51
问题 Does anybody know or have any links to websites describing details of how to design a database schema for a double entry accounting system ??. I did find a bunch of articles but non were very explanatory enough. Would appreciate it if someone could help me on this. 回答1: Here's one link that you may find helpful: http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html Updated: Alternative links (as original one seems to be broken): https://medium.com/@RobertKhou/double-entry-accounting-in-a

Use Float or Decimal for Accounting Application Dollar Amount?

扶醉桌前 提交于 2019-11-26 00:58:38
问题 We are rewriting our legacy Accounting System in VB.NET and SQL Server. We brought in a new team of .NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the Dollar amounts using Floats. The legacy system language, I programmed in, did not have a Float so I probably would have used a Decimal. What is your recommendation? Should Float or Decimal data type be used for dollar amounts? What are some of the pros and cons for either? One Con mentioned in our daily

Use Float or Decimal for Accounting Application Dollar Amount?

此生再无相见时 提交于 2019-11-25 21:01:20
We are rewriting our legacy Accounting System in VB.NET and SQL Server. We brought in a new team of .NET/ SQL Programmers to do the rewrite. Most of the system is already completed with the Dollar amounts using Floats. The legacy system language, I programmed in, did not have a Float so I probably would have used a Decimal. What is your recommendation? Should Float or Decimal data type be used for dollar amounts? What are some of the pros and cons for either? One Con mentioned in our daily scrum was you have to be careful when you calculate an amount that returns a result that is over two