Invoice issue resolved during date range update

This commit is contained in:
lakshya chauhan
2022-04-27 19:31:47 +05:30
parent 65bc355cf4
commit 99f55e449c

View File

@@ -2355,6 +2355,7 @@ class AdminOrdersControllerCore extends AdminController
$product_quantity = (int) $obj_booking_detail->getNumberOfDays($new_date_from, $new_date_to);
$old_product_quantity = (int) $obj_booking_detail->getNumberOfDays($old_date_from, $old_date_to);
$qty_diff = $product_quantity - $old_product_quantity;
/*By webkul to validate fields before deleting the cart and order data form the tables*/
if ($id_hotel == '') {
die(json_encode(array(
@@ -2638,6 +2639,19 @@ class AdminOrdersControllerCore extends AdminController
}
}
}
if (isset($order_invoice)) {
// Apply changes on OrderInvoice
$order_invoice->total_paid_tax_excl = $objOrder->total_paid_tax_excl;
$order_invoice->total_paid_tax_incl = $objOrder->total_paid_tax_incl;
}
// Save order invoice
if (isset($order_invoice)) {
$res &= $order_invoice->update();
}
// change order total save
$objOrder->save();
}