mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-31 10:24:00 +00:00
Admin Workflow - Code Refactoring
This commit is contained in:
+1
-7
@@ -56,11 +56,9 @@ class SaveAnswerActionV1AdminWFProcessor
|
||||
* @return
|
||||
*/
|
||||
public function execute($booking, $questionMetadata, $answerOptionId, $currentQuestion, $filesUpload){
|
||||
$isNoGoingBack = 0;
|
||||
$answerOption = QAAnswerOptions::where('id', $answerOptionId)->first();
|
||||
if($currentQuestion['question_number'] === 'approve_po' && $answerOption && $answerOption->value === "approve_po_approved"){
|
||||
$this->approvePurchaseOrderProcessor->execute($questionMetadata['id']);
|
||||
$isNoGoingBack = 1;
|
||||
$this->approvePurchaseOrderProcessor->execute($booking);
|
||||
}
|
||||
else if($currentQuestion['question_number'] === '1688_submit')
|
||||
{
|
||||
@@ -79,7 +77,6 @@ class SaveAnswerActionV1AdminWFProcessor
|
||||
$transaction = $this->fetchesTransaction->execute(['id' =>$questionMetadata['payment_history'][0]['transaction_bill']['id']]);
|
||||
$this->createPaymentProofDocumentProcessor->execute($transaction, $filesUpload['filesC']);
|
||||
}
|
||||
$isNoGoingBack = 1;
|
||||
}
|
||||
}
|
||||
else if($currentQuestion['question_number'] === '1688_underpaid_order_1')
|
||||
@@ -97,12 +94,9 @@ class SaveAnswerActionV1AdminWFProcessor
|
||||
$company = $booking->company()->first();
|
||||
$employee = $company->employees()->first();
|
||||
$transaction = $this->createBookingPaymentProcessor->execute($booking, (string) $differenceUnder, 'wallet', "", "", $employee->email);
|
||||
$isNoGoingBack = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $isNoGoingBack;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user