Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v17 Payment of some invoices: HTTP ERROR 500 #24383

Closed
syrinx75 opened this issue Mar 29, 2023 · 6 comments
Closed

v17 Payment of some invoices: HTTP ERROR 500 #24383

syrinx75 opened this issue Mar 29, 2023 · 6 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@syrinx75
Copy link

Bug

From the page of the invoice, when we try to add a payment or a refund, we get an error HTTP ERROR 500 on the page:
/compta/paiement.php

They are some invoices with whom the payment/refund work.

Environment Version

17.0.0

Environment OS

Linux on1 5.15.39-4-pve #1 SMP PVE 5.

Environment Web server

Apache/2.4.56 (Debian)

Environment PHP

7.4.33

Environment Database

MySQL or MariaDB 5.5.5-10.5.18-MariaDB

Environment URL(s)

/compta/paiement.php

Expected and actual behavior

No response

Steps to reproduce the behavior

Select an invoice, go to to Payment, add the date and the amount. Save => error.

Attached files

No response

@syrinx75 syrinx75 added the Bug This is a bug (something does not work as expected) label Mar 29, 2023
@emheyarssi
Copy link
Contributor

Could you show us the error 500 coming from the log file.

@syrinx75
Copy link
Author

syrinx75 commented Mar 31, 2023

Here:

2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.address, s.datec as date_creation, s.prefix_comm, s.status, s.fk_warehouse, s.price_level, s.tms as date_modification, s.fk_user_creat, s.fk_user_modif, s.phone, s.fax, s.email, s.socialnetworks, s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, 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.webservices_url, s.webservices_key, s.model_pdf, s.last_main_doc, s.code_compta, s.code_compta_fournisseur, s.accountancy_code_buy, s.accountancy_code_sell, s.code_client, s.code_fournisseur, s.parent, s.barcode, s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.mode_reglement, s.cond_reglement, s.deposit_percent, s.transport_mode, s.fk_account, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.transport_mode_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred, s.fk_shipping_method, s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.order_min_amount, s.supplier_order_min_amount, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, r.rowid as region_id, r.code_region as region_code, st.libelle as stcomm, st.picto as stcomm_picto, te.code as typent_code, i.libelle as label_incoterms, s.remise_client, s.remise_supplier FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.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_regions as r ON d.fk_region = r.code_region LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid WHERE s.entity IN (1) AND s.rowid = 232
2023-03-31 05:52:05 DEBUG x.x.x.x Facture::getSommePaiement
2023-03-31 05:52:05 DEBUG x.x.x.x Facture::getSommePaiement
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT sum(amount) as amount, sum(multicurrency_amount) as multicurrency_amount FROM llx_paiement_facture WHERE fk_facture = 1557
2023-03-31 05:52:05 DEBUG x.x.x.x DiscountAbsolute::getSumCreditNotesUsed
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 1557 AND f.type IN (0,2,5)
2023-03-31 05:52:05 DEBUG x.x.x.x DiscountAbsolute::getSumDepositsUsed
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 1557 AND f.type = 3
2023-03-31 05:52:05 DEBUG x.x.x.x HookManager::initHooks Loading hooks: context=pdfgeneration-path=/oblpdf/class/actions_oblpdf.class.php
2023-03-31 05:52:05 DEBUG x.x.x.x Facture::getIdContact
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT ec.fk_socpeople FROM llx_element_contact as ec, llx_socpeople as c, llx_c_type_contact as tc WHERE ec.element_id = 1557 AND ec.fk_socpeople = c.rowid AND c.entity IN (1) AND ec.fk_c_type_contact = tc.rowid AND tc.element = 'facture' AND tc.source = 'external' AND tc.code = 'SHIPPING' AND tc.active = 1
2023-03-31 05:52:05 ERR x.x.x.x Error: Bug into hook beforePDFCreation of module class ActionsOblPdf. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints
2023-03-31 05:52:05 DEBUG x.x.x.x Facture::getListOfPayments
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code, p.ref_ext FROM llx_paiement_facture as pf, llx_paiement as p, llx_c_paiement as t WHERE pf.fk_facture = 1557 AND pf.fk_paiement = p.rowid AND p.fk_paiement = t.id AND p.entity IN (1)
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT rc.amount_ttc as amount, rc.multicurrency_amount_ttc as multicurrency_amount, rc.datec as date, f.ref as ref, rc.description as type FROM llx_societe_remise_except as rc, llx_facture as f WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = 1557 AND (f.type = 2 OR f.type = 0 OR f.type = 3)
2023-03-31 05:52:05 INFO x.x.x.x functions.lib::dol_mkdir: dir=/home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/documents/admin/temp/
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT rowid FROM llx_facture WHERE fk_facture_source = 1557 AND type < 2 AND fk_statut = 1 ORDER BY fk_statut DESC
2023-03-31 05:52:05 DEBUG x.x.x.x Facture::fetchObjectLink
2023-03-31 05:52:05 DEBUG x.x.x.x sql=SELECT rowid, fk_source, sourcetype, fk_target, targettype FROM llx_element_element WHERE (fk_source = 1557 AND sourcetype = 'facture') OR (fk_target = 1557 AND targettype = 'facture') ORDER BY sourcetype
2023-03-31 05:52:05 DEBUG x.x.x.x Commande::fetch

@hregis
Copy link
Contributor

hregis commented Mar 31, 2023

@syrinx75 oblpdf this is an external module! Try to use an another pdf model

@emheyarssi
Copy link
Contributor

@hregis to fast ;-)

@syrinx75
Copy link
Author

The module is fixed but it's another error:

Fatal error: Uncaught Error: Call to a member function transnoentitiesnoconv() on null in /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/custom/oblpdf/class/actions_oblpdf.class.php:77 Stack trace: #0 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/core/class/hookmanager.class.php(289): ActionsOblPdf->pdf_writelinedesc() #1 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/core/lib/pdf.lib.php(1368): HookManager->executeHooks() #2 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/core/class/commondocgenerator.class.php(1241): pdf_writelinedesc() #3 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/core/modules/facture/doc/pdf_sponge.modules.php(767): CommonDocGenerator->printColDescContent() #4 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/core/class/commonobject.class.php(5538): pdf_sponge->write_file() #5 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/compta/facture/class/facture.class.php(5043): CommonObject->commonGenerateDocument() #6 /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/compta/paiement/class/paiement.class. in /home/jail/home/osu6bwl017ej/dbnj4QN5JwQ/htdocs/custom/oblpdf/class/actions_oblpdf.class.php on line 77

@hregis
Copy link
Contributor

hregis commented Mar 31, 2023

@syrinx75 this is an external module, contact the developer of this module!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

4 participants