diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 64b936302..000000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(docker-compose up:*)", - "Bash(python:*)", - "Bash(cat:*)", - "Bash(find:*)", - "Bash(docker-compose exec:*)", - "mcp__sequentialthinking__sequentialthinking" - ] - } -} diff --git a/.gitignore b/.gitignore index 7940ae3c2..81ebe75ee 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ composer.lock .project .settings .idea +.claude/ nbproject config/config.php scripts/addressdb/import diff --git a/Layout/default/Order/Form.php b/Layout/default/Order/Form.php index a513c694e..f09c3a82c 100644 --- a/Layout/default/Order/Form.php +++ b/Layout/default/Order/Form.php @@ -597,7 +597,7 @@
- +
@@ -828,7 +828,7 @@
- +
@@ -1893,7 +1893,7 @@ } else { $('#products-' + id + '-delete').val(0); //$('#position-' + id + ' .delete-button-container i').removeClass("fa-trash-can-slash").addClass("fa-trash-can"); - $('#position-' + id + ' .delete-button-container').html(''); + $('#position-' + id + ' .delete-button-container').html(''); //$('#position-' + id + ' .delete-button-container i').removeClass("btn-outline-white fa-trash-can-slash").addClass("text-danger fa-trash-can"); $('#position-' + id).removeClass('text-white deleted'); @@ -1932,7 +1932,7 @@ \
\
\ - \ + \
\
\ \ diff --git a/Layout/default/Preorder/Index.php b/Layout/default/Preorder/Index.php index 69eb2fbe2..8e3e833d4 100644 --- a/Layout/default/Preorder/Index.php +++ b/Layout/default/Preorder/Index.php @@ -1359,7 +1359,7 @@ $pagination_entity_name = "Vorbestellungen"; * Globals for map display */ var borderpolies = []; - is("Admin")): ?> + is("Admin") && !isset($campaign)): ?> true]) as $bp_netz): ?> borderpolies.push([borderpoly?>]); diff --git a/application/Api/v1/Modules/Preorder/Cif.php b/application/Api/v1/Modules/Preorder/Cif.php index 8e60be040..6a34e818f 100644 --- a/application/Api/v1/Modules/Preorder/Cif.php +++ b/application/Api/v1/Modules/Preorder/Cif.php @@ -43,22 +43,8 @@ class Cif extends Modules\ApiControllerModule { return \mfResponse::NotFound(["message" => "Preorder not found"]); } - // set status to 200 - if($preorder->status->code < 200) { - $new_status = \PreorderstatusModel::getFirst(["code" => 200]); - if(!$new_status) { - return \mfResponse::InternalServerError(); - } - $preorder->status_id = $new_status->id; - $preorder->save(); - } - - $sflag = \PreorderStatusflagModel::getFirst(["code" => 200]); - $sflag->preorder_id = $preorder->id; - if(!$sflag->value->value) { - $sflag->value->value = 1; - $sflag->value->save(); - } + // set status flag 200 + $preorder->setStatusFlag(200, 1); return \mfResponse::Ok(["message" => "Status successfully updated."]); @@ -134,22 +120,8 @@ class Cif extends Modules\ApiControllerModule { return \mfResponse::NotFound(["message" => "Invalid ciftoken"]); } - // set status to 200 - if($preorder->status->code < 200) { - $new_status = \PreorderstatusModel::getFirst(["code" => 200]); - if(!$new_status) { - return \mfResponse::InternalServerError(); - } - $preorder->status_id = $new_status->id; - $preorder->save(); - } - - $sflag = \PreorderStatusflagModel::getFirst(["code" => 200]); - $sflag->preorder_id = $preorder->id; - if(!$sflag->value->value) { - $sflag->value->value = 1; - $sflag->value->save(); - } + // set status flag 200 + $preorder->setStatusFlag(200, 1); return \mfResponse::Ok(["message" => "Status successfully updated."]); diff --git a/application/Emailnotification/Emailnotification.php b/application/Emailnotification/Emailnotification.php index a686a9067..4906b0ca6 100644 --- a/application/Emailnotification/Emailnotification.php +++ b/application/Emailnotification/Emailnotification.php @@ -32,7 +32,7 @@ class Emailnotification { if($object_data !== false) $this->object_data = $object_data; } - public function addAttachment($filepath = null, $content = null, $name = false, $c_type = "application/octet-stream", $disposition = "attachment", $encoding = "base64" , $charset = "utf-8") { + public function addAttachment($filepath = null, $content = null, $name = false, $c_type = "application/octet-stream", $disposition = "attachment", $encoding = "base64", $charset = "utf-8") { $attachment = [ "file" => $filepath, "content" => $content, diff --git a/application/Invoice/InvoiceController.php b/application/Invoice/InvoiceController.php index 6d44febed..f96dd6615 100644 --- a/application/Invoice/InvoiceController.php +++ b/application/Invoice/InvoiceController.php @@ -681,6 +681,8 @@ class InvoiceController extends mfBaseController { } // save Invoiceposition + // first round price + $position->price_gross = round($position->price_gross, 4); if (!$position->save()) { $invoice->rollbackTransaction(); die("Error saving Invoiceposition"); @@ -703,7 +705,7 @@ class InvoiceController extends mfBaseController { } $invoice->total = $total_net; - $invoice->total_gross = $total_gross; + $invoice->total_gross = round($total_gross, 4); //$invoice->total_vat = $total_vat; if (!$invoice->save()) {