mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
automatically complete tasks
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user