Rimo Import update
This commit is contained in:
@@ -64,6 +64,12 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
|
<th>Rimo Execution State</th>
|
||||||
|
<td><?=$address->rimo_ex_state?></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th>Rimo Operational State</th>
|
||||||
|
<td><?=$address->rimo_op_state?></td>
|
||||||
|
</tr><tr>
|
||||||
<td colspan="2"><h4>Status</h4></td>
|
<td colspan="2"><h4>Status</h4></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
|||||||
@@ -308,6 +308,8 @@ class ADBWohneinheit extends mfBaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($name == "rimo_workorders") {
|
if($name == "rimo_workorders") {
|
||||||
|
if(!$this->id) return null;
|
||||||
|
|
||||||
$rimo_workorders = RimoWorkorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
$rimo_workorders = RimoWorkorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
||||||
if(count($rimo_workorders)) {
|
if(count($rimo_workorders)) {
|
||||||
$this->rimo_workorders = $rimo_workorders;
|
$this->rimo_workorders = $rimo_workorders;
|
||||||
@@ -316,6 +318,7 @@ class ADBWohneinheit extends mfBaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($name == "preorders") {
|
if($name == "preorders") {
|
||||||
|
if(!$this->id) return [];
|
||||||
$preorders = PreorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
$preorders = PreorderModel::search(["adb_wohneinheit_id" => $this->id]);
|
||||||
if(!count($preorders)) {
|
if(!count($preorders)) {
|
||||||
return [];
|
return [];
|
||||||
@@ -325,6 +328,7 @@ class ADBWohneinheit extends mfBaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($name == "active_preorders") {
|
if($name == "active_preorders") {
|
||||||
|
if(!$this->id) return [];
|
||||||
$preorders = PreorderModel::searchActive(["adb_wohneinheit_id" => $this->id]);
|
$preorders = PreorderModel::searchActive(["adb_wohneinheit_id" => $this->id]);
|
||||||
if(!count($preorders)) {
|
if(!count($preorders)) {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -237,6 +237,11 @@ class AddressHelper
|
|||||||
$force_no_subcd = true;
|
$force_no_subcd = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($hausnummer && $hausnummer->rimo_id) {
|
||||||
|
$hausnummer = null;
|
||||||
|
}
|
||||||
|
|
||||||
/*if(!$hausnummer) {
|
/*if(!$hausnummer) {
|
||||||
//echo "Hausnummer adrcd $adrcd not found\n";
|
//echo "Hausnummer adrcd $adrcd not found\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -254,6 +259,10 @@ class AddressHelper
|
|||||||
if($hausnummer && $adrcd && $hausnummer->adrcd != $adrcd) {
|
if($hausnummer && $adrcd && $hausnummer->adrcd != $adrcd) {
|
||||||
$hausnummer = null;
|
$hausnummer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($hausnummer && $hausnummer->rimo_id) {
|
||||||
|
$hausnummer = null;
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
if (!$hausnummer) {
|
if (!$hausnummer) {
|
||||||
// dont create Hausnummer if Canceled in Rimo
|
// dont create Hausnummer if Canceled in Rimo
|
||||||
|
|||||||
@@ -893,9 +893,9 @@ function getServiceDnValues($dn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!array_key_exists("Shelf", $fields) && array_key_exists("SpliceBox", $fields)) {
|
/*if(!array_key_exists("Shelf", $fields) && array_key_exists("SpliceBox", $fields)) {
|
||||||
$fields['Shelf'] = $fields['SpliceBox'];
|
$fields['Shelf'] = $fields['SpliceBox'];
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ while($hausnummer_data = $db->fetch_object($res)) {
|
|||||||
if(ADBWohneinheitModel::count(["oaid" => $del_unit->oaid]) == 1) {
|
if(ADBWohneinheitModel::count(["oaid" => $del_unit->oaid]) == 1) {
|
||||||
//echo "!! Hausnummer ".$hausnummer->id.": cannot delete unit ".$del_unit->id." because it's the last Unit with OAID ".$oaid->oaid."\n";
|
//echo "!! Hausnummer ".$hausnummer->id.": cannot delete unit ".$del_unit->id." because it's the last Unit with OAID ".$oaid->oaid."\n";
|
||||||
$ftu_id = $del_unit->ftu_data["id"];
|
$ftu_id = $del_unit->ftu_data["id"];
|
||||||
RimoApi::unassignOaid($oaid->oaid, $ftu_id);
|
Rimoapi::unassignOaid($oaid->oaid, $ftu_id);
|
||||||
|
|
||||||
echo "Deleting OAID ".$oaid->oaid." from FTU ".$ftu_id."\n";
|
echo "Deleting OAID ".$oaid->oaid." from FTU ".$ftu_id."\n";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user