Skip to content

Instantly share code, notes, and snippets.

@CarwynNelson
Created October 22, 2017 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CarwynNelson/a670fecd63563617a97603148d6c916a to your computer and use it in GitHub Desktop.
Save CarwynNelson/a670fecd63563617a97603148d6c916a to your computer and use it in GitHub Desktop.
{
gnc_numeric bal = gnc_numeric_zero ();
GValue v = G_VALUE_INIT;
g_return_val_if_fail(GNC_IS_ACCOUNT(acc), FALSE);
qof_instance_get_kvp (QOF_INSTANCE(acc),
"reconcile-info/postpone/balance", &v);
if (!G_VALUE_HOLDS_INT64 (&v))
return FALSE;
bal = *(gnc_numeric*)g_value_get_boxed (&v);
if (!bal.denom)
return FALSE;
if (balance)
*balance = bal;
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment