Jump to content

Montant global de Facture en erreur, écriture avec la librairie FDPF


Recommended Posts

Bonjour à tous,

 

Sous prestashop 1.4.11

 

Il arrive parfois que le pdf de nos factures présente un montant erroné.

 

Dans la table ps_orders les données sont justes.

 

Nous utilisons la librairie FPDF,

 

Si l'un(e) d'entre vous peut m'aiguiller sur le fil du code qui arrive à la génération de l'état, et au calcul corrompu (double application d'une réduction sur l'article), je pourrai je pense gagner pas mal de temps.

 

Si c'est un problème connu, j'aimerais également trouver les infos dans les sujets liés, j'ai cherché, mais pas encore trouvé grand chose à ce sujet.

 

Merci

Bonne semaine

 

 

 

 

Link to comment
Share on other sites

Ce est un problème connu que certains montants ne sont pas à droite, dans toutes les versions de PrestaShop (développeurs désolé, je ne dis pas facilement). Je pense que le problème est si profond qu'il est presque impossible de trouver, tester et résoudre tous les problèmes. Je sais ce que je écris, je suis passé par cette vallée de larmes à plusieurs reprises lors de l'élaboration du module M4 Extensions PDF.
 

It is a known issue that some amounts are not right, in all versions of PrestaShop (sorry developers, I don't say it easily). I think the problem is so deep that it is almost impossible to find, solve and test all problems. I know what I am writing, I have gone through this valley of tears many times when developing the M4 PDF Extensions module.

Link to comment
Share on other sites

Thanks for your reply,

 

Problem has appeared since 1.4.11, we believe we were not having this issue under 1.4.6.2

 

So can you tell me more about pdf generation, how is it working? I'm looking for calculation rules, does file "administrator/pdf.php" contain the calculs, and it sorts of appeal the library write function?...

Link to comment
Share on other sites

In your version, the invoice is created in /classes/PDF.php. See all methods called in this file. The issues come from these methods and data stored in the database within the order process. As I wrote, it is not easy to catch all errors.

Link to comment
Share on other sites

Thanks for your reply, you are right this debug requires patience

 

I see now that It comes from order_detail table. product_price was set including discount. It's funny how problems appears randomly (and rarely) on articles.

 

I need to find the setter of this data : order_detail/produc_price but I can't find it in the OrderDetail Controller. Do I need to look closer into this file, or is htere any other file involved in the process of recording the details of the order?

Edited by donSt (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...