-
Notifications
You must be signed in to change notification settings - Fork 82
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
Change behavior for the bill generation #174
Comments
Any updates on this? |
Sorry but your comments are not very helpful. If you want to make this change on your own Sylius: create a fork, follow the instructions and send love for this change (this issue/slack/...). If not, submit a PR and/or buy one day of work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A bill is generated when the
sylius_payment
flow is complete. This is something good for business to business but not for business to customer because a "complete"sylius_payment
is not always paid and an unpaid order should not have a generated bill.That's why I think we should change this behavior.
Steps
Current configuration must be updated :
sylius_invoicing_plugin_payment_complete_producer
callback should be in thesylius_order
state machine, on thefulfill
transition.Sylius\InvoicingPlugin\EventProducer\OrderPaymentPaidProducer
should be updated because there is no more a PaymentInterface but an OrderInterface. Class should be renamedOrderFulfilledProducer
.Sylius\InvoicingPlugin\EventProducer\OrderPlacedProducer
should be updated because the event is no more dispatched with a condition oncheckoutState
(but withpaymentState
andOrderPaymentStates::STATE_PAID
). Class should be renamedOrderPaidProducer
.Related code should be renamed.
After changes
An unpaid order will not have any bill until the
OrderPaymentStates::STATE_PAID
is dispatched. Then the bill will be available for customer. Because the payment is paid, the owner can print the bill and prepare his order. Finally the order will be "fulfilled" when the shipment is marked as "shipped" and the bill will be sent to the customer.The text was updated successfully, but these errors were encountered: