lincolnloop / django-beancounter

Django-beancounter is a simple app I built to track my income and expenses.

This URL has Read+Write access

0862983b » lincolnloop 2008-12-04 autogen newforms-admin 1 from django.contrib import admin
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 2
3 from beancounter.models import (Category, BankAccount, AccountTransfer,
e4ceba0f » lincolnloop 2009-01-04 remove bid field, add invoi... 4 Person, Entry, Employee, Project, ProjectTime,
5 ProjectInvoice)
0862983b » lincolnloop 2008-12-04 autogen newforms-admin 6
7 class CategoryOptions(admin.ModelAdmin):
8 fieldsets = (
9 (None, {
10 'fields': ('type','name')
11 }),
12 ('Associate Costs of Goods Sold to an Income Category', {
13 'classes': ('collapse',),
14 'fields' : ('income',)
15 }),
16 )
17
18 class BankAccountOptions(admin.ModelAdmin):
19 list_display = ('name','type')
20 ordering = ['-track_balance','name','type']
21
22 class PersonOptions(admin.ModelAdmin):
23 list_display = ('name','phone','email')
24
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 25 class EmployeeAdmin(admin.ModelAdmin):
26 list_display = ('name', 'gmt_offset', 'rate')
27 search_fields = ('name',)
28
e4ceba0f » lincolnloop 2009-01-04 remove bid field, add invoi... 29 class ProjectInvoiceInline(admin.TabularInline):
30 model = ProjectInvoice
31
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 32 class ProjectAdmin(admin.ModelAdmin):
f9ffe2cd » lincolnloop 2009-01-05 auto-populate cost 33 list_display = ('name', 'total_invoiced', 'total_cost', 'profit')
e4ceba0f » lincolnloop 2009-01-04 remove bid field, add invoi... 34 inlines = [ProjectInvoiceInline,]
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 35
36 class ProjectTimeAdmin(admin.ModelAdmin):
5b15796c » lincolnloop 2009-01-05 minor admin tweaks 37 list_display = ('employee', 'start_date', 'project', 'hours', 'cost', 'cost_converted')
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 38 list_filter = ('project', 'employee')
5b15796c » lincolnloop 2009-01-05 minor admin tweaks 39 date_hierarchy = 'start_date'
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 40
0862983b » lincolnloop 2008-12-04 autogen newforms-admin 41 class AccountTransferOptions(admin.ModelAdmin):
42 list_display = ('date','amount','from_account','to_account')
43 list_filter = ('to_account','from_account')
44 date_hierarchy = 'date'
45
46 class EntryOptions(admin.ModelAdmin):
47 list_display = ('date', 'name', 'category', 'amount')
48 date_hierarchy = 'date'
49 search_fieldsets = ('name','memo')
50 list_filter = ('category','name','bank_account')
51
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 52
0862983b » lincolnloop 2008-12-04 autogen newforms-admin 53 admin.site.register(Category, CategoryOptions)
54 admin.site.register(BankAccount, BankAccountOptions)
55 admin.site.register(Person, PersonOptions)
56 admin.site.register(AccountTransfer, AccountTransferOptions)
57 admin.site.register(Entry, EntryOptions)
9d6640ef » lincolnloop 2009-01-04 added project/employee trac... 58 admin.site.register(Employee, EmployeeAdmin)
59 admin.site.register(Project, ProjectAdmin)
60 admin.site.register(ProjectTime, ProjectTimeAdmin)
0862983b » lincolnloop 2008-12-04 autogen newforms-admin 61