grand_total must equal the sum of item and modifier amounts plus total taxes minus any additional_discount_amount so the invoice values reconcile.curl --location -g --request POST '/api/method/public/pos-ordering/submit-orders' \
--header 'X-Access-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"period_start": "2025-03-20T09:00:00",
"period_end": "2025-03-20T10:00:00",
"restaurant_branch": "BR-001",
"staff_member": "SM-0001",
"orders": [
{
"name": "EXT-001",
"order_type": "Dine In",
"restaurant_brand": "BRAND-01",
"is_return": 0,
"posting_datetime": "2025-03-20T09:10:00",
"items": [
{
"name": "ITEM-001",
"menu_product": "MP-0001",
"qty": 2,
"amount": 120,
"modifiers": [
{
"name": "ITEM-001-MOD-001",
"menu_product": "MP-EXTRA",
"qty": 1,
"amount": 10
}
]
}
],
"taxes_and_charges": [
{
"account_head": "VAT - 14%",
"amount": 18
}
],
"payments": [
{
"mode_of_payment": "Cash",
"amount": 148,
"reference_no": "TX-123"
}
],
"additional_discount_amount": 0,
"grand_total": 148
}
]
}'{
"message": {
"job_id": "string",
"status": "string"
}
}