|
@@ 320-328 (lines=9) @@
|
| 317 |
|
} |
| 318 |
|
return new k_SeeOther($this->url()); |
| 319 |
|
} // transfer quotation to order |
| 320 |
|
elseif ($this->body('order')) { |
| 321 |
|
if ($this->getKernel()->user->hasModuleAccess('order') && $this->getDebtor()->get("type") == "quotation") { |
| 322 |
|
$this->getKernel()->useModule("order"); |
| 323 |
|
$order = new Order($this->getKernel()); |
| 324 |
|
if ($id = $order->create($this->getDebtor())) { |
| 325 |
|
return new k_SeeOther($this->url('../'.$id)); |
| 326 |
|
} |
| 327 |
|
} |
| 328 |
|
} // transfer forder to invoice |
| 329 |
|
elseif ($this->body('invoice')) { |
| 330 |
|
if ($this->getKernel()->user->hasModuleAccess('invoice') && ($this->getDebtor()->get("type") == "quotation" || $this->getDebtor()->get("type") == "order")) { |
| 331 |
|
$this->getKernel()->useModule("invoice"); |
|
@@ 329-337 (lines=9) @@
|
| 326 |
|
} |
| 327 |
|
} |
| 328 |
|
} // transfer forder to invoice |
| 329 |
|
elseif ($this->body('invoice')) { |
| 330 |
|
if ($this->getKernel()->user->hasModuleAccess('invoice') && ($this->getDebtor()->get("type") == "quotation" || $this->getDebtor()->get("type") == "order")) { |
| 331 |
|
$this->getKernel()->useModule("invoice"); |
| 332 |
|
$invoice = new Invoice($this->getKernel()); |
| 333 |
|
if ($id = $invoice->create($this->getDebtor())) { |
| 334 |
|
return new k_SeeOther($this->url('../' . $id)); |
| 335 |
|
} |
| 336 |
|
} |
| 337 |
|
} // Quick process order |
| 338 |
|
elseif ($this->body('quickprocess_order')) { |
| 339 |
|
if ($this->getKernel()->user->hasModuleAccess('invoice') && ($this->getDebtor()->get("type") == "quotation" || $this->getDebtor()->get("type") == "order")) { |
| 340 |
|
$this->getKernel()->useModule("invoice"); |
|
@@ 339-345 (lines=7) @@
|
| 336 |
|
} |
| 337 |
|
} // Quick process order |
| 338 |
|
elseif ($this->body('quickprocess_order')) { |
| 339 |
|
if ($this->getKernel()->user->hasModuleAccess('invoice') && ($this->getDebtor()->get("type") == "quotation" || $this->getDebtor()->get("type") == "order")) { |
| 340 |
|
$this->getKernel()->useModule("invoice"); |
| 341 |
|
$invoice = new Invoice($this->getKernel()); |
| 342 |
|
if ($id = $invoice->create($this->getDebtor())) { |
| 343 |
|
} |
| 344 |
|
} |
| 345 |
|
|
| 346 |
|
if ($this->getKernel()->user->hasModuleAccess('invoice')) { |
| 347 |
|
$this->getKernel()->useModule("invoice"); |
| 348 |
|
$invoice->setStatus('sent'); |