FIX_first name Last Name : PS
This commit is contained in:
parent
2630010a0f
commit
9e18a2d380
@ -24,10 +24,11 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<?php if (isset($invoice_details['customer_id']) && $invoice_details['customer_id'] != "") {
|
<?php
|
||||||
$displayvalue = "";
|
|
||||||
$first_name ="";
|
$first_name ="";
|
||||||
$last_name ="";
|
$last_name ="";
|
||||||
|
if (isset($invoice_details['customer_id']) && $invoice_details['customer_id'] != "") {
|
||||||
|
$displayvalue = "";
|
||||||
foreach ($customers as $customer) {
|
foreach ($customers as $customer) {
|
||||||
if ($customer->customer_id === $invoice_details['customer_id']) {
|
if ($customer->customer_id === $invoice_details['customer_id']) {
|
||||||
$displayvalue = $customer->first_name . ' ' . $customer->last_name;
|
$displayvalue = $customer->first_name . ' ' . $customer->last_name;
|
||||||
@ -38,9 +39,7 @@
|
|||||||
<label for="customerName">Customer Name</label>
|
<label for="customerName">Customer Name</label>
|
||||||
<input type="hidden" name="customer_name" id="customer_name" value="<?= $invoice_details['customer_id']; ?>" />
|
<input type="hidden" name="customer_name" id="customer_name" value="<?= $invoice_details['customer_id']; ?>" />
|
||||||
<input type="text" class="form-control" value="<?= $displayvalue ?>" readonly />
|
<input type="text" class="form-control" value="<?= $displayvalue ?>" readonly />
|
||||||
<input type="hidden" class="form-control" id="last_name" value="<?= $last_name ?>" readonly />
|
|
||||||
<input type="hidden" class="form-control" id="first_name" value="<?= $first_name ?>" readonly />
|
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<label for="customerName">Customer Name<span class="text-danger"> *</span></label>
|
<label for="customerName">Customer Name<span class="text-danger"> *</span></label>
|
||||||
<select class="form-control" id="customerName" name="customer_name" required data-toggle="select2" onchange="get_customer_billing_details(this.value); get_customer_membership_details(this.value)">
|
<select class="form-control" id="customerName" name="customer_name" required data-toggle="select2" onchange="get_customer_billing_details(this.value); get_customer_membership_details(this.value)">
|
||||||
@ -57,6 +56,9 @@
|
|||||||
endforeach; ?>
|
endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<input type="hidden" class="form-control" id="hidden_last_name" value="<?= $last_name ?>" readonly />
|
||||||
|
<input type="hidden" class="form-control" id="hidden_first_name" value="<?= $first_name ?>" readonly />
|
||||||
|
|
||||||
<div class="invalid-feedback"> Please select customer. </div>
|
<div class="invalid-feedback"> Please select customer. </div>
|
||||||
<div class="subscribedetails" style="display: none">
|
<div class="subscribedetails" style="display: none">
|
||||||
<div id="schemeName"></div>
|
<div id="schemeName"></div>
|
||||||
@ -1224,6 +1226,8 @@
|
|||||||
state ? customer_billing_addressDetails.push(state) : "";
|
state ? customer_billing_addressDetails.push(state) : "";
|
||||||
v.country_name ? customer_billing_addressDetails.push(v.country_name) : "";
|
v.country_name ? customer_billing_addressDetails.push(v.country_name) : "";
|
||||||
customer_billing_id = v.customer_address_id;
|
customer_billing_id = v.customer_address_id;
|
||||||
|
$('#hidden_first_name').val(v.first_name);
|
||||||
|
$('#hidden_last_name').val(v.last_name);
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
@ -1292,6 +1296,8 @@
|
|||||||
state ? customer_shipping_addressDetails.push(state) : "";
|
state ? customer_shipping_addressDetails.push(state) : "";
|
||||||
v.country_name ? customer_shipping_addressDetails.push(v.country_name) : "";
|
v.country_name ? customer_shipping_addressDetails.push(v.country_name) : "";
|
||||||
customer_shipping_id = v.customer_address_id;
|
customer_shipping_id = v.customer_address_id;
|
||||||
|
$('#hidden_first_name').val(v.first_name);
|
||||||
|
$('#hidden_last_name').val(v.last_name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$("#storeShippingAddress").val(customer_shipping_addressDetails.join(', \n') + ".").prop("readonly", true);
|
$("#storeShippingAddress").val(customer_shipping_addressDetails.join(', \n') + ".").prop("readonly", true);
|
||||||
@ -1954,10 +1960,10 @@ function saveInvoiceCustomer() {
|
|||||||
function submitAddress() {
|
function submitAddress() {
|
||||||
$('#storeBillingAddress').val("").prop('readonly',false);
|
$('#storeBillingAddress').val("").prop('readonly',false);
|
||||||
$('#storeShippingAddress').val("").prop('readonly',false);
|
$('#storeShippingAddress').val("").prop('readonly',false);
|
||||||
var cus_id = $('#customer_name').val();
|
var cus_id = $('#customer_name').val() ? $('#customer_name').val() : $('#customerName').val();
|
||||||
console.log("Qucik add Addresses - customer id = ",cus_id);
|
console.log("Qucik add Addresses - customer id = ",cus_id);
|
||||||
var last_name = $("#last_name").val();
|
var last_name = $("#hidden_last_name").val();
|
||||||
var first_name = $("#first_name").val();
|
var first_name = $("#hidden_first_name").val();
|
||||||
var QB_AddressLine = $("#quick_billing_address").val();
|
var QB_AddressLine = $("#quick_billing_address").val();
|
||||||
var QB_Country = $("#quick_billing_country").val();
|
var QB_Country = $("#quick_billing_country").val();
|
||||||
var QB_State = $("#quick_billing_state").val();
|
var QB_State = $("#quick_billing_state").val();
|
||||||
@ -2034,7 +2040,7 @@ function saveInvoiceCustomer() {
|
|||||||
QS_city: QS_City,
|
QS_city: QS_City,
|
||||||
QS_zip: QS_PostalCode
|
QS_zip: QS_PostalCode
|
||||||
};
|
};
|
||||||
|
console.log("Before -",formData);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url('qucik_add_addresses'); ?>",
|
url: "<?php echo base_url('qucik_add_addresses'); ?>",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user