FIX_SHIPPING ADDRESS NAME IN INVOICE PDF AND CUSTOMER ADD PAGE
This commit is contained in:
parent
765bc11d82
commit
1797974fc0
@ -191,13 +191,14 @@ class Customer extends BaseController
|
||||
$address_array = [];
|
||||
if ($count > 0) {
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$address_array[$x]['first_name'] = $requestData['cfname'];
|
||||
$saddress1_name = $requestData['saddress1_name'][$x];
|
||||
$address_array[$x]['first_name'] = $addressType == 1? $requestData['cfname']: $saddress1_name;
|
||||
$address_array[$x]['last_name'] = $requestData['csname'];
|
||||
// $address_array[$x]['company'] = "";
|
||||
$address_array[$x]['email'] = $requestData['cmail'];
|
||||
$address_array[$x]['mobile_no'] = $requestData['cmobile'];
|
||||
$saddress1_name = $requestData['saddress1_name'][$x];
|
||||
$address_array[$x]['address_1'] = $addressType == 1? $baddress1[$x]: $saddress1_name .','. $baddress1[$x];
|
||||
|
||||
$address_array[$x]['address_1'] = $baddress1[$x];
|
||||
$address_array[$x]['address_2'] = $baddress2[$x];
|
||||
$address_array[$x]['city'] = $bcity[$x];
|
||||
$address_array[$x]['state'] = $bcountry[$x] === 'IN' ? $bdropdownstate[$x] : $binputstate[$x] ;
|
||||
|
||||
@ -153,7 +153,7 @@ class Invoice extends BaseController
|
||||
$where = ['customer_addresses.isactive' => 1, 'customer_addresses.customer_id' => (int)$id];
|
||||
$where['address_type'] = 1;
|
||||
$data['customer_billing'] = $this->get_customer_address($where, []);
|
||||
$select = ["customer_address_id", "CONCAT(address_1,' ',address_2) as address"];
|
||||
$select = ["customer_address_id", "CONCAT(address_1,' ',address_2) as address","first_name"];
|
||||
$where['address_type'] = 2;
|
||||
$data['customer_shipping'] = $this->get_customer_address($where, $select);
|
||||
return $this->response->setJSON(['data' => $data]);
|
||||
|
||||
@ -1368,7 +1368,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
|
||||
$.each(cust_ship_arr, function(k, v) {
|
||||
$('#loadShippingDropdown').append($('<option>', {
|
||||
value: v.customer_address_id,
|
||||
text: v.address,
|
||||
text:v.address,
|
||||
selected: (v.customer_address_id == ship_addrid) ? true : false
|
||||
}));
|
||||
});
|
||||
@ -1551,7 +1551,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
|
||||
$.each(cs, function(k, v) {
|
||||
$('#loadShippingDropdown').append($('<option>', {
|
||||
value: v.customer_address_id,
|
||||
text: v.address,
|
||||
text:v.first_name+','+ v.address,
|
||||
}));
|
||||
});
|
||||
$("#storeShippingAddress").val('');
|
||||
@ -1595,6 +1595,7 @@ if (isset($invoice_item_details[0]['to_subscription']) && !empty($invoice_item_d
|
||||
customer_shipping_addressDetails = [];
|
||||
if (cs.length > 0) {
|
||||
$.each(cs, function(k, v) {
|
||||
// v.first_name?customer_shipping_addressDetails.push(v.first_name):'';
|
||||
var state = v.state_name ? v.state_name : v.state;
|
||||
state = v.postal_code ? state + ' ' + v.postal_code : state;
|
||||
v.address_1 ? customer_shipping_addressDetails.push(v.address_1 + " " + v.address_2) : "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user