Преглед изворни кода

Fix document dates not being set to null if not set

Alan Lam пре 2 година
родитељ
комит
4eeae0ae4b
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      controllers/document.php

+ 6 - 0
controllers/document.php

@@ -239,11 +239,17 @@ $controller = new class($document_type, $document_number) {
 			if($date_finalised) {
 				$document->dts_finalised = $date_finalised . " 12:00:00";
 			}
+			else {
+				$document->dts_finalised = null;
+			}
 
 			$date_paid = $this->request->date("dts_paid");
 			if($date_paid) {
 				$document->dts_paid = $date_paid . " 12:00:00";
 			}
+			else {
+				$document->dts_paid = null;
+			}
 		}
 
 		if($document->isAru()) {