Merge branch 'maint'

This commit is contained in:
Christopher Lam 2021-11-06 21:41:17 +08:00
commit 984d816a58
104 changed files with 48702 additions and 47684 deletions

View File

@ -243,16 +243,11 @@ time64 time64CanonicalDayTime(time64 t);
{
SCM key_scm = SCM_CAR (path_scm);
char *key;
gchar* gkey;
if (!scm_is_string (key_scm))
break;
key = scm_to_locale_string (key_scm);
gkey = g_strdup (key);
free (key);
path = g_list_prepend (path, gkey);
path = g_list_prepend (path, key);
path_scm = SCM_CDR (path_scm);
}
@ -462,13 +457,10 @@ void qof_book_set_string_option(QofBook* book, const char* opt_name, const char*
{
SCM key_scm = SCM_CAR (path_scm);
char *key;
gchar* gkey;
if (!scm_is_string (key_scm))
break;
key = scm_to_locale_string (key_scm);
gkey = g_strdup (key);
free (key);
path = g_list_prepend (path, gkey);
path = g_list_prepend (path, key);
path_scm = SCM_CDR (path_scm);
}
$1 = g_list_reverse (path);

View File

@ -164,8 +164,7 @@ gnc_scm_to_glist_string(SCM list)
str = gnc_scm_to_utf8_string (SCM_CAR(list));
if (str)
glist = g_list_prepend (glist, g_strdup (str));
g_free (str);
glist = g_list_prepend (glist, str);
}
list = SCM_CDR (list);
}
@ -186,8 +185,7 @@ gnc_scm_to_gslist_string(SCM list)
str = gnc_scm_to_utf8_string (SCM_CAR(list));
if (str)
gslist = g_slist_prepend (gslist, g_strdup (str));
g_free (str);
gslist = g_slist_prepend (gslist, str);
}
list = SCM_CDR (list);
}

View File

@ -39,15 +39,7 @@
gchar *gnc_scm_to_utf8_string(SCM scm_string)
{
if (scm_is_string (scm_string))
{
gchar* s;
char * str;
str = scm_to_utf8_stringn(scm_string, NULL);
s = g_strdup(str);
free (str);
return s;
}
return scm_to_utf8_stringn(scm_string, NULL);
/* Unable to extract string from the symbol...*/
g_error ("bad value\n");
@ -71,15 +63,7 @@ gchar *gnc_scm_to_utf8_string(SCM scm_string)
gchar *gnc_scm_to_locale_string(SCM scm_string)
{
if (scm_is_string (scm_string))
{
gchar* s;
char * str;
str = scm_to_locale_string(scm_string);
s = g_strdup(str);
free (str);
return s;
}
return scm_to_locale_string(scm_string);
/* Unable to extract string from the symbol...*/
g_error ("bad value\n");
@ -104,12 +88,7 @@ gnc_scm_symbol_to_locale_string(SCM symbol_value)
{
SCM string_value = scm_symbol_to_string (symbol_value);
if (scm_is_string (string_value))
{
char *tmp = scm_to_utf8_string (string_value);
gchar *str = g_strdup (tmp);
free (tmp);
return str;
}
return scm_to_utf8_string (string_value);
}
/* Unable to extract string from the symbol...*/

View File

@ -47,6 +47,7 @@ set (gnome_utils_SOURCES
dialog-utils.c
gnc-account-sel.c
gnc-amount-edit.c
gnc-autoclear.c
gnc-autosave.c
gnc-cell-renderer-date.c
gnc-cell-renderer-popup.c

View File

@ -0,0 +1,190 @@
/********************************************************************
* gnc-autoclear.c -- Knapsack algorithm functions *
* *
* Copyright 2020 Cristian Klein <cristian@kleinlabs.eu> *
* *
* This program is free software; you can redistribute it and/or *
* modify 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, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
*******************************************************************/
#include <config.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include "Account.h"
#include "Split.h"
#include "gncOwner.h"
#include "qof.h"
#include "gnc-autoclear.h"
static QofLogModule log_module = GNC_MOD_GUI;
/* the following functions are used in window-autoclear: */
#define MAXIMUM_SACK_SIZE 1000000
static gboolean
ght_gnc_numeric_equal(gconstpointer v1, gconstpointer v2)
{
gnc_numeric n1 = *(gnc_numeric *)v1, n2 = *(gnc_numeric *)v2;
return gnc_numeric_equal(n1, n2);
}
static guint
ght_gnc_numeric_hash(gconstpointer v1)
{
gnc_numeric n1 = *(gnc_numeric *)v1;
gdouble d1 = gnc_numeric_to_double(n1);
return g_double_hash (&d1);
}
typedef struct _sack_foreach_data_t
{
gnc_numeric split_value;
GList *reachable_list;
} *sack_foreach_data_t;
static void sack_foreach_func(gpointer key, gpointer value, gpointer user_data)
{
sack_foreach_data_t data = (sack_foreach_data_t) user_data;
gnc_numeric thisvalue = *(gnc_numeric *) key;
gnc_numeric reachable_value = gnc_numeric_add_fixed (thisvalue, data->split_value);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
memcpy(new_value, &reachable_value, sizeof(gnc_numeric));
data->reachable_list = g_list_prepend(data->reachable_list, new_value);
}
GList *
gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
gchar **errmsg)
{
GList *nc_list = NULL, *toclear_list = NULL;
GHashTable *sack;
gchar *msg = NULL;
guint sack_size = 0;
g_return_val_if_fail (GNC_IS_ACCOUNT (account), NULL);
sack = g_hash_table_new_full (ght_gnc_numeric_hash, ght_gnc_numeric_equal,
g_free, NULL);
/* Extract which splits are not cleared and compute the amount we have to clear */
for (GList *node = xaccAccountGetSplitList (account); node; node = node->next)
{
Split *split = (Split *)node->data;
if (xaccSplitGetReconcile (split) == NREC)
nc_list = g_list_prepend (nc_list, split);
else
toclear_value = gnc_numeric_sub_fixed
(toclear_value, xaccSplitGetAmount (split));
}
if (gnc_numeric_zero_p (toclear_value))
{
msg = _("Account is already at Auto-Clear Balance.");
goto skip_knapsack;
}
/* Run knapsack */
/* Entries in the hash table are:
* - key = amount to which we know how to clear (freed by GHashTable)
* - value = last split we used to clear this amount (not managed by GHashTable)
*/
for (GList *node = nc_list; node; node = node->next)
{
Split *split = (Split *)node->data;
gnc_numeric split_value = xaccSplitGetAmount (split);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
struct _sack_foreach_data_t s_data[1];
s_data->split_value = split_value;
s_data->reachable_list = NULL;
/* For each value in the sack, compute a new reachable value */
g_hash_table_foreach (sack, sack_foreach_func, s_data);
/* Add the value of the split itself to the reachable_list */
memcpy(new_value, &split_value, sizeof(gnc_numeric));
s_data->reachable_list = g_list_prepend
(s_data->reachable_list, new_value);
/* Add everything to the sack, looking out for duplicates */
for (GList *s_node = s_data->reachable_list; s_node; s_node = s_node->next)
{
gnc_numeric *reachable_value = s_node->data;
/* Check if it already exists */
if (g_hash_table_lookup_extended (sack, reachable_value, NULL, NULL))
{
/* If yes, we are in trouble, we reached an amount
using two solutions */
g_hash_table_insert (sack, reachable_value, NULL);
}
else
{
g_hash_table_insert (sack, reachable_value, split);
sack_size++;
if (sack_size > MAXIMUM_SACK_SIZE)
{
msg = _("Too many uncleared splits");
goto skip_knapsack;
}
}
}
g_list_free (s_data->reachable_list);
}
/* Check solution */
while (!gnc_numeric_zero_p (toclear_value))
{
Split *split = NULL;
if (!g_hash_table_lookup_extended (sack, &toclear_value,
NULL, (gpointer) &split))
{
msg = _("The selected amount cannot be cleared.");
goto skip_knapsack;
}
if (!split)
{
msg = _("Cannot uniquely clear splits. Found multiple possibilities.");
goto skip_knapsack;
}
toclear_list = g_list_prepend (toclear_list, split);
toclear_value = gnc_numeric_sub_fixed (toclear_value,
xaccSplitGetAmount (split));
}
skip_knapsack:
g_hash_table_destroy (sack);
g_list_free (nc_list);
if (msg)
{
*errmsg = g_strdup (msg);
g_list_free (toclear_list);
return NULL;
}
*errmsg = NULL;
return toclear_list;
}

View File

@ -0,0 +1,39 @@
/********************************************************************
* gnc-autoclear.h -- Knapsack algorithm functions
*
* Copyright 2020 Cristian Klein <cristian@kleinlabs.eu>
*
* This program is free software; you can redistribute it and/or
* modify 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, contact:
*
* Free Software Foundation Voice: +1-617-542-5942
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
* Boston, MA 02111-1301, USA gnu@gnu.org
*******************************************************************/
#ifndef GNC_AUTOCLEAR_H
#define GNC_AUTOCLEAR_H
#include <glib.h>
#include <Account.h>
/** Account splits are analysed; attempts to find a unique combination
* of uncleared splits which would set cleared balance to
* toclear_value. If this is not possible, *errmsg will be error
* message. errmsg must be a pointer to a gchar. If it is set, it
* must be freed by the caller.
*/
GList * gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
gchar **errmsg);
#endif

View File

@ -65,6 +65,7 @@
#include "gnc-state.h"
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include <gnc-glib-utils.h>
#include "gnc-uri-utils.h"
#include "gnc-version.h"
#include "gnc-warnings.h"
@ -1446,7 +1447,7 @@ gnc_main_window_delete_event (GtkWidget *window,
if (already_dead)
return TRUE;
if (g_list_length (active_windows) > 1)
if (gnc_list_length_cmp (active_windows, 1) > 0)
{
gint response;
GtkWidget *dialog;
@ -1478,7 +1479,7 @@ gnc_main_window_delete_event (GtkWidget *window,
return TRUE;
}
if (g_list_length(active_windows) > 1)
if (gnc_list_length_cmp (active_windows, 1) > 0)
return FALSE;
already_dead = gnc_main_window_quit(GNC_MAIN_WINDOW(window));
@ -3348,7 +3349,7 @@ gnc_main_window_close_page (GncPluginPage *page)
/* remove the preference callbacks from the main window */
gnc_main_window_remove_prefs (window);
}
if (window && g_list_length (active_windows) > 1)
if (window && (gnc_list_length_cmp (active_windows, 1) > 0))
gtk_widget_destroy (GTK_WIDGET(window));
}
}

View File

@ -29,7 +29,29 @@ gnc_add_scheme_test_targets(scm-test-load-gnome-utils-module
OUTPUT_DIR "tests"
DEPENDS "${GUILE_DEPENDS}")
set(test_autoclear_SOURCES
test-autoclear.cpp
)
set(test_autoclear_INCLUDE_DIRS
${CMAKE_BINARY_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/engine
${GLIB2_INCLUDE_DIRS}
)
set(test_autoclear_LIBS
gnc-engine
gnc-gnome-utils
gtest
)
gnc_add_test(test-autoclear "${test_autoclear_SOURCES}"
test_autoclear_INCLUDE_DIRS
test_autoclear_LIBS
)
gnc_add_scheme_tests(test-load-gnome-utils-module.scm)
set_dist_list(test_gnome_utils_DIST CMakeLists.txt test-gnc-recurrence.c test-load-gnome-utils-module.scm)
set_dist_list(test_gnome_utils_DIST CMakeLists.txt test-gnc-recurrence.c test-load-gnome-utils-module.scm
${test_autoclear_SOURCES})

View File

@ -25,9 +25,10 @@
#include <glib.h>
// GoogleTest is written in C++, however, the function we test in C.
extern "C" {
#include "../gnc-ui-balances.h"
#include "../gnc-autoclear.h"
}
#include <memory>
#include <Account.h>
#include <Split.h>
#include <gtest/gtest.h>

View File

@ -33,6 +33,7 @@
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include <gnc-glib-utils.h>
#include "Account.h"
#define DIALOG_IMAP_CM_CLASS "dialog-imap-edit"
@ -251,7 +252,7 @@ gnc_imap_dialog_delete (ImapDialog *imap_dialog)
list = gtk_tree_selection_get_selected_rows (selection, &fmodel);
// Make sure we have some rows selected
if (g_list_length (list) == 0)
if (!gnc_list_length_cmp (list, 0))
return;
// reset the invalid map total
@ -645,7 +646,7 @@ get_imap_info (ImapDialog *imap_dialog, Account *acc, const gchar *category, con
else
head = IMAP_FRAME;
if (g_list_length (imap_list) > 0)
if (gnc_list_length_cmp (imap_list, 0))
{
PINFO("List length is %d", g_list_length (imap_list));

View File

@ -50,6 +50,7 @@
#include "gncOwner.h"
#include "gncInvoice.h"
#include "gncInvoiceP.h"
#include <gnc-glib-utils.h>
#include "gncEntryLedger.h"
@ -3237,7 +3238,7 @@ multi_post_invoice_cb (GtkWindow *dialog, GList *invoice_list, gpointer user_dat
gboolean test;
InvoiceWindow *iw;
if (g_list_length(invoice_list) == 0)
if (!gnc_list_length_cmp (invoice_list, 0))
return;
// Get the posting parameters for these invoices
iw = gnc_ui_invoice_edit(dialog, invoice_list->data);
@ -3287,7 +3288,7 @@ multi_print_invoice_cb (GtkWindow *dialog, GList *invoice_list, gpointer user_da
{
struct multi_edit_invoice_data meid;
if (g_list_length(invoice_list) == 0)
if (!gnc_list_length_cmp (invoice_list, 0))
return;
meid.user_data = user_data;

View File

@ -32,6 +32,7 @@
#include "gnc-ui.h"
#include "gnc-gui-query.h"
#include "gnc-ui-util.h"
#include <gnc-glib-utils.h>
#include "qof.h"
#include "gnc-date.h"
#include "gnc-date-edit.h"
@ -1735,7 +1736,7 @@ static GList *select_txn_lots (GtkWindow *parent, Transaction *txn, Account **po
/* If the txn has both APAR splits linked to a business lot and
* splits that are not, issue a warning some will be discarded.
*/
if (has_no_lot_apar_splits && (g_list_length (txn_lots) > 0))
if (has_no_lot_apar_splits && gnc_list_length_cmp (txn_lots, 0))
{
GtkWidget *dialog;
char *split_str = g_strdup ("");

View File

@ -49,6 +49,7 @@
#include "swig-runtime.h"
#include "guile-mappings.h"
#include "gnc-engine-guile.h"
#include <gnc-glib-utils.h>
#define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"
@ -366,7 +367,7 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer data)
PricesDialog *pdb_dialog = data;
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW(pdb_dialog->remove_view));
GList *rows = gtk_tree_selection_get_selected_rows (selection, &model);
gboolean have_rows = (g_list_length (rows) > 0 ? TRUE : FALSE);
gboolean have_rows = (gnc_list_length_cmp (rows, 0));
change_source_flag (PRICE_REMOVE_SOURCE_COMM, have_rows, pdb_dialog);
g_list_foreach (rows, (GFunc) gtk_tree_path_free, NULL);
@ -547,7 +548,7 @@ gnc_prices_dialog_add_clicked (GtkWidget *widget, gpointer data)
}
else if (comm_list) // selection contains price parent rows
{
if (g_list_length (comm_list) == 1) // make sure it is only one parent
if (!gnc_list_length_cmp (comm_list, 1)) // make sure it is only one parent
{
price = gnc_price_create (pdb_dialog->book);
gnc_price_set_commodity (price, comm_list->data);

View File

@ -63,6 +63,7 @@
#include "gnc-ui-util.h"
#include "gnucash-sheet.h"
#include "gnc-session.h"
#include <gnc-glib-utils.h>
#include "gnc-split-reg.h"
@ -579,7 +580,7 @@ gnc_sxed_check_endpoint (GncSxEditorDialog *sxed)
g_date_clear (&nextDate, 1);
gnc_frequency_save_to_recurrence (sxed->gncfreq, &schedule, &startDate);
if (g_list_length (schedule) > 0)
if (gnc_list_length_cmp (schedule, 0))
{
g_date_subtract_days (&startDate, 1);
recurrenceListNextInstance (schedule, &startDate, &nextDate);
@ -1766,7 +1767,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
book = qof_instance_get_book (QOF_INSTANCE (acct));
affected_sxes = gnc_sx_get_sxes_referencing_account (book, acct);
if (g_list_length (affected_sxes) == 0)
if (!gnc_list_length_cmp (affected_sxes, 0))
return;
{

View File

@ -63,6 +63,7 @@
#include "gnc-ui-util.h"
#include "gnc-tree-model-split-reg.h"
#include "gnc-tree-control-split-reg.h"
#include <gnc-glib-utils.h>
#include "gnc-sx-instance-model.h"
#include "dialog-sx-since-last-run.h"
@ -836,7 +837,7 @@ gnc_sxed_check_consistent (GncSxEditorDialog2 *sxed)
g_date_clear (&nextDate, 1);
gnc_frequency_save_to_recurrence (sxed->gncfreq, &schedule, &startDate);
if (g_list_length (schedule) > 0)
if (gnc_list_length_cmp (schedule, 0))
{
g_date_subtract_days (&startDate, 1);
recurrenceListNextInstance (schedule, &startDate, &nextDate);
@ -1704,7 +1705,7 @@ _sx_engine_event_handler (QofInstance *ent, QofEventId event_type, gpointer user
book = qof_instance_get_book (QOF_INSTANCE (acct));
affected_sxes = gnc_sx_get_sxes_referencing_account (book, acct);
if (g_list_length (affected_sxes) == 0)
if (!gnc_list_length_cmp (affected_sxes, 0))
return;
{

View File

@ -43,6 +43,7 @@
#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include "gnc-glib-utils.h"
#include "Query.h"
#include "qof.h"
#include "gnc-ledger-display.h"
@ -807,22 +808,11 @@ gnc_sx_slr_tree_model_adapter_new (GncSxInstanceModel *instances)
static void
creation_error_dialog (GList **creation_errors)
{
GList *node = *creation_errors;
GtkWidget *dialog = NULL;
gchar *message = NULL;
if (*creation_errors == NULL) return;
for(; node != NULL; node = g_list_next (node))
{
gchar *new_msg = NULL;
if (message == NULL)
new_msg = g_strdup_printf ("%s", (gchar*)(node->data));
else
new_msg = g_strdup_printf ("%s\n%s", message, (gchar*)(node->data));
g_free (message);
message = new_msg;
g_free (node->data);
}
g_list_free (*creation_errors);
message = gnc_g_list_stringjoin (*creation_errors, "\n");
g_list_free_full (*creation_errors, g_free);
creation_errors = NULL;
dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
@ -1154,9 +1144,11 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, GncSxSinceLastRunDialog
// - [?] ability to create transactions
{
GList *unbound_variables;
gint unbound_len;
unbound_variables = gnc_sx_instance_model_check_variables (app_dialog->editing_model->instances);
PINFO ("%d variables unbound", g_list_length (unbound_variables));
if (g_list_length (unbound_variables) > 0)
unbound_len = g_list_length (unbound_variables);
PINFO ("%d variables unbound", unbound_len);
if (unbound_len > 0)
{
// focus first variable
GncSxVariableNeeded *first_unbound;

View File

@ -1590,7 +1590,7 @@ gnc_budget_view_refresh (GncBudgetView *budget_view)
col = GTK_TREE_VIEW_COLUMN((g_list_last (col_list))->data);
gtk_tree_view_remove_column (GTK_TREE_VIEW(priv->tree_view), col);
col_list = g_list_delete_link (col_list, g_list_last (col_list));
num_periods_visible = g_list_length (col_list);
num_periods_visible--;
col = GTK_TREE_VIEW_COLUMN(totals_col_list->data);
gtk_tree_view_remove_column (GTK_TREE_VIEW(priv->totals_tree_view), col);
@ -1653,7 +1653,7 @@ gnc_budget_view_refresh (GncBudgetView *budget_view)
totals_col_list = g_list_prepend (totals_col_list, col);
}
num_periods_visible = g_list_length (col_list);
num_periods_visible++;
}
gdk_rgba_free (note_color);

View File

@ -70,6 +70,7 @@
#include "window-main-summarybar.h"
#include "dialog-object-references.h"
#include "dialog-find-account.h"
#include <gnc-glib-utils.h>
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
@ -593,7 +594,7 @@ gnc_plugin_page_account_tree_open (Account *account, GtkWindow *win)
page_list = gnc_gobject_tracking_get_list(GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME);
// If we have a window, look for account page in that window
if (g_list_length ((GList*)page_list) != 0)
if (gnc_list_length_cmp (page_list, 0))
{
if (win != NULL)
{
@ -1500,7 +1501,7 @@ account_subaccount (Account* account)
{
Account* subaccount = NULL;
GList *subs = gnc_account_get_children (account);
if (g_list_length (subs) == 1)
if (!gnc_list_length_cmp (subs, 1))
subaccount = subs->data;
g_list_free (subs);
return subaccount;

View File

@ -756,7 +756,7 @@ gnc_plugin_page_sx_list_cmd_edit (GtkAction *action, GncPluginPageSxList *page)
selection = gtk_tree_view_get_selection (priv->tree_view);
selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
if (g_list_length (selected_paths) == 0)
if (!gnc_list_length_cmp (selected_paths, 0))
{
g_warning ("no selection edit.");
return;
@ -792,7 +792,7 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
selection = gtk_tree_view_get_selection (priv->tree_view);
selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
if (g_list_length (selected_paths) == 0)
if (!gnc_list_length_cmp (selected_paths, 0))
{
g_warning ("no selection edit.");
return;
@ -853,7 +853,7 @@ gnc_plugin_page_sx_list_cmd_delete (GtkAction *action, GncPluginPageSxList *page
selection = gtk_tree_view_get_selection (priv->tree_view);
selected_paths = gtk_tree_selection_get_selected_rows (selection, &model);
if (g_list_length (selected_paths) == 0)
if (!gnc_list_length_cmp (selected_paths, 0))
{
g_warning ("no selection for delete.");
return;

View File

@ -964,11 +964,11 @@ gsr_default_cut_txn_handler (GNCSplitReg *gsr, gpointer data)
{
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
"%s", recn_warn);
warning = GNC_PREF_WARN_REG_SPLIT_DEL_RECD;
warning = GNC_PREF_WARN_REG_SPLIT_CUT_RECD;
}
else
{
warning = GNC_PREF_WARN_REG_SPLIT_DEL;
warning = GNC_PREF_WARN_REG_SPLIT_CUT;
}
gtk_dialog_add_button (GTK_DIALOG(dialog),
@ -1003,11 +1003,11 @@ gsr_default_cut_txn_handler (GNCSplitReg *gsr, gpointer data)
{
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
"%s", recn_warn);
warning = GNC_PREF_WARN_REG_TRANS_DEL_RECD;
warning = GNC_PREF_WARN_REG_TRANS_CUT_RECD;
}
else
{
warning = GNC_PREF_WARN_REG_TRANS_DEL;
warning = GNC_PREF_WARN_REG_TRANS_CUT;
}
gtk_dialog_add_button (GTK_DIALOG(dialog),
_("_Cancel"), GTK_RESPONSE_CANCEL);

View File

@ -32,7 +32,7 @@
#include "gnc-main-window.h"
#include "gnc-plugin-page-register.h"
#include "gnc-ui.h"
#include "gnc-ui-balances.h"
#include "gnc-autoclear.h"
#include "window-autoclear.h"
#define WINDOW_AUTOCLEAR_CM_CLASS "window-autoclear"

View File

@ -40,9 +40,5 @@ namespace Gnucash {
int report_list (void);
int report_show (const bo_str& file_to_load,
const bo_str& run_report);
// A helper function to load scm config files (SYSCONFIGDIR/config
// and USERCONFIGDIR/config-user.scm) on demand
void gnc_load_scm_config(void);
}
#endif

View File

@ -99,7 +99,8 @@ Gnucash::gnc_load_scm_config (void)
static auto is_system_config_loaded = false;
if (!is_system_config_loaded)
{
auto msg = bl::translate ("Loading system scm configuration...").str (gnc_get_boost_locale());
/* Translators: Guile is the programming language of the reports */
auto msg = bl::translate ("Loading system wide Guile extensions…").str (gnc_get_boost_locale());
update_message (msg.c_str());
auto system_config_dir = gnc_path_get_pkgsysconfdir ();
auto system_config = g_build_filename (system_config_dir, "config", nullptr);
@ -111,7 +112,7 @@ Gnucash::gnc_load_scm_config (void)
static auto is_user_config_loaded = false;
if (!is_user_config_loaded)
{
auto msg = bl::translate ("Loading user scm configuration...").str (gnc_get_boost_locale());
auto msg = bl::translate ("Loading user specific Guile extensions…").str (gnc_get_boost_locale());
update_message (msg.c_str());
auto config_filename = g_build_filename (gnc_userconfig_dir (), "config-user.scm", nullptr);
is_user_config_loaded = gfec_try_load (config_filename);

View File

@ -64,6 +64,16 @@
<summary>Mark transaction split as unreconciled</summary>
<description>This dialog is presented before allowing you to mark a transaction split as unreconciled. Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</description>
</key>
<key name="reg-split-cut" type="i">
<default>0</default>
<summary>Cut a split from a transaction</summary>
<description>This dialog is presented before allowing you to cut a split from a transaction.</description>
</key>
<key name="reg-split-cut-recd" type="i">
<default>0</default>
<summary>Cut a reconciled split from a transaction</summary>
<description>This dialog is presented before allowing you to cut a reconciled split from a transaction. Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</description>
</key>
<key name="reg-split-del" type="i">
<default>0</default>
<summary>Remove a split from a transaction</summary>
@ -84,6 +94,16 @@
<summary>Remove all the splits from a transaction</summary>
<description>This dialog is presented before allowing you to remove all splits (including some reconciled splits) from a transaction. Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</description>
</key>
<key name="reg-trans-cut" type="i">
<default>0</default>
<summary>Cut a transaction</summary>
<description>This dialog is presented before allowing you to cut a transaction.</description>
</key>
<key name="reg-trans-cut-recd" type="i">
<default>0</default>
<summary>Cut a transaction with reconciled splits</summary>
<description>This dialog is presented before allowing you to cut a transaction that contains reconciled splits. Doing so will throw off the reconciled value of the register and can make it hard to perform future reconciliations.</description>
</key>
<key name="reg-trans-del" type="i">
<default>0</default>
<summary>Delete a transaction</summary>

View File

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkDialog" id="auto_clear_start_dialog">
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="can-focus">True</property>
<property name="can-default">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
<signal name="clicked" handler="gnc_autoclear_window_cancel_cb" swapped="no"/>
</object>
<packing>
@ -37,11 +37,11 @@
<object class="GtkButton" id="ok_button">
<property name="label" translatable="yes">_OK</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
<property name="can-focus">True</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="receives-default">True</property>
<property name="use-underline">True</property>
<signal name="clicked" handler="gnc_autoclear_window_ok_cb" swapped="no"/>
</object>
<packing>
@ -54,20 +54,20 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">About Auto-Clear</property>
<style>
<class name="gnc-class-title"/>
@ -82,10 +82,10 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Use this dialog if you want GnuCash to automatically find which transactions are cleared, given an ending balance. For example, said ending balance can be the current balance given by your bank online.</property>
<property name="wrap">True</property>
<property name="max_width_chars">80</property>
<property name="max-width-chars">80</property>
</object>
<packing>
<property name="expand">False</property>
@ -96,8 +96,8 @@
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="can-focus">False</property>
<property name="has-tooltip">True</property>
<property name="label" translatable="yes">Caution!</property>
<style>
<class name="gnc-class-emphasis"/>
@ -112,10 +112,10 @@
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">This tool might be slow or abort if the number of uncleared splits is more than approximately 20. In that case please clear at least some of them manually.</property>
<property name="wrap">True</property>
<property name="max_width_chars">80</property>
<property name="max-width-chars">80</property>
</object>
<packing>
<property name="expand">False</property>
@ -124,47 +124,63 @@
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="end_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Ending Balance</property>
<property name="use_underline">True</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="end_value_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="status_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -176,11 +192,11 @@
<object class="GtkCheckButton" id="show_cleared_splits_button">
<property name="label" translatable="yes">_Review cleared splits</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Select this option to open a register tab with newly cleared splits.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Select this option to open a register tab with newly cleared splits.</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -202,8 +218,5 @@
<action-widget response="-6">cancel_button</action-widget>
<action-widget response="-5">ok_button</action-widget>
</action-widgets>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>

View File

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<object class="GtkDialog" id="reconcile_start_dialog">
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="cancelbutton1">
<property name="label" translatable="yes">_Cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="can-focus">True</property>
<property name="can-default">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -35,11 +35,11 @@
<object class="GtkButton" id="okbutton1">
<property name="label" translatable="yes">_OK</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="can-focus">True</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="receives-default">False</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -51,25 +51,25 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">3</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="label" translatable="yes">&lt;b&gt;Reconcile Information&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="use-markup">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -78,106 +78,107 @@
</packing>
</child>
<child>
<!-- n-columns=3 n-rows=4 -->
<object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="row_spacing">3</property>
<property name="column_spacing">6</property>
<property name="can-focus">False</property>
<property name="border-width">6</property>
<property name="row-spacing">3</property>
<property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="date_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Statement _Date</property>
<property name="use_underline">True</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="start_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Starting Balance</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="end_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Ending Balance</property>
<property name="use_underline">True</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="subaccount_check">
<property name="label" translatable="yes">Include _subaccounts</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Include all descendant accounts in the reconcile. All of them must use the same commodity as this one.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="tooltip-text" translatable="yes">Include all descendant accounts in the reconcile. All of them must use the same commodity as this one.</property>
<property name="use-underline">True</property>
<property name="draw-indicator">True</property>
<signal name="toggled" handler="gnc_start_recn_children_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="date_value_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="ending_value_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<child>
<object class="GtkLabel" id="start_value">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin_start">3</property>
<property name="margin_end">3</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<property name="margin-start">3</property>
<property name="margin-end">3</property>
<property name="margin-top">3</property>
<property name="margin-bottom">3</property>
<property name="label">$15.00</property>
</object>
<packing>
@ -191,13 +192,25 @@
</style>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -208,15 +221,15 @@
<child>
<object class="GtkButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<child>
<object class="GtkButton" id="interest_button">
<property name="label" translatable="yes">Enter _Interest Payment...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="border_width">8</property>
<property name="use_underline">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="border-width">8</property>
<property name="use-underline">True</property>
<signal name="clicked" handler="gnc_start_recn_interest_clicked_cb" swapped="no"/>
</object>
<packing>
@ -234,13 +247,13 @@
</child>
<child>
<object class="GtkBox" id="future_warning">
<property name="can_focus">False</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<child>
<object class="GtkImage" id="future_icon">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">dialog-warning</property>
<property name="can-focus">False</property>
<property name="icon-name">dialog-warning</property>
</object>
<packing>
<property name="expand">False</property>
@ -251,9 +264,9 @@
<child>
<object class="GtkLabel" id="future_text">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">3</property>
<property name="margin_end">3</property>
<property name="can-focus">False</property>
<property name="margin-start">3</property>
<property name="margin-end">3</property>
<property name="label" translatable="yes">Statement Date is after today</property>
<property name="wrap">True</property>
</object>
@ -284,8 +297,5 @@
<action-widget response="-6">cancelbutton1</action-widget>
<action-widget response="-5">okbutton1</action-widget>
</action-widgets>
<child type="titlebar">
<placeholder/>
</child>
</object>
</interface>

View File

@ -223,7 +223,6 @@ static GncNumeric parse_price (const std::string &str)
char *endptr;
auto success = gnc_exp_parser_parse (str.c_str(), &val, &endptr);
gnc_exp_parser_shutdown();
if (!success)
throw std::invalid_argument (_("Price can't be parsed into a number."));

View File

@ -37,6 +37,7 @@
#include "gnc-ledger-display.h"
#include "gnc-prefs.h"
#include "gnc-ui-util.h"
#include <gnc-glib-utils.h>
#include "split-register-control.h"
#include "split-register-model.h"
@ -429,7 +430,7 @@ gnc_ledger_display_gl (void)
tRoot = gnc_book_get_template_root (gnc_get_current_book());
al = gnc_account_get_descendants (tRoot);
if (g_list_length (al) != 0)
if (gnc_list_length_cmp (al, 0))
xaccQueryAddAccountMatch (query, al, QOF_GUID_MATCH_NONE, QOF_QUERY_AND);
g_list_free (al);

View File

@ -894,7 +894,7 @@
(cons 'absolute (gnc-dmy2time64 31 12 1970)))
(set-option! options "Display" "Subtotal Table" #t)
(set-option! options "Currency" "Common Currency" #t)
(set-option! options "Currency" "Report Currency" foreign2)
(set-option! options "Currency" "Report's currency" foreign2)
(set-option! options "Currency" "Show original currency amount" #t)
(set-option! options "Sorting" "Primary Key" 'account-name)
(set-option! options "Sorting" "Primary Subtotal" #t)

View File

@ -831,7 +831,8 @@ void gnc_gsettings_version_upgrade (void)
g_variant_unref (ogG_maj_min);
old_maj_min = gnc_gsettings_get_int (GNC_PREFS_GROUP_GENERAL, GNC_PREF_VERSION);
}
g_variant_unref (og_maj_min);
if (og_maj_min)
g_variant_unref (og_maj_min);
PINFO ("Previous setting compatibility level: %i", old_maj_min);

View File

@ -341,159 +341,3 @@ gnc_ui_owner_get_print_report_balance (GncOwner *owner,
return g_strdup (xaccPrintAmount (balance, print_info));
}
/* the following functions are used in window-autoclear: */
#define MAXIMUM_SACK_SIZE 1000000
static gboolean
ght_gnc_numeric_equal(gconstpointer v1, gconstpointer v2)
{
gnc_numeric n1 = *(gnc_numeric *)v1, n2 = *(gnc_numeric *)v2;
return gnc_numeric_equal(n1, n2);
}
static guint
ght_gnc_numeric_hash(gconstpointer v1)
{
gnc_numeric n1 = *(gnc_numeric *)v1;
gdouble d1 = gnc_numeric_to_double(n1);
return g_double_hash (&d1);
}
typedef struct _sack_foreach_data_t
{
gnc_numeric split_value;
GList *reachable_list;
} *sack_foreach_data_t;
static void sack_foreach_func(gpointer key, gpointer value, gpointer user_data)
{
sack_foreach_data_t data = (sack_foreach_data_t) user_data;
gnc_numeric thisvalue = *(gnc_numeric *) key;
gnc_numeric reachable_value = gnc_numeric_add_fixed (thisvalue, data->split_value);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
memcpy(new_value, &reachable_value, sizeof(gnc_numeric));
data->reachable_list = g_list_prepend(data->reachable_list, new_value);
}
GList *
gnc_account_get_autoclear_splits (Account *account, gnc_numeric toclear_value,
gchar **errmsg)
{
GList *nc_list = NULL, *toclear_list = NULL;
GHashTable *sack;
gchar *msg = NULL;
guint sack_size = 0;
g_return_val_if_fail (GNC_IS_ACCOUNT (account), NULL);
sack = g_hash_table_new_full (ght_gnc_numeric_hash, ght_gnc_numeric_equal,
g_free, NULL);
/* Extract which splits are not cleared and compute the amount we have to clear */
for (GList *node = xaccAccountGetSplitList (account); node; node = node->next)
{
Split *split = (Split *)node->data;
if (xaccSplitGetReconcile (split) == NREC)
nc_list = g_list_prepend (nc_list, split);
else
toclear_value = gnc_numeric_sub_fixed
(toclear_value, xaccSplitGetAmount (split));
}
if (gnc_numeric_zero_p (toclear_value))
{
msg = _("Account is already at Auto-Clear Balance.");
goto skip_knapsack;
}
/* Run knapsack */
/* Entries in the hash table are:
* - key = amount to which we know how to clear (freed by GHashTable)
* - value = last split we used to clear this amount (not managed by GHashTable)
*/
for (GList *node = nc_list; node; node = node->next)
{
Split *split = (Split *)node->data;
gnc_numeric split_value = xaccSplitGetAmount (split);
gpointer new_value = g_malloc(sizeof(gnc_numeric));
struct _sack_foreach_data_t s_data[1];
s_data->split_value = split_value;
s_data->reachable_list = NULL;
/* For each value in the sack, compute a new reachable value */
g_hash_table_foreach (sack, sack_foreach_func, s_data);
/* Add the value of the split itself to the reachable_list */
memcpy(new_value, &split_value, sizeof(gnc_numeric));
s_data->reachable_list = g_list_prepend
(s_data->reachable_list, new_value);
/* Add everything to the sack, looking out for duplicates */
for (GList *s_node = s_data->reachable_list; s_node; s_node = s_node->next)
{
gnc_numeric *reachable_value = s_node->data;
/* Check if it already exists */
if (g_hash_table_lookup_extended (sack, reachable_value, NULL, NULL))
{
/* If yes, we are in trouble, we reached an amount
using two solutions */
g_hash_table_insert (sack, reachable_value, NULL);
}
else
{
g_hash_table_insert (sack, reachable_value, split);
sack_size++;
if (sack_size > MAXIMUM_SACK_SIZE)
{
msg = _("Too many uncleared splits");
goto skip_knapsack;
}
}
}
g_list_free (s_data->reachable_list);
}
/* Check solution */
while (!gnc_numeric_zero_p (toclear_value))
{
Split *split = NULL;
if (!g_hash_table_lookup_extended (sack, &toclear_value,
NULL, (gpointer) &split))
{
msg = _("The selected amount cannot be cleared.");
goto skip_knapsack;
}
if (!split)
{
msg = _("Cannot uniquely clear splits. Found multiple possibilities.");
goto skip_knapsack;
}
toclear_list = g_list_prepend (toclear_list, split);
toclear_value = gnc_numeric_sub_fixed (toclear_value,
xaccSplitGetAmount (split));
}
skip_knapsack:
g_hash_table_destroy (sack);
g_list_free (nc_list);
if (msg)
{
*errmsg = g_strdup (msg);
g_list_free (toclear_list);
return NULL;
}
*errmsg = NULL;
return toclear_list;
}

View File

@ -71,23 +71,6 @@ endif()
# Doesn't work yet:
gnc_add_test_with_guile(test-app-utils "${test_app_utils_SOURCES}" APP_UTILS_TEST_INCLUDE_DIRS APP_UTILS_TEST_LIBS)
set(test_autoclear_SOURCES
test-autoclear.cpp
)
set(test_autoclear_INCLUDE_DIRS
${APP_UTILS_TEST_INCLUDE_DIRS}
${GTEST_INCLUDE_DIR}
)
set(test_autoclear_LIBS
${APP_UTILS_TEST_LIBS}
gtest
)
gnc_add_test(test-autoclear "${test_autoclear_SOURCES}"
test_autoclear_INCLUDE_DIRS
test_autoclear_LIBS
)
set_dist_list(test_app_utils_DIST
CMakeLists.txt
test-exp-parser.c
@ -100,5 +83,4 @@ set_dist_list(test_app_utils_DIST
test-options.scm
${test_app_utils_scheme_SOURCES}
${test_app_utils_SOURCES}
${test_autoclear_SOURCES}
)

View File

@ -351,3 +351,13 @@ gnc_g_list_stringjoin (GList *list_of_strings, const gchar *sep)
return retval;
}
gint
gnc_list_length_cmp (const GList *list, size_t len)
{
for (GList *lst = (GList*) list;; lst = g_list_next (lst), len--)
{
if (!lst) return (len ? -1 : 0);
if (!len) return 1;
}
}

View File

@ -199,6 +199,20 @@ void gnc_scm_log_debug(const gchar *msg);
**/
gchar * gnc_g_list_stringjoin (GList *list_of_strings, const gchar *sep);
/**
* @brief Scans the GList elements the minimum number of iterations
* required to test it against a specified size. Returns -1, 0 or 1
* depending on whether the GList length has less, same, or more
* elements than the size specified.
*
* @param lst A GList
*
* @param len the comparator length to compare the GList length with
*
* @return A signed int comparing GList length with specified size.
**/
gint gnc_list_length_cmp (const GList *list, size_t len);
/** Kill a process. On UNIX send a SIGKILL, on Windows call TerminateProcess.
*
* @param pid The process ID. */

View File

@ -110,6 +110,28 @@ test_g_list_stringjoin (gconstpointer data)
g_list_free (test);
}
static void
test_gnc_list_length (gconstpointer data)
{
GList *lst = NULL;
g_assert (gnc_list_length_cmp (lst, 0) == 0);
g_assert (gnc_list_length_cmp (lst, 1) == -1);
lst = g_list_prepend (lst, (gpointer)1);
g_assert (gnc_list_length_cmp (lst, 0) == 1);
g_assert (gnc_list_length_cmp (lst, 1) == 0);
g_assert (gnc_list_length_cmp (lst, 2) == -1);
lst = g_list_prepend (lst, (gpointer)2);
g_assert (gnc_list_length_cmp (lst, 1) == 1);
g_assert (gnc_list_length_cmp (lst, 2) == 0);
g_assert (gnc_list_length_cmp (lst, 3) == -1);
g_list_free (lst);
}
int
main (int argc, char *argv[])
{
@ -119,6 +141,7 @@ main (int argc, char *argv[])
g_test_add_data_func ("/core-utils/gnc_utf8_strip_invalid_and_controls invalid utf8", (gconstpointer)invalid_utf8, test_gnc_utf8_strip_invalid_and_controls);
g_test_add_data_func ("/core-utils/gnc_utf8_strip_invalid_and_controls control chars", (gconstpointer)controls, test_gnc_utf8_strip_invalid_and_controls);
g_test_add_data_func ("/core-utils/gnc_g_list_stringjoin", NULL, test_g_list_stringjoin);
g_test_add_data_func ("/core-utils/gnc_list_length", NULL, test_gnc_list_length);
return g_test_run();
}

View File

@ -31,8 +31,7 @@
#include "gnc-date.h"
#include "Account.h"
#include <stdint.h>
#include <stdint.h>
#include <stdint.h>
#include <gnc-glib-utils.h>
#define LOG_MOD "gnc.engine.recurrence"
static QofLogModule log_module = LOG_MOD;
@ -556,7 +555,7 @@ recurrenceWeekendAdjustFromString(const gchar *str)
gboolean
recurrenceListIsSemiMonthly(GList *recurrences)
{
if (g_list_length(recurrences) != 2)
if (gnc_list_length_cmp (recurrences, 2))
return FALSE;
// should be a "semi-monthly":
@ -685,14 +684,15 @@ gchar*
recurrenceListToCompactString(GList *rs)
{
GString *buf = g_string_sized_new(16);
gint rs_len = g_list_length (rs);
if (g_list_length(rs) == 0)
if (rs_len == 0)
{
g_string_printf(buf, "%s", _("None"));
goto rtn;
}
if (g_list_length(rs) > 1)
if (rs_len > 1)
{
if (recurrenceListIsWeeklyMultiple(rs))
{
@ -724,7 +724,7 @@ recurrenceListToCompactString(GList *rs)
else
{
/* Translators: %d is the number of Recurrences in the list. */
g_string_printf(buf, _("Unknown, %d-size list."), g_list_length(rs));
g_string_printf(buf, _("Unknown, %d-size list."), rs_len);
}
}
else
@ -878,9 +878,10 @@ recurrenceListCmp(GList *a, GList *b)
{
Recurrence *most_freq_a, *most_freq_b;
g_return_val_if_fail(g_list_length(a) != 0 && g_list_length(b) != 0, 0);
g_return_val_if_fail(g_list_length(a) != 0, -1);
g_return_val_if_fail(g_list_length(b) != 0, 1);
if (!a)
return (b ? -1 : 0);
else if (!b)
return 1;
most_freq_a = (Recurrence*)g_list_nth_data(g_list_sort(a, (GCompareFunc)recurrenceCmp), 0);
most_freq_b = (Recurrence*)g_list_nth_data(g_list_sort(b, (GCompareFunc)recurrenceCmp), 0);

View File

@ -789,11 +789,8 @@ xaccTransScrubImbalance (Transaction *trans, Account *root,
ENTER ("()");
/* Must look for orphan splits and remove trading splits even if
* there is no imbalance and we're not using trading accounts.
*/
/* Must look for orphan splits even if there is no imbalance. */
xaccTransScrubSplits (trans);
xaccTransClearTradingSplits (trans);
/* Return immediately if things are balanced. */
if (xaccTransIsBalanced (trans))
@ -805,10 +802,11 @@ xaccTransScrubImbalance (Transaction *trans, Account *root,
if (! xaccTransUseTradingAccounts (trans))
{
gnc_transaction_balance_no_trading (trans, root, account);
LEAVE ("transaction balanced, no trading accounts");
LEAVE ("transaction balanced, no managed trading accounts");
return;
}
xaccTransClearTradingSplits (trans);
imbalance = xaccTransGetImbalanceValue (trans);
if (! gnc_numeric_zero_p (imbalance))
{

View File

@ -31,6 +31,7 @@
#include "qof.h"
#include "gnc-features.h"
#include "gnc-glib-utils.h"
typedef struct
{
@ -115,20 +116,15 @@ gchar *gnc_features_test_unknown (QofBook *book)
&features_list);
if (features_list)
{
GList *i;
char* msg = g_strdup(_("This Dataset contains features not supported "
"by this version of GnuCash. You must use a "
"newer version of GnuCash in order to support "
"the following features:"
));
for (i = features_list; i; i = i->next)
{
char *tmp = g_strconcat(msg, "\n* ", i->data, NULL);
g_free (msg);
msg = tmp;
}
const char* sep = "\n* ";
const char* header = _("This Dataset contains features not supported "
"by this version of GnuCash. You must use a "
"newer version of GnuCash in order to support "
"the following features:");
char *features_str = gnc_g_list_stringjoin (features_list, sep);
char *msg = g_strconcat (header, sep, features_str, NULL);
g_free (features_str);
g_list_free(features_list);
return msg;
}

View File

@ -796,26 +796,30 @@ gnc_price_list_destroy(PriceList *prices)
gboolean
gnc_price_list_equal(PriceList *prices1, PriceList *prices2)
{
GList *n1, *n2;
GList *n1 = prices1;
GList *n2 = prices2;
if (prices1 == prices2) return TRUE;
if (g_list_length (prices1) < g_list_length (prices2))
while (n1 || n2)
{
PWARN ("prices2 has extra prices");
return FALSE;
}
if (g_list_length (prices1) > g_list_length (prices2))
{
PWARN ("prices1 has extra prices");
return FALSE;
}
for (n1 = prices1, n2 = prices2; n1 ; n1 = n1->next, n2 = n2->next)
if (!n1)
{
PINFO ("prices2 has extra prices");
return FALSE;
}
if (!n2)
{
PINFO ("prices1 has extra prices");
return FALSE;
}
if (!gnc_price_equal (n1->data, n2->data))
return FALSE;
n1 = n1->next;
n2 = n2->next;
};
return TRUE;
}

View File

@ -22,6 +22,7 @@
**********************************************************************/
#include "gncIDSearch.h"
#include <gnc-glib-utils.h>
typedef enum
{ UNDEFINED,
@ -89,7 +90,6 @@ static void * search(QofBook * book, const gchar *id, void * object, GncSearchTy
void *c;
GList *result;
QofQuery *q;
gint len;
QofQueryPredData* string_pred_data;
PINFO("Type = %d", type);
@ -123,8 +123,7 @@ static void * search(QofBook * book, const gchar *id, void * object, GncSearchTy
result = qof_query_run (q);
// now compare _exactly_
len = g_list_length (result);
if (result && (len > 0))
if (gnc_list_length_cmp (result, 0))
{
result = g_list_first (result);

View File

@ -2721,7 +2721,8 @@
smallest-fraction="100"
local-symbol="BsF."
/>
<!-- "VES" - "Bolivar Soberano"
<!-- "VES" - "Bolivar Soberano"
2021-10-01 "VED" 1,000,000
-->
<currency
isocode="VES"
@ -2734,6 +2735,19 @@
smallest-fraction="100"
local-symbol="BsS."
/>
<!-- "VED" - "Bolivar Soberano"
-->
<currency
isocode="VED"
fullname="Bolivar Soberano"
unitname="bolivar"
partname="centimo"
namespace="ISO4217"
exchange-code="926"
parts-per-unit="100"
smallest-fraction="100"
local-symbol="BsD."
/>
<!-- "VND" - "Dong"
-->
<currency

View File

@ -676,7 +676,7 @@ void qof_query_add_term (QofQuery *q, QofQueryParamList *param_list,
qs = qof_query_create ();
query_init (qs, qt);
if (qof_query_has_terms (q))
if (q->terms != NULL)
qr = qof_query_merge (q, qs, op);
else
qr = qof_query_merge (q, qs, QOF_QUERY_OR);
@ -701,7 +701,8 @@ void qof_query_purge_terms (QofQuery *q, QofQueryParamList *param_list)
qt = static_cast<QofQueryTerm*>(_and_->data);
if (!param_list_cmp (qt->param_list, param_list))
{
if (g_list_length (static_cast<GList*>(_or_->data)) == 1)
auto or_list = static_cast<GList*> (_or_->data);
if (or_list && !or_list->next)
{
q->terms = g_list_remove_link (static_cast<GList*>(q->terms), _or_);
g_list_free_1 (_or_);
@ -710,7 +711,7 @@ void qof_query_purge_terms (QofQuery *q, QofQueryParamList *param_list)
}
else
{
_or_->data = g_list_remove_link (static_cast<GList*>(_or_->data), _and_);
_or_->data = g_list_remove_link (or_list, _and_);
g_list_free_1 (_and_);
_and_ = static_cast<GList*>(_or_->data);
if (!_and_) break;
@ -1137,7 +1138,7 @@ qof_query_merge(QofQuery *q1, QofQuery *q2, QofQueryOp op)
* so that the first term added to an empty query doesn't screw up.
*/
if ((QOF_QUERY_AND == op) &&
( (0 == qof_query_has_terms (q1)) || (0 == qof_query_has_terms (q2)) ))
(q1->terms == NULL || q2->terms == NULL))
{
op = QOF_QUERY_OR;
}
@ -1458,23 +1459,26 @@ gboolean qof_query_equal (const QofQuery *q1, const QofQuery *q2)
if (q1 == q2) return TRUE;
if (!q1 || !q2) return FALSE;
if (g_list_length (q1->terms) != g_list_length (q2->terms)) return FALSE;
if (q1->max_results != q2->max_results) return FALSE;
for (or1 = q1->terms, or2 = q2->terms; or1;
or1 = or1->next, or2 = or2->next)
for (or1 = q1->terms, or2 = q2->terms; or1 || or2;
or1 = or1->next, or2 = or2->next)
{
GList *and1, *and2;
if (!or1 || !or2)
return FALSE;
and1 = static_cast<GList*>(or1->data);
and2 = static_cast<GList*>(or2->data);
if (g_list_length (and1) != g_list_length (and2)) return FALSE;
for ( ; and1; and1 = and1->next, and2 = and2->next)
for (; and1 || and2; and1 = and1->next, and2 = and2->next)
{
if (!and1 || !and2)
return FALSE;
if (!qof_query_term_equal (static_cast<QofQueryTerm*>(and1->data),
static_cast<QofQueryTerm*>(and2->data)))
return FALSE;
}
}
if (!qof_query_sort_equal (&(q1->primary_sort), &(q2->primary_sort)))

View File

@ -732,9 +732,10 @@ guid_predicate_equal (const QofQueryPredData *p1, const QofQueryPredData *p2)
GList *l1 = pd1->guids, *l2 = pd2->guids;
if (pd1->options != pd2->options) return FALSE;
if (g_list_length (l1) != g_list_length (l2)) return FALSE;
for ( ; l1 ; l1 = l1->next, l2 = l2->next)
for (; l1 || l2; l1 = l1->next, l2 = l2->next)
{
if (!l1 || !l2)
return FALSE;
if (!guid_equal (static_cast<GncGUID*>(l1->data),
static_cast<GncGUID*>(l2->data)))
return FALSE;
@ -1525,9 +1526,10 @@ choice_predicate_equal (const QofQueryPredData *p1, const QofQueryPredData *p2)
GList *l1 = pd1->guids, *l2 = pd2->guids;
if (pd1->options != pd2->options) return FALSE;
if (g_list_length (l1) != g_list_length (l2)) return FALSE;
for ( ; l1 ; l1 = l1->next, l2 = l2->next)
for (; l1 || l2; l1 = l1->next, l2 = l2->next)
{
if (!l1 || !l2)
return FALSE;
if (!guid_equal (static_cast<GncGUID*>(l1->data),
static_cast<GncGUID*>(l2->data)))
return FALSE;

View File

@ -394,10 +394,6 @@ test_gnc_price_list_destroy (Fixture *fixture, gconstpointer pData)
gboolean
gnc_price_list_equal(PriceList *prices1, PriceList *prices2)// Local: 1:0:0
*/
/* static void
test_gnc_price_list_equal (Fixture *fixture, gconstpointer pData)
{
}*/
typedef struct
{
GNCPriceDB *pricedb;
@ -686,6 +682,38 @@ test_num_prices_helper (Fixture *fixture, gconstpointer pData)
guint
gnc_pricedb_get_num_prices(GNCPriceDB *db)// C: 2 in 1 Local: 0:0:0
*/
static void
test_gnc_price_list_equal (PriceDBFixture *fixture, gconstpointer pData)
{
PriceList *p1 = NULL;
PriceList *p2 = NULL;
Commodities *c = fixture->com;
gnc_commodity *aud = c->aud;
/* p1 and p2 are both NULL */
g_assert (gnc_price_list_equal (p1, p2));
p1 = gnc_pricedb_lookup_latest_any_currency(fixture->pricedb, aud);
/* p1 is PriceList, p2 is NULL */
g_assert (!gnc_price_list_equal (p1, p2));
p2 = p1;
/* p1 and p2 both point to the same PriceList */
g_assert (gnc_price_list_equal (p1, p2));
p2 = gnc_pricedb_lookup_latest_any_currency(fixture->pricedb, aud);
/* p1 and p2 are different PriceLists, but are identical in contents */
g_assert (p1 != p2);
g_assert (gnc_price_list_equal (p1, p2));
gnc_price_list_destroy (p1);
gnc_price_list_destroy (p2);
}
static void
test_gnc_pricedb_get_num_prices (PriceDBFixture *fixture, gconstpointer pData)
{
@ -1649,7 +1677,7 @@ test_suite_gnc_pricedb (void)
// GNC_TEST_ADD (suitename, "gnc price list remove", Fixture, NULL, setup, test_gnc_price_list_remove, teardown);
// GNC_TEST_ADD (suitename, "price list destroy helper", Fixture, NULL, setup, test_price_list_destroy_helper, teardown);
// GNC_TEST_ADD (suitename, "gnc price list destroy", Fixture, NULL, setup, test_gnc_price_list_destroy, teardown);
// GNC_TEST_ADD (suitename, "gnc price list equal", Fixture, NULL, setup, test_gnc_price_list_equal, teardown);
GNC_TEST_ADD (suitename, "gnc price list equal", PriceDBFixture, NULL, setup, test_gnc_price_list_equal, teardown);
// GNC_TEST_ADD (suitename, "gnc pricedb init", Fixture, NULL, setup, test_gnc_pricedb_init, teardown);
// GNC_TEST_ADD (suitename, "gnc pricedb create", Fixture, NULL, setup, test_gnc_pricedb_create, teardown);
// GNC_TEST_ADD (suitename, "destroy pricedb currency hash data", Fixture, NULL, setup, test_destroy_pricedb_currency_hash_data, teardown);

View File

@ -146,6 +146,7 @@ gnucash/gnome-utils/dialog-userpass.c
gnucash/gnome-utils/dialog-utils.c
gnucash/gnome-utils/gnc-account-sel.c
gnucash/gnome-utils/gnc-amount-edit.c
gnucash/gnome-utils/gnc-autoclear.c
gnucash/gnome-utils/gnc-autosave.c
gnucash/gnome-utils/gnc-cell-renderer-date.c
gnucash/gnome-utils/gnc-cell-renderer-popup.c
@ -215,7 +216,6 @@ gnucash/gnucash-commands.cpp
gnucash/gnucash-core-app.cpp
gnucash/gnucash.cpp
gnucash/gnucash-locale-windows.c
gnucash/gschemas/org.gnucash.GnuCash.deprecated.gschema.xml.in
gnucash/gschemas/org.gnucash.GnuCash.dialogs.business.gschema.xml.in
gnucash/gschemas/org.gnucash.GnuCash.dialogs.checkprinting.gschema.xml.in
gnucash/gschemas/org.gnucash.GnuCash.dialogs.commodities.gschema.xml.in

1632
po/ar.po

File diff suppressed because it is too large Load Diff

1634
po/as.po

File diff suppressed because it is too large Load Diff

1605
po/az.po

File diff suppressed because it is too large Load Diff

1621
po/bg.po

File diff suppressed because it is too large Load Diff

1632
po/brx.po

File diff suppressed because it is too large Load Diff

1641
po/ca.po

File diff suppressed because it is too large Load Diff

1635
po/cs.po

File diff suppressed because it is too large Load Diff

1620
po/da.po

File diff suppressed because it is too large Load Diff

1647
po/de.po

File diff suppressed because it is too large Load Diff

1625
po/doi.po

File diff suppressed because it is too large Load Diff

1633
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1805
po/es.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1614
po/et.po

File diff suppressed because it is too large Load Diff

1634
po/eu.po

File diff suppressed because it is too large Load Diff

1630
po/fa.po

File diff suppressed because it is too large Load Diff

1630
po/fi.po

File diff suppressed because it is too large Load Diff

1808
po/fr.po

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,15 @@
# Jaime Marquínez Ferrándiz <weblate@jregistros.fastmail.net>, 2021.
# Guille <willelopz+weblate@gmail.com>, 2021.
# Guille Lopez <willelopz@gmail.com>, 2021.
# Francisco Serrador <fserrador@gmail.com>, 2021.
msgid ""
msgstr ""
"Project-Id-Version: gnucash-glossary 1.8.9\n"
"Report-Msgid-Bugs-To: https://bugs.gnucash.org/enter_bug."
"cgi?product=GnuCash&component=Translations\n"
"POT-Creation-Date: 2021-01-10 08:00+0100\n"
"PO-Revision-Date: 2021-04-15 23:26+0000\n"
"Last-Translator: Guille Lopez <willelopz@gmail.com>\n"
"PO-Revision-Date: 2021-10-14 21:34+0000\n"
"Last-Translator: Francisco Serrador <fserrador@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/gnucash/glossary/"
"es/>\n"
"Language: es\n"
@ -24,7 +25,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.6-dev\n"
"X-Generator: Weblate 4.9-dev\n"
#. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)"
msgid "Term (Dear translator: This file will never be visible to the user!)"
@ -613,18 +614,16 @@ msgid "portfolio"
msgstr "cartera"
#. "Register invoice, voucher in account register"
#, fuzzy
msgid "post, to"
msgstr "cerrar"
msgstr "contabilizar"
#. "A menu choice in many graphical user interface applications that allows the user to specify how the application will act each time it is used. "
msgid "preferences"
msgstr "preferencias"
#. "Loan repayment calculator: your payments are split in interests payment and principal payment"
#, fuzzy
msgid "principal payment"
msgstr "acción: pago"
msgstr "abonación principal"
#. "An amount of money for which sth may be bought or sold"
msgid "price (in a split)"
@ -652,7 +651,7 @@ msgstr "Ganancias y Pérdidas"
#. "-"
msgid "quick-fill"
msgstr ""
msgstr "relleno rápido"
#. "-"
msgid "rebalance, to (a transaction)"
@ -668,7 +667,7 @@ msgstr "teneduría de libros?"
#. "A list of items; a book containing such a list"
msgid "register"
msgstr "libro de cuentas/anotaciones"
msgstr "registro"
#. "A transaction that is divided into two or more parts"
msgid "register entry: split transaction"
@ -700,15 +699,15 @@ msgstr "recargar"
#. "aka 'two-sided form' is in Europe often used for the balance sheet. Complement: report form: Vertical Form"
msgid "report form: T Account Form"
msgstr ""
msgstr "Formulario de Cuenta"
#. "aka 'running form' is in english speaking countries usually used for the balance sheet in one column. Complement: report form: T Account Form"
msgid "report form: Vertical Form"
msgstr ""
msgstr "Formulario Vertical"
#. "name of an equity account (?); to be distinguished from the opening balance."
msgid "Retained Earnings"
msgstr ""
msgstr "Ganancias Retenidas"
#. "Create a new transaction that is the inverse of the old one. When you add the two together they completely cancel out. Accounts use this instead of voiding transactions, usually because the prior month has been closed and can no longer be changed, or the entire accounting system is 'write only'."
#, fuzzy
@ -745,11 +744,11 @@ msgstr "acciones"
#. "(often: of a quote) A place from which something comes or is obtained."
msgid "source"
msgstr "fuente"
msgstr "origen"
#. "One of the two or several parts a transaction is divided into"
msgid "split"
msgstr "partida"
msgstr "desglose"
#. "This sets the particular design or shape of a report."
msgid "style sheet"
@ -760,17 +759,16 @@ msgid "subtotal"
msgstr "subtotal"
#. "On the government's tax forms, the tax code identifies the given line or place on the form where certain amounts must be specified according to the current country's legislation"
#, fuzzy
msgid "tax code"
msgstr "información sobre impuestos"
msgstr "código de imposición"
#. "field of an account"
msgid "tax info"
msgstr "información sobre impuestos"
msgstr "informe sobre imposiciones"
#. "Amost everybody has to declare and probably pay it. See https://en.wikipedia.org/wiki/Income_tax"
msgid "tax type: income tax"
msgstr "tipo de impuesto: impuesto sobre la renta"
msgstr "tipo impositivo: imposición sobre renta"
#. "Usually only business users have to handle it, see https://en.wikipedia.org/wiki/Sales_tax."
msgid "tax type: sales tax"

1625
po/gu.po

File diff suppressed because it is too large Load Diff

1669
po/he.po

File diff suppressed because it is too large Load Diff

1632
po/hi.po

File diff suppressed because it is too large Load Diff

1669
po/hr.po

File diff suppressed because it is too large Load Diff

1625
po/hu.po

File diff suppressed because it is too large Load Diff

1644
po/id.po

File diff suppressed because it is too large Load Diff

1648
po/it.po

File diff suppressed because it is too large Load Diff

1637
po/ja.po

File diff suppressed because it is too large Load Diff

1634
po/kn.po

File diff suppressed because it is too large Load Diff

1631
po/ko.po

File diff suppressed because it is too large Load Diff

1634
po/kok.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1632
po/ks.po

File diff suppressed because it is too large Load Diff

1630
po/lt.po

File diff suppressed because it is too large Load Diff

1632
po/lv.po

File diff suppressed because it is too large Load Diff

1638
po/mai.po

File diff suppressed because it is too large Load Diff

1632
po/mni.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1638
po/mr.po

File diff suppressed because it is too large Load Diff

1649
po/nb.po

File diff suppressed because it is too large Load Diff

1633
po/ne.po

File diff suppressed because it is too large Load Diff

1642
po/nl.po

File diff suppressed because it is too large Load Diff

1637
po/pl.po

File diff suppressed because it is too large Load Diff

1645
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1638
po/ro.po

File diff suppressed because it is too large Load Diff

1634
po/ru.po

File diff suppressed because it is too large Load Diff

1620
po/rw.po

File diff suppressed because it is too large Load Diff

1633
po/sk.po

File diff suppressed because it is too large Load Diff

1639
po/sr.po

File diff suppressed because it is too large Load Diff

1714
po/sv.po

File diff suppressed because it is too large Load Diff

1634
po/ta.po

File diff suppressed because it is too large Load Diff

1632
po/te.po

File diff suppressed because it is too large Load Diff

1636
po/tr.po

File diff suppressed because it is too large Load Diff

1631
po/uk.po

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More