Agentic Trading Lab
Talk to agents, and test trading ideas. Try AI trading agents on real market data with no code required.
AI translation
分租套房電費計算:抄表、依台電帳單比例或每度單價分攤、公共用電、換表、列印繳費通知單。純網頁免安裝
Translation pending
FinanceJavaScript · HTMLGitHub @LarryveryhandsomeOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗分租套房、雅房,每間裝了分表(小電表),每兩個月抄一次表、算一次電費,常常算到頭昏: 誰用了幾度、公共用電怎麼分、四捨五入差的那幾塊錢算誰的?這個網頁會:
免安裝、免伺服器、不連網:雙擊 index.html 就能用。資料只存在你這台電腦的瀏覽器。
線上試用(示範資料):https://larryveryhandsome.github.io/tw-submeter-bill/
index.html。一開始會顯示示範資料(房客、電表編號、度數、金額全部是假的),可以先玩看看。data/readings.example.csv(可用 Excel 開),照「電表編號」填本期度數。在那間房勾「換表」,填:
用電度數 =(舊表最後 − 上期)+(本期 − 新表起始)。下一期會自動從新表的度數接著算。
資料存在瀏覽器裡,換電腦、清除瀏覽器資料、用私密視窗都會不見。 請定期按「匯出備份(JSON)」,要還原時用「匯入備份」。「匯出本期 CSV」可以用 Excel 開(有 BOM,不會亂碼)。
config.js)用記事本打開 config.js。網頁上「計費設定」改過的值會存在瀏覽器、優先於這裡;按「恢復 config.js 預設」可還原。
| 設定 | 說明 |
|---|---|
title | 網頁、總表和通知單的標題 |
landlord、contact | 通知單上的出租人稱呼與電話 |
mode | ratio 依台電帳單比例分攤;fixed 固定每度單價 |
unitPrice | fixed 模式每度幾元 |
commonMode | 公共用電:equal 計費房間平均分;usage 依用電比例分;landlord 房東負擔 |
rounding | round 四捨五入到元;ceil 無條件進位;floor 無條件捨去;none 不取整(小數 2 位) |
remainder | 取整後的差額:last 加到最後一間(合計=原始總額四捨五入,通常剛好等於帳單);landlord 由房東吸收 |
minCharge | 每間最低收費(元),0 代表不設 |
spikeFactor、spikeMinKwh | 本期度數超過上期幾倍、且至少多幾度,就提醒「暴增」 |
noticeNote | 通知單下方的說明文字 |
fields | 抄表 CSV 的欄位名稱 |
台電帳單 2,400 元/480 度,每度 2,400 ÷ 480 = 5 元。四間房分表:
| 房間 | 用電度數 | 分到公共用電 | 計費度數 | 應繳 |
|---|---|---|---|---|
| A | 120 | 15 | 135 | 675 |
| B | 90 | 15 | 105 | 525 |
| C | 150 | 15 | 165 | 825 |
| D | 60 | 15 | 75 | 375 |
| 合計 | 420 | 60 | 480 | 2,400 |
公共用電 = 480 − 420 = 60 度,平均每間 15 度。四間合計剛好等於台電帳單。
如果改成「依用電比例分」,每間就是 自己度數 ÷ 分表合計 × 帳單金額;改成「房東負擔」,每間只付自己度數 × 5 元,公共的 60 度(300 元)由房東吸收。
取整差額:例如 1,000 元三間平分,每間 333.33 元,四捨五入是 333、333、333,少 1 元。 選「加到最後一間」→ 333、333、334(合計 1,000);選「由房東吸收」→ 三間都 333,房東負擔 1 元。
index.html 畫面(不載入任何外部資源,file:// 直接開)
css/style.css 樣式(含列印、深色模式、手機版)
config.js 設定(window.BILL_CONFIG)
data/sample.js 網頁內建的示範資料(SAMPLE_READINGS_CSV 和範本 CSV 內容相同,測試會檢查)
data/readings.example.csv 抄表 CSV 範本
js/bill.js 計算核心:CSV、度數、兩種算法、公共用電、取整、提醒、帶入上期(純函式,UMD)
js/app.js 畫面邏輯
tests/ 單元測試(node:test,不用裝任何套件)
npm test
不需要任何金鑰、帳號或付費服務。 全部計算都在你的瀏覽器裡完成,不連網、不呼叫任何 API。所以沒有 docs/金鑰申請.md。
完整的發布前檢查(八道閘門)見 RELEASE_CHECK.md。
這個工具是開源的,可以免費使用。如果你想要:
歡迎加 LINE 跟我們聊。我們會依需求的範圍與複雜度報價,原則上以實際報價單為準。