Added activation_billing (Nachverrechnen) in PreorderBilling

This commit is contained in:
Frank Schubert
2025-06-25 16:53:47 +02:00
parent 4689ed3dc0
commit aa9ffb090e
7 changed files with 114 additions and 9 deletions
+12 -1
View File
@@ -1177,6 +1177,9 @@ class PreorderController extends mfBaseController {
private function saveActivationdateApi() {
$preorder_id = $this->request->id;
$activation_date = $this->request->activation_date;
$activation_billing = $this->request->activation_billing ? 1 : 0;
$this->log->debug(print_r($this->request->get(), true));
$preorder = new Preorder($preorder_id);
if(!$preorder->id) {
@@ -1199,7 +1202,15 @@ class PreorderController extends mfBaseController {
$history->changed = $activationdate->getTimestamp();
$history->save();
return ["message" => "Activationdate saved successfully", "preorder_id" => $preorder_id, "activation_date" => $activation_date];
//$this->log->debug(print_r($preorder, true));
$this->log->debug(print_r($activation_billing, true));
if($preorder->activation_billing != $activation_billing) {
$preorder->activation_billing = $activation_billing;
$this->log->debug(print_r($preorder, true));
$preorder->save();
}
return ["message" => "Activationdate saved successfully", "preorder_id" => $preorder_id, "activation_date" => $activation_date, "activation_billing" => $activation_billing];
}
private function addWorkorderRemarkApi() {