Jump to content

Invoices with legal value


senolage

Recommended Posts

Hello everyone,

 

I've been developing with PrestaShop for a while now, and am getting to love it. Already took a peek at the new 1.5 RC2 and it looks pretty amazing.

 

Now to the point of the thread:

 

I'm planing the development of a couple modules to abide to legal requirements in some countries where a certain level of certification and a rather complicated approval process in order for the invoices to be legally valid. So, I intend to integrate with some external service (already certified platforms) to generate the invoices, credit slips, and so on.

 

So, what I would like to know/discuss is the best way to integrate this into PrestaShop (would be great if someone from the development team could join the discussion :D).

 

From the documentation and my analysis I couldn't figure out some hookable points where one could hook in order to generate these invoices and use its data.

I believe what I'd really have to do is create override classes for:

- OrderInvoice

- OrderSlip

 

I'm not really sure about the OrderReturn class but I think that wouldn't be required.

 

I'll be developing for PS 1.5 but will probably adapt it to 1.4 as well.

 

Thank you very much for reading.

 

Regards,

Dinis

Link to comment
Share on other sites

I'm not sure there are enough hooks to achieve what I need.

I would need to hook to any action that changes a placed order after the point in which it gets validated:

  • Order is validated: communicate with external webservice and generate legal invoice;
  • Validated order changes status - communicate status change:
    • Marked as paid
    • Cancel invoice

    [*]Product quantities in the order changed - communicate these changes

    [*]Refund added - create a credit slip in the external service

There might also be other actions that I couldn't remember of that might need to get communicated, but these seem to be at least mandatory ones.

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...