Fix: Wrong column name fk_paiement_fourn -> fk_paiementfourn
The column in llx_paiementfourn_facturefourn is fk_paiementfourn (no underscore) not fk_paiement_fourn. This caused payment lookups to fail, creating duplicate payments instead of linking to existing ones. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2dc9279143
commit
6342225cc1
3 changed files with 4 additions and 4 deletions
2
card.php
2
card.php
|
|
@ -496,7 +496,7 @@ if ($object->id > 0) {
|
|||
$sql = "SELECT pf.fk_facturefourn, pf.amount, f.ref, f.ref_supplier, f.total_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON pf.fk_facturefourn = f.rowid";
|
||||
$sql .= " WHERE pf.fk_paiement_fourn = ".((int) $object->fk_paiementfourn);
|
||||
$sql .= " WHERE pf.fk_paiementfourn = ".((int) $object->fk_paiementfourn);
|
||||
$resql = $db->query($sql);
|
||||
$invoicesFound = false;
|
||||
if ($resql && $db->num_rows($resql) > 0) {
|
||||
|
|
|
|||
|
|
@ -1656,7 +1656,7 @@ class BankImportTransaction extends CommonObject
|
|||
}
|
||||
|
||||
// Find the payment(s) for this invoice
|
||||
$sql = "SELECT pfp.fk_paiement_fourn as payment_id, pfp.amount";
|
||||
$sql = "SELECT pfp.fk_paiementfourn as payment_id, pfp.amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pfp";
|
||||
$sql .= " WHERE pfp.fk_facturefourn = ".((int) $invoiceId);
|
||||
$sql .= " ORDER BY pfp.rowid DESC";
|
||||
|
|
@ -1951,7 +1951,7 @@ class BankImportTransaction extends CommonObject
|
|||
}
|
||||
|
||||
// Find payment for this invoice
|
||||
$sql = "SELECT pfp.fk_paiement_fourn as payment_id";
|
||||
$sql = "SELECT pfp.fk_paiementfourn as payment_id";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pfp";
|
||||
$sql .= " WHERE pfp.fk_facturefourn = ".((int) $invoiceId);
|
||||
$sql .= " ORDER BY pfp.rowid DESC LIMIT 1";
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class modBankImport extends DolibarrModules
|
|||
$this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@bankimport'
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = '1.7';
|
||||
$this->version = '1.8';
|
||||
// Url to the file with your last numberversion of this module
|
||||
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue