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 = new Facture($this->db);
|
||||||
$fac->fetch($facs[$i]);
|
$fac->fetch($facs[$i]);
|
||||||
$amounts[$fac->id] = $fac->total_ttc;
|
$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 = new Paiement($this->db);
|
||||||
$paiement->datepaye = $date ;
|
$paiement->datepaye = $date ;
|
||||||
|
|||||||
@ -146,6 +146,11 @@ class RejetPrelevement
|
|||||||
dol_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]);
|
dol_syslog("RejetPrelevement::Create Erreur creation paiement facture ".$facs[$i]);
|
||||||
}
|
}
|
||||||
$result=$pai->addPaymentToBank($user,'payment','(WithdrawalRefused)',$bankaccount);
|
$result=$pai->addPaymentToBank($user,'payment','(WithdrawalRefused)',$bankaccount);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
dol_syslog("RejetPrelevement::Create bank Transaction Error");
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
// Payment validation
|
// Payment validation
|
||||||
if ($pai->valide() < 0)
|
if ($pai->valide() < 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user