Răsfoiți Sursa

Fix customer not saving on location form

Alan Lam 3 ani în urmă
părinte
comite
cdfc0411c1
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      controllers/location_form.php

+ 3 - 0
controllers/location_form.php

@@ -53,6 +53,9 @@ if($submit) {
 	try {
 	try {
 		$user->requireValidCsrfToken();
 		$user->requireValidCsrfToken();
 
 
+		$customer_id = $request->int("customer_id");
+		$customer = Customer::require($customer_id);
+
 		$location->customer_id = $customer->id;
 		$location->customer_id = $customer->id;
 		$location->name = $request->string("name");
 		$location->name = $request->string("name");
 		$location->phone = $request->string("phone");
 		$location->phone = $request->string("phone");