surya90 Django85 Here is my code for 2.9.1
Go to app/Http/Controllers/DeliveryController.php
On line 702 and 792 you have
$restaurant_earning->amount += $order->total - ($order->delivery_charge + $order->tip_amount);
Replaced by
$restaurant_earning->amount += $order->total - ($order->delivery_charge + $order->tip_amount) - $order->restaurant_charge;
On line 708 and 798 you have
$restaurant_earning->amount = $order->total - ($order->delivery_charge + $order->tip_amount);
Replaced by
$restaurant_earning->amount = $order->total - ($order->delivery_charge + $order->tip_amount) - $order->restaurant_charge;
Save this file.
Go to app/Http/Controllers/RestaurantOwnerController.php
On line 94 and 1298 you have
$totalEarning += $completedOrder->total - ($completedOrder->delivery_charge + $completedOrder->tip_amount);
Replaced by
$totalEarning += $completedOrder->total - ($completedOrder->delivery_charge + $completedOrder->tip_amount) - $completedOrder->restaurant_charge;
Save this file.
You have finished 🙂
You can also do it with the tax if you want
https://discuss.foodomaa.com/d/682-tuto-tax-for-administrator/10