Revert: Code for - Added: option to add/edit customer address from order detail page of BO
This commit is contained in:
@@ -758,35 +758,6 @@
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon icon-envelope"></i> {l s='Guest Address'}
|
||||
{if $can_edit}
|
||||
{if $idGuestAddress}
|
||||
<a id="edit_guest_address" class="btn btn-primary pull-right fancybox" href="{$link->getAdminLink('AdminAddresses')}&id_address={$idGuestAddress}&updateaddress&realedit=1&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-pencil"></i> {l s='Edit'}
|
||||
</a>
|
||||
{else}
|
||||
<a id="add_guest_address" class="btn btn-primary pull-right fancybox" href="{$link->getAdminLink('AdminAddresses')}&addaddress&id_customer={$order->id_customer}&liteDisplaying=1&submitFormAjax=1#">
|
||||
<i class="icon-plus-circle"></i> {l s='Add Address'}
|
||||
</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row">
|
||||
{if $guestFormatedAddress}
|
||||
{$guestFormatedAddress}
|
||||
{else}
|
||||
<div class="list-empty">
|
||||
<div class="list-empty-msg">
|
||||
<i class="icon-warning-sign list-empty-icon"></i>
|
||||
{l s='Guest address not found.'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Order Internal notes *}
|
||||
{if (sizeof($messages))}
|
||||
<div class="panel">
|
||||
|
||||
@@ -2892,15 +2892,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
// Overbookings information of the order
|
||||
$orderOverBookings = $objHotelBookingDetail->getOverbookedRooms($order->id, 0, '', '', 0, 0, 1);
|
||||
|
||||
// Guest address info
|
||||
$guestFormatedAddress = '';
|
||||
if ($idGuestAddress = Customer::getCustomerIdAddress($order->id_customer)) {
|
||||
$guestFormatedAddress = AddressFormat::generateAddress(new Address($idGuestAddress), array(), "<br />");
|
||||
}
|
||||
|
||||
$this->tpl_view_vars = array(
|
||||
'guestFormatedAddress' => $guestFormatedAddress,
|
||||
'idGuestAddress' => $idGuestAddress,
|
||||
'totalRefundedRooms' => $totalRefundedRooms,
|
||||
'orderOverBookings' => $orderOverBookings,
|
||||
// refund info
|
||||
|
||||
@@ -1248,22 +1248,7 @@ function setRoomTypeGuestOccupancy(booking_occupancy_wrapper)
|
||||
/* Refund system script */
|
||||
var flagRefund = '';
|
||||
|
||||
// when submit from ajax from guest address controller the function will be called from the controller header
|
||||
function getSummary()
|
||||
{
|
||||
return;
|
||||
}
|
||||
$(document).ready(function() {
|
||||
// when click edit/add guest address we have to initialize fancybox
|
||||
$('.fancybox').fancybox({
|
||||
'type': 'iframe',
|
||||
'width': '90%',
|
||||
'height': '90%',
|
||||
afterClose: function() {
|
||||
location.reload();
|
||||
},
|
||||
});
|
||||
|
||||
// when change order state to cancel or refund then show modal of bookings cancellation
|
||||
$(document).on('change', '#id_order_state', function(e) {
|
||||
if ($(this).val() == PS_OS_CANCELED || $(this).val() == PS_OS_REFUND) {
|
||||
|
||||
Reference in New Issue
Block a user