diff --git a/app/Controllers/ApiIntegration.php b/app/Controllers/ApiIntegration.php index a78d5aae..33645835 100644 --- a/app/Controllers/ApiIntegration.php +++ b/app/Controllers/ApiIntegration.php @@ -719,14 +719,14 @@ class ApiIntegration extends ResourceController if (count($billing_array) > 0) { foreach ($billing_array as $bill) { if($bill->first_name != ""){ - $billing_addr = "".$bill->address_1 .",". $bill->address_2 ."
".$bill->city." ".$bill->postcode."
".$bill->state." ".$bill->country.".
"; + $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 = "".$ship->address_1 .",". $ship->address_2 ."
".$ship->city." ".$ship->postcode."
".$ship->state." ".$ship->country.".
"; + $shipping_addr = $ship->address_1 . " " . $ship->address_2 . ",\n" . $ship->city . ",\n" . $ship->state . " - " . $ship->postal_code . ",\n" . $ship->country . "."; } } } diff --git a/app/Views/invoice_form.php b/app/Views/invoice_form.php index 9eeece37..6559c9cf 100644 --- a/app/Views/invoice_form.php +++ b/app/Views/invoice_form.php @@ -45,12 +45,12 @@ -
-
@@ -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);