From: <vo...@us...> - 2010-12-02 14:42:38
|
Revision: 1022 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1022&view=rev Author: vomikan Date: 2010-12-02 14:42:32 +0000 (Thu, 02 Dec 2010) Log Message: ----------- Buttons color changed Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2010-12-02 14:29:52 UTC (rev 1021) +++ trunk/mmex/src/billsdepositsdialog.cpp 2010-12-02 14:42:32 UTC (rev 1022) @@ -484,12 +484,12 @@ wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); itemPanel25->SetSizer(itemBoxSizer26); - wxButton* itemButton27 = new wxButton( itemPanel25, ID_DIALOG_TRANS_BUTTON_OK, - _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton27 = new wxButton( itemPanel25, ID_DIALOG_TRANS_BUTTON_OK, _("OK")); + itemButton27->SetForegroundColour(wxColour(wxT("FOREST GREEN"))); itemBoxSizer26->Add(itemButton27, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* itemButton28 = new wxButton( itemPanel25, - wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + wxButton* itemButton28 = new wxButton( itemPanel25, wxID_CANCEL, _("Cancel")); + itemButton28->SetForegroundColour(wxColour(wxT("RED"))); itemBoxSizer26->Add(itemButton28, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-03-21 01:18:48
|
Revision: 1197 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1197&view=rev Author: stef145g Date: 2011-03-21 01:18:42 +0000 (Mon, 21 Mar 2011) Log Message: ----------- Correction to dialog box Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2011-03-20 01:25:56 UTC (rev 1196) +++ trunk/mmex/src/billsdepositsdialog.cpp 2011-03-21 01:18:42 UTC (rev 1197) @@ -117,8 +117,12 @@ dpcbd_->Disable(); itemRepeats_->Disable(); itemAccountName_->Disable(); + textAmount_->SetFocus(); } + if (edit_) // Disabled on Edit because changing this date has no effect except to confuse user. + dpc_->Disable(); + wxSQLite3Statement st_payee = db_->PrepareStatement("select PAYEENAME from PAYEE_V1 where PAYEEID = ?"); wxSQLite3Statement st = db_->PrepareStatement("select * from BILLSDEPOSITS_V1 where BDID = ?"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-09-30 18:03:20
|
Revision: 1469 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1469&view=rev Author: vomikan Date: 2011-09-30 18:03:13 +0000 (Fri, 30 Sep 2011) Log Message: ----------- ready for vertical design Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2011-09-30 16:24:11 UTC (rev 1468) +++ trunk/mmex/src/billsdepositsdialog.cpp 2011-09-30 18:03:13 UTC (rev 1469) @@ -295,20 +295,26 @@ { mmBDDialog* itemDialog1 = this; - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); itemDialog1->SetSizer(itemBoxSizer2); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); + //--//wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxBoxSizer* itemBoxSizer3L = new wxBoxSizer(wxVERTICAL); + itemBoxSizer3->Add(itemBoxSizer3L, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxBoxSizer* itemBoxSizer3R = new wxBoxSizer(wxVERTICAL); + itemBoxSizer3->Add(itemBoxSizer3R, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + /* Bills & Deposits Details */ - wxStaticBox* itemStaticBoxSizer4Static = new wxStaticBox(itemDialog1, wxID_ANY, - _("Repeating Transaction Details")); - wxStaticBoxSizer* itemStaticBoxSizer4 = new wxStaticBoxSizer(itemStaticBoxSizer4Static, - wxHORIZONTAL); - itemBoxSizer3->Add(itemStaticBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5); + wxStaticBox* itemStaticBoxSizer4Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Repeating Transaction Details"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticBoxSizer* itemStaticBoxSizer4 = new wxStaticBoxSizer(itemStaticBoxSizer4Static, wxHORIZONTAL); + itemBoxSizer3L->Add(itemStaticBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5); wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(2, 4, 0, 0); + //--//wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(4, 2, 0, 0); itemStaticBoxSizer4->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, @@ -371,20 +377,20 @@ itemCheckBoxAutoExeUserAck_ = new wxCheckBox( itemDialog1, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_USERACK, _("Set to 'Auto Execute' on the 'Next Occurrence' date."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - itemBoxSizer3->Add(itemCheckBoxAutoExeUserAck_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer3L->Add(itemCheckBoxAutoExeUserAck_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); itemCheckBoxAutoExeSilent_ = new wxCheckBox( itemDialog1, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_SILENT, _("Set 'Auto Execute' without user acknowlegement."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); itemCheckBoxAutoExeSilent_->Enable(false); - itemBoxSizer3->Add(itemCheckBoxAutoExeSilent_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer3L->Add(itemCheckBoxAutoExeSilent_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); /* Transaction Details */ wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox(itemDialog1, - wxID_ANY, _("Transaction Details")); + wxID_ANY, _("Transaction Details"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer(itemStaticBoxSizer14Static, wxVERTICAL); - itemBoxSizer3->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer3R->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL); itemStaticBoxSizer14->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5); @@ -422,6 +428,7 @@ itemStaticBoxSizer14->Add(itemPanel7, 1, wxGROW|wxALL, 5); wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(4, 4, 0, 0); + //--//wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(8, 2, 0, 0); itemPanel7->SetSizer(itemFlexGridSizer8); wxStaticText* itemStaticText9 = new wxStaticText( itemPanel7, ID_DIALOG_TRANS_STATIC_PAYEE, @@ -532,7 +539,7 @@ wxPanel* itemPanel25 = new wxPanel( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - itemBoxSizer3->Add(itemPanel25, 0, wxALIGN_RIGHT|wxALL, 5); + itemBoxSizer2->Add(itemPanel25, 0, wxALIGN_RIGHT|wxALL, 5); wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); itemPanel25->SetSizer(itemBoxSizer26); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2011-10-08 13:32:44
|
Revision: 1478 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1478&view=rev Author: vomikan Date: 2011-10-08 13:32:38 +0000 (Sat, 08 Oct 2011) Log Message: ----------- Vertical design (not finished yet) will be updated Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2011-10-08 09:44:42 UTC (rev 1477) +++ trunk/mmex/src/billsdepositsdialog.cpp 2011-10-08 13:32:38 UTC (rev 1478) @@ -295,53 +295,64 @@ { mmBDDialog* itemDialog1 = this; - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); - itemDialog1->SetSizer(itemBoxSizer2); + wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL); + itemDialog1->SetSizer(itemBoxSizer20); - wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); - //--//wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + //--//wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer20->Add(itemBoxSizer3, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxBoxSizer* itemBoxSizer3L = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer3L, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer3->Add(itemBoxSizer3L, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxBoxSizer* itemBoxSizer3R = new wxBoxSizer(wxVERTICAL); - itemBoxSizer3->Add(itemBoxSizer3R, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer3->Add(itemBoxSizer2, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + /* Calendar */ + wxStaticBox* itemStaticBoxSizerCalendar = new wxStaticBox(itemDialog1, wxID_ANY, _("Calendar"), wxDefaultPosition, wxDefaultSize, 0 ); + wxStaticBoxSizer* itemStaticBoxSizer44 = new wxStaticBoxSizer(itemStaticBoxSizerCalendar, wxHORIZONTAL); + itemBoxSizer3L->Add(itemStaticBoxSizer44, 10, wxALIGN_CENTER|wxALL, 15); + + wxCalendarCtrl* itemCalendarCtrl44 = new wxCalendarCtrl( itemDialog1, wxID_ANY, wxDateTime(), wxDefaultPosition, wxDefaultSize, + wxCAL_MONDAY_FIRST + //wxCAL_SUNDAY_FIRST + |wxSUNKEN_BORDER ); + itemStaticBoxSizer44->Add(itemCalendarCtrl44, 10, wxALIGN_CENTER_HORIZONTAL|wxALL, 15); + /* Bills & Deposits Details */ wxStaticBox* itemStaticBoxSizer4Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Repeating Transaction Details"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBoxSizer* itemStaticBoxSizer4 = new wxStaticBoxSizer(itemStaticBoxSizer4Static, wxHORIZONTAL); - itemBoxSizer3L->Add(itemStaticBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5); + itemBoxSizer3L->Add(itemStaticBoxSizer4, 0, wxALIGN_CENTER|wxALL, 5); - wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(2, 4, 0, 0); - //--//wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(4, 2, 0, 0); + //--//wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(2, 4, 0, 0); + wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(4, 2, 10, 10); itemStaticBoxSizer4->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("Account Name"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer5->Add(itemStaticText6, 0, - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); itemAccountName_ = new wxButton( itemDialog1, ID_DIALOG_BD_COMBOBOX_ACCOUNTNAME, - _("Select Account"), wxDefaultPosition, wxSize(100, -1), 0 ); + _("Select Account"), wxDefaultPosition, wxSize(200, -1), 0 ); itemFlexGridSizer5->Add(itemAccountName_, 0, - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); itemAccountName_->SetToolTip(_("Specify the Account that will own the repeating transaction")); wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("Next Occurrence"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer5->Add(itemStaticText8, 0, - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); dpcbd_ = new wxDatePickerCtrl( itemDialog1, ID_DIALOG_BD_BUTTON_NEXTOCCUR, wxDefaultDateTime, - wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN); - itemFlexGridSizer5->Add(dpcbd_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxDefaultPosition, wxSize(110,-1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); + itemFlexGridSizer5->Add(dpcbd_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); dpcbd_->SetToolTip(_("Specify the date of the next bill or deposit")); wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("Repeats"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer5->Add(itemStaticText10, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); wxString itemComboBox11Strings[] = { @@ -360,45 +371,85 @@ itemRepeats_ = new wxChoice( itemDialog1, ID_DIALOG_BD_COMBOBOX_REPEATS, wxDefaultPosition, wxSize(100, -1), 11, itemComboBox11Strings, 0); itemFlexGridSizer5->Add(itemRepeats_, 0, - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); itemRepeats_->SetSelection(0); wxStaticText* itemStaticText231 = new wxStaticText( itemDialog1, wxID_STATIC, _("Times Repeated"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer5->Add(itemStaticText231, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); textNumRepeats_ = new wxTextCtrl( itemDialog1, ID_DIALOG_BD_TEXTCTRL_NUM_TIMES, wxT(""), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer5->Add(textNumRepeats_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemFlexGridSizer5->Add(textNumRepeats_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); textNumRepeats_->SetToolTip(_("Specify the number of times this series repeats. Leave blank if this series continues forever.")); /* Auto Execution Status */ itemCheckBoxAutoExeUserAck_ = new wxCheckBox( itemDialog1, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_USERACK, _("Set to 'Auto Execute' on the 'Next Occurrence' date."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - itemBoxSizer3L->Add(itemCheckBoxAutoExeUserAck_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer3L->Add(itemCheckBoxAutoExeUserAck_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); itemCheckBoxAutoExeSilent_ = new wxCheckBox( itemDialog1, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_SILENT, _("Set 'Auto Execute' without user acknowlegement."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); itemCheckBoxAutoExeSilent_->Enable(false); - itemBoxSizer3L->Add(itemCheckBoxAutoExeSilent_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemBoxSizer3L->Add(itemCheckBoxAutoExeSilent_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); /* Transaction Details */ wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Transaction Details"), wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer(itemStaticBoxSizer14Static, wxVERTICAL); - itemBoxSizer3R->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + itemBoxSizer2->Add(itemStaticBoxSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer14->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 5); + itemStaticBoxSizer14->Add(itemBoxSizer4, 0, wxALIGN_LEFT|wxALL, 0); - wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, - _("Transaction Type"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxPanel* itemPanel7 = new wxPanel( itemDialog1, wxID_ANY, wxDefaultPosition, + wxDefaultSize, wxTAB_TRAVERSAL ); + itemStaticBoxSizer14->Add(itemPanel7, 1, wxGROW|wxALL, 5); + //--//wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(4, 4, 0, 0); + wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(8, 2, 10, 10); + itemPanel7->SetSizer(itemFlexGridSizer8); + + ////Date + wxStaticText* itemStaticText15 = new wxStaticText( itemPanel7, wxID_STATIC, _("Date"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer8->Add(itemStaticText15, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + + dpc_ = new wxDatePickerCtrl( itemPanel7, ID_DIALOG_TRANS_BUTTONDATE, wxDefaultDateTime, + wxDefaultPosition, wxSize(110, -1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); + itemFlexGridSizer8->Add(dpc_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + dpc_->SetToolTip(_("Specify the date of the transaction")); + + //////////////////////////////////////////// + + wxStaticText* itemStaticText51 = new wxStaticText( itemPanel7, wxID_STATIC, _("Status"), + wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer8->Add(itemStaticText51, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + + wxString itemChoice7Strings[] = + { + _("None"), + _("Reconciled"), + _("Void"), + _("Follow up") + }; + + + choiceStatus_ = new wxChoice( itemPanel7, ID_DIALOG_TRANS_STATUS, wxDefaultPosition, + wxSize(100, -1), 4, itemChoice7Strings, 0 ); + itemFlexGridSizer8->Add(choiceStatus_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); + choiceStatus_->SetSelection(mmIniOptions::transStatusReconciled_); + choiceStatus_->SetToolTip(_("Specify the status for the transaction")); + + ////Type + wxStaticText* itemStaticText5 = new wxStaticText( itemPanel7, wxID_STATIC, + _("Type"), wxDefaultPosition, wxDefaultSize, 0 ); + //itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + itemFlexGridSizer8->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + wxString itemChoice6Strings[] = { _("Withdrawal"), @@ -406,140 +457,110 @@ _("Transfer") }; - choiceTrans_ = new wxChoice( itemDialog1, ID_DIALOG_TRANS_TYPE, wxDefaultPosition, + choiceTrans_ = new wxChoice( itemPanel7, ID_DIALOG_TRANS_TYPE, wxDefaultPosition, wxDefaultSize, 3, itemChoice6Strings, 0 ); - itemBoxSizer4->Add(choiceTrans_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemFlexGridSizer8->Add(choiceTrans_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); choiceTrans_->SetSelection(DEF_WITHDRAWAL); choiceTrans_->SetToolTip(_("Specify the type of transactions to be created.")); - bAdvanced_ = new wxButton( itemDialog1, ID_DIALOG_TRANS_BUTTONADVANCED, _("Advanced"), + // + staticTextAdvancedActive_ = new wxStaticText( itemPanel7, wxID_STATIC, + _("Active"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer8->Add(staticTextAdvancedActive_, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + + bAdvanced_ = new wxButton( itemPanel7, ID_DIALOG_TRANS_BUTTONADVANCED, _("Advanced"), wxDefaultPosition, wxSize(100, -1), 0 ); bAdvanced_->Enable(false); - itemBoxSizer4->Add(bAdvanced_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); -// bAdvanced_->SetToolTip(_("Specify advanced settings for transaction")); + itemFlexGridSizer8->Add(bAdvanced_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); bAdvanced_->SetToolTip(_("Specify the transfer amount in the To Account")); - staticTextAdvancedActive_ = new wxStaticText( itemDialog1, wxID_STATIC, - _(" is active!"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer4->Add(staticTextAdvancedActive_, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - wxPanel* itemPanel7 = new wxPanel( itemDialog1, wxID_ANY, wxDefaultPosition, - wxDefaultSize, wxTAB_TRAVERSAL ); - itemStaticBoxSizer14->Add(itemPanel7, 1, wxGROW|wxALL, 5); + //Amount + wxStaticText* itemStaticText23 = new wxStaticText( itemPanel7, wxID_STATIC, + _("Amount"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer8->Add(itemStaticText23, 0, + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(4, 4, 0, 0); - //--//wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(8, 2, 0, 0); - itemPanel7->SetSizer(itemFlexGridSizer8); + textAmount_ = new wxTextCtrl( itemPanel7, ID_DIALOG_TRANS_TEXTAMOUNT, wxT(""), + wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer8->Add(textAmount_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + textAmount_->SetToolTip(_("Specify the amount for this transaction")); + + //Payee wxStaticText* itemStaticText9 = new wxStaticText( itemPanel7, ID_DIALOG_TRANS_STATIC_PAYEE, _("Payee"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText9, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + itemFlexGridSizer8->Add(itemStaticText9, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); bPayee_ = new wxButton( itemPanel7, ID_DIALOG_TRANS_BUTTONPAYEE, _("Select Payee"), wxDefaultPosition, wxSize(200, -1), 0 ); - itemFlexGridSizer8->Add(bPayee_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemFlexGridSizer8->Add(bPayee_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); bPayee_->SetToolTip(_("Specify where the transaction is going to or coming from ")); - wxStaticText* itemStaticText11 = new wxStaticText( itemPanel7, wxID_STATIC, _("Number"), - wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText11, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxStaticText* itemStaticText13 = new wxStaticText( itemPanel7, ID_DIALOG_TRANS_STATIC_FROM, _("To"), wxDefaultPosition, wxDefaultSize, 0 ); + + bTo_ = new wxButton( itemPanel7, ID_DIALOG_TRANS_BUTTONTO, _("Select To Acct"), + wxDefaultPosition, wxSize(200, -1), 0 ); - textNumber_ = new wxTextCtrl( itemPanel7, ID_DIALOG_TRANS_TEXTNUMBER, wxT(""), - wxDefaultPosition, wxSize(100, -1), 0 ); - itemFlexGridSizer8->Add(textNumber_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - textNumber_->SetToolTip(_("Specify any associated check number or transaction number")); - - wxStaticText* itemStaticText13 = new wxStaticText( itemPanel7, ID_DIALOG_TRANS_STATIC_FROM, - _("To"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText13, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + itemFlexGridSizer8->Add(itemStaticText13, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxUP, 10); + itemFlexGridSizer8->Add(bTo_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxUP, 10); + if (!edit_) + {itemFlexGridSizer8->AddSpacer(20); itemFlexGridSizer8->AddSpacer(20);} itemStaticText13->Show(false); - - bTo_ = new wxButton( itemPanel7, ID_DIALOG_TRANS_BUTTONTO, _("Select To Acct"), - wxDefaultPosition, wxSize(200, -1), 0 ); - itemFlexGridSizer8->Add(bTo_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); bTo_->Show(false); // bTo_->SetToolTip(_("Specify the transfer account")); bTo_->SetToolTip(_("Specify which account the transfer is going to")); - wxStaticText* itemStaticText15 = new wxStaticText( itemPanel7, wxID_STATIC, _("Date"), - wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText15, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); - - dpc_ = new wxDatePickerCtrl( itemPanel7, ID_DIALOG_TRANS_BUTTONDATE, wxDefaultDateTime, - wxDefaultPosition, wxDefaultSize, wxDP_DROPDOWN); - itemFlexGridSizer8->Add(dpc_, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); - dpc_->SetToolTip(_("Specify the date of the transaction")); if (!edit_ && !enterOccur_) dpc_->Enable(false); + itemFlexGridSizer8->AddSpacer(20); + cSplit_ = new wxCheckBox( itemPanel7, + ID_DIALOG_TRANS_SPLITCHECKBOX, _("Split"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + cSplit_->SetValue(FALSE); + itemFlexGridSizer8->Add(cSplit_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); + wxStaticText* itemStaticText17 = new wxStaticText( itemPanel7, wxID_STATIC, _("Category"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer8->Add(itemStaticText17, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); // ******************************** // - wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxHORIZONTAL); - itemFlexGridSizer8->Add(itemBoxSizer18, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5); + //wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxHORIZONTAL); + //itemFlexGridSizer8->Add(itemBoxSizer18, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5); bCategory_ = new wxButton( itemPanel7, ID_DIALOG_TRANS_BUTTONCATEGS, _("Select Category"), wxDefaultPosition, wxSize(200, -1), 0 ); - itemBoxSizer18->Add(bCategory_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemFlexGridSizer8->Add(bCategory_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); bCategory_->SetToolTip(_("Specify the category for this transaction")); - cSplit_ = new wxCheckBox( itemPanel7, - ID_DIALOG_TRANS_SPLITCHECKBOX, _("Split"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - cSplit_->SetValue(FALSE); - itemBoxSizer18->Add(cSplit_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - //////////////////////////////////////////// - - wxStaticText* itemStaticText51 = new wxStaticText( itemPanel7, wxID_STATIC, _("Status"), + //Number + wxStaticText* itemStaticText11 = new wxStaticText( itemPanel7, wxID_STATIC, _("Number"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText51, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + itemFlexGridSizer8->Add(itemStaticText11, 0, + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - wxString itemChoice7Strings[] = - { - _("None"), - _("Reconciled"), - _("Void"), - _("Follow up") - }; + textNumber_ = new wxTextCtrl( itemPanel7, ID_DIALOG_TRANS_TEXTNUMBER, wxT(""), + wxDefaultPosition, wxSize(100, -1), 0 ); + itemFlexGridSizer8->Add(textNumber_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + textNumber_->SetToolTip(_("Specify any associated check number or transaction number")); + - - choiceStatus_ = new wxChoice( itemPanel7, ID_DIALOG_TRANS_STATUS, wxDefaultPosition, - wxSize(100, -1), 4, itemChoice7Strings, 0 ); - itemFlexGridSizer8->Add(choiceStatus_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - choiceStatus_->SetSelection(mmIniOptions::transStatusReconciled_); - choiceStatus_->SetToolTip(_("Specify the status for the transaction")); - wxStaticText* itemStaticText21 = new wxStaticText( itemPanel7, wxID_STATIC, _("Notes"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer8->Add(itemStaticText21, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); + wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); textNotes_ = new wxTextCtrl( itemPanel7, ID_DIALOG_TRANS_TEXTNOTES, wxT(""), wxDefaultPosition, wxSize(200, 75), wxTE_MULTILINE ); - itemFlexGridSizer8->Add(textNotes_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); + itemFlexGridSizer8->Add(textNotes_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); textNotes_->SetToolTip(_("Specify any text notes you want to add to this transaction.")); - wxStaticText* itemStaticText23 = new wxStaticText( itemPanel7, wxID_STATIC, - _("Amount"), wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(itemStaticText23, 0, - wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); - - textAmount_ = new wxTextCtrl( itemPanel7, ID_DIALOG_TRANS_TEXTAMOUNT, wxT(""), - wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer8->Add(textAmount_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - textAmount_->SetToolTip(_("Specify the amount for this transaction")); - wxPanel* itemPanel25 = new wxPanel( itemDialog1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - itemBoxSizer2->Add(itemPanel25, 0, wxALIGN_RIGHT|wxALL, 5); + itemBoxSizer20->Add(itemPanel25, 0, wxALIGN_RIGHT|wxALL, 5); wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); itemPanel25->SetSizer(itemBoxSizer26); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-12-09 08:27:01
|
Revision: 1555 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1555&view=rev Author: stef145g Date: 2011-12-09 08:26:54 +0000 (Fri, 09 Dec 2011) Log Message: ----------- Bug Fix: Manual Repeat transactions details not being entered into database when due. (Recent bug introduced with new functionality) Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2011-12-06 06:28:31 UTC (rev 1554) +++ trunk/mmex/src/billsdepositsdialog.cpp 2011-12-09 08:26:54 UTC (rev 1555) @@ -1037,8 +1037,9 @@ wxString transNum = textNumber_->GetValue(); wxString notes = textNotes_->GetValue(); wxString status = wxT(""); // nothing yet + + // Multiplex Auto executable onto the repeat field of the database. int repeats = itemRepeats_->GetSelection(); - // Multiplex Auto executable onto the repeat field of the database. if (autoExecuteUserAck_) repeats += BD_REPEATS_MULTIPLEX_BASE; if (autoExecuteSilent_) @@ -1206,7 +1207,8 @@ } else if (enterOccur_) { - if ( (repeats < 11) || (numRepeats > 0) ) + // repeats now hold extra info. Need to get repeats from dialog selection + if ( (itemRepeats_->GetSelection() < 11) || (numRepeats > 0) ) { boost::shared_ptr<mmBankTransaction> pTransaction; boost::shared_ptr<mmBankTransaction> pTemp(new mmBankTransaction(core_->db_)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-02-06 09:09:08
|
Revision: 1752 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1752&view=rev Author: vomikan Date: 2012-02-06 09:08:57 +0000 (Mon, 06 Feb 2012) Log Message: ----------- correction and improvement Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-02-06 08:33:26 UTC (rev 1751) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-02-06 09:08:57 UTC (rev 1752) @@ -433,8 +433,15 @@ // Status -------------------------------------------- wxStaticText* staticTextStatus = new wxStaticText( transactionPanel, wxID_STATIC, _("Status")); + + wxArrayString choiceStatusStrings; + choiceStatusStrings.Add(_("None")); + choiceStatusStrings.Add(_("Reconciled")); + choiceStatusStrings.Add(_("Void")); + choiceStatusStrings.Add(_("Follow up")); + choiceStatusStrings.Add(_("Duplicate")); choiceStatus_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_STATUS, - wxDefaultPosition, wxSize(110, -1), 4, trxStatuses4Choice, 0 ); + wxDefaultPosition, wxSize(110, -1), choiceStatusStrings); choiceStatus_->SetSelection(mmIniOptions::transStatusReconciled_); choiceStatus_->SetToolTip(_("Specify the status for the transaction")); @@ -443,14 +450,19 @@ // Type -------------------------------------------- wxStaticText* staticTextType = new wxStaticText( transactionPanel, wxID_STATIC, _("Type")); - + + wxArrayString choiceTypeStrings; + choiceTypeStrings.Add(_("Withdrawal")); + choiceTypeStrings.Add(_("Deposit")); + if (mmDBWrapper::getNumBankAccounts(db_)>1) + choiceTypeStrings.Add(_("Transfer")); choiceTrans_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_TYPE, - wxDefaultPosition, wxSize(110, -1), 3, trxTypes4Choice, 0 ); + wxDefaultPosition, wxSize(110, -1), choiceTypeStrings); choiceTrans_->SetSelection(DEF_WITHDRAWAL); choiceTrans_->SetToolTip(_("Specify the type of transactions to be created.")); cAdvanced_ = new wxCheckBox( transactionPanel, ID_DIALOG_TRANS_ADVANCED_CHECKBOX, _("Advanced"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - cAdvanced_->SetValue(FALSE); + cAdvanced_->SetValue(false); cAdvanced_->SetToolTip(_("Allows the setting of different amounts in the FROM and TO accounts.")); wxBoxSizer* typeSizer = new wxBoxSizer(wxHORIZONTAL); @@ -467,11 +479,11 @@ wxStaticText* staticTextAmount = new wxStaticText( transactionPanel, wxID_STATIC, _("Amount")); textAmount_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTAMOUNT, wxT(""), - wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT ); + wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT|wxTE_PROCESS_ENTER , doubleValidator() ); textAmount_->SetToolTip(amountNormalTip_); toTextAmount_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTAMOUNT, wxT(""), - wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT ); + wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT|wxTE_PROCESS_ENTER , doubleValidator() ); toTextAmount_->SetToolTip(_("Specify the transfer amount in the To Account")); wxBoxSizer* amountSizer = new wxBoxSizer(wxHORIZONTAL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-03-06 12:10:28
|
Revision: 1935 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1935&view=rev Author: guanlisheng Date: 2012-03-06 12:10:21 +0000 (Tue, 06 Mar 2012) Log Message: ----------- format Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-03-06 12:01:54 UTC (rev 1934) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-03-06 12:10:21 UTC (rev 1935) @@ -96,8 +96,12 @@ if (edit_ || enterOccur_) { dataToControls(); - if (enterOccur_) + if (! enterOccur_) { + dpc_->Disable(); + } + else + { choiceTrans_->Disable(); dpcbd_->Disable(); itemRepeats_->Disable(); @@ -107,12 +111,12 @@ itemCheckBoxAutoExeUserAck_->Disable(); textNumRepeats_->Disable(); bSetNextOccurDate_->Disable(); - } else - dpc_->Disable(); + } } Centre(); Fit(); + return TRUE; } @@ -124,8 +128,8 @@ "SUBCATEGID, FOLLOWUPID, TOTRANSAMOUNT, REPEATS, NUMOCCURRENCES, " "NEXTOCCURRENCEDATE, date(TRANSDATE, 'localtime') as TRANSDATE " "from BILLSDEPOSITS_V1 where BDID = ? "; - // Removed "date(NEXTOCCURRENCEDATE, 'localtime') as NEXTOCCURRENCEDATE, " - // because causing problems with some systems and in different time zones + // Removed "date(NEXTOCCURRENCEDATE, 'localtime') as NEXTOCCURRENCEDATE, " + // because causing problems with some systems and in different time zones wxSQLite3Statement st = db_->PrepareStatement(billsdepositsSql); st.Bind(1, bdID_); @@ -155,8 +159,8 @@ wxString dtnostr = mmGetDateForDisplay(db_, dtno); dpcbd_->SetValue(dtno); dpc_->SetValue(dtno); - calendarCtrl_->SetDate (dtno); - + calendarCtrl_->SetDate (dtno); + int repeatSel = q1.GetInt(wxT("REPEATS")); // Have used repeatSel to multiplex auto repeat fields. if (repeatSel >= BD_REPEATS_MULTIPLEX_BASE) @@ -193,7 +197,7 @@ wxString accountName = core_->getAccountName(accountID_); itemAccountName_->SetLabel(accountName); - split_->loadFromBDDB(core_, bdID_); + split_->loadFromBDDB(core_, bdID_); if (split_->numEntries() > 0) { @@ -271,7 +275,7 @@ wxStaticBoxSizer* calendarStaticBoxSizer = new wxStaticBoxSizer(calendarStaticBox, wxHORIZONTAL); repeatTransBoxSizer->Add(calendarStaticBoxSizer, 10, wxALIGN_CENTER|wxLEFT|wxBOTTOM|wxRIGHT, 15); - //TODO: Set these up as user selectable. Some users wish to have monday first in calendar! + //TODO: Set these up as user selectable. Some users wish to have monday first in calendar! bool startSunday = true; bool showSuroundingWeeks = true; @@ -287,7 +291,7 @@ calendarCtrl_ = new wxCalendarCtrl( this, ID_DIALOG_BD_CALENDAR, wxDateTime(), wxDefaultPosition, wxDefaultSize, style); calendarStaticBoxSizer->Add(calendarCtrl_, 10, wxALIGN_CENTER_HORIZONTAL|wxALL, 15); - + /* Bills & Deposits Details */ wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Repeating Transaction Details") ); wxStaticBoxSizer* repeatDetailsStaticBoxSizer = new wxStaticBoxSizer(repeatDetailsStaticBox, wxHORIZONTAL); @@ -306,7 +310,7 @@ wxString accNameStr = accName[0]; itemAccountName_->SetLabel(accNameStr); accountID_= core_->getAccountID(accNameStr); - }; + }; itemFlexGridSizer5->Add(itemAccountName_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); itemAccountName_->SetToolTip(_("Specify the Account that will own the repeating transaction")); @@ -328,11 +332,11 @@ spinNextOccDate_ = new wxSpinButton( this, ID_DIALOG_BD_REPEAT_DATE_SPINNER, wxDefaultPosition, spinCtrlSize,spinCtrlDirection|wxSP_ARROW_KEYS|wxSP_WRAP); - spinNextOccDate_->SetToolTip(_("Retard or advance the date of the 'next occurrence")); + spinNextOccDate_->SetToolTip(_("Retard or advance the date of the 'next occurrence")); - wxBoxSizer* nextOccurDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* nextOccurDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); nextOccurDateBoxSizer->Add(dpcbd_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - nextOccurDateBoxSizer->Add(spinNextOccDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); + nextOccurDateBoxSizer->Add(spinNextOccDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); itemFlexGridSizer5->Add(staticTextNextOccur, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); @@ -411,11 +415,11 @@ dpc_->SetToolTip(_("Specify the date of the transaction")); spinTransDate_ = new wxSpinButton( transactionPanel,ID_DIALOG_TRANS_DATE_SPINNER, wxDefaultPosition, spinCtrlSize,spinCtrlDirection|wxSP_ARROW_KEYS|wxSP_WRAP); - spinTransDate_->SetToolTip(_("Retard or advance the date of the transaction")); + spinTransDate_->SetToolTip(_("Retard or advance the date of the transaction")); - wxBoxSizer* transDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* transDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); transDateBoxSizer->Add(dpc_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - transDateBoxSizer->Add(spinTransDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); + transDateBoxSizer->Add(spinTransDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); transPanelSizer->Add(staticTextDate, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); transPanelSizer->Add(transDateBoxSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); @@ -431,7 +435,7 @@ choiceStatusStrings.Add(_("Duplicate")); choiceStatus_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_STATUS, wxDefaultPosition, wxSize(110, -1), choiceStatusStrings); - choiceStatus_->SetSelection(mmIniOptions::instance().transStatusReconciled_); + choiceStatus_->SetSelection(mmIniOptions::instance().transStatusReconciled_); choiceStatus_->SetToolTip(_("Specify the status for the transaction")); transPanelSizer->Add(staticTextStatus, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); @@ -461,7 +465,7 @@ transPanelSizer->Add(staticTextType, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); transPanelSizer->Add(typeSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - // Amount Fields -------------------------------------------- + // Amount Fields -------------------------------------------- amountNormalTip_ = _("Specify the amount for this transaction"); amountTransferTip_ = _("Specify the amount to be transfered"); @@ -569,9 +573,12 @@ /********************************************************************************************** Adjust controls according to function settings ***********************************************************************************************/ - if (enterOccur_) { + if (enterOccur_) + { spinNextOccDate_->Disable(); - } else { + } + else + { dpc_->Disable(); spinTransDate_->Disable(); } @@ -584,96 +591,96 @@ void mmBDDialog::OnAccountName(wxCommandEvent& /*event*/) { - wxArrayString as = core_->getAccountsName(); - - wxSingleChoiceDialog scd(this, _("Choose Bank Account or Term Account"), _("Select Account"), as); - if (scd.ShowModal() == wxID_OK) - { - wxString acctName = scd.GetStringSelection(); - accountID_ = core_->getAccountID(acctName); - itemAccountName_->SetLabel(acctName); - } + wxArrayString as = core_->getAccountsName(); + + wxSingleChoiceDialog scd(this, _("Choose Bank Account or Term Account"), _("Select Account"), as); + if (scd.ShowModal() == wxID_OK) + { + wxString acctName = scd.GetStringSelection(); + accountID_ = core_->getAccountID(acctName); + itemAccountName_->SetLabel(acctName); + } } void mmBDDialog::OnPayee(wxCommandEvent& /*event*/) { if (choiceTrans_->GetSelection() == DEF_TRANSFER) - { - wxArrayString as = core_->getAccountsName(); - - wxString acctName = itemAccountName_->GetLabel(); - bPayee_->SetLabel(acctName); - - wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); - if (scd.ShowModal() == wxID_OK) + { + wxArrayString as = core_->getAccountsName(); + + wxString acctName = itemAccountName_->GetLabel(); + bPayee_->SetLabel(acctName); + + wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); + if (scd.ShowModal() == wxID_OK) { acctName = scd.GetStringSelection(); - payeeID_ = core_->getAccountID(acctName); - bPayee_->SetLabel(acctName); - itemAccountName_->SetLabel(acctName); - } + payeeID_ = core_->getAccountID(acctName); + bPayee_->SetLabel(acctName); + itemAccountName_->SetLabel(acctName); + } } else { mmPayeeDialog dlg(this, core_); if ( dlg.ShowModal() == wxID_OK ) - { + { payeeID_ = dlg.getPayeeId(); - if (payeeID_ == -1) + if (payeeID_ == -1) { - resetPayeeString(); + resetPayeeString(); payeeUnknown_ = true; return; } - + // ... If this is a Split Transaction, ignore the Payee change if (split_->numEntries()) return; - + int tempCategID = -1; int tempSubCategID = -1; - wxString payeeName = mmDBWrapper::getPayee(db_, payeeID_, tempCategID, tempSubCategID); + wxString payeeName = mmDBWrapper::getPayee(db_, payeeID_, tempCategID, tempSubCategID); bPayee_->SetLabel(mmReadyDisplayString(payeeName)); payeeUnknown_ = false; - if (tempCategID == -1) - { + if (tempCategID == -1) + { return; } - + wxString catName = core_->getCategoryName(tempCategID); wxString categString = catName; - + if (tempSubCategID != -1) { wxString subcatName = mmDBWrapper::getSubCategoryName(db_, tempCategID, tempSubCategID); categString += wxT(" : "); categString += subcatName; } - + categID_ = tempCategID; subcategID_ = tempSubCategID; bCategory_->SetLabel(categString); } - else - { + else + { wxString payeeName = mmDBWrapper::getPayee(db_, payeeID_, categID_, subcategID_); if (payeeName.IsEmpty()) - { - //payeeID_ = -1; - categID_ = -1; - subcategID_ = -1; + { + //payeeID_ = -1; + categID_ = -1; + subcategID_ = -1; categoryName_ = wxEmptyString; subCategoryName_ = wxEmptyString; bCategory_->SetLabel(_("Select Category")); - //bPayee_->SetLabel(_("Select Payee")); - resetPayeeString(); + //bPayee_->SetLabel(_("Select Payee")); + resetPayeeString(); payeeUnknown_ = true; - } - else - { - bPayee_->SetLabel(payeeName); + } + else + { + bPayee_->SetLabel(payeeName); payeeUnknown_ = false; } } @@ -681,14 +688,14 @@ } void mmBDDialog::OnTo(wxCommandEvent& /*event*/) -{ +{ // This should only get called if we are in a transfer wxArrayString as = core_->getAccountsName(); - + wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); if (scd.ShowModal() == wxID_OK) { - wxString acctName = scd.GetStringSelection(); + wxString acctName = scd.GetStringSelection(); toID_ = core_->getAccountID(acctName); bTo_->SetLabel(acctName); } @@ -821,8 +828,7 @@ } SetTransferControls(true); - if (cAdvanced_->IsChecked()) - SetAdvancedTransferControls(true); + if (cAdvanced_->IsChecked()) SetAdvancedTransferControls(true); stp->SetLabel(_("From")); st->SetLabel(_("To")); @@ -1052,7 +1058,7 @@ wxASSERT(st.GetParamCount() == i); st.ExecuteUpdate(); - int transID = db_->GetLastRowId().ToLong(); + int transID = db_->GetLastRowId().ToLong(); st.Finalize(); // -- @@ -1064,7 +1070,7 @@ st = db_->PrepareStatement(sql_ins); for (size_t i = 0; i < split_->numEntries(); ++i) - { + { mmSplitTransactionEntry &r = *split_->entries_[i]; st.Bind(1, transID); @@ -1073,10 +1079,10 @@ st.Bind(4, r.splitAmount_); st.ExecuteUpdate(); - r.splitEntryID_ = db_->GetLastRowId().ToLong(); + r.splitEntryID_ = db_->GetLastRowId().ToLong(); st.Reset(); - } + } st.Finalize(); } @@ -1117,33 +1123,33 @@ // -- - st = db_->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); + st = db_->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); st.Bind(1, bdID_); st.ExecuteUpdate(); st.Finalize(); // -- - static const char sql_ins[] = + static const char sql_ins[] = "insert into BUDGETSPLITTRANSACTIONS_V1 (TRANSID, CATEGID, SUBCATEGID, SPLITTRANSAMOUNT) " "values (?, ?, ?, ?)"; st = db_->PrepareStatement(sql_ins); for (size_t i = 0; i < split_->numEntries(); ++i) - { + { mmSplitTransactionEntry &r = *split_->entries_[i]; st.Bind(1, bdID_); st.Bind(2, r.categID_); st.Bind(3, r.subCategID_); st.Bind(4, r.splitAmount_); - + st.ExecuteUpdate(); - r.splitEntryID_ = db_->GetLastRowId().ToLong(); + r.splitEntryID_ = db_->GetLastRowId().ToLong(); st.Reset(); - } + } st.Finalize(); } @@ -1171,7 +1177,7 @@ pTransaction->date_ = dpc_->GetValue(); pTransaction->toAmt_ = toTransAmount_; - *pTransaction->splitEntries_.get() = *split_.get(); + *pTransaction->splitEntries_.get() = *split_.get(); pTransaction->updateAllData(core_, fromAccountID, pCurrencyPtr); core_->bTransactionList_.addTransaction(core_, pTransaction); } @@ -1210,9 +1216,12 @@ void mmBDDialog::OnAutoExecutionUserAckChecked(wxCommandEvent& /*event*/) { autoExecuteUserAck_ = ! autoExecuteUserAck_; - if (autoExecuteUserAck_) { + if (autoExecuteUserAck_) + { itemCheckBoxAutoExeSilent_->Enable(true); - } else { + } + else + { itemCheckBoxAutoExeSilent_->SetValue(false); itemCheckBoxAutoExeSilent_->Enable(false); autoExecuteSilent_ = false; @@ -1236,15 +1245,18 @@ void mmBDDialog::OnDateChanged(wxDateEvent& event) { - wxDateTime date = event.GetDate(); - calendarCtrl_->SetDate(date) ; + wxDateTime date = event.GetDate(); + calendarCtrl_->SetDate(date) ; } void mmBDDialog::OnAdvanceChecked(wxCommandEvent& /*event*/) { - if (cAdvanced_->IsChecked()) { + if (cAdvanced_->IsChecked()) + { SetAdvancedTransferControls(true); - } else { + } + else + { SetAdvancedTransferControls(); textAmount_->SetToolTip(amountTransferTip_); } @@ -1252,10 +1264,13 @@ void mmBDDialog::SetTransferControls(bool transfers) { - if (transfers) { + if (transfers) + { cAdvanced_->Enable(); bTo_->Show(); - } else { + } + else + { bTo_->Hide(); cAdvanced_->Disable(); SetAdvancedTransferControls(); @@ -1264,7 +1279,8 @@ void mmBDDialog::SetAdvancedTransferControls(bool advanced) { - if (advanced) { + if (advanced) + { toTextAmount_->Enable(); advancedToTransAmountSet_ = true; // Display the transfer amount in the toTextAmount control. @@ -1273,12 +1289,17 @@ wxString dispAmount; mmex::formatDoubleToCurrencyEdit(toTransAmount_, dispAmount); toTextAmount_->SetValue(dispAmount); - } else + } + else + { toTextAmount_->SetValue(textAmount_->GetValue()); + } textAmount_->SetToolTip(_("Specify the transfer amount in the From Account")); - } else { + } + else + { toTextAmount_->Disable(); advancedToTransAmountSet_ = false; } @@ -1287,15 +1308,14 @@ void mmBDDialog::SetNewDate(wxDatePickerCtrl* dpc, bool forward) { int day = -1; - if (forward) - day = 1; + if (forward) day = 1; wxString dateStr = dpc->GetValue().FormatISODate(); - wxDateTime date = mmGetStorageStringAsDate (dateStr) ; - date = date.Add(wxDateSpan::Days(day)); + wxDateTime date = mmGetStorageStringAsDate (dateStr) ; + date = date.Add(wxDateSpan::Days(day)); - dpc_->SetValue( date ); - dpcbd_->SetValue( date ); + dpc_->SetValue( date ); + dpcbd_->SetValue( date ); calendarCtrl_->SetDate(date); } @@ -1330,27 +1350,36 @@ bSetNextOccurDate_->Disable(); int repeats = itemRepeats_->GetSelection(); - if ( (repeats == 11) ) { + if (repeats == 11) + { staticTextRepeats_->SetLabel( repeatLabelActivate ); staticTimesRepeat_->SetLabel( timeLabelDays); toolTipsStr << _("Specify period in Days to activate.") << wxT("\n") << _("Becomes blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } else if ( (repeats == 12) ) { + } + else if (repeats == 12) + { staticTextRepeats_->SetLabel(repeatLabelActivate ); staticTimesRepeat_->SetLabel(timeLabelMonths); toolTipsStr << _("Specify period in Months to activate.") << wxT("\n") << _("Becomes blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } else if ( (repeats == 13) ) { + } + else if (repeats == 13) + { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel(timeLabelDays); toolTipsStr << _("Specify period in Days to activate.") << wxT("\n") << _("Leave blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } else if ( (repeats == 14) ) { + } + else if (repeats == 14) + { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel(timeLabelMonths); toolTipsStr << _("Specify period in Months to activate.") << wxT("\n") << _("Leave blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } else { + } + else + { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel( _("Times Repeated") ); toolTipsStr << _("Specify the number of times this series repeats.") << wxT("\n") << _("Leave blank if this series continues forever."); @@ -1370,7 +1399,7 @@ { int value = wxAtoi(valueStr); wxString dateStr = dpcbd_->GetValue().FormatISODate(); - wxDateTime date = mmGetStorageStringAsDate(dateStr); + wxDateTime date = mmGetStorageStringAsDate(dateStr); int repeats = itemRepeats_->GetSelection(); if ( (repeats == 11) || (repeats == 12)) @@ -1378,10 +1407,10 @@ if ( (repeats == 11)) date = date.Add(wxDateSpan::Days(value)); else - date = date.Add(wxDateSpan::Months(value)); + date = date.Add(wxDateSpan::Months(value)); - dpc_->SetValue( date ); - dpcbd_->SetValue( date ); + dpc_->SetValue( date ); + dpcbd_->SetValue( date ); calendarCtrl_->SetDate(date); } bSetNextOccurDate_->Disable(); @@ -1401,10 +1430,7 @@ if (dlg.ShowModal() == wxID_OK) { double amount = split_->getTotalSplits(); - if (choiceTrans_->GetSelection() == DEF_TRANSFER) { - if (amount < 0) - amount = - amount; - } + if (choiceTrans_->GetSelection() == DEF_TRANSFER && amount < 0) amount = - amount; wxString dispAmount; mmex::formatDoubleToCurrencyEdit(amount, dispAmount); textAmount_->SetValue(dispAmount); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-03-09 19:35:32
|
Revision: 1967 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=1967&view=rev Author: vomikan Date: 2012-03-09 19:35:26 +0000 (Fri, 09 Mar 2012) Log Message: ----------- fix Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-03-09 19:29:27 UTC (rev 1966) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-03-09 19:35:26 UTC (rev 1967) @@ -500,7 +500,7 @@ transPanelSizer->Add(bPayee_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); // Payee Alternate ------------------------------------------------ - wxStaticText* staticTextTo = new wxStaticText( transactionPanel, ID_DIALOG_TRANS_STATIC_FROM, _(" ") ); + wxStaticText* staticTextTo = new wxStaticText( transactionPanel, ID_DIALOG_TRANS_STATIC_FROM, wxT(" ") ); bTo_ = new wxButton( transactionPanel, ID_DIALOG_TRANS_BUTTONTO, _("Select To Acct"), wxDefaultPosition, wxSize(225, -1), 0 ); bTo_->SetToolTip(_("Specify which account the transfer is going to")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-09 00:54:11
|
Revision: 2269 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2269&view=rev Author: guanlisheng Date: 2012-05-09 00:36:36 +0000 (Wed, 09 May 2012) Log Message: ----------- use new database access for billsdeposits dialog Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 00:20:26 UTC (rev 2268) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 00:36:36 UTC (rev 2269) @@ -26,6 +26,7 @@ #include "splittransactionsdialog.h" #include "defs.h" #include "paths.h" +#include "mmex_db_view.h" #include <limits> @@ -122,138 +123,121 @@ void mmBDDialog::dataToControls() { - static const char billsdepositsSql[] = + DB_View_BILLSDEPOSITS_V1::Data* billsdeposit = BILLSDEPOSITS_V1.get(bdID_, db_); + if (!billsdeposit) + return; + categID_ = billsdeposit->CATEGID; + subcategID_ = billsdeposit->SUBCATEGID; + + wxString transNumString = billsdeposit->TRANSACTIONNUMBER; + wxString statusString = billsdeposit->STATUS; + wxString notesString = billsdeposit->NOTES; + wxString transTypeString = billsdeposit->TRANSCODE; + double transAmount = billsdeposit->TRANSAMOUNT; + toTransAmount_ = billsdeposit->TOTRANSAMOUNT; - "select BDID, ACCOUNTID, TOACCOUNTID, PAYEEID, TRANSCODE, TRANSAMOUNT, STATUS, TRANSACTIONNUMBER, NOTES, CATEGID, " - "SUBCATEGID, FOLLOWUPID, TOTRANSAMOUNT, REPEATS, NUMOCCURRENCES, " - "NEXTOCCURRENCEDATE, date(TRANSDATE, 'localtime') as TRANSDATE " - "from BILLSDEPOSITS_V1 where BDID = ? "; - // Removed "date(NEXTOCCURRENCEDATE, 'localtime') as NEXTOCCURRENCEDATE, " - // because causing problems with some systems and in different time zones - - wxSQLite3Statement st = db_->PrepareStatement(billsdepositsSql); - st.Bind(1, bdID_); + choiceStatus_->SetSelection(getTransformedTrxStatus(statusString)); - wxSQLite3ResultSet q1 = st.ExecuteQuery(); + wxString nextOccurrString = billsdeposit->NEXTOCCURRENCEDATE; + int numRepeatStr = billsdeposit->NUMOCCURRENCES; + if (numRepeatStr > 0) + textNumRepeats_->SetValue(wxString::Format(wxT("%d"), numRepeatStr)); + + wxDateTime dtno = mmGetStorageStringAsDate(nextOccurrString); + wxString dtnostr = mmGetDateForDisplay(db_, dtno); + dpcbd_->SetValue(dtno); + dpc_->SetValue(dtno); + calendarCtrl_->SetDate (dtno); - if (q1.NextRow()) + int repeatSel = billsdeposit->REPEATS; + // Have used repeatSel to multiplex auto repeat fields. + if (repeatSel >= BD_REPEATS_MULTIPLEX_BASE) { - categID_ = q1.GetInt(wxT("CATEGID")); - subcategID_ = q1.GetInt(wxT("SUBCATEGID")); + repeatSel -= BD_REPEATS_MULTIPLEX_BASE; + autoExecuteUserAck_ = true; + itemCheckBoxAutoExeUserAck_->SetValue(true); + itemCheckBoxAutoExeSilent_->Enable(true); - wxString transNumString = q1.GetString(wxT("TRANSACTIONNUMBER")); - wxString statusString = q1.GetString(wxT("STATUS")); - wxString notesString = q1.GetString(wxT("NOTES")); - wxString transTypeString = q1.GetString(wxT("TRANSCODE")); - double transAmount = q1.GetDouble(wxT("TRANSAMOUNT")); - toTransAmount_ = q1.GetDouble(wxT("TOTRANSAMOUNT")); - - choiceStatus_->SetSelection(getTransformedTrxStatus(statusString)); - - wxString nextOccurrString = q1.GetString(wxT("NEXTOCCURRENCEDATE")); - wxString numRepeatStr = q1.GetString(wxT("NUMOCCURRENCES")); - if (numRepeatStr != wxT("-1")) - textNumRepeats_->SetValue(numRepeatStr); - - wxDateTime dtno = mmGetStorageStringAsDate(nextOccurrString); - wxString dtnostr = mmGetDateForDisplay(db_, dtno); - dpcbd_->SetValue(dtno); - dpc_->SetValue(dtno); - calendarCtrl_->SetDate (dtno); - - int repeatSel = q1.GetInt(wxT("REPEATS")); - // Have used repeatSel to multiplex auto repeat fields. if (repeatSel >= BD_REPEATS_MULTIPLEX_BASE) { repeatSel -= BD_REPEATS_MULTIPLEX_BASE; - autoExecuteUserAck_ = true; - itemCheckBoxAutoExeUserAck_->SetValue(true); - itemCheckBoxAutoExeSilent_->Enable(true); - - if (repeatSel >= BD_REPEATS_MULTIPLEX_BASE) - { - repeatSel -= BD_REPEATS_MULTIPLEX_BASE; - autoExecuteSilent_ = true; - itemCheckBoxAutoExeSilent_->SetValue(true); - } + autoExecuteSilent_ = true; + itemCheckBoxAutoExeSilent_->SetValue(true); } + } - itemRepeats_->SetSelection(repeatSel); - setRepeatDetails(); - if (repeatSel == 0) // if none - textNumRepeats_->SetValue(wxT("")); - - if (transTypeString == TRANS_TYPE_WITHDRAWAL_STR) - choiceTrans_->SetSelection(DEF_WITHDRAWAL); - else if (transTypeString == TRANS_TYPE_DEPOSIT_STR) - choiceTrans_->SetSelection(DEF_DEPOSIT); - else if (transTypeString == TRANS_TYPE_TRANSFER_STR) - choiceTrans_->SetSelection(DEF_TRANSFER); - updateControlsForTransType(); + itemRepeats_->SetSelection(repeatSel); + setRepeatDetails(); + if (repeatSel == 0) // if none + textNumRepeats_->SetValue(wxT("")); + + if (transTypeString == TRANS_TYPE_WITHDRAWAL_STR) + choiceTrans_->SetSelection(DEF_WITHDRAWAL); + else if (transTypeString == TRANS_TYPE_DEPOSIT_STR) + choiceTrans_->SetSelection(DEF_DEPOSIT); + else if (transTypeString == TRANS_TYPE_TRANSFER_STR) + choiceTrans_->SetSelection(DEF_TRANSFER); + updateControlsForTransType(); - payeeID_ = q1.GetInt(wxT("PAYEEID")); - toID_ = q1.GetInt(wxT("TOACCOUNTID")); - accountID_ = q1.GetInt(wxT("ACCOUNTID")); - wxString accountName = core_->getAccountName(accountID_); - itemAccountName_->SetLabel(accountName); + payeeID_ = billsdeposit->PAYEEID; + toID_ = billsdeposit->TOACCOUNTID; + accountID_ = billsdeposit->ACCOUNTID; + wxString accountName = core_->getAccountName(accountID_); + itemAccountName_->SetLabel(accountName); - split_->loadFromBDDB(core_, bdID_); + split_->loadFromBDDB(core_, bdID_); - if (split_->numEntries() > 0) + if (split_->numEntries() > 0) + { + bCategory_->SetLabel(_("Split Category")); + cSplit_->SetValue(true); + } + else + { + wxString catName = core_->getCategoryName(categID_); + wxString categString = catName; + categoryName_ = categString; + + if (subcategID_ != -1) { - bCategory_->SetLabel(_("Split Category")); - cSplit_->SetValue(true); + subCategoryName_ = mmDBWrapper::getSubCategoryName(db_, categID_, subcategID_); + categString += wxT(" : "); + categString += subCategoryName_; } - else - { - wxString catName = core_->getCategoryName(categID_); - wxString categString = catName; - categoryName_ = categString; + bCategory_->SetLabel(categString); + } - if (subcategID_ != -1) - { - subCategoryName_ = mmDBWrapper::getSubCategoryName(db_, categID_, subcategID_); - categString += wxT(" : "); - categString += subCategoryName_; - } - bCategory_->SetLabel(categString); - } + textNotes_->SetValue(notesString); + textNumber_->SetValue(transNumString); - textNotes_->SetValue(notesString); - textNumber_->SetValue(transNumString); + if (split_->numEntries() > 0) + { + transAmount = split_->getTotalSplits(); + textAmount_->Enable(false); + } + wxString dispAmount; + mmex::formatDoubleToCurrencyEdit(transAmount, dispAmount); + textAmount_->SetValue(dispAmount); - if (split_->numEntries() > 0) - { - transAmount = split_->getTotalSplits(); - textAmount_->Enable(false); - } - wxString dispAmount; - mmex::formatDoubleToCurrencyEdit(transAmount, dispAmount); - textAmount_->SetValue(dispAmount); + wxString payeeString = core_->getPayeeName(payeeID_); + bPayee_->SetLabel(payeeString); + + if (transTypeString == TRANS_TYPE_TRANSFER_STR) + { + wxString fromAccount = core_->getAccountName(accountID_); + wxString toAccount = core_->getAccountName(toID_); - wxString payeeString = core_->getPayeeName(payeeID_); - bPayee_->SetLabel(payeeString); - - if (transTypeString == TRANS_TYPE_TRANSFER_STR) - { - wxString fromAccount = core_->getAccountName(accountID_); - wxString toAccount = core_->getAccountName(toID_); + bPayee_->SetLabel(fromAccount); + bTo_->SetLabel(toAccount); + payeeID_ = accountID_; - bPayee_->SetLabel(fromAccount); - bTo_->SetLabel(toAccount); - payeeID_ = accountID_; - - // When editing an advanced transaction record, we do not reset the toTransAmount_ - if ((edit_ || enterOccur_) && (toTransAmount_ != transAmount)) - { - cAdvanced_->SetValue(true); - SetAdvancedTransferControls(true); - } + // When editing an advanced transaction record, we do not reset the toTransAmount_ + if ((edit_ || enterOccur_) && (toTransAmount_ != transAmount)) + { + cAdvanced_->SetValue(true); + SetAdvancedTransferControls(true); } } - - st.Finalize(); - st.Reset(); } void mmBDDialog::CreateControls() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-09 00:58:32
|
Revision: 2270 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2270&view=rev Author: guanlisheng Date: 2012-05-09 00:58:26 +0000 (Wed, 09 May 2012) Log Message: ----------- Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 00:36:36 UTC (rev 2269) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 00:58:26 UTC (rev 2270) @@ -1020,55 +1020,41 @@ "NEXTOCCURRENCEDATE, NUMOCCURRENCES) " "values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, -1, ?, ?, ?, ? )"; - wxSQLite3Statement st = db_->PrepareStatement(sql); - - int i = 0; - st.Bind(++i, fromAccountID); - st.Bind(++i, toAccountID); - st.Bind(++i, payeeID_); - st.Bind(++i, transCode); - st.Bind(++i, amount); - st.Bind(++i, status); - st.Bind(++i, transNum); - st.Bind(++i, notes); - st.Bind(++i, categID_); - st.Bind(++i, subcategID_); - st.Bind(++i, date1); - st.Bind(++i, toTransAmount_); - st.Bind(++i, repeats); - st.Bind(++i, nextOccurDate); - st.Bind(++i, numRepeats); + DB_View_BILLSDEPOSITS_V1::Data* billsdeposit = BILLSDEPOSITS_V1.create(); + billsdeposit->ACCOUNTID = fromAccountID; + billsdeposit->TOACCOUNTID = toAccountID; + billsdeposit->PAYEEID = payeeID_; + billsdeposit->TRANSCODE = transCode; + billsdeposit->TRANSAMOUNT = amount; + billsdeposit->STATUS = status; + billsdeposit->TRANSACTIONNUMBER = transNum; + billsdeposit->NOTES = notes; + billsdeposit->CATEGID = categID_; + billsdeposit->SUBCATEGID = subcategID_; + billsdeposit->TRANSDATE = date1; + billsdeposit->TOTRANSAMOUNT = toTransAmount_; + billsdeposit->REPEATS = repeats; + billsdeposit->NEXTOCCURRENCEDATE = nextOccurDate; + billsdeposit->NUMOCCURRENCES = numRepeats; - wxASSERT(st.GetParamCount() == i); + if (!billsdeposit->save(db_)) + return; - st.ExecuteUpdate(); - int transID = db_->GetLastRowId().ToLong(); - st.Finalize(); - - // -- + int transID = billsdeposit->id(); - static const char sql_ins[] = - "insert into BUDGETSPLITTRANSACTIONS_V1 (TRANSID, CATEGID, SUBCATEGID, SPLITTRANSAMOUNT) " - "values (?, ?, ?, ?)"; - - st = db_->PrepareStatement(sql_ins); - for (size_t i = 0; i < split_->numEntries(); ++i) { mmSplitTransactionEntry &r = *split_->entries_[i]; - st.Bind(1, transID); - st.Bind(2, r.categID_); - st.Bind(3, r.subCategID_); - st.Bind(4, r.splitAmount_); + DB_View_BUDGETSPLITTRANSACTIONS_V1::Data* budgetsplittransaction = BUDGETSPLITTRANSACTIONS_V1.create(); + budgetsplittransaction->TRANSID = transID; + budgetsplittransaction->CATEGID = r.categID_; + budgetsplittransaction->SUBCATEGID = r.subCategID_; + budgetsplittransaction->SPLITTRANSAMOUNT = r.splitAmount_; - st.ExecuteUpdate(); - r.splitEntryID_ = db_->GetLastRowId().ToLong(); - - st.Reset(); + if (budgetsplittransaction->save(db_)) + r.splitEntryID_ = budgetsplittransaction->id(); } - - st.Finalize(); } else if (edit_) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gua...@us...> - 2012-05-09 01:12:01
|
Revision: 2271 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2271&view=rev Author: guanlisheng Date: 2012-05-09 01:11:55 +0000 (Wed, 09 May 2012) Log Message: ----------- new database access Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 00:58:26 UTC (rev 2270) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-05-09 01:11:55 UTC (rev 2271) @@ -1013,13 +1013,6 @@ if (!edit_ && !enterOccur_) { - static const char sql[] = - "insert into BILLSDEPOSITS_V1 (ACCOUNTID, TOACCOUNTID, PAYEEID, TRANSCODE, " - "TRANSAMOUNT, STATUS, TRANSACTIONNUMBER, NOTES," - "CATEGID, SUBCATEGID, TRANSDATE, FOLLOWUPID, TOTRANSAMOUNT, REPEATS, " - "NEXTOCCURRENCEDATE, NUMOCCURRENCES) " - "values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, -1, ?, ?, ?, ? )"; - DB_View_BILLSDEPOSITS_V1::Data* billsdeposit = BILLSDEPOSITS_V1.create(); billsdeposit->ACCOUNTID = fromAccountID; billsdeposit->TOACCOUNTID = toAccountID; @@ -1058,70 +1051,50 @@ } else if (edit_) { - static const char sql[] = - "update BILLSDEPOSITS_V1 " - "SET ACCOUNTID=?, TOACCOUNTID=?, PAYEEID=?, TRANSCODE=?," - "TRANSAMOUNT=?, STATUS=?, TRANSACTIONNUMBER=?, NOTES=?," - "CATEGID=?, SUBCATEGID=?, TRANSDATE=?, TOTRANSAMOUNT=?, REPEATS=?, " - "NEXTOCCURRENCEDATE=?, NUMOCCURRENCES=? " - "WHERE BDID=?"; + DB_View_BILLSDEPOSITS_V1::Data* billsdeposit = BILLSDEPOSITS_V1.get(bdID_, db_); + if (!billsdeposit) + return; + billsdeposit->ACCOUNTID = fromAccountID; + billsdeposit->TOACCOUNTID = toAccountID; + billsdeposit->PAYEEID = payeeID_; + billsdeposit->TRANSCODE = transCode; + billsdeposit->TRANSAMOUNT = amount; + billsdeposit->STATUS = status; + billsdeposit->TRANSACTIONNUMBER = transNum; + billsdeposit->NOTES = notes; + billsdeposit->CATEGID = categID_; + billsdeposit->SUBCATEGID = subcategID_; + billsdeposit->TRANSDATE = date1; + billsdeposit->TOTRANSAMOUNT = toTransAmount_; + billsdeposit->REPEATS = repeats; + billsdeposit->NEXTOCCURRENCEDATE = nextOccurDate; + billsdeposit->NUMOCCURRENCES = numRepeats; - wxSQLite3Statement st = db_->PrepareStatement(sql); + if (!billsdeposit->save(db_)) + return; - int i = 0; - st.Bind(++i, accountID_); - st.Bind(++i, toAccountID); - st.Bind(++i, payeeID_); - st.Bind(++i, transCode); - st.Bind(++i, amount); - st.Bind(++i, status); - st.Bind(++i, transNum); - st.Bind(++i, notes); - st.Bind(++i, categID_); - st.Bind(++i, subcategID_); - st.Bind(++i, date1); - st.Bind(++i, toTransAmount_); - st.Bind(++i, repeats); - st.Bind(++i, nextOccurDate); - st.Bind(++i, numRepeats); - st.Bind(++i, bdID_); + int transID = billsdeposit->id(); - wxASSERT(st.GetParamCount() == i); - - st.ExecuteUpdate(); - st.Finalize(); - // -- - - st = db_->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); + wxSQLite3Statement st = db_->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); st.Bind(1, bdID_); st.ExecuteUpdate(); st.Finalize(); // -- - - static const char sql_ins[] = - "insert into BUDGETSPLITTRANSACTIONS_V1 (TRANSID, CATEGID, SUBCATEGID, SPLITTRANSAMOUNT) " - "values (?, ?, ?, ?)"; - - st = db_->PrepareStatement(sql_ins); - for (size_t i = 0; i < split_->numEntries(); ++i) { mmSplitTransactionEntry &r = *split_->entries_[i]; - st.Bind(1, bdID_); - st.Bind(2, r.categID_); - st.Bind(3, r.subCategID_); - st.Bind(4, r.splitAmount_); - - st.ExecuteUpdate(); - r.splitEntryID_ = db_->GetLastRowId().ToLong(); - - st.Reset(); - } + DB_View_BUDGETSPLITTRANSACTIONS_V1::Data* budgetsplittransaction = BUDGETSPLITTRANSACTIONS_V1.create(); + budgetsplittransaction->TRANSID = transID; + budgetsplittransaction->CATEGID = r.categID_; + budgetsplittransaction->SUBCATEGID = r.subCategID_; + budgetsplittransaction->SPLITTRANSAMOUNT = r.splitAmount_; - st.Finalize(); + if (budgetsplittransaction->save(db_)) + r.splitEntryID_ = budgetsplittransaction->id(); + } } else if (enterOccur_) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-05-24 12:28:03
|
Revision: 2393 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2393&view=rev Author: vomikan Date: 2012-05-24 12:27:54 +0000 (Thu, 24 May 2012) Log Message: ----------- fix for wxFlexGridSizer Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-05-24 12:07:37 UTC (rev 2392) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-05-24 12:27:54 UTC (rev 2393) @@ -390,7 +390,7 @@ wxPanel* transactionPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); transDetailsStaticBoxSizer->Add(transactionPanel, 0, wxGROW|wxALL, 10); - wxFlexGridSizer* transPanelSizer = new wxFlexGridSizer(5, 2, 10, 10); + wxFlexGridSizer* transPanelSizer = new wxFlexGridSizer(10, 2, 10, 10); transactionPanel->SetSizer(transPanelSizer); // Trans Date -------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-13 12:52:31
|
Revision: 2586 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2586&view=rev Author: vomikan Date: 2012-06-13 12:52:20 +0000 (Wed, 13 Jun 2012) Log Message: ----------- wxSizerFlags, wxStringClientData Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 08:41:14 UTC (rev 2585) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 12:52:20 UTC (rev 2586) @@ -243,22 +243,27 @@ void mmBDDialog::CreateControls() { + wxSizerFlags flags, flagsCenter, flagsExpand; + flags.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxTOP|wxLEFT, 0); + flagsCenter.Align(wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL).Border(wxALL, 0); + flagsExpand.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxALL, 0).Expand(); + + wxFont staticBoxFontSetting = this->GetFont(); + staticBoxFontSetting.SetWeight(wxFONTWEIGHT_BOLD); + wxBoxSizer* mainBoxSizerOuter = new wxBoxSizer(wxVERTICAL); wxBoxSizer* mainBoxSizerInner = new wxBoxSizer(wxHORIZONTAL); /* Repeat Transaction Details */ wxBoxSizer* repeatTransBoxSizer = new wxBoxSizer(wxVERTICAL); - /* Transaction Details */ - wxStaticBox* transDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Transaction Details") ); - wxStaticBoxSizer* transDetailsStaticBoxSizer = new wxStaticBoxSizer(transDetailsStaticBox, wxVERTICAL); - this->SetSizer(mainBoxSizerOuter); /* Calendar */ - wxStaticBox* calendarStaticBox = new wxStaticBox(this, wxID_ANY, _("Calendar") ); + wxStaticBox* calendarStaticBox = new wxStaticBox(this, wxID_ANY, _("Calendar")); + calendarStaticBox->SetFont(staticBoxFontSetting); wxStaticBoxSizer* calendarStaticBoxSizer = new wxStaticBoxSizer(calendarStaticBox, wxHORIZONTAL); - repeatTransBoxSizer->Add(calendarStaticBoxSizer, 10, wxALIGN_CENTER|wxLEFT|wxBOTTOM|wxRIGHT, 15); + repeatTransBoxSizer->Add(calendarStaticBoxSizer, flagsCenter); //TODO: Set these up as user selectable. Some users wish to have monday first in calendar! bool startSunday = true; @@ -275,20 +280,21 @@ calendarCtrl_ = new wxCalendarCtrl( this, ID_DIALOG_BD_CALENDAR, wxDateTime(), wxDefaultPosition, wxDefaultSize, style); - calendarStaticBoxSizer->Add(calendarCtrl_, 10, wxALIGN_CENTER_HORIZONTAL|wxALL, 15); + calendarStaticBoxSizer->Add(calendarCtrl_, flagsCenter); /* Bills & Deposits Details */ - wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Repeating Transaction Details") ); + wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Repeating Transaction Details")); + repeatDetailsStaticBox->SetFont(staticBoxFontSetting); wxStaticBoxSizer* repeatDetailsStaticBoxSizer = new wxStaticBoxSizer(repeatDetailsStaticBox, wxHORIZONTAL); - repeatTransBoxSizer->Add(repeatDetailsStaticBoxSizer, 0, wxALIGN_CENTER|wxALL, 5); + repeatTransBoxSizer->Add(repeatDetailsStaticBoxSizer, flagsExpand); - wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(4, 2, 10, 10); - repeatDetailsStaticBoxSizer->Add(itemFlexGridSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxFlexGridSizer* itemFlexGridSizer5 = new wxFlexGridSizer(0, 2, 10, 10); + repeatDetailsStaticBoxSizer->Add(itemFlexGridSizer5, flagsCenter); wxStaticText* staticTextAccName = new wxStaticText( this, wxID_STATIC, _("Account Name") ); - itemFlexGridSizer5->Add(staticTextAccName, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + itemFlexGridSizer5->Add(staticTextAccName, flagsCenter); itemAccountName_ = new wxButton( this, ID_DIALOG_BD_COMBOBOX_ACCOUNTNAME, _("Select Account"), - wxDefaultPosition, wxSize(180, -1), 0 ); + wxDefaultPosition, wxSize(180, -1) ); if (core_->getNumBankAccounts() == 1) { wxArrayString accName = core_->getAccountsName(); @@ -296,7 +302,7 @@ itemAccountName_->SetLabel(accNameStr); accountID_= core_->getAccountID(accNameStr); }; - itemFlexGridSizer5->Add(itemAccountName_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + itemFlexGridSizer5->Add(itemAccountName_, flagsCenter); itemAccountName_->SetToolTip(_("Specify the Account that will own the repeating transaction")); // change properties depending on system parameters @@ -312,7 +318,7 @@ // Next Occur Date -------------------------------------------- wxStaticText* staticTextNextOccur = new wxStaticText( this, wxID_STATIC, _("Next Occurrence") ); dpcbd_ = new wxDatePickerCtrl( this, ID_DIALOG_BD_BUTTON_NEXTOCCUR, wxDefaultDateTime, - wxDefaultPosition, wxSize(110,-1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); + wxDefaultPosition, wxSize(130,-1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); dpcbd_->SetToolTip(_("Specify the date of the next bill or deposit")); spinNextOccDate_ = new wxSpinButton( this, ID_DIALOG_BD_REPEAT_DATE_SPINNER, @@ -320,16 +326,16 @@ spinNextOccDate_->SetToolTip(_("Retard or advance the date of the 'next occurrence")); wxBoxSizer* nextOccurDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); - nextOccurDateBoxSizer->Add(dpcbd_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - nextOccurDateBoxSizer->Add(spinNextOccDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); + nextOccurDateBoxSizer->Add(dpcbd_, flags); + nextOccurDateBoxSizer->AddSpacer(interval); + nextOccurDateBoxSizer->Add(spinNextOccDate_, flags); - itemFlexGridSizer5->Add(staticTextNextOccur, 0, - wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - itemFlexGridSizer5->Add(nextOccurDateBoxSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + itemFlexGridSizer5->Add(staticTextNextOccur, flags); + itemFlexGridSizer5->Add(nextOccurDateBoxSizer, flags); // Repeats -------------------------------------------- staticTextRepeats_ = new wxStaticText( this, wxID_STATIC, _("Repeats") ); - itemFlexGridSizer5->Add(staticTextRepeats_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + itemFlexGridSizer5->Add(staticTextRepeats_, flags); wxArrayString repeatsStrChoiceArray; repeatsStrChoiceArray.Add(_("None")); @@ -355,19 +361,19 @@ bSetNextOccurDate_ = new wxButton( this, ID_DIALOG_TRANS_BUTTONTRANSNUM, _("Next"), wxDefaultPosition, wxSize(60, -1)); bSetNextOccurDate_->SetToolTip(_("Advance the Next Occurance Date with the specified values")); - repeatBoxSizer->Add(itemRepeats_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - repeatBoxSizer->Add(bSetNextOccurDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 4); + repeatBoxSizer->Add(itemRepeats_, flags); + repeatBoxSizer->Add(bSetNextOccurDate_, flags); - itemFlexGridSizer5->Add(repeatBoxSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + itemFlexGridSizer5->Add(repeatBoxSizer, flags); itemRepeats_->SetSelection(0); // Repeat Times -------------------------------------------- staticTimesRepeat_ = new wxStaticText( this, wxID_STATIC, _("Times Repeated") ); - itemFlexGridSizer5->Add(staticTimesRepeat_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + itemFlexGridSizer5->Add(staticTimesRepeat_, flags); textNumRepeats_ = new wxTextCtrl( this, ID_DIALOG_BD_TEXTCTRL_NUM_TIMES, (""), wxDefaultPosition, wxSize(110, -1), 0, wxFloatingPointValidator<float>(2) ); - itemFlexGridSizer5->Add(textNumRepeats_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + itemFlexGridSizer5->Add(textNumRepeats_, flags); textNumRepeats_->SetMaxLength(12); setRepeatDetails(); @@ -381,50 +387,61 @@ itemCheckBoxAutoExeSilent_->Disable(); itemCheckBoxAutoExeSilent_->SetToolTip(_("Automatic Execution will occur without user interaction")); - repeatTransBoxSizer->Add(itemCheckBoxAutoExeUserAck_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - repeatTransBoxSizer->Add(itemCheckBoxAutoExeSilent_, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5); + repeatTransBoxSizer->Add(itemCheckBoxAutoExeUserAck_, flags); + repeatTransBoxSizer->Add(itemCheckBoxAutoExeSilent_, flags); /************************************************************************************************************ transactionPanel controlled by transPanelSizer - is contained in the transDetailsStaticBoxSizer. *************************************************************************************************************/ + /* Transaction Details */ + wxStaticBox* transDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Transaction Details") ); + transDetailsStaticBox->SetFont(staticBoxFontSetting); + wxStaticBoxSizer* transDetailsStaticBoxSizer = new wxStaticBoxSizer(transDetailsStaticBox, wxVERTICAL); + wxPanel* transactionPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - transDetailsStaticBoxSizer->Add(transactionPanel, 0, wxGROW|wxALL, 10); + transDetailsStaticBoxSizer->Add(transactionPanel, flagsExpand); - wxFlexGridSizer* transPanelSizer = new wxFlexGridSizer(10, 2, 10, 10); + wxFlexGridSizer* transPanelSizer = new wxFlexGridSizer(0, 2, 10, 10); transactionPanel->SetSizer(transPanelSizer); // Trans Date -------------------------------------------- wxStaticText* staticTextDate = new wxStaticText( transactionPanel, wxID_STATIC, _("Date")); dpc_ = new wxDatePickerCtrl( transactionPanel, ID_DIALOG_TRANS_BUTTONDATE, wxDefaultDateTime, - wxDefaultPosition, wxSize(110, -1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); + wxDefaultPosition, wxSize(130, -1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); dpc_->SetToolTip(_("Specify the date of the transaction")); spinTransDate_ = new wxSpinButton( transactionPanel,ID_DIALOG_TRANS_DATE_SPINNER, wxDefaultPosition, spinCtrlSize,spinCtrlDirection|wxSP_ARROW_KEYS|wxSP_WRAP); spinTransDate_->SetToolTip(_("Retard or advance the date of the transaction")); wxBoxSizer* transDateBoxSizer = new wxBoxSizer(wxHORIZONTAL); - transDateBoxSizer->Add(dpc_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transDateBoxSizer->Add(dpc_, flags); transDateBoxSizer->Add(spinTransDate_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, interval); - transPanelSizer->Add(staticTextDate, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - transPanelSizer->Add(transDateBoxSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); + transPanelSizer->Add(staticTextDate, flags); + transPanelSizer->Add(transDateBoxSizer, flags); // Status -------------------------------------------- wxStaticText* staticTextStatus = new wxStaticText( transactionPanel, wxID_STATIC, _("Status")); - wxArrayString choiceStatusStrings; - choiceStatusStrings.Add(_("None")); - choiceStatusStrings.Add(_("Reconciled")); - choiceStatusStrings.Add(_("Void")); - choiceStatusStrings.Add(_("Follow up")); - choiceStatusStrings.Add(_("Duplicate")); choiceStatus_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_STATUS, - wxDefaultPosition, wxSize(110, -1), choiceStatusStrings); + wxDefaultPosition, wxSize(110, -1)); + wxString transaction_status[] = + { + wxTRANSLATE("None"), + wxTRANSLATE("Reconciled"), + wxTRANSLATE("Void"), + wxTRANSLATE("Follow up"), + wxTRANSLATE("Duplicate") + }; + for(size_t i = 0; i < sizeof(transaction_status)/sizeof(wxString); ++i) + choiceStatus_->Append(wxGetTranslation(transaction_status[i]), + new wxStringClientData(transaction_status[i])); + choiceStatus_->SetStringSelection(wxGetTranslation(mmIniOptions::instance().transStatusReconciled_)); choiceStatus_->SetToolTip(_("Specify the status for the transaction")); - transPanelSizer->Add(staticTextStatus, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - transPanelSizer->Add(choiceStatus_, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextStatus, flags); + transPanelSizer->Add(choiceStatus_, flags); // Type -------------------------------------------- wxStaticText* staticTextType = new wxStaticText( transactionPanel, wxID_STATIC, _("Type")); @@ -444,11 +461,11 @@ cAdvanced_->SetToolTip(_("Allows the setting of different amounts in the FROM and TO accounts.")); wxBoxSizer* typeSizer = new wxBoxSizer(wxHORIZONTAL); - typeSizer->Add(choiceTrans_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - typeSizer->Add(cAdvanced_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxALL, 5); + typeSizer->Add(choiceTrans_, flags); + typeSizer->Add(cAdvanced_, flags); - transPanelSizer->Add(staticTextType, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - transPanelSizer->Add(typeSizer, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextType, flags); + transPanelSizer->Add(typeSizer, flags); // Amount Fields -------------------------------------------- amountNormalTip_ = _("Specify the amount for this transaction"); @@ -457,19 +474,21 @@ wxStaticText* staticTextAmount = new wxStaticText( transactionPanel, wxID_STATIC, _("Amount")); textAmount_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTAMOUNT, (""), - wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT|wxTE_PROCESS_ENTER , wxFloatingPointValidator<float>(2) ); + wxDefaultPosition, wxSize(110, -1), + wxALIGN_RIGHT|wxTE_PROCESS_ENTER , wxFloatingPointValidator<float>(2) ); textAmount_->SetToolTip(amountNormalTip_); toTextAmount_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTAMOUNT, (""), - wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT|wxTE_PROCESS_ENTER , wxFloatingPointValidator<float>(2) ); + wxDefaultPosition, wxSize(110, -1), wxALIGN_RIGHT|wxTE_PROCESS_ENTER, + wxFloatingPointValidator<float>(2) ); toTextAmount_->SetToolTip(_("Specify the transfer amount in the To Account")); wxBoxSizer* amountSizer = new wxBoxSizer(wxHORIZONTAL); - amountSizer->Add(textAmount_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 0); - amountSizer->Add(toTextAmount_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT, 5); + amountSizer->Add(textAmount_, flags); + amountSizer->Add(toTextAmount_, flags); - transPanelSizer->Add(staticTextAmount, 0, wxALIGN_LEFT|wxALL, 0); - transPanelSizer->Add(amountSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextAmount, flags); + transPanelSizer->Add(amountSizer, flags); // Payee ------------------------------------------------ wxStaticText* staticTextPayee = new wxStaticText( transactionPanel, ID_DIALOG_TRANS_STATIC_PAYEE,_("Payee") ); @@ -481,8 +500,8 @@ bPayee_->SetToolTip(payeeWithdrawalTip_); resetPayeeString(); - transPanelSizer->Add(staticTextPayee, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - transPanelSizer->Add(bPayee_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextPayee, flags); + transPanelSizer->Add(bPayee_, flags); // Payee Alternate ------------------------------------------------ wxStaticText* staticTextTo = new wxStaticText( transactionPanel, ID_DIALOG_TRANS_STATIC_FROM, (" ") ); @@ -490,8 +509,8 @@ wxDefaultPosition, wxSize(225, -1), 0 ); bTo_->SetToolTip(_("Specify which account the transfer is going to")); - transPanelSizer->Add(staticTextTo, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxUP, 0); - transPanelSizer->Add(bTo_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxUP, 0); + transPanelSizer->Add(staticTextTo, flags); + transPanelSizer->Add(bTo_, flags); // Split Category ------------------------------------------- cSplit_ = new wxCheckBox( transactionPanel, ID_DIALOG_TRANS_SPLITCHECKBOX, _("Split"), @@ -500,7 +519,7 @@ cSplit_->SetToolTip(_("Use split Categories")); transPanelSizer->AddSpacer(20); // Fill empty space. - transPanelSizer->Add(cSplit_, 0, wxALIGN_BOTTOM|wxALIGN_LEFT|wxALL, 0); + transPanelSizer->Add(cSplit_, flags); // Category --------------------------------------------- wxStaticText* staticTextCategory = new wxStaticText( transactionPanel, wxID_STATIC, _("Category")); @@ -508,8 +527,8 @@ wxDefaultPosition, wxSize(225, -1), 0 ); //bCategory_->SetToolTip(_("Specify the category for this transaction")); - transPanelSizer->Add(staticTextCategory, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); - transPanelSizer->Add(bCategory_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextCategory, flags); + transPanelSizer->Add(bCategory_, flags); // Number --------------------------------------------- wxStaticText* staticTextNumber = new wxStaticText( transactionPanel, wxID_STATIC, _("Number")); @@ -517,8 +536,8 @@ wxDefaultPosition, wxSize(185, -1), 0 ); textNumber_->SetToolTip(_("Specify any associated check number or transaction number")); - transPanelSizer->Add(staticTextNumber, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - transPanelSizer->Add(textNumber_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextNumber, flags); + transPanelSizer->Add(textNumber_, flags); // Notes --------------------------------------------- wxStaticText* staticTextNotes = new wxStaticText( transactionPanel, wxID_STATIC, _("Notes")); @@ -526,8 +545,8 @@ wxDefaultPosition, wxSize(225, 80), wxTE_MULTILINE ); textNotes_->SetToolTip(_("Specify any text notes you want to add to this transaction.")); - transPanelSizer->Add(staticTextNotes, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 0); - transPanelSizer->Add(textNotes_, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0); + transPanelSizer->Add(staticTextNotes, flags); + transPanelSizer->Add(textNotes_, flags); SetTransferControls(); // hide appropriate fields /********************************************************************************************** @@ -538,10 +557,10 @@ buttonsPanel->SetSizer(buttonsPanelSizer); wxButton* okButton = new wxButton( buttonsPanel, wxID_OK, _("OK")); - buttonsPanelSizer->Add(okButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + buttonsPanelSizer->Add(okButton, flags); wxButton* cancelButton = new wxButton( buttonsPanel, wxID_CANCEL, _("Cancel")); - buttonsPanelSizer->Add(cancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + buttonsPanelSizer->Add(cancelButton, flags); cancelButton->SetFocus(); /********************************************************************************************** @@ -969,7 +988,7 @@ wxString transNum = textNumber_->GetValue(); wxString notes = textNotes_->GetValue(); - wxString status = (""); // nothing yet + wxString status = ""; // nothing yet // Multiplex Auto executable onto the repeat field of the database. int repeats = itemRepeats_->GetSelection(); @@ -993,9 +1012,12 @@ wxString nextOccurDate = dpcbd_->GetValue().FormatISODate(); - status = wxString("URVFD").Mid(choiceStatus_->GetSelection(), 1); - status.Replace("U",""); - + wxStringClientData* status_obj = (wxStringClientData *)choiceStatus_->GetClientObject(choiceStatus_->GetSelection()); + if (status_obj) + { + status = (status_obj->GetData()).Left(1); + status.Replace("N",""); + } wxString date1 = dpc_->GetValue().FormatISODate(); if (!edit_ && !enterOccur_) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-13 14:36:59
|
Revision: 2589 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2589&view=rev Author: vomikan Date: 2012-06-13 14:36:50 +0000 (Wed, 13 Jun 2012) Log Message: ----------- var mane fix Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 14:25:27 UTC (rev 2588) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 14:36:50 UTC (rev 2589) @@ -141,9 +141,9 @@ choiceStatus_->SetSelection(getTransformedTrxStatus(statusString)); wxString nextOccurrString = billsdeposit->NEXTOCCURRENCEDATE; - int numRepeatStr = billsdeposit->NUMOCCURRENCES; - if (numRepeatStr > 0) - textNumRepeats_->SetValue(wxString::Format("%d", numRepeatStr)); + int numRepeat = billsdeposit->NUMOCCURRENCES; + if (numRepeat > 0) + textNumRepeats_->SetValue(wxString::Format("%d", numRepeat)); wxDateTime dtno = mmGetStorageStringAsDate(nextOccurrString); wxString dtnostr = mmGetDateForDisplay(db_, dtno); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-13 14:48:15
|
Revision: 2590 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2590&view=rev Author: vomikan Date: 2012-06-13 14:48:08 +0000 (Wed, 13 Jun 2012) Log Message: ----------- wxTRANSLATE Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 14:36:50 UTC (rev 2589) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 14:48:08 UTC (rev 2590) @@ -57,10 +57,10 @@ EVT_TEXT(ID_DIALOG_BD_TEXTCTRL_NUM_TIMES,mmBDDialog::OnPeriodChange) END_EVENT_TABLE() -const wxString payeeDepositTip_ = "Specify where the transaction is coming from"; -const wxString payeeWithdrawalTip_ = "Specify where the transaction is going to"; -const wxString amountNormalTip_ = "Specify the amount for this transaction"; -const wxString amountTransferTip_ = "Specify the amount to be transfered"; +const wxString payeeDepositTip_ = wxTRANSLATE("Specify where the transaction is coming from"); +const wxString payeeWithdrawalTip_ = wxTRANSLATE("Specify where the transaction is going to"); +const wxString amountNormalTip_ = wxTRANSLATE("Specify the amount for this transaction"); +const wxString amountTransferTip_ = wxTRANSLATE("Specify the amount to be transfered"); mmBDDialog::mmBDDialog( ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-12 21:27:56
|
Revision: 2584 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2584&view=rev Author: vomikan Date: 2012-06-12 21:27:50 +0000 (Tue, 12 Jun 2012) Log Message: ----------- cleanup Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-12 21:19:22 UTC (rev 2583) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-12 21:27:50 UTC (rev 2584) @@ -993,22 +993,8 @@ wxString nextOccurDate = dpcbd_->GetValue().FormatISODate(); - if (choiceStatus_->GetSelection() == DEF_STATUS_NONE) - { - status = (""); // nothing yet - } - else if (choiceStatus_->GetSelection() == DEF_STATUS_RECONCILED) - { - status = ("R"); - } - else if (choiceStatus_->GetSelection() == DEF_STATUS_VOID) - { - status = ("V"); - } - else if (choiceStatus_->GetSelection() == DEF_STATUS_FOLLOWUP) - { - status = ("F"); - } + status = wxString("URVFD").Mid(choiceStatus_->GetSelection(), 1); + status.Replace("U",""); wxString date1 = dpc_->GetValue().FormatISODate(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-13 13:37:03
|
Revision: 2587 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2587&view=rev Author: vomikan Date: 2012-06-13 13:36:56 +0000 (Wed, 13 Jun 2012) Log Message: ----------- update Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 12:52:20 UTC (rev 2586) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-13 13:36:56 UTC (rev 2587) @@ -292,7 +292,7 @@ repeatDetailsStaticBoxSizer->Add(itemFlexGridSizer5, flagsCenter); wxStaticText* staticTextAccName = new wxStaticText( this, wxID_STATIC, _("Account Name") ); - itemFlexGridSizer5->Add(staticTextAccName, flagsCenter); + itemFlexGridSizer5->Add(staticTextAccName, flags); itemAccountName_ = new wxButton( this, ID_DIALOG_BD_COMBOBOX_ACCOUNTNAME, _("Select Account"), wxDefaultPosition, wxSize(180, -1) ); if (core_->getNumBankAccounts() == 1) @@ -302,7 +302,7 @@ itemAccountName_->SetLabel(accNameStr); accountID_= core_->getAccountID(accNameStr); }; - itemFlexGridSizer5->Add(itemAccountName_, flagsCenter); + itemFlexGridSizer5->Add(itemAccountName_, flags); itemAccountName_->SetToolTip(_("Specify the Account that will own the repeating transaction")); // change properties depending on system parameters @@ -446,13 +446,21 @@ // Type -------------------------------------------- wxStaticText* staticTextType = new wxStaticText( transactionPanel, wxID_STATIC, _("Type")); - wxArrayString choiceTypeStrings; - choiceTypeStrings.Add(_("Withdrawal")); - choiceTypeStrings.Add(_("Deposit")); - if (core_->getNumBankAccounts() > 1) - choiceTypeStrings.Add(_("Transfer")); choiceTrans_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_TYPE, - wxDefaultPosition, wxSize(110, -1), choiceTypeStrings); + wxDefaultPosition, wxSize(110, -1)); + wxString transaction_type[] = + { + wxTRANSLATE("Withdrawal"), + wxTRANSLATE("Deposit"), + wxTRANSLATE("Transfer") + }; + size_t size = sizeof(transaction_type)/sizeof(wxString); + // Restrict choise if accounts number less than 2 + if (core_->getNumBankAccounts() < 2) size--; + for(size_t i = 0; i < size; ++i) + choiceTrans_->Append(wxGetTranslation(transaction_type[i]), + new wxStringClientData(transaction_type[i])); + choiceTrans_->SetSelection(DEF_WITHDRAWAL); choiceTrans_->SetToolTip(_("Specify the type of transactions to be created.")); cAdvanced_ = new wxCheckBox( transactionPanel, ID_DIALOG_TRANS_ADVANCED_CHECKBOX, _("Advanced"), @@ -556,10 +564,10 @@ wxBoxSizer* buttonsPanelSizer = new wxBoxSizer(wxHORIZONTAL); buttonsPanel->SetSizer(buttonsPanelSizer); - wxButton* okButton = new wxButton( buttonsPanel, wxID_OK, _("OK")); - buttonsPanelSizer->Add(okButton, flags); + wxButton* okButton = new wxButton( buttonsPanel, wxID_OK); + buttonsPanelSizer->Add(okButton, flags.Border(wxRIGHT|wxBOTTOM, 10)); - wxButton* cancelButton = new wxButton( buttonsPanel, wxID_CANCEL, _("Cancel")); + wxButton* cancelButton = new wxButton( buttonsPanel, wxID_CANCEL); buttonsPanelSizer->Add(cancelButton, flags); cancelButton->SetFocus(); @@ -865,13 +873,8 @@ { wxString transCode; - int tCode = choiceTrans_->GetSelection(); - if (tCode == DEF_WITHDRAWAL) - transCode = TRANS_TYPE_WITHDRAWAL_STR; - else if (tCode == DEF_DEPOSIT) - transCode = TRANS_TYPE_DEPOSIT_STR; - else if (tCode == DEF_TRANSFER) - transCode = TRANS_TYPE_TRANSFER_STR; + wxStringClientData* type_obj = (wxStringClientData *)choiceTrans_->GetClientObject(choiceTrans_->GetSelection()); + if (type_obj) transCode = type_obj->GetData(); if (payeeID_ == -1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2012-06-18 17:32:58
|
Revision: 2630 http://moneymanagerex.svn.sourceforge.net/moneymanagerex/?rev=2630&view=rev Author: vomikan Date: 2012-06-18 17:32:48 +0000 (Mon, 18 Jun 2012) Log Message: ----------- wxConfigBase added Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2012-06-18 12:38:37 UTC (rev 2629) +++ trunk/mmex/src/billsdepositsdialog.cpp 2012-06-18 17:32:48 UTC (rev 2630) @@ -262,8 +262,9 @@ repeatTransBoxSizer->Add(calendarStaticBoxSizer, flagsCenter); //TODO: Set these up as user selectable. Some users wish to have monday first in calendar! - bool startSunday = true; - bool showSuroundingWeeks = true; + wxConfigBase *config = wxConfigBase::Get(); + bool startSunday = config->ReadBool("CAL_SUNDAY_FIRST", true); + bool showSuroundingWeeks = config->ReadBool("CAL_SHOW_SURROUNDING_WEEKS", true); int style = wxSUNKEN_BORDER| wxCAL_SHOW_HOLIDAYS| wxCAL_SEQUENTIAL_MONTH_SELECTION; if (startSunday) @@ -279,7 +280,8 @@ calendarStaticBoxSizer->Add(calendarCtrl_, flagsCenter); /* Bills & Deposits Details */ - wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Repeating Transaction Details")); + wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, + wxID_ANY, _("Repeating Transaction Details")); repeatDetailsStaticBox->SetFont(staticBoxFontSetting); wxStaticBoxSizer* repeatDetailsStaticBoxSizer = new wxStaticBoxSizer(repeatDetailsStaticBox, wxHORIZONTAL); repeatTransBoxSizer->Add(repeatDetailsStaticBoxSizer, flagsExpand); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2013-04-04 04:42:01
|
Revision: 3645 http://sourceforge.net/p/moneymanagerex/code/3645 Author: vomikan Date: 2013-04-04 04:41:58 +0000 (Thu, 04 Apr 2013) Log Message: ----------- warnings fix Modified Paths: -------------- trunk/mmex/src/billsdepositsdialog.cpp Modified: trunk/mmex/src/billsdepositsdialog.cpp =================================================================== --- trunk/mmex/src/billsdepositsdialog.cpp 2013-04-04 04:31:13 UTC (rev 3644) +++ trunk/mmex/src/billsdepositsdialog.cpp 2013-04-04 04:41:58 UTC (rev 3645) @@ -6,12 +6,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -43,9 +43,9 @@ EVT_CHECKBOX(ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_USERACK, mmBDDialog::OnAutoExecutionUserAckChecked) EVT_CHECKBOX(ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_SILENT, mmBDDialog::OnAutoExecutionSilentChecked) EVT_CALENDAR_SEL_CHANGED(ID_DIALOG_BD_CALENDAR, mmBDDialog::OnCalendarSelChanged) - EVT_DATE_CHANGED(ID_DIALOG_TRANS_BUTTONDATE, mmBDDialog::OnDateChanged) + EVT_DATE_CHANGED(ID_DIALOG_TRANS_BUTTONDATE, mmBDDialog::OnDateChanged) EVT_DATE_CHANGED(ID_DIALOG_BD_BUTTON_NEXTOCCUR, mmBDDialog::OnDateChanged) - EVT_CHOICE(ID_DIALOG_BD_COMBOBOX_REPEATS, mmBDDialog::OnRepeatTypeChanged) + EVT_CHOICE(ID_DIALOG_BD_COMBOBOX_REPEATS, mmBDDialog::OnRepeatTypeChanged) EVT_BUTTON(ID_DIALOG_TRANS_BUTTONTRANSNUM, mmBDDialog::OnsetNextRepeatDate) EVT_TEXT(ID_DIALOG_BD_TEXTCTRL_NUM_TIMES,mmBDDialog::OnPeriodChange) END_EVENT_TABLE() @@ -59,7 +59,7 @@ } mmBDDialog::mmBDDialog(mmCoreDB* core, int bdID, bool edit, bool enterOccur, - wxWindow* parent, wxWindowID id, const wxString& caption, + wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) :core_(core), bdID_(bdID), edit_(edit) , categID_(-1), subcategID_(-1), payeeID_(-1), accountID_(-1), toID_(-1) @@ -70,7 +70,7 @@ Create(parent, id, caption, pos, size, style); } -bool mmBDDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, +bool mmBDDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); @@ -81,7 +81,7 @@ GetSizer()->SetSizeHints(this); SetIcon(mmex::getProgramIcon()); - + boost::shared_ptr<mmSplitTransactionEntries> split(new mmSplitTransactionEntries()); split_ = split; @@ -117,20 +117,20 @@ void mmBDDialog::dataToControls() { - static const char billsdepositsSql[] = - + static const char billsdepositsSql[] = + "select BDID, ACCOUNTID, TOACCOUNTID, PAYEEID, TRANSCODE, TRANSAMOUNT, STATUS, TRANSACTIONNUMBER, NOTES, CATEGID, " "SUBCATEGID, FOLLOWUPID, TOTRANSAMOUNT, REPEATS, NUMOCCURRENCES, " "NEXTOCCURRENCEDATE, date(TRANSDATE, 'localtime') as TRANSDATE " "from BILLSDEPOSITS_V1 where BDID = ? "; // Removed "date(NEXTOCCURRENCEDATE, 'localtime') as NEXTOCCURRENCEDATE, " // because causing problems with some systems and in different time zones - + wxSQLite3Statement st = core_->db_.get()->PrepareStatement(billsdepositsSql); st.Bind(1, bdID_); wxSQLite3ResultSet q1 = st.ExecuteQuery(); - + if (q1.NextRow()) { categID_ = q1.GetInt(wxT("CATEGID")); @@ -141,7 +141,7 @@ wxString transTypeString = q1.GetString(wxT("TRANSCODE")); double transAmount = q1.GetDouble(wxT("TRANSAMOUNT")); toTransAmount_ = q1.GetDouble(wxT("TOTRANSAMOUNT")); - + wxString statusString = q1.GetString(wxT("STATUS")); //wxString statusString = pBankTransaction_->status_; if (statusString == wxT("")) statusString = wxT("N"); @@ -157,7 +157,7 @@ dpcbd_->SetValue(dtno); dpc_->SetValue(dtno); calendarCtrl_->SetDate (dtno); - + int repeatSel = q1.GetInt(wxT("REPEATS")); // Have used repeatSel to multiplex auto repeat fields. if (repeatSel >= BD_REPEATS_MULTIPLEX_BASE) @@ -179,7 +179,7 @@ setRepeatDetails(); if (repeatSel == 0) // if none textNumRepeats_->SetValue(wxT("")); - + if (transTypeString == TRANS_TYPE_WITHDRAWAL_STR) transaction_type_->SetSelection(DEF_WITHDRAWAL); else if (transTypeString == TRANS_TYPE_DEPOSIT_STR) @@ -223,7 +223,7 @@ wxString payeeString = core_->payeeList_.GetPayeeName(payeeID_); bPayee_->SetLabel(payeeString); - + if (transTypeString == TRANS_TYPE_TRANSFER_STR) { wxString fromAccount = core_->accountList_.GetAccountName(accountID_); @@ -241,13 +241,13 @@ } } } - + st.Finalize(); st.Reset(); } void mmBDDialog::CreateControls() -{ +{ const int border = 5; wxSizerFlags flags, flagsExpand; flags.Align(wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL).Border(wxALL, border); @@ -258,7 +258,7 @@ /* Repeat Transaction Details */ wxBoxSizer* repeatTransBoxSizer = new wxBoxSizer(wxVERTICAL); - + /* Transaction Details */ wxStaticBox* transDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Transaction Details") ); wxStaticBoxSizer* transDetailsStaticBoxSizer = new wxStaticBoxSizer(transDetailsStaticBox, wxVERTICAL); @@ -282,11 +282,11 @@ if (showSuroundingWeeks) style = wxCAL_SHOW_SURROUNDING_WEEKS| style; - - calendarCtrl_ = new wxCalendarCtrl( this, ID_DIALOG_BD_CALENDAR, wxDateTime(), + + calendarCtrl_ = new wxCalendarCtrl( this, ID_DIALOG_BD_CALENDAR, wxDateTime(), wxDefaultPosition, wxDefaultSize, style); calendarStaticBoxSizer->Add(calendarCtrl_, 10, wxALIGN_CENTER_HORIZONTAL|wxALL, 15); - + /* Bills & Deposits Details */ wxStaticBox* repeatDetailsStaticBox = new wxStaticBox(this, wxID_ANY, _("Repeating Transaction Details") ); wxStaticBoxSizer* repeatDetailsStaticBoxSizer = new wxStaticBoxSizer(repeatDetailsStaticBox, wxHORIZONTAL); @@ -296,7 +296,7 @@ repeatDetailsStaticBoxSizer->Add(itemFlexGridSizer5, flags); itemFlexGridSizer5->Add(new wxStaticText( this, wxID_STATIC, _("Account Name")), flags); - itemAccountName_ = new wxButton( this, ID_DIALOG_BD_COMBOBOX_ACCOUNTNAME, _("Select Account"), + itemAccountName_ = new wxButton( this, ID_DIALOG_BD_COMBOBOX_ACCOUNTNAME, _("Select Account"), wxDefaultPosition, wxSize(180, -1)); if (core_->accountList_.getNumBankAccounts() == 1) { @@ -337,7 +337,7 @@ // Repeats -------------------------------------------- staticTextRepeats_ = new wxStaticText( this, wxID_STATIC, _("Repeats") ); itemFlexGridSizer5->Add(staticTextRepeats_, flags); - + itemRepeats_ = new wxChoice( this, ID_DIALOG_BD_COMBOBOX_REPEATS, wxDefaultPosition, wxSize(110, -1)); size_t size = sizeof(BILLSDEPOSITS_REPEATS)/sizeof(wxString); @@ -369,11 +369,11 @@ setRepeatDetails(); /* Auto Execution Status */ - itemCheckBoxAutoExeUserAck_ = new wxCheckBox( this, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_USERACK, + itemCheckBoxAutoExeUserAck_ = new wxCheckBox( this, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_USERACK, _("Set to 'Auto Execute' on the 'Next Occurrence' date."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); itemCheckBoxAutoExeUserAck_->SetToolTip(_("Automatic Execution will require user acknowledgement.")); - itemCheckBoxAutoExeSilent_ = new wxCheckBox( this, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_SILENT, + itemCheckBoxAutoExeSilent_ = new wxCheckBox( this, ID_DIALOG_BD_CHECKBOX_AUTO_EXECUTE_SILENT, _("Set 'Auto Execute' without user acknowlegement."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); itemCheckBoxAutoExeSilent_->Disable(); itemCheckBoxAutoExeSilent_->SetToolTip(_("Automatic Execution will occur without user interaction")); @@ -393,7 +393,7 @@ box_sizer1->Add(transPanelSizer); // Trans Date -------------------------------------------- - dpc_ = new wxDatePickerCtrl( transactionPanel, ID_DIALOG_TRANS_BUTTONDATE, wxDefaultDateTime, + dpc_ = new wxDatePickerCtrl( transactionPanel, ID_DIALOG_TRANS_BUTTONDATE, wxDefaultDateTime, wxDefaultPosition, wxSize(110, -1), wxDP_DROPDOWN | wxDP_SHOWCENTURY); dpc_->SetToolTip(_("Specify the date of the transaction")); spinTransDate_ = new wxSpinButton( transactionPanel,ID_DIALOG_TRANS_DATE_SPINNER, @@ -421,7 +421,7 @@ transPanelSizer->Add(choiceStatus_, flags); // Type -------------------------------------------- - transaction_type_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_TYPE, + transaction_type_ = new wxChoice( transactionPanel, ID_DIALOG_TRANS_TYPE, wxDefaultPosition, wxSize(110, -1)); // Restrict choise if accounts number less than 2 @@ -436,7 +436,7 @@ cAdvanced_ = new wxCheckBox( transactionPanel, ID_DIALOG_TRANS_ADVANCED_CHECKBOX, _("Advanced"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); cAdvanced_->SetValue(false); - cAdvanced_->SetToolTip(_("Allows the setting of different amounts in the FROM and TO accounts.")); + cAdvanced_->SetToolTip(_("Allows the setting of different amounts in the FROM and TO accounts.")); wxBoxSizer* typeSizer = new wxBoxSizer(wxHORIZONTAL); typeSizer->Add(transaction_type_, flags); @@ -447,7 +447,7 @@ // Amount Fields -------------------------------------------- amountNormalTip_ = _("Specify the amount for this transaction"); - amountTransferTip_ = _("Specify the amount to be transfered"); + amountTransferTip_ = _("Specify the amount to be transfered"); wxStaticText* staticTextAmount = new wxStaticText( transactionPanel, wxID_STATIC, _("Amount")); @@ -478,7 +478,7 @@ transPanelSizer->Add(staticTextPayee, flags); transPanelSizer->Add(bPayee_, flags); - + // Payee Alternate ------------------------------------------------ wxStaticText* staticTextTo = new wxStaticText( transactionPanel, ID_DIALOG_TRANS_STATIC_FROM, wxT(" ") ); bTo_ = new wxButton( transactionPanel, ID_DIALOG_TRANS_BUTTONTO, _("Select To Acct"), @@ -502,7 +502,7 @@ bCategory_ = new wxButton( transactionPanel, ID_DIALOG_TRANS_BUTTONCATEGS, _("Select Category"), wxDefaultPosition, wxSize(225, -1), 0 ); //bCategory_->SetToolTip(_("Specify the category for this transaction")); - + transPanelSizer->Add(staticTextCategory, flags); transPanelSizer->Add(bCategory_, flags); @@ -510,15 +510,15 @@ textNumber_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTNUMBER, wxT(""), wxDefaultPosition, wxSize(225, -1)); textNumber_->SetToolTip(_("Specify any associated check number or transaction number")); - + transPanelSizer->Add(new wxStaticText( transactionPanel, wxID_STATIC, _("Number")), flags); transPanelSizer->Add(textNumber_, flags); - + // Notes --------------------------------------------- textNotes_ = new wxTextCtrl( transactionPanel, ID_DIALOG_TRANS_TEXTNOTES, wxT(""), wxDefaultPosition, wxSize(225, 80), wxTE_MULTILINE ); textNotes_->SetToolTip(_("Specify any text notes you want to add to this transaction.")); - + transPanelSizer->Add(new wxStaticText( transactionPanel, wxID_STATIC, _("Notes")), flags); transPanelSizer->AddSpacer(1); box_sizer1->Add(textNotes_, flagsExpand); @@ -552,11 +552,11 @@ /********************************************************************************************** Adjust controls according to function settings ***********************************************************************************************/ - if (enterOccur_) + if (enterOccur_) { spinNextOccDate_->Disable(); - } - else + } + else { dpc_->Disable(); spinTransDate_->Disable(); @@ -571,7 +571,7 @@ void mmBDDialog::OnAccountName(wxCommandEvent& /*event*/) { wxArrayString as = core_->accountList_.getAccountsName(); - + wxSingleChoiceDialog scd(this, _("Choose Bank Account or Term Account"), _("Select Account"), as); if (scd.ShowModal() == wxID_OK) { @@ -586,20 +586,20 @@ if (transaction_type_->GetSelection() == DEF_TRANSFER) { wxArrayString as = core_->accountList_.getAccountsName(); - + wxString acctName = itemAccountName_->GetLabel(); bPayee_->SetLabel(acctName); - + wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); - if (scd.ShowModal() == wxID_OK) + if (scd.ShowModal() == wxID_OK) { acctName = scd.GetStringSelection(); payeeID_ = core_->accountList_.GetAccountId(acctName); bPayee_->SetLabel(acctName); itemAccountName_->SetLabel(acctName); } - } - else + } + else { mmPayeeDialog dlg(this, core_); @@ -612,7 +612,7 @@ payeeUnknown_ = true; return; } - + // ... If this is a Split Transaction, ignore the Payee change if (split_->numEntries()) return; @@ -625,7 +625,7 @@ { return; } - + categID_ = pPayee->categoryId_; subcategID_ = pPayee->subcategoryId_; wxString categString = core_->categoryList_.GetFullCategoryString(categID_, subcategID_); @@ -656,10 +656,10 @@ } void mmBDDialog::OnTo(wxCommandEvent& /*event*/) -{ +{ // This should only get called if we are in a transfer wxArrayString as = core_->accountList_.getAccountsName(); - + wxSingleChoiceDialog scd(this, _("Account name"), _("Select Account"), as); if (scd.ShowModal() == wxID_OK) { @@ -717,7 +717,7 @@ { wxStaticText* st = (wxStaticText*)FindWindow(ID_DIALOG_TRANS_STATIC_FROM); wxStaticText* stp = (wxStaticText*)FindWindow(ID_DIALOG_TRANS_STATIC_PAYEE); - + if (transaction_type_->GetSelection() == DEF_WITHDRAWAL) { displayControlsForType(DEF_WITHDRAWAL); @@ -755,8 +755,8 @@ SetTransferControls(true); if (cAdvanced_->IsChecked()) SetAdvancedTransferControls(true); - stp->SetLabel(_("From")); - st->SetLabel(_("To")); + stp->SetLabel(_("From")); + st->SetLabel(_("To")); bTo_->SetLabel(_("Select To Account")); toID_ = -1; payeeUnknown_ = true; @@ -865,7 +865,7 @@ mmShowErrorMessageInvalid(this, _("To Account")); return; } - + if (payeeID_ == toID_) { mmShowErrorMessage(this, _("From and To Account cannot be the same."), _("Error")); @@ -895,11 +895,11 @@ } } } - + wxString transNum = textNumber_->GetValue(); wxString notes = textNotes_->GetValue(); - // Multiplex Auto executable onto the repeat field of the database. + // Multiplex Auto executable onto the repeat field of the database. int repeats = itemRepeats_->GetSelection(); if (autoExecuteUserAck_) repeats += BD_REPEATS_MULTIPLEX_BASE; @@ -908,7 +908,7 @@ wxString numRepeatStr = textNumRepeats_->GetValue(); int numRepeats = -1; - + if (!numRepeatStr.empty()) { long cnt = 0; if (numRepeatStr.ToLong(&cnt)) @@ -918,27 +918,27 @@ numRepeats = static_cast<int>(cnt); } } - + wxString nextOccurDate = dpcbd_->GetValue().FormatISODate(); wxString status = wxT(""); wxStringClientData* status_obj = (wxStringClientData *)choiceStatus_->GetClientObject(choiceStatus_->GetSelection()); if (status_obj) status = status_obj->GetData().Left(1); status.Replace(wxT("N"), wxT("")); - + wxString date1 = dpc_->GetValue().FormatISODate(); if (!edit_ && !enterOccur_) { - static const char sql[] = + static const char sql[] = "insert into BILLSDEPOSITS_V1 (ACCOUNTID, TOACCOUNTID, PAYEEID, TRANSCODE, " "TRANSAMOUNT, STATUS, TRANSACTIONNUMBER, NOTES," "CATEGID, SUBCATEGID, TRANSDATE, FOLLOWUPID, TOTRANSAMOUNT, REPEATS, " "NEXTOCCURRENCEDATE, NUMOCCURRENCES) " "values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, -1, ?, ?, ?, ? )"; - + wxSQLite3Statement st = core_->db_.get()->PrepareStatement(sql); - + int i = 0; st.Bind(++i, fromAccountID); st.Bind(++i, toAccountID); @@ -961,10 +961,10 @@ st.ExecuteUpdate(); int transID = core_->db_.get()->GetLastRowId().ToLong(); st.Finalize(); - + // -- - static const char sql_ins[] = + static const char sql_ins[] = "insert into BUDGETSPLITTRANSACTIONS_V1 (TRANSID, CATEGID, SUBCATEGID, SPLITTRANSAMOUNT) " "values (?, ?, ?, ?)"; @@ -981,7 +981,7 @@ st.ExecuteUpdate(); r.splitEntryID_ = core_->db_.get()->GetLastRowId().ToLong(); - + st.Reset(); } @@ -990,7 +990,7 @@ } else if (edit_) { - static const char sql[] = + static const char sql[] = "update BILLSDEPOSITS_V1 " "SET ACCOUNTID=?, TOACCOUNTID=?, PAYEEID=?, TRANSCODE=?," "TRANSAMOUNT=?, STATUS=?, TRANSACTIONNUMBER=?, NOTES=?," @@ -1025,19 +1025,19 @@ transID_ = bdID_; // -- - st = core_->db_.get()->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); + st = core_->db_.get()->PrepareStatement("delete from BUDGETSPLITTRANSACTIONS_V1 where TRANSID = ?"); st.Bind(1, bdID_); st.ExecuteUpdate(); st.Finalize(); // -- - static const char sql_ins[] = + static const char sql_ins[] = "insert into BUDGETSPLITTRANSACTIONS_V1 (TRANSID, CATEGID, SUBCATEGID, SPLITTRANSAMOUNT) " "values (?, ?, ?, ?)"; st = core_->db_.get()->PrepareStatement(sql_ins); - + for (size_t i = 0; i < split_->numEntries(); ++i) { mmSplitTransactionEntry &r = *split_->entries_[i]; @@ -1046,10 +1046,10 @@ st.Bind(2, r.categID_); st.Bind(3, r.subCategID_); st.Bind(4, r.splitAmount_); - + st.ExecuteUpdate(); r.splitEntryID_ = core_->db_.get()->GetLastRowId().ToLong(); - + st.Reset(); } @@ -1094,7 +1094,7 @@ categID_ = -1; subcategID_ = -1; split_ = boost::shared_ptr<mmSplitTransactionEntries>(new mmSplitTransactionEntries()); - + bool state = cSplit_->GetValue(); if (state) { @@ -1118,11 +1118,11 @@ void mmBDDialog::OnAutoExecutionUserAckChecked(wxCommandEvent& /*event*/) { autoExecuteUserAck_ = ! autoExecuteUserAck_; - if (autoExecuteUserAck_) + if (autoExecuteUserAck_) { itemCheckBoxAutoExeSilent_->Enable(true); - } - else + } + else { itemCheckBoxAutoExeSilent_->SetValue(false); itemCheckBoxAutoExeSilent_->Enable(false); @@ -1153,11 +1153,11 @@ void mmBDDialog::OnAdvanceChecked(wxCommandEvent& /*event*/) { - if (cAdvanced_->IsChecked()) + if (cAdvanced_->IsChecked()) { SetAdvancedTransferControls(true); - } - else + } + else { SetAdvancedTransferControls(); textAmount_->SetToolTip(amountTransferTip_); @@ -1166,12 +1166,12 @@ void mmBDDialog::SetTransferControls(bool transfers) { - if (transfers) + if (transfers) { cAdvanced_->Enable(); bTo_->Show(); - } - else + } + else { bTo_->Hide(); cAdvanced_->Disable(); @@ -1181,7 +1181,7 @@ void mmBDDialog::SetAdvancedTransferControls(bool advanced) { - if (advanced) + if (advanced) { toTextAmount_->Enable(); advancedToTransAmountSet_ = true; @@ -1191,7 +1191,7 @@ wxString dispAmount; mmex::formatDoubleToCurrencyEdit(toTransAmount_, dispAmount); toTextAmount_->SetValue(dispAmount); - } + } else { toTextAmount_->SetValue(textAmount_->GetValue()); @@ -1199,8 +1199,8 @@ textAmount_->SetToolTip(_("Specify the transfer amount in the From Account")); - } - else + } + else { toTextAmount_->Disable(); advancedToTransAmountSet_ = false; @@ -1243,44 +1243,44 @@ void mmBDDialog::setRepeatDetails() { - wxString repeatLabelRepeats = _("Repeats"); - wxString repeatLabelActivate = _("Activates"); + wxString repeatLabelRepeats = _("Repeats"); + wxString repeatLabelActivate = _("Activates"); - wxString timeLabelDays = _("Period: Days"); - wxString timeLabelMonths = _("Period: Months"); - wxString toolTipsStr = wxEmptyString; + wxString timeLabelDays = _("Period: Days"); + wxString timeLabelMonths = _("Period: Months"); + wxString toolTipsStr = wxEmptyString; bSetNextOccurDate_->Disable(); int repeats = itemRepeats_->GetSelection(); - if (repeats == 11) + if (repeats == 11) { staticTextRepeats_->SetLabel( repeatLabelActivate ); staticTimesRepeat_->SetLabel( timeLabelDays); toolTipsStr << _("Specify period in Days to activate.") << wxT("\n") << _("Becomes blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } - else if (repeats == 12) + } + else if (repeats == 12) { staticTextRepeats_->SetLabel(repeatLabelActivate ); staticTimesRepeat_->SetLabel(timeLabelMonths); toolTipsStr << _("Specify period in Months to activate.") << wxT("\n") << _("Becomes blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } + } else if (repeats == 13) { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel(timeLabelDays); toolTipsStr << _("Specify period in Days to activate.") << wxT("\n") << _("Leave blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } + } else if (repeats == 14) { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel(timeLabelMonths); toolTipsStr << _("Specify period in Months to activate.") << wxT("\n") << _("Leave blank when not active."); textNumRepeats_->SetToolTip(toolTipsStr); - } - else + } + else { staticTextRepeats_->SetLabel(repeatLabelRepeats); staticTimesRepeat_->SetLabel( _("Times Repeated") ); @@ -1304,17 +1304,19 @@ wxDateTime date = mmGetStorageStringAsDate(dateStr); int repeats = itemRepeats_->GetSelection(); - if ( (repeats == 11) || (repeats == 12)) + if (repeats == 11) { - if ( (repeats == 11)) - date = date.Add(wxDateSpan::Days(value)); - else - date = date.Add(wxDateSpan::Months(value)); + date = date.Add(wxDateSpan::Days(value)); + } + else if (repeats == 12) + { + date = date.Add(wxDateSpan::Months(value)); + } - dpc_->SetValue( date ); - dpcbd_->SetValue( date ); - calendarCtrl_->SetDate(date); - } + dpc_->SetValue( date ); + dpcbd_->SetValue( date ); + calendarCtrl_->SetDate( date ); + bSetNextOccurDate_->Disable(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |