diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl
index e8de6bf14..c1fd0afff 100755
--- a/admin-dev/themes/default/template/controllers/orders/form.tpl
+++ b/admin-dev/themes/default/template/controllers/orders/form.tpl
@@ -925,11 +925,33 @@
var addresses_invoice_options = '';
var address_invoice_detail = '';
var address_delivery_detail = '';
+ var delivery_address_edit_link = '';
+ var invoice_address_edit_link = '';
+
$.each(addresses, function() {
if (this.id_address == id_address_invoice)
- address_invoice_detail = this.company+' '+this.firstname+' '+this.lastname+'
'+this.address1+'
'+this.address2+'
'+this.postcode+' '+this.city+' '+this.country;
+ {
+ address_invoice_detail = this.company+' '+this.firstname+' '+this.lastname+'
'+this.address1+'
'+this.address2+'
'+this.postcode+' '+this.city;
+
+ if (this.state != null)
+ address_invoice_detail += ' '+this.state;
+
+ address_invoice_detail += ''+this.country;
+
+ invoice_address_edit_link = "{$link->getAdminLink('AdminAddresses')}&id_address="+this.id_address+"&updateaddress&realedit=1&liteDisplaying=1&submitFormAjax=1#";
+ }
+
if(this.id_address == id_address_delivery)
- address_delivery_detail = this.company+' '+this.firstname+' '+this.lastname+'
'+this.address1+'
'+this.address2+'
'+this.postcode+' '+this.city+' '+this.country;
+ {
+ address_delivery_detail = this.company+' '+this.firstname+' '+this.lastname+'
'+this.address1+'
'+this.address2+'
'+this.postcode+' '+this.city;
+
+ if (this.state != null)
+ address_delivery_detail += ' '+this.state;
+
+ address_delivery_detail += ''+this.country;
+
+ delivery_address_edit_link = "{$link->getAdminLink('AdminAddresses')}&id_address="+this.id_address+"&updateaddress&realedit=1&liteDisplaying=1&submitFormAjax=1#";
+ }
addresses_delivery_options += '';
addresses_invoice_options += '';
@@ -949,6 +971,8 @@
$('#id_address_invoice').html(addresses_invoice_options);
$('#address_delivery_detail').html(address_delivery_detail);
$('#address_invoice_detail').html(address_invoice_detail);
+ $('#edit_delivery_address').attr('href', delivery_address_edit_link);
+ $('#edit_invoice_address').attr('href', invoice_address_edit_link);
}
function updateAddresses()
@@ -1159,14 +1183,14 @@