mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 15:04:19 +00:00
remove accounting tasks from auto generated tasks temporarily until ready
This commit is contained in:
@@ -20,7 +20,7 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
/** @var UpdatePerfexCRMObject */
|
||||
private $updatePerfexCRMObject;
|
||||
|
||||
/** @var Transaction */
|
||||
/** @var */
|
||||
private $transaction;
|
||||
|
||||
/** @var Boolean */
|
||||
@@ -28,10 +28,10 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
|
||||
/**
|
||||
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
|
||||
* @param Transaction $transaction
|
||||
* @param $transaction
|
||||
* @param Boolean $shouldCreateInvoice
|
||||
*/
|
||||
public function __construct(UpdatePerfexCRMObject $updatePerfexCRMObject, Transaction $transaction, Boolean $shouldCreateInvoice)
|
||||
public function __construct(UpdatePerfexCRMObject $updatePerfexCRMObject, $transaction, Boolean $shouldCreateInvoice)
|
||||
{
|
||||
$this->updatePerfexCRMObject = $updatePerfexCRMObject;
|
||||
$this->transaction = $transaction;
|
||||
@@ -42,7 +42,7 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
public function handle()
|
||||
{
|
||||
$result = (App()->make(UpdatePerfexCRMProcessor::class))->execute($this->updatePerfexCRMObject);
|
||||
if($this->transaction != null){
|
||||
if($this->transaction != null && $this->shouldCreateInvoice){
|
||||
$updatePerfexCRMInvoiceObject = new UpdatePerfexCRMInvoiceObject(
|
||||
$this->updatePerfexCRMObject->getContactEmail(),
|
||||
$this->updatePerfexCRMObject->getProjectName(),
|
||||
@@ -51,9 +51,8 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
true
|
||||
);
|
||||
|
||||
if($this->shouldCreateInvoice) {
|
||||
UpdatePerfexCRMInvoice::dispatch($updatePerfexCRMInvoiceObject);
|
||||
}
|
||||
UpdatePerfexCRMInvoice::dispatch($updatePerfexCRMInvoiceObject);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user