Merge pull request #22779 from Hystepik/develop#2
Fix : Sql error on stripe sepa
This commit is contained in:
commit
d30a89c5b3
@ -143,6 +143,13 @@ if (empty($reshook)) {
|
|||||||
$result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'direct-debit', 'facture');
|
$result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'direct-debit', 'facture');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
} else {
|
||||||
|
// We refresh object data
|
||||||
|
$ret = $object->fetch($id, $ref);
|
||||||
|
$isdraft = (($object->statut == FactureFournisseur::STATUS_DRAFT) ? 1 : 0);
|
||||||
|
if ($ret > 0) {
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1572,7 +1572,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
$this->errors[] = "Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?";
|
$this->errors[] = "Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO '.MAIN_DB_PREFIX.'prelevement_demande(";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_demande(";
|
||||||
$sql .= "fk_facture, ";
|
$sql .= "fk_facture, ";
|
||||||
$sql .= " amount, date_demande, fk_user_demande, ext_payment_id, ext_payment_site, sourcetype, entity)";
|
$sql .= " amount, date_demande, fk_user_demande, ext_payment_id, ext_payment_site, sourcetype, entity)";
|
||||||
$sql .= " VALUES (".$this->id;
|
$sql .= " VALUES (".$this->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user