Skip to content

Commit

Permalink
Invoice issue resolved during date range update
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshya chauhan committed Apr 27, 2022
1 parent 65bc355 commit 99f55e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions controllers/admin/AdminOrdersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2355,6 +2355,7 @@ public function ajaxProcessEditProductOnOrder()
$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(
Expand Down Expand Up @@ -2638,6 +2639,19 @@ public function ajaxProcessEditProductOnOrder()
}
}
}

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();
}
Expand Down

0 comments on commit 99f55e4

Please sign in to comment.