mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add check to display warning dialog for mismatched commodities
This commit is contained in:
parent
c39f8929d2
commit
f19b707927
@ -2619,6 +2619,16 @@ gnc_split_reg_determine_read_only( GNCSplitReg *gsr )
|
|||||||
{
|
{
|
||||||
dialog_args *args;
|
dialog_args *args;
|
||||||
char *string = NULL;
|
char *string = NULL;
|
||||||
|
reg = gnc_ledger_display_get_split_register( gsr->ledger );
|
||||||
|
if(reg->mismatched_commodities)
|
||||||
|
{
|
||||||
|
string = _("This account may not be edited because its"
|
||||||
|
" subaccounts have mismatched commodities or currencies."
|
||||||
|
"You need to open each account individually to "
|
||||||
|
"edit transactions.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
switch (gnc_split_reg_get_placeholder(gsr))
|
switch (gnc_split_reg_get_placeholder(gsr))
|
||||||
{
|
{
|
||||||
case PLACEHOLDER_NONE:
|
case PLACEHOLDER_NONE:
|
||||||
@ -2641,6 +2651,7 @@ gnc_split_reg_determine_read_only( GNCSplitReg *gsr )
|
|||||||
"of a set of accounts.");
|
"of a set of accounts.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
gsr->read_only = TRUE;
|
gsr->read_only = TRUE;
|
||||||
/* Put up a warning dialog */
|
/* Put up a warning dialog */
|
||||||
args = g_malloc(sizeof(dialog_args));
|
args = g_malloc(sizeof(dialog_args));
|
||||||
|
Loading…
Reference in New Issue
Block a user