Merge branch 'fronkdev' into 'master'

Added fancyurl execption in mfRouter for Login process

See merge request fronk/thetool!69
This commit is contained in:
Frank Schubert
2023-08-30 07:04:52 +00:00
4 changed files with 90 additions and 4 deletions
@@ -13,6 +13,8 @@ class ADBWohneinheit extends mfBaseModel {
if(!$this->id) return true;
if(!$this->hausnummer_id) return true;
// ADBWohneinheit_onSave_noAutoUnitCount can be defined if doing bulk
// operations where unit count is calculated seperately
if(!defined("ADBWohneinheit_onSave_noAutoUnitCount") || !ADBWohneinheit_onSave_noAutoUnitCount) {
$unit_count = ADBWohneinheitModel::count(['hausnummer_id' => $this->hausnummer_id]);
$hausnummer = $this->getProperty("hausnummer");
+2 -2
View File
@@ -100,7 +100,7 @@ class Preorder extends mfBaseModel {
$oaid->loadRandomUnassigned($oaid_attributes);
if(!$oaid->oaid) {
$this->layout->setFlash("Keine weiteren OAIDs verfügbar", "error");
$this->log->error("Keine weiteren OAIDs verfügbar");
throw new Exception("Keine weiteren OAIDs verfügbar in ".$netowner->getCompanyOrName());
} else {
// make sure this OAID is not in use on another wohneinheit by accident
@@ -137,7 +137,7 @@ class Preorder extends mfBaseModel {
$oaid->unit_string = (string)$wohneinheit;
//var_dump($oaid);exit;
if(!$oaid->save()) {
$this->layout()->setFlash("Fehler beim Speichern der OAID für Preorder ".$preorder->id);
$this->log->error("Fehler beim Speichern der OAID für Preorder ".$preorder->id);
$this->redirect("Preordercampaign", "Admin");
}
if(!$this->save()) {
@@ -610,8 +610,8 @@ class PreordercampaignController extends mfBaseController {
//$preorder->save();
$resp_data = json_decode($response);
if(!is_object($resp_data)) {
$this->log->error("Cannot create RimoWorkorder in Database! Invalid Response! (Preorder code: ".$preorder->ucode.") | Response: \n$response");
throw new Exception("Cannot create RimoWorkorder in Database! Invalid Response! (Preorder code: ".$preorder->ucode.")");
$this->log->error("Cannot create RimoWorkorder! Invalid Response! (Preorder code: ".$preorder->ucode.") | Response: \n$response");
throw new Exception("Cannot create RimoWorkorder! Invalid Response! (Preorder code: ".$preorder->ucode.")");
}
$wo = RimoWorkorderModel::create([