accounting

Hierarchical roll-up in SQL accounting system

▼魔方 西西 提交于 2020-05-17 04:50:05
问题 I'm trying to make annual reports (Balance Sheet and Profit & Loss) from general journal entries in an accounting system. The general journal table (simplified) includes: CREATE TABLE `sa_general_journal` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Date` timestamp NOT NULL DEFAULT current_timestamp(), `Item` varchar(1024) NOT NULL DEFAULT '', `Amount` decimal(9,2) NOT NULL DEFAULT 0.00, `Source` int(10) unsigned NOT NULL, `Destination` int(10) unsigned NOT NULL, PRIMARY KEY (`ID`), KEY

How to design a relational model for double-entry accounting with job costing

核能气质少年 提交于 2020-03-13 06:51:23
问题 I would like to commend to readers for the depth and obvious thought that went into the answers here and here. I stumbled across them while searching for something tangential for a project I'm working on, and I got caught up reading them from top to bottom. I am trying to build a niche-market app using these principles (namely, double-entry accounting), with job-costing thrown in. The above answers have been extremely helpful in reshaping my concept of what both the accounting and the

Report from Double Entry Accounting [closed]

a 夏天 提交于 2020-01-07 08:03:43
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 days ago . My reputation is not enough to comment on this post: Relational Data Model for Double-Entry Accounting. For the data model from the linked question, can anyone explain the calculation for the closing balance on the AccountStatement, any sample SQL? And a small clarification, correct me if I'm wrong.

Ruby on Rails REST design question - transfer money between accounts

一世执手 提交于 2020-01-02 07:14:25
问题 I have an Account class, want to implement transfer screens to allow a user to transfer money between 2 accounts. How would I implement this ins RESTfull way? I have the standard account and rest actions for that, thats fine. But how would I implement transfer? Normally I would just add a method called "transfer" (called to render the screen) and "transfer_update"(called on submit) to the accounts controller and corresponding views, but I don think this is very RESTfull. thanks Joel 回答1: You

Relational Data Model for Double-Entry Accounting

北慕城南 提交于 2019-12-30 05:31:28
问题 The bounty expires in 5 hours . Answers to this question are eligible for a +50 reputation bounty. Alex wants to draw more attention to this question. Assume there is a bank, a large shop, etc, that wants the accounting to be done correctly, for both internal accounts, and keeping track of customer accounts. Rather than implementing that which satisfies the current simple and narrow requirement, which would a 'home brew': those turn out to be a temporary crutch for the current simple

Accounting Database - storing a transaction

偶尔善良 提交于 2019-12-18 10:47:08
问题 You make a gaming website where the user can buy gaming credits and the funds are deposited/credited into the user's virtual account to play some game etc...etc.. 1 If you got an accountant to record the transaction, it would be recorded like this (maybe a bit more complex but you get the point) TRANSACTION PK_ID1 Cash - $10 (System) PK_ID2 Deposit $10 (System) TRANSACTION PK_ID3 Bank Account - $10 (John) PK_ID4 Deposit $10 (John) 2 As a developer, do you really need to waste 2 extra records?

Calculate fiscal year in SQL Server

狂风中的少年 提交于 2019-12-18 03:56:43
问题 How would you calculate the fiscal year from a date field in a view in SQL Server? 回答1: 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

How to update balance in a accounting app with django ?

有些话、适合烂在心里 提交于 2019-12-13 14:49:05
问题 I'm learning Django, trying to do an accounting app for keeping track of my expenses, etc.. I created the database with two models, one for accounts and one for operations. But i have no idea how to keep my balance updated with each operation. I was thinking maybe, each time i save a new operation, I update the balance by overriding the save method of Operation Model ? But in that case, if i make a mistake and have to delete one operation, my balance won't be updated then, right ? I thought I

Crystal Report creating a receipt register report 2

拈花ヽ惹草 提交于 2019-12-11 12:45:03
问题 This question is related to my first question, see it here: Crystal Report creating a receipt register report I already done some parts of my report with the help of a good person(Siva) but I'm on much bigger problem I think. It's about my sundries section. In my table and I want to display my report to look like this. And this is what I'm getting... You can see in my table that the record with RefNo: 1003 has a lots of account that has been paid. Unfortunately the reports I'm getting has no

Accounting and Database design, storing debit and credit amount

落花浮王杯 提交于 2019-12-09 04:44:25
问题 QUESTION: In the case below should I have stored all my amount as positives decimal amounts then flag the amount as either being a "Debit" or "Credit" rather than storing debits as negative amount and credits as positive amount? In my database design, I store "debit" as negative amount, and credit as positive amount. Now in reporting sometimes the results come out wrong because if you do this TotalAmount = Amount-Fee, and if withdraw amount is $100, and fee is $1. You would end up with -$100-