|
@@ -96,10 +96,11 @@ $controller = new class($number) {
|
|
|
$company_id = $this->request->int("company_id");
|
|
$company_id = $this->request->int("company_id");
|
|
|
$company = $this->requireCompany($company_id);
|
|
$company = $this->requireCompany($company_id);
|
|
|
|
|
|
|
|
|
|
+ $location_id = $this->request->int("location_id");
|
|
|
|
|
+ $location = Location::require($location_id);
|
|
|
|
|
+
|
|
|
$sale = $this->getSale();
|
|
$sale = $this->getSale();
|
|
|
if(!$sale) {
|
|
if(!$sale) {
|
|
|
- $location_id = $this->request->int("location_id");
|
|
|
|
|
- $location = Location::require($location_id);
|
|
|
|
|
|
|
|
|
|
$sale = new Sale();
|
|
$sale = new Sale();
|
|
|
$sale->location_id = $location->id;
|
|
$sale->location_id = $location->id;
|
|
@@ -111,6 +112,7 @@ $controller = new class($number) {
|
|
|
$success_message = __("Lead created successfully.");
|
|
$success_message = __("Lead created successfully.");
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
|
|
+ $sale->location_id = $location->id;
|
|
|
$sale->status = $this->request->int("status");
|
|
$sale->status = $this->request->int("status");
|
|
|
$sale->currency = $this->request->string("currency");
|
|
$sale->currency = $this->request->string("currency");
|
|
|
$sale->tax_rate = $this->request->decimal("tax_rate", 2);
|
|
$sale->tax_rate = $this->request->decimal("tax_rate", 2);
|