Problème SQL dolibarr v16

Bonjour à toutes et à tous,

Ayant des problèmes SQL sur ma version 15.0.2, j’ai voulu essayer de passer en 16, oui je sais, c’est pas bien c’est une version beta.

Mais ca n’empêche que j’ai exactement les mêmes problèmes qu’en V15.0.2, pas de pire, pas de mieux.

Premièrement, j’ai cette erreur pour mes derniers paiements :

Bad string syntax to evaluate (dot char is forbidden): ($obj->dynamount_payed ? (($resql = $db-query('SELECT datep FROM llx_paiement as p JOIN llx_paiement_facture as pf ON p.rowid = pf.fk_paiement WHERE pf.fk_facture = '.$db->escape($obj->id) . ' ORDER BY datep DESC'))?( ($datep = $db->fetch_array($resql)) ? date('d/m/Y', strtotime($datep['datep'])) : 'Aucun' ) :'Erreur' ) : 'Aucun' )

Quand je vais dans ma base de données, j’ai ceci :

Ensuite, j’ai un second problème qui est celui lorsque je vais dans mes modèles de courriels :

Dolibarr a détecté une erreur technique.
You use an experimental or develop level of features, so please do NOT report any bugs or vulnerability, except if problem is confirmed after moving option MAIN_FEATURES_LEVEL back to 0.
Ces informations peuvent être utiles à des fins de diagnostic (vous pouvez définir l’option $dolibarr_main_prod sur ‹ 1 › pour masquer les informations sensibles):
Date: 20220619210618
Dolibarr: 16.0.0-beta - https://www.dolibarr.org
Niveau de fonctionnalités: 1
PHP: 7.4.25
Serveur: Apache
OS: Linux webm190.cluster003.gra.hosting.ovh.net 4.14.253-ovh-vps-grsec-zfs-classid #1 SMP Thu Oct 28 11:15:35 CEST 2021 x86_64
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Url sollicitée: /ges/htdocs/admin/mails_templates.php
Referer: Login @ 16.0.4
Gestionnaire de menu: eldy_menu.php

Modules/Applications: user, ficheinter, propal, categorie, bookmark, projet, expedition, banque, cron, commande, facture, fournisseur, holiday, printing, salaries, fckeditor, service, societe, rubis, invoicetracking, tax, stock, product, comptabilite
Type gestionnaire de base de données: mysqli
Requête dernier accès en base en erreur: SELECT rowid as rowid, module, label, type_template, lang, fk_user, private, position, topic, joinfiles, content_lines, content, enabled, active FROM llx_c_email_templates WHERE entity IN (0,1) AND (lang = ‹ fr_FR › OR lang IS NULL OR lang = ‹  ›) ORDER BY type_template ASC, lang ASC, position ASC, label ASC LIMIT 1001
Code retour dernier accès en base en erreur: DB_ERROR_NOSUCHFIELD
Information sur le dernier accès en base en erreur: Unknown column ‹ content_lines › in ‹ field list ›

Tout le reste de dolibarr fonctionne parfaitement, sauf ces 2 choses là.

Quelqu’un peut il m’aider là dessus ?

Hello,

Ta deuxième erreur se produit parce qu’il manque le champ

dans la table

Soit tu lances le script www.tondolibarr.com/install/repair.php, avec un peu de chance, ça corrigera la première erreur aussi.

Soit tu le rajoute « à la main » dans la console phpmyadmin:

ALTER TABLE llx_c_email_templates ADD COLUMN content_lines TEXT

Si repair.php n’a pas résolu le premier souci,faudra en dire plus: quel est l’URL appelée, quest ce qu’il y a comme module externe, depuis quelle version as-tu migrer …
Parce que là je bois une erreur provoquée parce que du code PHP est « injecté » dans la requête MySQL sans interprétation.

A plus

Bonjour,

Ta première erreur ressemble à un champ supplémentaire calculé qui a une mauvaise formule ?

Bonjour daraelmin,

La fonction repair je l’ai essayé plusieurs fois sans succès. Cependant le fait de rajouter la table à la main le problème des mails à disparu ! C’est déjà une très bonne chose ! Maintenant pourquoi ce champ à été supprimé, je ne sais pas …

Mon problème avec la date de paiement quant à lui persiste …

Le seul module (plugin) que j’utilise c’est celui des relance de facture du dolistore qui fonctionne très bien.

Je n’arrive pas à dire depuis quand j’ai réellement ce problème de dernier paiement. Ce qui est sur c’est qu’en 15.0.2 ca fonctionnait très bien, puis du jour au lendemain j’ai eu ce problème sans rien changer. C’est pour ca que je suis passer en 16 pensant résoudre le problème. Malheureusement il est tenace !

EDIT : Je viens de retenter un « repair standard confirmed » et je suis allé dans les détails. Je viens de voir apparaitre ceci :

Erreur DB_ERROR_1072: ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);***
***Key column 'entity' doesn't exist in table

Voici les détails :

Request 1 sql=‹ ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8; ›
Request 2 sql=‹ ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci; ›
Request 3 sql=‹ ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8; ›
Request 4 sql=‹ ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) COLLATE utf8_unicode_ci; ›
Request 5 sql=‹ ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) CHARACTER SET utf8; ›
Request 6 sql=‹ ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) COLLATE utf8_unicode_ci; ›
Request 7 sql=‹ ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) CHARACTER SET utf8; ›
Request 8 sql=‹ ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) COLLATE utf8_unicode_ci; ›
Request 9 sql=‹ ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8; ›
Request 10 sql=‹ ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci; ›
Request 11 sql=‹ ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8; ›
Request 12 sql=‹ ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci; ›
Request 13 sql=‹ ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8; ›
Request 14 sql=‹ ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci; ›
Request 15 sql=‹ ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8; ›
Request 16 sql=‹ ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci; ›
Request 17 sql=‹ ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8; ›
Request 18 sql=‹ ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci; ›
Request 19 sql=‹ ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) CHARACTER SET utf8; ›
Request 20 sql=‹ ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) COLLATE utf8_unicode_ci; ›
Request 21 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 22 sql=‹ update llx_facture set date_pointoftax = NULL where DATE(STR_TO_DATE(date_pointoftax, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 23 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 24 sql=‹ update llx_facture set date_pointoftax = NULL where DATE(STR_TO_DATE(date_pointoftax, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 25 sql=‹ INSERT IGNORE INTO llx_product_lot (entity, fk_product, batch, eatby, sellby, datec, fk_user_creat, fk_user_modif) SELECT DISTINCT e.entity, ps.fk_product, pb.batch, pb.eatby, pb.sellby, pb.tms, e.fk_user_author, e.fk_user_author from llx_product_batch as pb, llx_product_stock as ps, llx_entrepot as e WHERE pb.fk_product_stock = ps.rowid AND ps.fk_entrepot = e.rowid; ›
Request 26 sql=‹ UPDATE llx_user set api_key = null where api_key = ‹  ›; ›
Request 27 sql=‹ UPDATE llx_c_email_templates SET position = 0 WHERE position IS NULL; ›
Request 28 sql=‹ ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency; ›
Request 29 sql=‹ ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_currency; ›
Request 30 sql=‹ ALTER TABLE llx_facture DROP FOREIGN KEY fk_facture_fk_currency; ›
Request 31 sql=‹ delete from llx_facturedet where fk_facture in (select rowid from llx_facture where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›)); ›
Request 32 sql=‹ delete from llx_facture where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›); ›
Request 33 sql=‹ delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›)); ›
Request 34 sql=‹ delete from llx_commande where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›); ›
Request 35 sql=‹ delete from llx_propaldet where fk_propal in (select rowid from llx_propal where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›)); ›
Request 36 sql=‹ delete from llx_propal where ref in ( ›(PROV)‹ ,‹ ErrorBadMask ›); ›
Request 37 sql=‹ delete from llx_facturedet where fk_facture in (select rowid from llx_facture where ref = ‹  ›); ›
Request 38 sql=‹ delete from llx_facture where ref = ‹  ›; ›
Request 39 sql=‹ delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref = ‹  ›); ›
Request 40 sql=‹ delete from llx_commande where ref = ‹  ›; ›
Request 41 sql=‹ delete from llx_propaldet where fk_propal in (select rowid from llx_propal where ref = ‹  ›); ›
Request 42 sql=‹ delete from llx_propal where ref = ‹  ›; ›
Request 43 sql=‹ delete from llx_deliverydet where fk_delivery in (select rowid from llx_delivery where ref = ‹  ›); ›
Request 44 sql=‹ delete from llx_delivery where ref = ‹  ›; ›
Request 45 sql=‹ delete from llx_expeditiondet where fk_expedition in (select rowid from llx_expedition where ref = ‹  ›); ›
Request 46 sql=‹ delete from llx_expedition where ref = ‹  ›; ›
Request 47 sql=‹ delete from llx_holiday_logs where fk_user_update not IN (select rowid from llx_user); ›
Request 48 sql=‹ delete from llx_rights_def where perms IS NULL; ›
Request 49 sql=‹ delete from llx_user_rights where fk_user not IN (select rowid from llx_user); ›
Request 50 sql=‹ delete from llx_usergroup_rights where fk_usergroup not in (select rowid from llx_usergroup); ›
Request 51 sql=‹ delete from llx_usergroup_rights where fk_id not in (select id from llx_rights_def); ›
Request 52 sql=‹ update llx_deplacement set dated=‹ 2010-01-01 › where dated < ‹ 2000-01-01 ›; ›
Request 53 sql=‹ update llx_subscription set fk_bank = null where fk_bank not in (select rowid from llx_bank); ›
Request 54 sql=‹ update llx_propal set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 55 sql=‹ update llx_commande set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 56 sql=‹ update llx_facture set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 57 sql=‹ update llx_commande_fournisseur set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 58 sql=‹ update llx_contrat set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 59 sql=‹ update llx_deplacement set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 60 sql=‹ update llx_facture_fourn set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 61 sql=‹ update llx_facture_rec set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 62 sql=‹ update llx_fichinter set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 63 sql=‹ update llx_projet_task set fk_projet = null where fk_projet not in (select rowid from llx_projet); ›
Request 64 sql=‹ update llx_propal set fk_user_author = null where fk_user_author not in (select rowid from llx_user); ›
Request 65 sql=‹ update llx_propal set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user); ›
Request 66 sql=‹ update llx_propal set fk_user_cloture = null where fk_user_cloture not in (select rowid from llx_user); ›
Request 67 sql=‹ update llx_commande set fk_user_author = null where fk_user_author not in (select rowid from llx_user); ›
Request 68 sql=‹ update llx_commande set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user); ›
Request 69 sql=‹ delete from llx_societe_extrafields where fk_object not in (select rowid from llx_societe); ›
Request 70 sql=‹ delete from llx_adherent_extrafields where fk_object not in (select rowid from llx_adherent); ›
Request 71 sql=‹ delete from llx_product_extrafields where fk_object not in (select rowid from llx_product); ›
Request 72 sql=‹ UPDATE llx_product SET datec = tms WHERE datec IS NULL; ›
Request 73 sql=‹ update llx_product_batch set batch = ‹  › where batch = ‹ Non défini ›; ›
Request 74 sql=‹ update llx_product_batch set batch = ‹  › where batch = ‹ Non défini ›; ›
Request 75 sql=‹ update llx_stock_mouvement set batch = null where batch = ‹ Non défini ›; ›
Request 76 sql=‹ update llx_stock_mouvement set batch = null where batch = ‹ Non défini ›; ›
Request 77 sql=‹ DELETE FROM llx_product_lot WHERE fk_product NOT IN (select rowid from llx_product); ›
Request 78 sql=‹ DELETE FROM llx_product_stock WHERE fk_product NOT IN (select rowid from llx_product); ›
Request 79 sql=‹ DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); ›
Request 80 sql=‹ DROP TABLE tmp_llx_product_batch; ›
Request 81 sql=‹ DROP TABLE tmp_llx_product_batch2; ›
Request 82 sql=‹ CREATE TABLE tmp_llx_product_batch AS select fk_product_stock, eatby, sellby, batch, SUM(qty) as qty, COUNT(rowid) as nb FROM llx_product_batch GROUP BY fk_product_stock, eatby, sellby, batch HAVING COUNT(rowid) > 1; ›
Request 83 sql=‹ CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, ‹ 2000-01-01 ›) = COALESCE(tpb.eatby,‹ 2000-01-01 ›) and COALESCE(pb.sellby, ‹ 2000-01-01 ›) = COALESCE(tpb.sellby, ‹ 2000-01-01 ›) and pb.batch = tpb.batch; ›
Request 84 sql=‹ DELETE FROM llx_product_batch WHERE rowid IN (select rowid FROM tmp_llx_product_batch2); ›
Request 85 sql=‹ INSERT INTO llx_product_batch(fk_product_stock, eatby, sellby, batch, qty) SELECT fk_product_stock, eatby, sellby, batch, qty FROM tmp_llx_product_batch; ›
Request 86 sql=‹ DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); ›
Request 87 sql=‹ DELETE FROM llx_product_batch WHERE qty = 0; ›
Request 88 sql=‹ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); ›
Request 89 sql=‹ delete from llx_product_association where fk_product_pere NOT IN (select rowid from llx_product); ›
Request 90 sql=‹ delete from llx_product_association where fk_product_fils NOT IN (select rowid from llx_product); ›
Request 91 sql=‹ drop table tmp_categorie; ›
Request 92 sql=‹ create table tmp_categorie as select * from llx_categorie; ›
Request 93 sql=‹ delete from llx_categorie where fk_parent not in (select rowid from tmp_categorie) and fk_parent is not null and fk_parent <> 0; ›
Request 94 sql=‹ drop table tmp_categorie; ›
Request 95 sql=‹ delete from llx_categorie_product where fk_categorie not in (select rowid from llx_categorie where type = 0); ›
Request 96 sql=‹ delete from llx_categorie_fournisseur where fk_categorie not in (select rowid from llx_categorie where type = 1); ›
Request 97 sql=‹ delete from llx_categorie_societe where fk_categorie not in (select rowid from llx_categorie where type = 2); ›
Request 98 sql=‹ delete from llx_categorie_member where fk_categorie not in (select rowid from llx_categorie where type = 3); ›
Request 99 sql=‹ delete from llx_categorie_contact where fk_categorie not in (select rowid from llx_categorie where type = 4); ›
Request 100 sql=‹ delete from llx_categorie_project where fk_categorie not in (select rowid from llx_categorie where type = 6); ›
Request 101 sql=‹ delete from llx_ecm_files where src_object_type = ‹ expensereport › and src_object_id NOT IN (select rowid from llx_expensereport); ›
Request 102 sql=‹ delete from llx_ecm_files where (src_object_type = ‹ contrat › OR src_object_type = ‹ contract ›) and src_object_id NOT IN (select rowid from llx_contrat); ›
Request 103 sql=‹ delete from llx_deliverydet where fk_delivery not in (select fk_target from llx_element_element where targettype = ‹ delivery ›) AND fk_delivery not in (select fk_source from llx_element_element where sourcetype = ‹ delivery ›); ›
Request 104 sql=‹ delete from llx_delivery where rowid not in (select fk_target from llx_element_element where targettype = ‹ delivery ›) AND rowid not in (select fk_source from llx_element_element where sourcetype = ‹ delivery ›); ›
Request 105 sql=‹ delete from llx_element_element where targettype=‹ shipping › and fk_target not in (select rowid from llx_expedition); ›
Request 106 sql=‹ delete from llx_element_element where targettype=‹ propal › and fk_target not in (select rowid from llx_propal); ›
Request 107 sql=‹ delete from llx_element_element where targettype=‹ facture › and fk_target not in (select rowid from llx_facture); ›
Request 108 sql=‹ delete from llx_element_element where targettype=‹ commande › and fk_target not in (select rowid from llx_commande); ›
Request 109 sql=‹ delete from llx_element_element where sourcetype=‹ shipping › and fk_source not in (select rowid from llx_expedition); ›
Request 110 sql=‹ delete from llx_element_element where sourcetype=‹ propal › and fk_source not in (select rowid from llx_propal); ›
Request 111 sql=‹ delete from llx_element_element where sourcetype=‹ facture › and fk_source not in (select rowid from llx_facture); ›
Request 112 sql=‹ delete from llx_element_element where sourcetype=‹ commande › and fk_source not in (select rowid from llx_commande); ›
Request 113 sql=‹ DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm); ›
Request 114 sql=‹ DELETE from llx_bank_url where type = ‹ payment › and url_id not in (select rowid from llx_paiement); ›
Request 115 sql=‹ DELETE from llx_bank_url where type = ‹ payment_supplier › and url_id not in (select rowid from llx_paiementfourn); ›
Request 116 sql=‹ DELETE from llx_bank_url where type = ‹ company › and url_id not in (select rowid from llx_societe); ›
Request 117 sql=‹ DROP table tmp_user; ›
Request 118 sql=‹ CREATE TABLE tmp_user as (select * from llx_user); ›
Request 119 sql=‹ UPDATE llx_user SET fk_user = NULL where fk_user NOT IN (select rowid from tmp_user); ›
Request 120 sql=‹ UPDATE llx_product SET canvas = NULL where canvas = ‹ default@product ›; ›
Request 121 sql=‹ UPDATE llx_product SET canvas = NULL where canvas = ‹ service@product ›; ›
Request 122 sql=‹ DELETE FROM llx_boxes where box_id NOT IN (SELECT rowid FROM llx_boxes_def); ›
Request 123 sql=‹ update llx_document_model set nom = ‹ typhon › where (nom = ‹  › OR nom is null) and type = ‹ delivery ›; ›
Request 124 sql=‹ DELETE FROM llx_document_model WHERE nom =‹ elevement › AND type=‹ delivery ›; ›
Request 125 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 1, ‹ AC_TEL ›, ‹ system ›, ‹ Phone call › ,NULL, 2); ›
Request 126 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 2, ‹ AC_FAX ›, ‹ system ›, ‹ Send Fax › ,NULL, 3); ›
Request 127 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 3, ‹ AC_PROP ›, ‹ systemauto ›, ‹ Send commercial proposal by email › ,‹ propal ›, 10); ›
Request 128 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 4, ‹ AC_EMAIL ›, ‹ system ›, ‹ Send Email › ,NULL, 4); ›
Request 129 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 5, ‹ AC_RDV ›, ‹ system ›, ‹ Rendez-vous › ,NULL, 1); ›
Request 130 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 8, ‹ AC_COM ›, ‹ systemauto ›, ‹ Send customer order by email › ,‹ order ›, 8); ›
Request 131 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 9, ‹ AC_FAC ›, ‹ systemauto ›, ‹ Send customer invoice by email › ,‹ invoice ›, 6); ›
Request 132 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 10, ‹ AC_SHIP ›, ‹ systemauto ›, ‹ Send shipping by email › ,‹ shipping ›, 11); ›
Request 133 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 30, ‹ AC_SUP_ORD ›, ‹ systemauto ›, ‹ Send supplier order by email › ,‹ order_supplier ›, 9); ›
Request 134 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values (31, ‹ AC_SUP_INV ›, ‹ systemauto ›, ‹ Send supplier invoice by email › ,‹ invoice_supplier ›, 7); ›
Request 135 sql=‹ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 50, ‹ AC_OTH ›, ‹ system ›, ‹ Other › ,NULL, 5); ›
Request 136 sql=‹ DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid; ›
Request 137 sql=‹ DELETE from llx_menu where module = ‹ margin › and url = ‹ /margin/index.php › and not exists (select * from llx_const where name = ‹ MAIN_MODULE_MARGIN › or name = ‹ MAIN_MODULE_MARGINS ›); ›
Request 138 sql=‹ DELETE from llx_menu where module = ‹ margins › and url = ‹ /margin/index.php › and not exists (select * from llx_const where name = ‹ MAIN_MODULE_MARGIN › or name = ‹ MAIN_MODULE_MARGINS ›); ›
Request 139 sql=‹ ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur; ›
Request 140 sql=‹ ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur; ›
Request 141 sql=‹ update llx_opensurvey_sondage set format = ‹ D › where format = ‹ D+ ›; ›
Request 142 sql=‹ update llx_opensurvey_sondage set format = ‹ A › where format = ‹ A+ ›; ›
Request 143 sql=‹ update llx_opensurvey_sondage set tms = now(); ›
Request 144 sql=‹ update llx_product set barcode = null where barcode in ( ›‹ , ‹ -1 ›, ‹ 0 ›); ›
Request 145 sql=‹ update llx_societe set barcode = null where barcode in ( ›‹ , ‹ -1 ›, ‹ 0 ›); ›
Request 146 sql=‹ drop table tmp_links_double; ›
Request 147 sql=‹ create table tmp_links_double as (select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2); ›
Request 148 sql=‹ delete from llx_links where (rowid, label) in (select max_rowid, label from tmp_links_double); ›
Request 149 sql=‹ drop table tmp_links_double; ›
Request 150 sql=‹ drop table tmp_product_double; ›
Request 151 sql=‹ create table tmp_product_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2); ›
Request 152 sql=‹ update llx_product set barcode = null where (rowid, barcode) in (select max_rowid, barcode from tmp_product_double); ›
Request 153 sql=‹ drop table tmp_product_double; ›
Request 154 sql=‹ drop table tmp_societe_double; ›
Request 155 sql=‹ create table tmp_societe_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2); ›
Request 156 sql=‹ update llx_societe set barcode = null where (rowid, barcode) in (select max_rowid, barcode from tmp_societe_double); ›
Request 157 sql=‹ drop table tmp_societe_double; ›
Request 158 sql=‹ drop table tmp_accounting_account_double; ›
Request 159 sql=‹ create table tmp_accounting_account_double as (select account_number, fk_pcg_version, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_accounting_account where label is not null group by account_number, fk_pcg_version having count(rowid) >= 2); ›
Request 160 sql=‹ delete from llx_accounting_account where (rowid) in (select max_rowid from tmp_accounting_account_double); ›
Request 161 sql=‹ drop table tmp_accounting_account_double; ›
Request 162 sql=‹ UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid; ›
Request 163 sql=‹ UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0); ›
Request 164 sql=‹ UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author > 0 and (fk_user_action is null or fk_user_action = 0); ›
Request 165 sql=‹ UPDATE llx_projet_task_time set task_datehour = task_date where task_datehour IS NULL and task_date IS NOT NULL; ›
Request 166 sql=‹ UPDATE llx_projet set fk_opp_status = NULL where fk_opp_status = -1; ›
Request 167 sql=‹ UPDATE llx_projet set fk_opp_status = (SELECT rowid FROM llx_c_lead_status WHERE code=‹ PROSP ›) where fk_opp_status IS NULL and opp_amount > 0; ›
Request 168 sql=‹ UPDATE llx_c_lead_status set code = ‹ WON › where code = ‹ WIN ›; ›
Request 169 sql=‹ update llx_propaldet set product_type = 1 where product_type = 2; ›
Request 170 sql=‹ update llx_commandedet set product_type = 1 where product_type = 2; ›
Request 171 sql=‹ update llx_facturedet set product_type = 1 where product_type = 2; ›
Request 172 sql=‹ update llx_propal set fk_statut = 1 where fk_statut = -1; ›
Request 173 sql=‹ delete from llx_commande_fournisseur_dispatch where fk_commandefourndet = 0 or fk_commandefourndet IS NULL; ›
Request 174 sql=‹ delete from llx_menu where menu_handler = ‹ smartphone ›; ›
Request 175 sql=‹ update llx_expedition set date_valid = date_creation where fk_statut = 1 and date_valid IS NULL; ›
Request 176 sql=‹ update llx_expedition set date_valid = NOW() where fk_statut = 1 and date_valid IS NULL; ›
Request 177 sql=‹ update llx_projet_task as pt set pt.duration_effective = (select SUM(ptt.task_duration) as y from llx_projet_task_time as ptt where ptt.fk_task = pt.rowid) where pt.duration_effective <> (select SUM(ptt.task_duration) as y from llx_projet_task_time as ptt where ptt.fk_task = pt.rowid); ›
Request 178 sql=‹ drop table tmp_c_shipment_mode; ›
Request 179 sql=‹ create table tmp_c_shipment_mode as (select code, tracking from llx_c_shipment_mode); ›
Request 180 sql=‹ DELETE FROM llx_c_shipment_mode where code IN (select code from tmp_c_shipment_mode WHERE tracking is NULL OR tracking = ‹  ›) AND code IN (select code from tmp_c_shipment_mode WHERE tracking is NOT NULL AND tracking != ‹  ›) AND (tracking IS NULL OR tracking = ‹  ›); ›
Request 181 sql=‹ drop table tmp_c_shipment_mode; ›
Request 182 sql=‹ drop table tmp_bank_url_expense_user; ›
Request 183 sql=‹ create table tmp_bank_url_expense_user (select e.fk_user_author, bu2.fk_bank from llx_expensereport as e, llx_bank_url as bu2 where bu2.url_id = e.rowid and bu2.type = ‹ payment_expensereport ›); ›
Request 184 sql=‹ update llx_bank_url as bu set url_id = (select e.fk_user_author from tmp_bank_url_expense_user as e where e.fk_bank = bu.fk_bank) where (bu.url_id = 0 OR bu.url_id IS NULL) and bu.type =‹ user ›; ›
Request 185 sql=‹ drop table tmp_bank_url_expense_user; ›
Request 186 sql=‹ DROP TABLE tmp_llx_accouting_account; ›
Request 187 sql=‹ CREATE TABLE tmp_llx_accouting_account AS SELECT MIN(rowid) as MINID, account_number, entity, fk_pcg_version, count() AS NB FROM llx_accounting_account group BY account_number, entity, fk_pcg_version HAVING count() >= 2 order by account_number, entity, fk_pcg_version; ›
Request 188 sql=‹ DELETE from llx_accounting_account where rowid in (select minid from tmp_llx_accouting_account where minid NOT IN (SELECT fk_code_ventilation from llx_facturedet) AND minid NOT IN (SELECT fk_code_ventilation from llx_facture_fourn_det) AND minid NOT IN (SELECT fk_code_ventilation from llx_expensereport_det)); ›
Request 189 sql=‹ ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account; ›
Request 190 sql=‹ ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version); ›
Erreur DB_ERROR_1072: ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
> Key column ‹ entity › doesn’t exist in table
Request 191 sql=‹ update llx_projet_task_time set task_datehour = task_date where task_datehour < task_date or task_datehour > DATE_ADD(task_date, interval 1 day); ›
Request 192 sql=‹ UPDATE llx_chargesociales SET date_creation = tms WHERE date_creation IS NULL; ›
Request 193 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 194 sql=‹ update llx_accounting_account set tms = datec where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 195 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 196 sql=‹ update llx_accounting_account set tms = datec where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 197 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 198 sql=‹ update llx_expensereport set date_debut = date_create where DATE(STR_TO_DATE(date_debut, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 199 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 200 sql=‹ update llx_expensereport set date_debut = date_create where DATE(STR_TO_DATE(date_debut, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 201 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 202 sql=‹ update llx_expensereport set date_fin = date_debut where DATE(STR_TO_DATE(date_fin, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 203 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 204 sql=‹ update llx_expensereport set date_fin = date_debut where DATE(STR_TO_DATE(date_fin, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 205 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 206 sql=‹ update llx_expensereport set date_valid = date_fin where DATE(STR_TO_DATE(date_valid, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 207 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 208 sql=‹ update llx_expensereport set date_valid = date_fin where DATE(STR_TO_DATE(date_valid, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 209 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 210 sql=‹ update llx_expensereport_det as ed set date = (select date_debut from llx_expensereport as e where ed.fk_expensereport = e.rowid) where DATE(STR_TO_DATE(date, ‹ %Y-%m-%d ›)) < ‹ 1000-00-00 ›; ›
Request 211 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 212 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 213 sql=‹ update llx_bank set tms = datec where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 214 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 215 sql=‹ update llx_bank set tms = datec where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 216 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 217 sql=‹ update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 218 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 219 sql=‹ update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 220 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 221 sql=‹ update llx_facture_fourn set date_lim_reglement = null where DATE(STR_TO_DATE(date_lim_reglement, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 222 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 223 sql=‹ update llx_facture_fourn set date_lim_reglement = null where DATE(STR_TO_DATE(date_lim_reglement, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 224 sql=‹ SET sql_mode = ‹ ALLOW_INVALID_DATES ›; ›
Request 225 sql=‹ update llx_inventory set date_cre = null where DATE(STR_TO_DATE(date_cre, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 226 sql=‹ SET sql_mode = ‹ NO_ZERO_DATE ›; ›
Request 227 sql=‹ update llx_inventory set date_cre = null where DATE(STR_TO_DATE(date_cre, ‹ %Y-%m-%d ›)) IS NULL; ›
Request 228 sql=‹ update llx_facturedet set product_type = 0 where product_type = 1 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 0); ›
Request 229 sql=‹ update llx_facturedet set product_type = 1 where product_type = 0 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 1); ›
Request 230 sql=‹ update llx_facture_fourn_det set product_type = 0 where product_type = 1 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 0); ›
Request 231 sql=‹ update llx_facture_fourn_det set product_type = 1 where product_type = 0 AND fk_product > 0 AND fk_product IN (SELECT rowid FROM llx_product WHERE fk_product_type = 1); ›
Request 232 sql=‹ DELETE FROM llx_mrp_production where qty = 0; ›
Request 233 sql=‹ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS NULL; ›
Request 234 sql=‹ UPDATE llx_facturedet SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and subprice > 0) OR (multicurrency_subprice > 0 and subprice < 0)); ›
Request 235 sql=‹ UPDATE llx_facturedet SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0)); ›
Request 236 sql=‹ UPDATE llx_facturedet SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0)); ›
Request 237 sql=‹ UPDATE llx_facturedet SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0)); ›
Request 238 sql=‹ UPDATE llx_facture SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0)); ›
Request 239 sql=‹ UPDATE llx_facture SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0)); ›
Request 240 sql=‹ UPDATE llx_facture SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0)); ›
Request 241 sql=‹ UPDATE llx_facture_fourn_det SET multicurrency_subprice = -multicurrency_subprice WHERE ((multicurrency_subprice < 0 and pu_ht > 0) OR (multicurrency_subprice > 0 and pu_ht < 0)); ›
Request 242 sql=‹ UPDATE llx_facture_fourn_det SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0)); ›
Request 243 sql=‹ UPDATE llx_facture_fourn_det SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and tva > 0) OR (multicurrency_total_tva > 0 and tva < 0)); ›
Request 244 sql=‹ UPDATE llx_facture_fourn_det SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0)); ›
Request 245 sql=‹ UPDATE llx_facture_fourn SET multicurrency_total_ht = -multicurrency_total_ht WHERE ((multicurrency_total_ht < 0 and total_ht > 0) OR (multicurrency_total_ht > 0 and total_ht < 0)); ›
Request 246 sql=‹ UPDATE llx_facture_fourn SET multicurrency_total_tva = -multicurrency_total_tva WHERE ((multicurrency_total_tva < 0 and total_tva > 0) OR (multicurrency_total_tva > 0 and total_tva < 0)); ›
Request 247 sql=‹ UPDATE llx_facture_fourn SET multicurrency_total_ttc = -multicurrency_total_ttc WHERE ((multicurrency_total_ttc < 0 and total_ttc > 0) OR (multicurrency_total_ttc > 0 and total_ttc < 0)); ›
Request 248 sql=‹ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL; ›
Request 249 sql=‹ DELETE FROM llx_rights_def WHERE module = ‹ hrm › AND perms = ‹ employee ›; ›

Salut Ksar,

Je ne sais aps comment ajouter un champs supplémentaire calculé.
Tu peux me dire où se trouve cet endroit que je vérifie si mon plugin de relance de facture n’a pas ajouté quelque chose ?

Hello,

Ajoute à la main le champs entity a llx_accounting_account:

ALTER TABLE llx_accounting_account ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid ;

Et relance le repair pour voir ce que ça donne.

A plus

Après avoir saisi le champs je n’ai plus d’erreur quand je répare la base de données :

Exécution du script	OK - Afficher/masquer les détails

*** Check fields into extra table structure match table of definition. If not add column into table
Check availability of extra field for llx_societe_extrafields
 
Check availability of extra field for llx_adherent_extrafields
 
Check availability of extra field for llx_product_extrafields
 
Check availability of extra field for llx_socpeople_extrafields
 
Check availability of extra field for llx_propal_extrafields
 
Check availability of extra field for llx_commande_extrafields
 
Check availability of extra field for llx_facture_extrafields
 
Check availability of extra field for llx_supplier_proposal_extrafields
 
Check availability of extra field for llx_commande_fournisseur_extrafields
 
Check availability of extra field for llx_facture_fourn_extrafields
 
Check availability of extra field for llx_actioncomm_extrafields
 
Check availability of extra field for llx_bom_bom_extrafields
 
Check availability of extra field for llx_mrp_mo_extrafields
 
Check availability of extra field for llx_adherent_type_extrafields
 
Check availability of extra field for llx_user_extrafields
 
Check availability of extra field for llx_projet_extrafields
 
Check availability of extra field for llx_projet_task_extrafields
 

*** Clean constant record of modules not enabled

*** Clean definition of boxes of modules not enabled

Cependant j’ai toujours mon bug au niveau de mon dernier paiement…

Personne ne sait ou a de solutions ?

Cette fonctionnalité est très importante pour moi car cela me permet de faire la totalité du CA encaissé par mois. Or, sans cette fonctionnalité je ne peux plus voir mon chiffre d’affaire encaissé puisque la date du dernier paiement n’est enregistrée dans la base de donnée.

Bonjour,

Tu poses une question sur V16 qui est une version de développement.
Donc il ne faut pas s’étonner que peu de personnes te répondent.

Je suis d’accord gaecCAB, sauf que ce problème date de la version 15.0.2, exactement le même message que sur la 16, donc j’en déduis que le problème est le même et donc la solution aussi.

Je pense qu’il y a qqch qui ne joue pas dans tes fichiers. Tu devrais reinstaller ton dossier dolibarr.
Avec un git clone idealement.

bon, et bien… ça ne fonctionne toujours pas.

Je ne sais pas quoi faire pour récupérer un dolibar fonctionnel, je n’ai absolument pas envie de tout recommencer au niveau de la saisie client etc …

La dernière sauvegarde que j’ai c’est quand j’étais en version 12. Comment vous feriez vous ?

EDIT : Finalement je suis allé dans le module « factures et avoirs » de dolibarr, puis dans l’onglet Attribut supplémentaire et j’ai supprimé la fonction dernier paiement et tout est rentré dans l’ordre …

1 « J'aime »

Bonjour,

C’est un module en particulier qui rajoute cette fonctionnalité ? Ce n’est pas natif.

Si oui, peut être remonter à son auteur.

Excellente journée

1 « J'aime »