automatically complete tasks

This commit is contained in:
Omair Saleh
2023-06-15 06:11:27 +08:00
parent ef1b63870f
commit 85a7a09e32
@@ -21,7 +21,8 @@ class TransactionToPerfexCRMProcessorV2
{
try {
if(in_array($model->type, [TransactionType::PAYMENT, TransactionType::BILL, TransactionType::PURCHASE_ORDER])) {
$bookingInfo = $this->extractBookingInfo($model->type === TransactionType::BILL ? $model->owner : $model);
$transaction = $model->type === TransactionType::BILL ? $model->owner : $model;
$bookingInfo = $this->extractBookingInfo($transaction);
$projectName = 'Exchange | ' . $bookingInfo['serviceTypeName'] . ' | ' . $bookingInfo['bookingMarking'];
$tasks = $this->defineTasks($model, $status);
@@ -37,7 +38,7 @@ class TransactionToPerfexCRMProcessorV2
[],
$tasks
);
$this->dispatchUpdateJob($model, $status, $updatePerfexCRMObject);
$this->dispatchUpdateJob($transaction, $status, $updatePerfexCRMObject);
}
}
} catch (\Exception $exception) {