Git Product home page Git Product logo

Comments (4)

bitbager avatar bitbager commented on June 14, 2024

Hi! Thanks, that's a lot of information.
First, I think we should consider making CompanyData aware of Channels. I also believe that we should be able to configure whether the VAT number for this specific channel should be validated and if it should be sent to the customer after the payment has proceeded. Doing it the same way as it's done in the channel config with skip payment/shipment step if one available would be perfect. We should remember that it's a plugin and it should solve more than one problem, as there might be users who would need to use it in another way the French law allows.

Secondary, although payment event is great, you should consider a state machine callback for this purpose. Payments are not being managed through resource events, they do through the state machine though.

What do you think?

from syliusinvoicingplugin.

ambroisemaupate avatar ambroisemaupate commented on June 14, 2024

Hi @bitbager
Thanks for you interest !

Making CompanyData aware of Channels is a great idea, so we could add:

  • channel OneToOne field to CompanyData
  • invoiceNumberTemplate string to CompanyData
  • validateCustomerVatNumber boolean to CompanyData or Channel?
  • generateInvoiceAfterPaymentSuccess boolean to CompanyData or Channel?

It’s my first project with Sylius, so I’m new with their payment state machine.

See https://github.com/ambroisemaupate/SyliusInvoicingPlugin/commits/channel-aware WIP branch.

from syliusinvoicingplugin.

bitbager avatar bitbager commented on June 14, 2024

I think that all of these data should be assofisted with CompanyData model. Also allowing string template path is not a good idea. Let’s make it a ChoiceType of constants and for customization, we will include a reference to Symfony FormExtension documentation. How is the progress btw? 😉

from syliusinvoicingplugin.

ambroisemaupate avatar ambroisemaupate commented on June 14, 2024

Progress is good!
Invoice generation and email sending is done on Payment state-machine transition, I’ve added all fields into CompanyData. I need now to make invoice number configurable and improve invoice template to display VAT, Shipping and reductions.

I’ll publish my PR when I’m back on this project. 🤞
Do not hesitate to have a look on my branch… https://github.com/ambroisemaupate/SyliusInvoicingPlugin/commits/channel-aware

from syliusinvoicingplugin.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.