Skip to content

Commit

Permalink
Merge branch 'hotfix/patches'
Browse files Browse the repository at this point in the history
  • Loading branch information
codinguser committed Aug 9, 2015
2 parents 0d8a52d + 032a240 commit e8339c0
Show file tree
Hide file tree
Showing 7 changed files with 530 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Change Log
===============================================================================
Version 1.6.3 *(2015-08-09)*
----------------------------
* Fixed: Transfer account ignored when saving transaction with one split (after opening split editor)
* Fixed: Crash when exporting scheduled transactions when there are scheduled backups present
* Added: Polish translation

Version 1.6.2 *(2015-07-16)*
----------------------------
* Fixed: Editing accounts causing the account's transactions to be deleted
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'crashlytics'

def versionMajor = 1
def versionMinor = 6
def versionPatch = 2
def versionPatch = 3
def versionBuild = 0

def buildTime() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ private void exportScheduledTransactions(XmlSerializer xmlSerializer) throws IOE
String actionUID = cursor.getString(cursor.getColumnIndexOrThrow(ScheduledActionEntry.COLUMN_ACTION_UID));
Account accountUID = mTransactionToTemplateAccountMap.get(actionUID);

if (accountUID == null) //if the action UID does not belong to a transaction we've seen before, skip it
continue;

xmlSerializer.startTag(null, GncXmlHelper.TAG_SCHEDULED_ACTION);
xmlSerializer.attribute(null, GncXmlHelper.ATTR_KEY_VERSION, GncXmlHelper.BOOK_VERSION);
xmlSerializer.startTag(null, GncXmlHelper.TAG_SX_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,17 @@ private void saveNewTransaction() {
Currency currency = Currency.getInstance(mTransactionsDbAdapter.getAccountCurrencyCode(mAccountUID));
Money amount = new Money(amountBigd, currency).absolute();

if (mSplitsList.size() == 1){ //means split editor was opened but no split was added
String transferAcctUID;
if (mUseDoubleEntry) {
long transferAcctId = mDoubleAccountSpinner.getSelectedItemId();
transferAcctUID = mAccountsDbAdapter.getUID(transferAcctId);
} else {
transferAcctUID = mAccountsDbAdapter.getOrCreateImbalanceAccountUID(currency);
}
mSplitsList.add(mSplitsList.get(0).createPair(transferAcctUID));
}

//capture any edits which were done directly (not using split editor)
if (mSplitsList.size() == 2 && mSplitsList.get(0).isPairOf(mSplitsList.get(1))) {
//if it is a simple transfer where the editor was not used, then respect the button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public void onActivityCreated(Bundle savedInstanceState) {

getDialog().setTitle(R.string.title_transaction_splits);

mSplitItemViewList = new ArrayList<View>();
mSplitItemViewList = new ArrayList<>();
mSplitsDbAdapter = SplitsDbAdapter.getInstance();

//we are editing splits for a new transaction.
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/dialog_export.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@
android:layout_marginLeft="10dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/option_export_all_transactions"
android:visibility="gone"
/>
<TextView android:layout_marginLeft="@dimen/dialog_padding"
android:text="@string/hint_export_choice"
android:visibility="gone"
style="@style/TextAppearance.Hint" />

<CheckBox android:id="@+id/checkbox_post_export_delete"
Expand Down
Loading

0 comments on commit e8339c0

Please sign in to comment.