Added Preorderselfservice API
This commit is contained in:
@@ -959,11 +959,14 @@ class Preorder extends mfBaseModel {
|
||||
}
|
||||
|
||||
$include_full_home = false;
|
||||
$include_full_address = false;
|
||||
|
||||
if(in_array("full_home", $options)) {
|
||||
$include_full_home = true;
|
||||
}
|
||||
|
||||
if(in_array("full_address", $options)) {
|
||||
$include_full_address = true;
|
||||
}
|
||||
|
||||
$hausnummer = $this->getProperty("adb_hausnummer");
|
||||
$wohneinheit = $this->getProperty("adb_wohneinheit");
|
||||
@@ -1020,6 +1023,22 @@ class Preorder extends mfBaseModel {
|
||||
unset($address['municipality']);
|
||||
}
|
||||
|
||||
if($include_full_address) {
|
||||
$address['gps_lat'] = $hausnummer->gps_lat;
|
||||
$address['gps_long'] = $hausnummer->gps_long;
|
||||
$address["borderpoint_lat"] = $hausnummer->borderpoint_lat;
|
||||
$address["borderpoint_long"] = $hausnummer->borderpoint_long;
|
||||
|
||||
$address["trenches"] = [];
|
||||
$address["home_trench"] = [];
|
||||
if($hausnummer->trenches) {
|
||||
$address["trenches"] = json_decode($hausnummer->trenches);
|
||||
}
|
||||
if($hausnummer->home_trench) {
|
||||
$address["home_trench"] = json_decode($hausnummer->home_trench);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$include_full_home) {
|
||||
$address['block'] = ($wohneinheit->block) ? $wohneinheit->block : null;
|
||||
$address['stock'] = ($wohneinheit->stock) ? $wohneinheit->stock : null;
|
||||
|
||||
Reference in New Issue
Block a user