mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-31 18:34:10 +00:00
Admin Workflow - Fix new unclear workflow requirement
This commit is contained in:
+2
-5
@@ -104,17 +104,15 @@ class FetchNextQuestionV1AdminWFProcessor
|
||||
if($question_number !== ""){
|
||||
//Check if question exists
|
||||
$questions = $this->listsQuestions->execute(['questionnaire_set_id' => $questionnaireSetId, 'question_number' => $question_number]);
|
||||
if($previousAnswer['answer'] === '1688_underpaid_overpaid' && count($questions) == 0){
|
||||
if($previousAnswer['answer'] === '1688_order_verified' && count($questions) == 0){
|
||||
$questionMetadata = $questionContext['questionMetadata'] ?? null;
|
||||
// $processed = round((floatval($questionMetadata['amount_processed']) + PHP_FLOAT_EPSILON) * 1000) / 1000;
|
||||
// $amount = round((floatval($questionMetadata['amount']) + PHP_FLOAT_EPSILON) * 1000) / 1000;
|
||||
$processed = $questionMetadata['amount_processed'];
|
||||
$amount = $questionMetadata['amount'];
|
||||
$wallet = $booking->company->wallets()->first();
|
||||
$walletAmount = $wallet->amount;
|
||||
|
||||
if ($processed === $amount) {
|
||||
$question_number = '1688_order_paid_precisely';
|
||||
$question_number = '1688_proceed_order';
|
||||
}
|
||||
else if ($processed < $amount) {
|
||||
$outstanding = $this->calculatesBookingOutstanding->execute($booking) + $this->calculatesBookingRefundAmount->execute($booking, $booking->fix_currency_id);
|
||||
@@ -126,7 +124,6 @@ class FetchNextQuestionV1AdminWFProcessor
|
||||
$underpay = $configurations->getTotal();
|
||||
|
||||
if($underpay > round($outstanding, 2)) {
|
||||
// throw new MalformedRequestException('Your payment must not be greater than '. $outstanding .'.');
|
||||
$question_number = '1688_underpaid_order_3';
|
||||
}
|
||||
else if($walletAmount > $underpay) {
|
||||
|
||||
Reference in New Issue
Block a user