OAID / Rimo Workorder update:

- OAIDs are now auto assigned to preorders/wohneinheiten on save
- OAIDs can be exported to rimo via Preorder Admin functions
- Preorder admin function createWorkorder automatically creates, exports and assigns OAIDs
This commit is contained in:
Frank Schubert
2023-08-09 09:02:44 +02:00
parent 85ab465862
commit 9f051b4cf3
27 changed files with 1150 additions and 81 deletions
@@ -171,9 +171,11 @@ while($csv = fgetcsv($input, 0)) {
continue;
}
//echo $campaign->name." (".$network->name.")\n";
$create_oaid = false;
if($campaign->oaid_origin == "thetool") {
$create_oaid = true;
}
//var_dump($data);exit;
$hausnummer = new ADBHausnummer($data->hausnummer_id);
$wohneinheiten = ADBWohneinheitModel::search(["hausnummer_id" => $hausnummer->id]);
@@ -250,7 +252,7 @@ while($csv = fgetcsv($input, 0)) {
continue;
}
if(!$unit->oaid) {
if($create_oaid && !$unit->oaid) {
$unit->oaid = $unit->getNewOAID();
$unit->save();
}
@@ -312,7 +314,7 @@ while($csv = fgetcsv($input, 0)) {
continue;
}
if(!$unit->oaid) {
if($create_oaid && !$unit->oaid) {
$unit->oaid = $unit->getNewOAID();
$unit->save();
}