From b167efeabf9b6292c6c7a15f7a83b48c2eb86a1b Mon Sep 17 00:00:00 2001 From: ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ Date: Sun, 18 Jul 2021 10:53:32 +0800 Subject: Weight times quantity to make up total --- anteraja.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anteraja.c b/anteraja.c index 9874d34..8c151ff 100644 --- a/anteraja.c +++ b/anteraja.c @@ -121,7 +121,7 @@ void anteraja_order(const char *order_number, const char *service, const char *s double weight = atof(items[i][WEIGHT]) * 1000.0; if (weight < 100.0) weight = 100.0; - total_weight += weight; + total_weight += weight * quantity; sprintf(item, ORDER_ITEM, items[i][DESCRIPTION], quantity, (int)price, (int)weight); if (json) json = realloc(json, strlen(json) + length + 1); -- cgit v1.3