Cannot validate draft invoice

Hi,
I’ve just upgrade Dolibarr from 2.9.0 to 3.2.0. I made the chain-upgrade (first 2.9.0 to 3.0.1, then 3.0.1 to 3.1.1 and finally 3.1.1 to 3.2.0).

After each upgrade step I verify that there were no errors and made a simple application walkthrough checking for errors. Everything seemed good.

Then I start using the new version for real, created a new invoice, feel the data and when I wanted to validate it, there was no effect on the operation. After clicking “Validate” the screen returns with no errors hiding the buttons as if the invoice were validated successful, but it wasn’t. If I refresh the screen or navigate to the invoice again, it looks like a draft.

I enabled the syslog module to see if there’s any error that could be helpful, but I didn’t found anything (below are the lines written during the operation). The only thing I could notice is that there is no UPDATE statement, so there’s no way the invoice to be really changed to the validated state.

I did the same operation in a testing environment I have in another server and could not reproduce the error. The production instance and testing instance are not identical, but I could not identify any difference that could be affecting the production environment.

Could please anybody give me some light here?

Thanks a lot!!!

====== BEGIN DOLIBARR.LOG ======
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd nologin facture This is an already logged session. _SESSION[‘dol_login’]=user
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd nologin facture User::fetch sql=SELECT u.rowid, u.name, u.firstname, u.email, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note, u.pass, u.pass_crypted, u.pass_temp, u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.ref_int, u.ref_ext FROM llx_user as u WHERE u.entity IN (0,1) AND u.login = ‘user
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture User::getrights sql=SELECT r.module, r.perms, r.subperms FROM llx_user_rights as ur, llx_rights_def as r WHERE r.id = ur.fk_id AND r.entity in (0,1) AND ur.fk_user= 1 AND r.perms IS NOT NULL
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture User::getrights sql=SELECT r.module, r.perms, r.subperms FROM llx_usergroup_rights as gr, llx_usergroup_user as gu, llx_rights_def as r WHERE r.id = gr.fk_id AND gr.fk_usergroup = gu.fk_usergroup AND gu.fk_user = 1 AND r.perms IS NOT NULL AND r.entity = 1 AND gu.entity IN (0,1)
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture — Access to /compta/facture.php
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture Menubase::menuLeftCharger sql=SELECT m.rowid, m.type, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu FROM llx_menu as m WHERE m.entity = 1 AND m.menu_handler IN (‘eldy’,‘all’) AND m.usertype IN (0,2) ORDER BY m.position, m.rowid
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture Menubase::menuLeftCharger sql=SELECT m.rowid, m.type, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu FROM llx_menu as m WHERE m.entity = 1 AND m.menu_handler IN (‘eldy’,‘all’) AND m.usertype IN (0,2) ORDER BY m.position, m.rowid
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture Societe::fetch SELECT s.rowid, s.nom as name, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as datec, s.prefix_comm, s.status, s.price_level, s.tms as date_update, s.tel, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo, s.import_key, s.canvas, fj.libelle as forme_juridique, e.libelle as effectif, p.code as country_code, p.libelle as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_pays as p ON s.fk_pays = p.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id WHERE s.rowid = 5
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture Societe::fetch SELECT s.rowid, s.nom as name, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as datec, s.prefix_comm, s.status, s.price_level, s.tms as date_update, s.tel, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo, s.import_key, s.canvas, fj.libelle as forme_juridique, e.libelle as effectif, p.code as country_code, p.libelle as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_pays as p ON s.fk_pays = p.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id WHERE s.rowid = 5
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::getSommePaiement sql=SELECT sum(amount) as amount FROM llx_paiement_facture WHERE fk_facture = 28
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getSumCreditNotesUsed sql=SELECT sum(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 28 AND f.type = 2
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getSumDepositsUsed sql=SELECT sum(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 28 AND f.type = 3
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getAvailableDiscounts sql=SELECT SUM(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc WHERE (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL) AND rc.fk_soc = 5 AND (fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description=’(DEPOSIT)’))
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getAvailableDiscounts sql=SELECT SUM(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc WHERE (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL) AND rc.fk_soc = 5 AND (fk_facture_source IS NOT NULL AND description <> ‘(DEPOSIT)’)
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture User::fetch sql=SELECT u.rowid, u.name, u.firstname, u.email, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note, u.pass, u.pass_crypted, u.pass_temp, u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.ref_int, u.ref_ext FROM llx_user as u WHERE u.entity IN (0,1) AND u.rowid = 1
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture functions2::get_next_value sql=SELECT MAX(SUBSTRING(facnumber, 1, 8)) as val FROM llx_facture WHERE facnumber LIKE ‘________’ AND facnumber NOT LIKE ‘%PROV%’ AND entity IN (1)
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture functions2::get_next_value return 00000127
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::fetch sql=SELECT sr.rowid, sr.fk_soc, sr.fk_user, sr.amount_ht, sr.amount_tva, sr.amount_ttc, sr.tva_tx, sr.fk_facture_line, sr.fk_facture, sr.fk_facture_source, sr.description, sr.datec, f.facnumber as ref_facture_source FROM llx_societe_remise_except as sr LEFT JOIN llx_facture as f ON sr.fk_facture_source = f.rowid WHERE sr.fk_facture_source=28
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Form::load_cache_conditions_paiements sql=SELECT rowid, code, libelle FROM llx_c_payment_term WHERE active=1 ORDER BY sortorder
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Form::load_cache_types_paiements sql=SELECT id, code, libelle, type FROM llx_c_paiement WHERE active > 0 ORDER BY id
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT libelle as label FROM llx_c_paiement WHERE code = ‘DEP’
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT libelle as label FROM llx_c_paiement WHERE code = ‘DEB’
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT label as label FROM llx_c_currencies WHERE code_iso = ‘ARP’
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture Project::fetch sql=SELECT rowid, ref, title, description, public, datec, tms, dateo, datee, fk_soc, fk_user_creat, fk_statut, note_private, note_public FROM llx_projet WHERE rowid=2
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture files.lib.php::dol_dir_list path=/usr/share/dolibarr/documents/facture/(PROV28) types=files recursive=0 filter= excludefilter=.meta$
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture Facture::fetchObjectLink sql=SELECT fk_source, sourcetype, fk_target, targettype FROM llx_element_element WHERE (fk_source = ‘28’ AND sourcetype = ‘facture’) OR (fk_target = ‘28’ AND targettype = ‘facture’)
2012-08-01 17:16:08 INFO aaa.bbb.ccc.ddd *user* facture ActionComm::getActions sql=SELECT a.id FROM llx_actioncomm as a WHERE a.entity = 1 AND a.fk_element = 28 AND a.elementtype = ‘invoice’
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture — End access to /compta/facture.php
====== END DOLIBARR.LOG ======

Try to disable and enable the invoice module.
Also, check into invoice module setup that every option is set.

Hi Eldy,
thanks for your answer.

I disabled and reenabled the invoice module without luck.

I also checked the module configuration. Not every option is enabled because I wanted it so, but I found that the mask option for invoice numbers (which I was using with version 2.9.0) shows a red legend of “Module not configured”. I think these log’s lines are showing that option doing something:

2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture functions2::get_next_value sql=SELECT MAX(SUBSTRING(facnumber, 1, 8)) as val FROM llx_facture WHERE facnumber LIKE ‘________’ AND facnumber NOT LIKE ‘%PROV%’ AND entity IN (1)
2012-08-01 17:16:08 DEBUG aaa.bbb.ccc.ddd *user* facture functions2::get_next_value return 00000127

Here is the screenshot of part of the invoice module configuration where the message is shown:
[img/]

Is there something I have to reconfigure?

Thanks again for your help!

Short update:
I tried using the “terre” (default) numbering model with no luck. Also found that the invoice cannot be cloned neither deleted. Should I upload that two operation’s logs too?

Another short update:
The “Module not configured” message disappeared when I fill the credit note mask field, an option that was blank because it didn’t exist on 2.9.0, I think.

Anyway, the operations on invoices still don’t work.

Can you try to call the page yourdolibarr/install/repair.php
And try again.

It will be easier to find pb with setup to module “terre”. After switching to terre, can you provide log when you validate an invoice ?

Hi Eldy,
thanks again for your help.

I tried calling install/repair.php. It executed several SQL queries with no errors, but when I tried validating the invoice I got the same result.

Here is the log output for the validate operation after switching to “terre”

====== BEGIN DELOBARR.LOG ======
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd nologin facture This is an already logged session. SESSION[‘dol_login’]=user
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd nologin facture User::fetch sql=SELECT u.rowid, u.name, u.firstname, u.email, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note, u.pass, u.pass_crypted, u.pass_temp, u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.ref_int, u.ref_ext FROM llx_user as u WHERE u.entity IN (0,1) AND u.login = ‘user
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture User::getrights sql=SELECT r.module, r.perms, r.subperms FROM llx_user_rights as ur, llx_rights_def as r WHERE r.id = ur.fk_id AND r.entity in (0,1) AND ur.fk_user= 1 AND r.perms IS NOT NULL
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture User::getrights sql=SELECT r.module, r.perms, r.subperms FROM llx_usergroup_rights as gr, llx_usergroup_user as gu, llx_rights_def as r WHERE r.id = gr.fk_id AND gr.fk_usergroup = gu.fk_usergroup AND gu.fk_user = 1 AND r.perms IS NOT NULL AND r.entity = 1 AND gu.entity IN (0,1)
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture — Access to /compta/facture.php
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture Menubase::menuLeftCharger sql=SELECT m.rowid, m.type, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu FROM llx_menu as m WHERE m.entity = 1 AND m.menu_handler IN (‘eldy’,‘all’) AND m.usertype IN (0,2) ORDER BY m.position, m.rowid
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture Menubase::menuLeftCharger sql=SELECT m.rowid, m.type, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu FROM llx_menu as m WHERE m.entity = 1 AND m.menu_handler IN (‘eldy’,‘all’) AND m.usertype IN (0,2) ORDER BY m.position, m.rowid
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch sql=SELECT f.rowid,f.facnumber,f.ref_client,f.ref_ext,f.ref_int,f.type,f.fk_soc,f.amount,f.tva, f.localtax1, f.localtax2, f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise, f.datef as df, f.date_lim_reglement as dlr, f.datec as datec, f.date_valid as datev, f.tms as datem, f.note as note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.fk_facture_source, f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams, p.code as mode_reglement_code, p.libelle as mode_reglement_libelle, c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc FROM llx_facture as f LEFT JOIN llx_c_payment_term as c ON f.fk_cond_reglement = c.rowid LEFT JOIN llx_c_paiement as p ON f.fk_mode_reglement = p.id WHERE f.entity = 1 AND f.rowid=28
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::fetch_lines sql=SELECT l.rowid, l.fk_product, l.fk_parent_line, l.description, l.product_type, l.price, l.qty, l.tva_tx, l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice, l.rang, l.special_code, l.date_start as date_start, l.date_end as date_end, l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc FROM llx_facturedet as l LEFT JOIN llx_product as p ON l.fk_product = p.rowid WHERE l.fk_facture = 28 ORDER BY l.rang
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture Societe::fetch SELECT s.rowid, s.nom as name, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as datec, s.prefix_comm, s.status, s.price_level, s.tms as date_update, s.tel, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo, s.import_key, s.canvas, fj.libelle as forme_juridique, e.libelle as effectif, p.code as country_code, p.libelle as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_pays as p ON s.fk_pays = p.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id WHERE s.rowid = 5
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture Societe::fetch SELECT s.rowid, s.nom as name, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as datec, s.prefix_comm, s.status, s.price_level, s.tms as date_update, s.tel, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement, s.fk_pays as country_id, s.fk_stcomm, s.remise_client, s.mode_reglement, s.cond_reglement, s.tva_assuj, s.localtax1_assuj, s.localtax2_assuj, s.fk_prospectlevel, s.default_lang, s.logo, s.import_key, s.canvas, fj.libelle as forme_juridique, e.libelle as effectif, p.code as country_code, p.libelle as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_pays as p ON s.fk_pays = p.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id WHERE s.rowid = 5
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Facture::getSommePaiement sql=SELECT sum(amount) as amount FROM llx_paiement_facture WHERE fk_facture = 28
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getSumCreditNotesUsed sql=SELECT sum(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 28 AND f.type = 2
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getSumDepositsUsed sql=SELECT sum(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 28 AND f.type = 3
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getAvailableDiscounts sql=SELECT SUM(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc WHERE (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL) AND rc.fk_soc = 5 AND (fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description=’(DEPOSIT)’))
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::getAvailableDiscounts sql=SELECT SUM(rc.amount_ttc) as amount FROM llx_societe_remise_except as rc WHERE (rc.fk_facture IS NULL AND rc.fk_facture_line IS NULL) AND rc.fk_soc = 5 AND (fk_facture_source IS NOT NULL AND description <> ‘(DEPOSIT)’)
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture User::fetch sql=SELECT u.rowid, u.name, u.firstname, u.email, u.signature, u.office_phone, u.office_fax, u.user_mobile, u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note, u.pass, u.pass_crypted, u.pass_temp, u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid, u.statut, u.lang, u.entity, u.datec as datec, u.tms as datem, u.datelastlogin as datel, u.datepreviouslogin as datep, u.photo as photo, u.openid as openid, u.ref_int, u.ref_ext FROM llx_user as u WHERE u.entity IN (0,1) AND u.rowid = 1
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture mod_facture_terre::getNextValue sql=SELECT MAX(SUBSTRING(facnumber FROM 8)) as max FROM llx_facture WHERE facnumber LIKE 'FA
___-%’ AND entity = 1
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture mod_facture_terre::getNextValue return FA1208-0001
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture DiscountAbsolute::fetch sql=SELECT sr.rowid, sr.fk_soc, sr.fk_user, sr.amount_ht, sr.amount_tva, sr.amount_ttc, sr.tva_tx, sr.fk_facture_line, sr.fk_facture, sr.fk_facture_source, sr.description, sr.datec, f.facnumber as ref_facture_source FROM llx_societe_remise_except as sr LEFT JOIN llx_facture as f ON sr.fk_facture_source = f.rowid WHERE sr.fk_facture_source=28
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Form::load_cache_conditions_paiements sql=SELECT rowid, code, libelle FROM llx_c_payment_term WHERE active=1 ORDER BY sortorder
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Form::load_cache_types_paiements sql=SELECT id, code, libelle, type FROM llx_c_paiement WHERE active > 0 ORDER BY id
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT libelle as label FROM llx_c_paiement WHERE code = ‘DEP’
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT libelle as label FROM llx_c_paiement WHERE code = ‘DEB’
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Translate::getLabelFromKey sql=SELECT label as label FROM llx_c_currencies WHERE code_iso = ‘ARP’
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture Project::fetch sql=SELECT rowid, ref, title, description, public, datec, tms, dateo, datee, fk_soc, fk_user_creat, fk_statut, note_private, note_public FROM llx_projet WHERE rowid=2
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture files.lib.php::dol_dir_list path=/usr/share/dolibarr-mch/documents/doctemplates/invoices types=files recursive=0 filter=.odt excludefilter=
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture files.lib.php::dol_dir_list path=/usr/share/dolibarr-mch/documents/facture/(PROV28) types=files recursive=0 filter= excludefilter=.meta$
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture Facture::fetchObjectLink sql=SELECT fk_source, sourcetype, fk_target, targettype FROM llx_element_element WHERE (fk_source = ‘28’ AND sourcetype = ‘facture’) OR (fk_target = ‘28’ AND targettype = ‘facture’)
2012-08-03 19:14:39 INFO aaa.bbb.ccc.ddd *user* facture ActionComm::getActions sql=SELECT a.id FROM llx_actioncomm as a WHERE a.entity = 1 AND a.fk_element = 28 AND a.elementtype = ‘invoice’
2012-08-03 19:14:39 DEBUG aaa.bbb.ccc.ddd *user* facture — End access to /compta/facture.php
====== END DOLIBARR.LOG ======

Thanks!

Can you confirm you added at least on line into invoice ?
Do you agree to send a mysqldump of your database to me (eldy@destailleur.fr) ? I will need it to reproduce pb.

Hi Eldy,
yes, I did add one line to the invoice. After your advice, I added a second line for testing, having the same result.

In fact, I created another invoice to do some other tests and realized that I cannot do anything with invoices. That means, once I create a draft invoice, I cannot delete it, copy it or validate it. The three operations end with the same result: the screen refreshes, no error is presented, buttons are hidden, but no data is modified. If I refresh the screen again, everything goes as it was before the operation (and looking at the logs, no update/insert/delete statement is sent to the database).

I’m sending the dump to your mail.

Thanks again!
M.

I had no problem with your dump file. I succeed in validating invoice at first try (using your admin user, the login that end with i).

-Can you edit other things but invoice ?
-May be you have a problem into your mysql database. Can you run the command “mysqlcheck.exe -u root --auto-repair=true --all-databases” to check it ?
-Can you try to upgrade to 3.2.1 (not yet officially released but already package and available at http://www.dolibarr.org/files/stable/standard/) ?

Hi Eldy,
thank for your soon answer. I’m responding to your questions:

- I was trying operations with that user you mentioned.
- Yes, I can edit other things. For example, I can add transactions manually into bank accounts. I can create invoices too and add lines to them, but not validate, delete or clone. An observation I made: there’s no service/product combo list at “free zone line add”, so the line added to the invoice has no type. It’s a feature (hiding unnecessary selection) or is another symptom of the same problem?
- mysqlcheck finishes ok.

I can upgrade to 3.2.1 if you think it could resolve the issue, but keep in mind that this is a production environment; crash and corruption bugs are not acceptable. Do you think 3.2.1 is safe enough?

I was thinking on downgrading to 2.9.0 again and start over testing invoice validation after each version (3.0.1, 3.1.0 and then 3.2.0 again). I think I can find the point where the things go wrong more precisely. The downside is that I don’t know if the database schema is backwards compatible or not, I mean, if I can use 3.2.0 upgraded schema with 2.9.0 without doing harm.

What is your recommendation?

Thank!
M.

I should mention I’m having the exact same problem. Checked all the directory perms and they look ok. Also I had used the Ubuntu / Debian dpkg dolibarr_3.2.0+nmu1_all.deb to install.

I went ahead and upgraded to the 3.3.0 alpha and everything works perfectly so far, and looks pretty sweet. I’m probably going to go ahead and use this in production and keep the fingers crossed. But I do know for sure that the 3.2.0 stable was not working, as the previous poster mentioned, not being able to validate or delete invoices, or the sample customer I created to test with.

Additionally, this may be of significance. I recall when I was having trouble with 3.2.0 the PHP link under System Information would not display a page. After upgrade to 3.3.0 it works as expected.

Gary

Hi Gary,
I find your post very usefull!

I see that 3.3.0 is a beta yet. Did you try 3.2.1 as Eldy adviced me to do?

With this new information, I decline to downgrade and give a chance to 3.2.1 or 3.3.0.

By the other side, I’m thinking it may be an issue with the .deb package (I used it too) and hopefully, the issue is not at the gz tarball. Another try could be overriding the htdocs directory structure with the content of the tarball, as in the standard upgrade method.

Regards!
M.

Hi everyone,
after a lot of tries, I resolve the issue by sticking at version 3.1.1.

First I tried overriding 3.2.0 deb package files with tarball. Then I
made the upgrade to 3.2.1 with no success. Then I tried 3.3.0 after Gary’s post, but also no success.

Finally I recover the database backup from the very before moment I start upgrading 2.9.0 and started all the process again using tarballs distributions. Everything was going fine until I reached 3.2.0 again. At that point, the upgrade process succeed but after I logged in into the upgraded Dolibarr the only think I could see was the menu buttons; no logout, no screen content. I tried refreshing with CTRL-F5 and logging in from another machine with the same result.

With this result, I recover the database backup to the point after upgrading 3.1.1 (yes, I made a backup between every upgrade) and recover the 3.1.1 files and now everything seems to work fine.

I tested invoices creation and validation, to make payments, to register some transactions into bank accounts and consolidate them with no errors so far.

Unfortunately, I couldn’t realize which was the problem, therefore I’m sticking at version 3.1.1 until a new release of 3.2.x, which I will test very carefully.

Bye!
M.

Hi M,

Best to stick with what works. : )

I had a database dump from my initial install of 3.2.0 with my products and services, that I imported in to 3.3 during the /dolibar/install process.

I’m trying to remember exactly what I might have done differently. I did reinstall mysql as one of my troubleshooting steps. Its the only db on my server so I was able to get away with that. Tho i’m doubting that really would have solved the issue.

Unfortunately I don’t exactly remember what part of my troubleshooting actually fixed it.

If i can think of it (and possibly recreate) I’ll be sure and post.

Best of luck

Gary

Development versions are meant for development. In development versions like 3.3.x many things can be broken. The reason is the development of new code.

Very true. Tho oddly enough I’m finding the development version more stable than the stable! I haven’t run into any trouble yet (knock on wood)

Nearly the same upgrade resulting to the same problem.
No error on database.

The upgrade to version 3.2.1 fix the problem.

Thank you for this great piece of software.

Hello everybody,

I have a similar problem in Dolibarr 3.2.1 on UBUNTU 10.04 LTS Server. The validation of draft offers, new projects etc does not work. I attached 2 screen shots with the open error terminal of firefox

As it looks like the failure is originating from the JavaScript I switched the JavaScript and AJax function of dolibarr off. After this the validation and all other connected functions are working as expected. For sure you do not have the nice Ajax look and feel.

I installed dolibarr from the .deb file with all the requested dependencies installed. But I am not sure if all dependencies required under 10.04 for 3.2.1 are really defined in the .deb file. e.g. The Gant for the project did not worked direct after installation but came into function after I installed jgraph* So I am not sure which package actually solved the problem.

WBR,

drachenreiter

Dolibarr 3.2.1 deb file use the jquery javascript lib. May be this lib is too old with ubuntu 10.04