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

Fix sending of quotes and invoices #666

Merged
merged 6 commits into from Mar 7, 2023
Merged

Fix sending of quotes and invoices #666

merged 6 commits into from Mar 7, 2023

Conversation

pierredup
Copy link
Member

When using the "Save and Send" button for quotes and invoices, they were never sent out.
Also fix attaching an invoice to a quote when accepting a quote.

@pierredup pierredup added this to the 2.2.0 milestone Mar 7, 2023
@pierredup pierredup added the bug label Mar 7, 2023
@what-the-diff
Copy link

what-the-diff bot commented Mar 7, 2023

  • Added typehints to the Transition class
  • Removed unused variables from InvoiceCreateHandler and added a new one for MailerInterface
  • Changed return types of __invoke methods in Send, AbstractInvoiceHandler and Transition classes to RedirectResponse
  • Fixed typo in transition action name (accepted -> accepted)
  • Set quote property on invoice when creating an invoice from a quote object
  • Rename QuoteManager to QuoteMailer
  • Move send logic from manager to mailer
  • Add exception handling for sending email in the workflow listener and action handler (in case of invalid transition or transport error)
  • Remove unused code from WorkFlowSubscriberTest::onQuoteAccepted() test method, as it is not used anymore after refactoring
  • Added a new class QuoteMailer
  • Updated the WorkFlowSubscriber to use this new mailer instead of sending emails directly from it
  • Removed some duplicate code in tests for creating the subscriber object and added test coverage for QuoteMailer

@pierredup pierredup self-assigned this Mar 7, 2023
@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Patch coverage: 29.41% and project coverage change: -0.51 ⚠️

Comparison is base (080e88e) 50.84% compared to head (7403468) 50.33%.

Additional details and impacted files
@@             Coverage Diff              @@
##              2.2.x     #666      +/-   ##
============================================
- Coverage     50.84%   50.33%   -0.51%     
- Complexity     2204     2211       +7     
============================================
  Files           411      411              
  Lines          7559     7575      +16     
============================================
- Hits           3843     3813      -30     
- Misses         3716     3762      +46     
Flag Coverage Δ
unittests 50.33% <29.41%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/InvoiceBundle/Action/Transition.php 0.00% <0.00%> (ø)
src/InvoiceBundle/Action/Transition/Send.php 0.00% <0.00%> (ø)
...oiceBundle/Form/Handler/AbstractInvoiceHandler.php 0.00% <0.00%> (-100.00%) ⬇️
src/QuoteBundle/Action/Transition.php 0.00% <0.00%> (ø)
src/QuoteBundle/Action/Transition/Send.php 0.00% <0.00%> (ø)
src/QuoteBundle/Mailer/QuoteMailer.php 22.72% <0.00%> (ø)
src/QuoteBundle/Listener/WorkFlowSubscriber.php 96.15% <80.00%> (-3.85%) ⬇️
src/InvoiceBundle/Manager/InvoiceManager.php 60.65% <100.00%> (+1.33%) ⬆️
src/MailerBundle/Factory/MailerConfigFactory.php 100.00% <100.00%> (ø)
.../QuoteBundle/Form/Handler/AbstractQuoteHandler.php 0.00% <0.00%> (-100.00%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pierredup pierredup merged commit 5c02559 into 2.2.x Mar 7, 2023
@pierredup pierredup deleted the fix-invoice-sending branch March 7, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant