merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 7bf6fdb81f2fe865bdab8f8644ab96801418f3ed
parent 0aeca381e76623565419d9d7bc214cabd7d94761
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  3 Jan 2026 23:45:15 +0100

fix typos

Diffstat:
Mcontrib/typst/transactions.typ | 16++++++++--------
Msrc/backend/taler-merchant-httpd_private-get-statistics-report-transactions.c | 13++++++++++++-
2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/contrib/typst/transactions.typ b/contrib/typst/transactions.typ @@ -261,7 +261,7 @@ y-label: dchart.y_label, x-tick-step: none, y-tick-step: auto, - mode : if dchart.cummulative { "stacked" } else { "clustered" }, + mode : if dchart.cumulative { "stacked" } else { "clustered" }, // alternatives: "clustered" or "basic" or "stacked" bar-style: p, data_groups, @@ -273,24 +273,24 @@ v(1cm) let cols = (auto,) + dchart.labels.map(_ => auto) - if dchart.cummulative { + if dchart.cumulative { cols.push(auto) } let aligns = (left,) + dchart.labels.map(_ => right) - if dchart.cummulative { + if dchart.cumulative { aligns.push(right) } let header = ([*When*],) + dchart.labels.map(label => [*#label*]) - if dchart.cummulative { + if dchart.cumulative { header.push([*Total*]) } let rows = data_groups.map(entry => { let row = (entry.at("start_date_str"),) row += entry.at("values").map(val => str(val)) - if dchart.cummulative { + if dchart.cumulative { row.push(str(entry.at("values").sum())) } row @@ -309,7 +309,7 @@ } -// Load your JSON data +// Example usage: #form(( business_name: "Example.com", start_date: (t_s: 1764967786), @@ -331,7 +331,7 @@ values: (10, 20, 30)), ), labels: ([EUR],[CHF],[HUF]), - cummulative: false, + cumulative: false, ), (chart_name: "Transaction rate", y_label: "Rate", @@ -348,7 +348,7 @@ values: (10, 20, 30)), ), labels: ([Claimed],[Paid],[Settled]), - cummulative: true, + cumulative: true, ), ), )) \ No newline at end of file diff --git a/src/backend/taler-merchant-httpd_private-get-statistics-report-transactions.c b/src/backend/taler-merchant-httpd_private-get-statistics-report-transactions.c @@ -314,6 +314,12 @@ make_transaction_volume_report (struct ResponseContext *rctx, "lookup_statistics_amount_by_bucket")) ? GNUNET_NO : GNUNET_SYSERR; } + if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) + { + json_decref (rctx->data_groups); + rctx->data_groups = NULL; + return GNUNET_OK; + } labels = json_array (); GNUNET_assert (NULL != labels); @@ -461,7 +467,12 @@ make_transaction_count_report (struct ResponseContext *rctx, "lookup_statistics_XXX")) ? GNUNET_NO : GNUNET_SYSERR; } - + if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) + { + json_decref (rctx->data_groups); + rctx->data_groups = NULL; + return GNUNET_OK; + } labels = json_array (); GNUNET_assert (NULL != labels); for (unsigned int i=0; i<rctx->labels_cnt; i++)