cash back ref

This commit is contained in:
glovetleong
2022-04-05 22:57:53 +08:00
parent 4deb5845e3
commit 01ddfb6282
3 changed files with 17 additions and 3 deletions
@@ -118,12 +118,14 @@ class CreateCashBackTransactionProcessor
0,
null,
ApprovalStatus::APPROVED,
null,
'cash back ' . $transaction->bill_no
);
$cash_back_transaction = $this->createsTransaction->execute($transaction, $object);
$company = $transaction->owner()->first()->company;
$credit = $this->creditWalletProcessor->execute($company, $transaction->type, $cash_back_transaction->amount, '');
$credit = $this->creditWalletProcessor->execute($company, $transaction->type, $cash_back_transaction->amount, 'cash back ' . $transaction->bill_no);
}
}
}