Api Invoice Adress issues 1 : ps

This commit is contained in:
VE10-Sanjeev 2023-10-13 18:22:54 +05:30
parent f726377124
commit 628d77a6db
2 changed files with 6 additions and 8 deletions

View File

@ -719,14 +719,14 @@ class ApiIntegration extends ResourceController
if (count($billing_array) > 0) {
foreach ($billing_array as $bill) {
if($bill->first_name != ""){
$billing_addr = "<span>".$bill->address_1 .",". $bill->address_2 ."<br> </span><span>".$bill->city." ".$bill->postcode."<br></span><span>".$bill->state." ".$bill->country.".<br></span>";
$billing_addr = $bill->address_1 . " " . $bill->address_2 . ",\n" . $bill->city . ",\n" . $bill->state . " - " . $bill->postal_code . ",\n" . $bill->country . ".";
}
}
}
if (count($shipping_array) > 0) {
foreach ($shipping_array as $ship) {
if($ship->first_name != ""){
$shipping_addr = "<span>".$ship->address_1 .",". $ship->address_2 ."<br> </span><span>".$ship->city." ".$ship->postcode."<br></span><span>".$ship->state." ".$ship->country.".<br></span>";
$shipping_addr = $ship->address_1 . " " . $ship->address_2 . ",\n" . $ship->city . ",\n" . $ship->state . " - " . $ship->postal_code . ",\n" . $ship->country . ".";
}
}
}

View File

@ -45,12 +45,12 @@
<input type="hidden" id="hiddenBillingAddressId" name="billing_address_id"
placeholder="hidden for billing address id"
value="<?= isset($invoice_details['billing_address_id']) ? $invoice_details['billing_address_id'] : '' ?>" />
<textarea class="form-control" id="storeBillingAddress" name="billing_address"
<textarea class="form-control" id="storeBillingAddress" name="billing_address" rows="4"
readonly><?= isset($invoice_details['billing_address']) ? $invoice_details['billing_address'] : '' ?></textarea>
</div>
<div class="form-group col-md-6">
<label for="storeShippingAddress">Shipping Address</label>
<textarea class="form-control" id="storeShippingAddress" name="shipping_address"
<textarea class="form-control" id="storeShippingAddress" name="shipping_address" rows="4"
readonly><?= isset($invoice_details['shipping_address']) ? $invoice_details['shipping_address'] : '' ?></textarea>
</div>
</div>
@ -644,8 +644,7 @@ $(document).ready(function() {
customer_billing = "";
if (cb.length > 0) {
$.each(cb, function(k, v) {
customer_billing = v.address_1 + "," + v.address_2 + "," + v.city +
"," + v.state + "," + v.country + "." + v.postal_code
customer_billing = v.address_1 + " " + v.address_2 + ",\n" + v.city + ",\n" + v.state + " - "+v.postal_code+",\n"+ v.country +"."
customer_billing_id = v.customer_address_id
});
}
@ -703,8 +702,7 @@ $(document).ready(function() {
customer_shipping = "";
if (cs.length > 0) {
$.each(cs, function(k, v) {
customer_shipping = v.address_1 + "," + v.address_2 + "," + v.city +
"," + v.state + "," + v.country + "." + v.postal_code
customer_shipping = v.address_1 + " " + v.address_2 + ",\n" + v.city + ",\n" + v.state + " - "+v.postal_code+",\n"+ v.country +"."
});
}
// console.log(customer_shipping);