summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 19:03:56 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-19 19:03:56 +0800
commit194ca9221d44acc98007251d845899890b57b4ce (patch)
tree24b1a4d61e74f25533a9b7ddbd2a46d661394150
parent74028cd953f94cfd2d0a1f635ed07e25d94c6802 (diff)
Minimum total weight is 1kg
-rw-r--r--anteraja.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/anteraja.c b/anteraja.c
index 87438dd..a2e4562 100644
--- a/anteraja.c
+++ b/anteraja.c
@@ -138,10 +138,11 @@ void anteraja_order(const char *order_number, const char *service, const char *s
+ strlen(receiver_phone) + strlen(destination) + strlen(receiver_address)
+ strlen(receiver_postal) + strlen(json) + ORDER_INSURANCE + ORDER_SUBTOTAL
- 15 * strlen("%s") - 2 * strlen("%d") + 1);
- sprintf(shipping.post, ORDER_POST, prefix, order_number, service, (int)total_weight, sender_name,
- sender_phone, origin, sender_address, sender_postal, receiver_name, receiver_phone,
- destination, receiver_address, receiver_postal, json,
- total_weight < 1000.0 ? "true" : "false", subtotal < 1000.0 ? 1000 : (int)subtotal);
+ sprintf(shipping.post, ORDER_POST, prefix, order_number, service,
+ total_weight < 1000.0 ? 1000 : (int)total_weight, sender_name, sender_phone,
+ origin, sender_address, sender_postal, receiver_name, receiver_phone, destination,
+ receiver_address, receiver_postal, json, total_weight < 1000.0 ? "true" : "false",
+ subtotal < 1000.0 ? 1000 : (int)subtotal);
static const char *trail[] = {
"content",
"waybill_no",