mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-09-01 10:54:00 +00:00
remove accounting tasks from auto generated tasks temporarily until ready
This commit is contained in:
@@ -162,17 +162,10 @@ class TransactionToPerfexCRMProcessorV2
|
||||
|
||||
private function dispatchUpdateJob(Transaction $model, int $status, UpdatePerfexCRMObject $updatePerfexCRMObject)
|
||||
{
|
||||
$dispatchClass = null;
|
||||
|
||||
if ($model->type === TransactionType::PAYMENT && $status === ApprovalStatus::APPROVED) {
|
||||
$dispatchClass = UpdatePerfexCRMInvoice::class;
|
||||
} elseif (($model->type === TransactionType::PAYMENT || $model->type === TransactionType::PURCHASE_ORDER) && $status === ApprovalStatus::PENDING_VERIFICATION) {
|
||||
$dispatchClass = UpdatePerfexCRM::class;
|
||||
}
|
||||
|
||||
if ($dispatchClass) {
|
||||
UpdatePerfexCRMPrelude::dispatch($model, $updatePerfexCRMObject, $dispatchClass);
|
||||
if($status == ApprovalStatus::APPROVED){
|
||||
UpdatePerfexCRMPrelude::dispatch($model, $updatePerfexCRMObject, UpdatePerfexCRM::class, UpdatePerfexCRMInvoice::class);
|
||||
} elseif($status == ApprovalStatus::PENDING_VERIFICATION){
|
||||
UpdatePerfexCRM::dispatch($updatePerfexCRMObject, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user