Fix: Supprime colonne obsolete fk_facture dans llx_paiement car gre par llx_paiement_facture
Fix: la liste de treso ne prend en compte que les factures non payes
This commit is contained in:
parent
a10968cddc
commit
90cfe4ddcb
@ -152,13 +152,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$sql.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
|
||||
$sql.= " WHERE f.paye = 0 AND fk_statut > 0";
|
||||
$sql.= " WHERE f.paye = 0 AND fk_statut = 1";
|
||||
$sql.= " UNION DISTINCT";
|
||||
$sql.= " SELECT ff.rowid as facid, ff.facnumber, (-1*ff.total_ttc), ff.type, ".$db->pdate("ff.date_lim_reglement")." as dlr,";
|
||||
$sql.= " s.rowid as socid, s.nom, s.fournisseur";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";
|
||||
$sql.= " WHERE ff.paye = 0 AND fk_statut > 0";
|
||||
$sql.= " WHERE ff.paye = 0 AND fk_statut = 1";
|
||||
$sql.= " ORDER BY dlr ASC";
|
||||
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -87,6 +87,8 @@ update llx_rights_def set libelle='Cr
|
||||
|
||||
-- Supprime colone en doublon avec fk_user_creat
|
||||
alter table llx_paiement drop column author;
|
||||
-- Supprime colonne obsolete car gérée par llx_paiement_facture
|
||||
alter table llx_paiement drop column fk_facture;
|
||||
|
||||
update llx_actioncomm set fk_action = 9 where fk_action = 10;
|
||||
update llx_actioncomm set percent = 100 where percent = 0 and datea is not null;
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
create table llx_paiement
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_facture integer,
|
||||
datec datetime, -- date de creation
|
||||
tms timestamp,
|
||||
datep datetime, -- payment date
|
||||
|
||||
Loading…
Reference in New Issue
Block a user