automatically complete tasks

This commit is contained in:
Omair Saleh
2023-06-15 06:16:54 +08:00
parent 1a08dd1659
commit d6516fda53
@@ -20,13 +20,12 @@ class TransactionToPerfexCRMProcessorV2
public function execute(Transaction $model, int $status)
{
try {
dd($model->type);
if(in_array($model->type, [TransactionType::PAYMENT, TransactionType::BILL, TransactionType::PURCHASE_ORDER])) {
$transaction = ($model->type === TransactionType::BILL ? $model->owner : $model);
$bookingInfo = $this->extractBookingInfo($transaction);
$projectName = 'Exchange | ' . $bookingInfo['serviceTypeName'] . ' | ' . $bookingInfo['bookingMarking'];
$tasks = $this->defineTasks($model, $status);
dd($tasks);
if(count($tasks) > 0) {
$updatePerfexCRMObject = new UpdatePerfexCRMObject(
$bookingInfo['companyName'],