diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index 5f06eee2..4d60fa2d 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -892,6 +892,13 @@ update_stefan (struct OrderContext *oc, TALER_EXCHANGE_keys_stefan_round (keys, &net); + if (-1 == TALER_amount_cmp (&oc->brutto, + &net)) + { + /* brutto < netto! */ + /* => after rounding, there is no real difference */ + net = oc->brutto; + } GNUNET_assert (0 <= TALER_amount_subtract (&fee, &oc->brutto, |