mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Withdrawals: Add bank transaction for refused withdrawals
This commit is contained in:
parent
5d1a032cd1
commit
e6ddc8bd71
|
|
@ -430,8 +430,7 @@ class BonPrelevement extends CommonObject
|
|||
$fac = new Facture($this->db);
|
||||
$fac->fetch($facs[$i]);
|
||||
$amounts[$fac->id] = $fac->total_ttc;
|
||||
//TODO: Uncomment next line if invoice must have payed status
|
||||
//$result = $fac->set_paid($user);
|
||||
$result = $fac->set_paid($user);
|
||||
}
|
||||
$paiement = new Paiement($this->db);
|
||||
$paiement->datepaye = $date ;
|
||||
|
|
|
|||
|
|
@ -146,6 +146,11 @@ class RejetPrelevement
|
|||
dol_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]);
|
||||
}
|
||||
$result=$pai->addPaymentToBank($user,'payment','(WithdrawalRefused)',$bankaccount);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_syslog("RejetPrelevement::Create bank Transaction Error");
|
||||
$error++;
|
||||
}
|
||||
|
||||
// Payment validation
|
||||
if ($pai->valide() < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user