2012/12/19

Android App:Daily Money Change Log 2012/12/18






This project is a fork of original Daily Money project hosted on github by Dennis Chen

https://github.com/dennischen/daily-money



1. added: export csv/import csv/share csv for tags
2. added: reset data for tags
3. modified: remove auto creating default account when there is no account exist




1. 新增:匯出 CSV/匯入 CSV/分享 CSV 加入標籤相關資料
2. 新增:重置資料 加入標籤相關資料
3/ 修改:移除當沒有任何帳戶時、自動建立預設帳戶的功能



標籤功能的簡單說明


2012/12/18

Android App:Daily Money Enhancement - Tag



設計理念:
Tag 可以視為「專案」、「分類」、「預算」......等等,最重要的是可以一對多,一筆帳務明細對應到多個 tag。
例如,假設同時記錄全家人的收支時,可能會想將帳務細分為「由誰支出」、「花在誰身上」、「花在哪個特定的事件上」或是同時要區分上述所列的項目,可以建立以下 tag:
支付人.A
支付人.B
花費使用人.C
花費使用人.D
專案.X
專案.Y
然後在一筆明細中設定多個 tag:支付人.A花費使用人.C專案.X
來表示這筆花費屬於專案 X,且是由 A 支付、花在 C 身上。(會太斤斤計較嗎?哈哈!)
接著可以透過報表或查詢功能去篩選某一期間、某些 tag,來查看收支的情形。
基本上,tag 和 account 的性質有點類似,可以把 account 視為實體帳戶,例如現金、銀行帳戶等等真的有實體存在;而 tag 可視為虛帳戶,例如同一個銀行帳戶裡的資金可能會劃分不同的用途。
透過 account 和 tag 的搭配,便可以同時達到彙整帳務或是細分帳務的目的。



功能需求:
1. Tag 管理畫面與帳本管理雷同
2. 點選 icon 後,顯示 tag 清單
3. 按 menu 出現「新增」按鈕
4. 長按清單項目出現「編輯」、「刪除」、「複製」按鈕
5. TB_TAG 記錄 tag 資訊
6. TB_DETTAG 記錄 details 和 tags 的對應關係資訊
7. 報表僅提供一 icon,進入後畫面與現有報表雷同,但最右側按鈕改為「週」、「月」、「年」、「日」「自訂區間」切換呈現。
8. 同 tag 中金額計算根據記帳時 to account 的借貸性質進行加減。to account 為資產時金額為正,其餘金額為負。
9. 「匯出 CSV」、「匯入 CSV」兩功能需加入 TB_TAG 和 TB_DETTAG。

PS1. 圖表有必要嗎?(不想做)

基本上如果做完這樣的功能,我也懶得再做預算功能了......

我自己做了一張很醜的圖

標籤管理

建立/修改明細時,可設定標籤。

標籤是多選形式。

標籤金額的報表





目前進度到 6.,其實有點卡住,
有很多東西可以和原本 Account 的處理共用,但是如果要做 refactoring,大概就得大改;倘若只是硬加上新功能的話,感覺又有很多重複的程式,真是兩難;另一方面,不太清楚原作者程式架構的設計理念,新加入的東西似乎有點格格不入。

就跟做專案一樣,每個人的程式撰寫風格都不同,也很難鉅細靡遺地規範程式應該怎麼寫;不論好壞與否,總是會有歧異而增加維護、修改的難度。

2012/12/17

Android App:Daily Money Change Log 2012/12/17





This project is a fork of original Daily Money project hosted on github by Dennis Chen

https://github.com/dennischen/daily-money


1. added: report for tags
2. modified: move tag settings up in add/editing details screen
3. fixed: backups house keeping function after merging official release 0.9.8
4. fixed: minor bugs


1. 新增:標籤相關的報表功能
2. 修改:新增/編輯帳務明細時,設定標籤的項目上移。
3. 修正:合併官方版本 0.9.8 後,保留最近七天的備份資料功能失效。
4. 修正:小問題修正

標籤功能的簡單說明


2012/12/12

Android App:Daily Money Change Log 2012/12/12




This project is a fork of original Daily Money project hosted on github by Dennis Chen

https://github.com/dennischen/daily-money

1. Merge official release 0.9.8-121107-freshly
2. modified: hide installment/recurring settings when editing details.
3. modified: reorganize report display into Accounts Changes & Accounts Balances with day/week/month/year mode
4. added: tag management
5. added: add tag settings when add/editing details
6. TODO: report for tags

This is alpha release. After finishing the report for tags, tags will be more practical.


1. 合併官方版本 0.9.8-121107-freshly
2. 修改:編輯帳務明細時,隱藏分期/週期設定。
3. 修改:調整報表呈現,區分為「帳戶餘額」、「帳戶變動」,並可在日、週、月、年循環切換。
4. 新增:增加標籤管理功能
5. 新增:新增/編輯帳務明細時,可設定標籤。
6. TODO:標籤相關的報表功能

待標籤的報表完成後,標籤的功能才有意義。


2012/08/22

JARS Money Management System (T. Harv Eker) 實作


財務自由帳戶 Financial Freedom Account = 10%
長期儲蓄帳戶 Long Term Savings For Spending = 10%
教育訓練帳戶 Education = 10%
休閒娛樂帳戶 Play = 10%
貢獻付出帳戶 Give = 5%
生活支出帳戶 Necessities =55%

2012/08/15

Android App:Daily Money Change Log 2012/08/15



This project is a fork of original Daily Money project hosted on github by Dennis Chen

https://github.com/dennischen/daily-money

Merge official release 0.9.8.

合併官方版本 0.9.8。

2012/07/27

想想就好了

在現有專案型態下,即便是很類似的專案,我們也只是不斷地重新造輪,即使是號稱使用相同平台的專案,彼此之間也根本無法相容。

2012/07/23

Just a Note:參加 Java TWO 大拜拜的感想


1. 每個 topic 都只有不到一小時,很難深入描述,而且通常只能用很簡單的例子介紹"優點"。
2. 中午的便當還不錯。
3. 背包還不錯

2012/06/16

Android App:Daily Money To Do List by Myself


Budget
1. button
    (1) top button panel: [prev][this][next][monthly/yearly view]
    (2) menu: [add][import]
    (3) long press: [edit][copy][delete]
2. add/edit
    (1) budget item: Set a name for budget item.
    (2) amount: Set amount for budget item.
    (3) month or year: Set budget month or year.
    (4) warning: show warning or not when add/edit details.
    (5) tip: show percentage or not when add/edit details.
3. delete: delete a budget item.
4. copy: copy a budget item.
5. (last priority)import: import existing account as budget item
    (1) from expenses
    (2) from debet
    (3) from tag
7. list view
8. impact on add/edit detail
    (1) show warning
    (2) show tip
8. (last priority)budget report

Recurring
1. button
    (1) menu: [add]
    (2) long press: [edit][copy][delete]
2. add/edit
    (1) from account
    (2) to account
    (3) frequency: daily/weekly/monthly/yearly
    (4) date information: (according to frequency)
        a. daily: none
        b. weekly: set week day
        c. monthly: set day of a month/last day
        d. yearly: set month and day of a month
3. delete: delete a recurring item.
4. copy: copy a recurring item.
5. daily background scheduled job creates recurring item automatically.

Tag
1. button
    (1) menu: [add]
    (2) long press: [edit][copy][delete]
2. add/edit
    (1) tag name
3. delete: delete a tag.
4. copy: copy a tag.
5. impact on add/edit detail: add tag selection item.

2012/06/12

Android App:Daily Money Change Log 2012/06/12


This project is a fork of original Daily Money project hosted on github by Dennis Chen
https://github.com/dennischen/daily-money

Modified: Because the native class DatePickerDialog in Android 4.0 shows "Set Date" in title rather than date information as before, create a new customize DatePickerDialog to display date in the title.

修改:因為 Android 4.0 原生的 DatePickerDialog 只會在標題顯示「設定日期」,而不會顯示日期資訊,所以增加一個自訂的 DatePickerDialog 在標題顯示日期資訊。

2012/05/12

Android App:Daily Money Change Log 2012/05/14


This project is a fork of original Daily Money project hosted on github by Dennis Chen
https://github.com/dennischen/daily-money

1. bug fixing for installment.
2. only keep backups last 7 days when execute daily backup.
3. bug fixing for pie chart.

1. 分期付款處理的問題修正。
2. 每日自動備份時,只保留最近七天的資料。
3. 圓餅圖問題修正。


2012/04/30

Android App:Daily Money Change Log 2012/04/30

This project is a fork of original Daily Money project hosted on Google Code by Dennis Chen
http://code.google.com/p/daily-money/
https://github.com/dennischen/daily-money

Only one change.
Automatic backup db & pref files to sd card at 3:00 A.M. every day.

只有一項修改。
每天凌晨三點自動備份 db 和 pref 檔到 SD 卡。


2012/04/13

Just a Note:Handle BigDecimal with Android SQLiteDatabase

Sorry, it is difficult to me to write this article in English.

原本 Daily Money 是使用 SQLite 的 REAL 資料型態儲存金額相關欄位,在程式中則是使用 double 處理金額的運算。
開發過金融系統的人都很清楚,double 存在精確度的問題,所以這次改版,就把 double 改為 BigDecimal。

修改中遇到幾個問題,備忘一下。


Android App:Daily Money Change Log 2012/04/13

2012/03/09

Message in a Bottle:Spring Batch DuplicateKeyException 處理紀錄(未解)


之前使用 spring batch,因為客戶要求寫 db 時,不能因為 primary key duplicate 而終止 batch。

所以我在 chunk 加了 skip-limit 的 property,並且設定

<skippable-exception-classes>
  <include class="org.springframework.dao.DuplicateKeyException" />
</skippable-exception-classes>

然後,昨天遇到了一狀況:
1. 查詢 batch_step_execution table 時,會發現 rollback_count 會是 write_skip_count 的兩倍。
2. 假設有兩筆資料 primary key 相同,且當 writer 是 db writer 時,會正確寫入一筆。
3. 承 2.,當 writer 是 composite writer 時 ( db writer + file writer ),這兩筆都不會寫入( db 和 file 皆如此)。

所以我在 chunk 後加上了

<no-rollback-exception-classes>
  <include class="org.springframework.dao.DuplicateKeyException"/>
</no-rollback-exception-classes>

承 3.,db 就正常了(寫入一筆),但是 file 依然兩筆都不寫。

還好 file 只是用來輔助檢查之用,經客戶確認可接受此狀況,所以就沒有繼續調整。

紀錄一下,看之後有沒有解決方法。