mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Revert "Revert "[gnc-plugin-page-register] when reversing reversed txn, offer jump""
This reverts commit c96024ab3d
.
GnuCash 4.8a having been tagged.
This commit is contained in:
parent
96db26cc1d
commit
d561cc6188
@ -4072,13 +4072,6 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
|
|||||||
if (trans == NULL)
|
if (trans == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (xaccTransGetReversedBy (trans))
|
|
||||||
{
|
|
||||||
gnc_error_dialog (GTK_WINDOW (window), "%s",
|
|
||||||
_ ("A reversing entry has already been created for this transaction."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
split = gnc_split_register_get_current_split (reg);
|
split = gnc_split_register_get_current_split (reg);
|
||||||
account = xaccSplitGetAccount (split);
|
account = xaccSplitGetAccount (split);
|
||||||
|
|
||||||
@ -4088,6 +4081,17 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new_trans = xaccTransGetReversedBy (trans);
|
||||||
|
if (new_trans)
|
||||||
|
{
|
||||||
|
const char *rev = _("A reversing entry has already been created for this transaction.");
|
||||||
|
const char *jump = _("Jump to the transaction?");
|
||||||
|
if (gnc_verify_dialog (GTK_WINDOW (window), TRUE, "%s\n\n%s", rev, jump))
|
||||||
|
goto jump_to_trans;
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
|
if (!gnc_dup_time64_dialog (window, _("Reverse Transaction"),
|
||||||
_("New Transaction Information"), &date))
|
_("New Transaction Information"), &date))
|
||||||
{
|
{
|
||||||
@ -4104,6 +4108,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction* action,
|
|||||||
|
|
||||||
gnc_resume_gui_refresh();
|
gnc_resume_gui_refresh();
|
||||||
|
|
||||||
|
jump_to_trans:
|
||||||
/* Now jump to new trans */
|
/* Now jump to new trans */
|
||||||
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
|
gsr = gnc_plugin_page_register_get_gsr (GNC_PLUGIN_PAGE (page));
|
||||||
split = xaccTransFindSplitByAccount(new_trans, account);
|
split = xaccTransFindSplitByAccount(new_trans, account);
|
||||||
|
Loading…
Reference in New Issue
Block a user