mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Added indexes, fixed GetMonthList (Shire)
git-svn-id: svn://ultimatepp.org/upp/trunk@877 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2018d54c61
commit
a3b7d313db
2 changed files with 13 additions and 7 deletions
|
|
@ -155,6 +155,7 @@ void HomeBudget::Setup()
|
|||
month.GoEnd();
|
||||
UpdateSummary();
|
||||
}
|
||||
|
||||
EnableMoney();
|
||||
Sizeable().Zoomable();
|
||||
|
||||
|
|
@ -164,7 +165,7 @@ void HomeBudget::Setup()
|
|||
about <<= THISBACK(About);
|
||||
help <<= THISBACK(Help);
|
||||
|
||||
category/*.AlwaysDrop()*/.Resizeable(false).Header(false);
|
||||
category.Resizeable(false).Header(false);
|
||||
category.AddPlus(THISBACK(NewCategory));
|
||||
|
||||
dosummary = true;
|
||||
|
|
@ -184,8 +185,13 @@ void HomeBudget::Serialize(Stream &s)
|
|||
void HomeBudget::GenMonthList(int year)
|
||||
{
|
||||
months.Clear();
|
||||
for(int i = 0; i < 12; i++)
|
||||
months.Add(Date(year, i + 1, 1), Format("%Month %.4d", i + 1, year));
|
||||
|
||||
int curr_year = GetSysDate().year;
|
||||
int max_year = max(year,curr_year);
|
||||
|
||||
for(int scan_year = min(year, curr_year) - 1; scan_year <= max_year; scan_year++)
|
||||
for(int i = 0; i < 12; i++)
|
||||
months.Add(Date(scan_year, i + 1, 1), Format("%Month %.4d", i + 1, scan_year));
|
||||
}
|
||||
|
||||
void HomeBudget::LoadMoney(int dtid)
|
||||
|
|
@ -782,7 +788,7 @@ void HomeBudget::ClearAll()
|
|||
void HomeBudget::About()
|
||||
{
|
||||
WithAboutLayout<TopWindow> dlg;
|
||||
CtrlLayoutCancel(dlg, t_("O programie"));
|
||||
CtrlLayoutCancel(dlg, t_("About"));
|
||||
dlg.info.NoSb();
|
||||
Size sz = dlg.info.GetSize();
|
||||
dlg.info.SetQTF(GetTopic(String("HomeBudget/src/About$") + (lang == 0 ? "en-us" : "pl-pl")), Zoom(150, 1400));
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ END_TABLE
|
|||
|
||||
TABLE_(CATEGORIES)
|
||||
INT (ID) PRIMARY_KEY
|
||||
INT_ (GR_ID)
|
||||
INT_ (GR_ID) INDEX
|
||||
STRING (NAME, 500)
|
||||
DOUBLE_ (DEFVALUE)
|
||||
INT_ (PM)
|
||||
|
|
@ -19,8 +19,8 @@ END_TABLE
|
|||
|
||||
TABLE_(MONEY)
|
||||
INT (ID) PRIMARY_KEY
|
||||
INT_ (DT_ID)
|
||||
INT_ (CAT_ID)
|
||||
INT_ (DT_ID) INDEX
|
||||
INT_ (CAT_ID) INDEX
|
||||
INT (PM)
|
||||
DOUBLE_ (VALUE)
|
||||
DATE (DT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue