Commit e623ab6f authored by DevPilot's avatar DevPilot

fix(accounting): تسجيل سبب عدم إلغاء رسم المقاصة عند الارتداد بدل ما يعدّي بصمت

parent c9dfacbc
......@@ -149,7 +149,16 @@ final class BouncedChequeService
// بشيك تقسيط اتحصّل عليه رسم مقاصة، بيتعكس هنا.
$linkedCheque = ChequeClearingFeeService::chequeForInstrument($instrumentId);
if ($linkedCheque) {
ChequeClearingFeeService::reverseForCheque((int) $linkedCheque['id']);
$rev = ChequeClearingFeeService::reverseForCheque((int) $linkedCheque['id']);
if (!$rev['reversed'] && $rev['error'] !== null) {
// الارتداد نفسه بيكمّل، بس لازم يبان إن الإلغاء ما تمّش وليه —
// أشهر سبب: الرسم متعلّم عليه إنه محمّل من غير قيد فعلي وراه.
Logger::error('Clearing fee not reversed on bounce', [
'instrument_id' => $instrumentId,
'cheque_id' => (int) $linkedCheque['id'],
'error' => $rev['error'],
]);
}
}
// The bank's charge on the club. Posted whoever ends up bearing it —
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment