itzumar
Posts: 88
|
Posted: 01/30/2013, 4:03 AM |
|
can any one send me balance sheet script and mysql design with php or guide me. i want to create balance sheet using code chrage studio
_________________
Umar |
|
|
viktork
Posts: 22
|
Posted: 01/30/2013, 11:30 AM |
|
Here is a simple one
Just make sure that you have values with the right negative/positive meanings (Assets/Liabilities as per your Ledger)
SELECT * FROM transactions;
transNum | itemid | description | qty
---------------------------------------
01 | 01 | DESC1 | 14
02 | 01 | DESC1 | 05
03 | 01 | DESC1 | 01
04 | 02 | DESC2 | 02
05 | 02 | DESC2 | 01
06 | 02 | DESC2 | 02
07 | 03 | DESC3 | 05
08 | 03 | DESC3 | 06
09 | 03 | DESC3 | 01
SELECT itemid,description,qty FROM transactions GROUP BY id WITH ROLLUP;
itemid | description | qty
----------------------------
01 | DESC1 | 20
02 | DESC2 | 05
03 | DESC3 | 12
| DESC3 | 37
Source: http://stackoverflow.com/questions/12940119/mysql-change-last-row-of-rollup
|
|
|
|