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

[Feature] Tax receipt #311

Merged
merged 11 commits into from
Sep 21, 2023
Merged

[Feature] Tax receipt #311

merged 11 commits into from
Sep 21, 2023

Conversation

ChinemeremChigbo
Copy link
Member

@ChinemeremChigbo ChinemeremChigbo commented Aug 29, 2023

Notion ticket link

[17] Tax Receipt PDF

Implementation description

  • @sherryhli I'm not sure if I fully understand what a schema change is. For instance, in this ticket, I initially wanted to have the invoice and donation be separate pdfs, however this would have required me to change the model ApplicationProcessing in the \prisma\schema.prisma file to include some donationInvoiceNumber or make each applicationinvoice be a tuple of invoices (one for donation and the other for the invoice) or something similar. I believe this is a schema change since it adds or removes something from the schema.prisma file? Because of this I instead conditionally have both the invoice and the donation receipt in one file. If the donation amount exceeds $20 the file will have both invoice and donation, otherwise it will only have the invoice.

Notes

  • Added some comments throughout this PR for which a second opinion would be appreciated.
2023-09-03.21-28-36_trimmedsmall.mp4

Checklist

  • My PR name is descriptive, is in imperative tense and starts with one of the following: [Feature],[Improvement] or [Fix],
  • I have run the appropriate linter(s)
  • I have requested a review from the RCD team on GitHub, or specific people who are associated with this ticket

@ChinemeremChigbo ChinemeremChigbo marked this pull request as draft August 29, 2023 02:06
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not use the new file RCD sent since I think this one looks better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not use the new file RCD sent since I think this one looks better.

paymentItems,
totalAmount,
address,
}).content.concat([
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the invoice PDF. If we have a donation, we include both the invoice and donation PDFs.

@ChinemeremChigbo ChinemeremChigbo changed the title Tax receipt [Feature] Tax receipt Sep 3, 2023
@ChinemeremChigbo ChinemeremChigbo marked this pull request as ready for review September 3, 2023 13:07
Copy link
Member

@sherryhli sherryhli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sherryhli I'm not sure if I fully understand what a schema change is. For instance, in this ticket, I initially wanted to have the invoice and donation be separate pdfs, however this would have required me to change the model ApplicationProcessing in the \prisma\schema.prisma file to include some donationInvoiceNumber or make each applicationinvoice be an tuple of invoices (one for donation and the other for the invoice) or something similar. I believe this is a schema change since it adds or removes something from the schema.prisma file? Because of this I instead conditionally have both the invoice and the donation receipt in one file. If the donation amount exceeds $20 the file will have both invoice and donation, otherwise it will only have the invoice.

Yeah, you're right - adding donationInvoiceNumber would be considered a schema change, we'd need to add a column to the DB. I think your approach is a good workaround!


This looks great!

Thanks for the detailed walkthrough video. Would be great if you can write up a short paragraph describing those behaviours. I think all 3 features going out in the next release would benefit from having some user documention.

@ChinemeremChigbo ChinemeremChigbo merged commit eb84373 into staging Sep 21, 2023
1 check passed
@ChinemeremChigbo ChinemeremChigbo deleted the tax-receipt branch September 21, 2023 02:51
leogjhuang pushed a commit that referenced this pull request Oct 4, 2023
* Add donation receipt pdf

* Add signature and stamp pngs

* Increase stamp size and add "Receipt" text to location

* generate receipt

* 2 separate PDFs generated

* Remove unused pdf generation

* Remove second step

* Make combined pdf

* Remove unused props

* Update utils.ts

* Change > $20 to >= $20 for donation generation
@leogjhuang leogjhuang mentioned this pull request Oct 4, 2023
3 tasks
leogjhuang added a commit that referenced this pull request Oct 4, 2023
* [Fix] Save poaFormS3ObjectKey when updating guardian information in permit holders page (#319)
* [Fix] Postal Code Space Issue (#316)
* Set other gender field on permit holders page (#318)
* Add .nvmrc file (#317)
* [Feature] Implement applicant deletion (#310)
* [Feature] Implement application deletion (#315)
* Display other gender field on permit holders page (#314)
* Move wallet card task in application processing (#313)
* [Feature] Tax receipt (#311)
* [Fix] Fix expiry date for in-progress replacement applications (#274)
* [Fix] Fix APP history permit type badge (#273)
* [Improvement] Adjust spacing of address in invoice (#272)
* [Fix] Show validation error messages on form mount (#271)
leogjhuang pushed a commit that referenced this pull request Oct 10, 2023
* Add donation receipt pdf

* Add signature and stamp pngs

* Increase stamp size and add "Receipt" text to location

* generate receipt

* 2 separate PDFs generated

* Remove unused pdf generation

* Remove second step

* Make combined pdf

* Remove unused props

* Update utils.ts

* Change > $20 to >= $20 for donation generation
@leogjhuang leogjhuang mentioned this pull request Oct 10, 2023
3 tasks
leogjhuang pushed a commit that referenced this pull request Oct 10, 2023
* Add donation receipt pdf

* Add signature and stamp pngs

* Increase stamp size and add "Receipt" text to location

* generate receipt

* 2 separate PDFs generated

* Remove unused pdf generation

* Remove second step

* Make combined pdf

* Remove unused props

* Update utils.ts

* Change > $20 to >= $20 for donation generation
@leogjhuang leogjhuang mentioned this pull request Oct 10, 2023
3 tasks
leogjhuang added a commit that referenced this pull request Oct 10, 2023
* [Feature] Create setEmployeeAsActive GraphQL endpoint (#322)
* [Fix] Save poaFormS3ObjectKey when updating guardian information in permit holders page (#319)
* [Fix] Postal Code Space Issue (#316)
* Set other gender field on permit holders page (#318)
* Add .nvmrc file (#317)
* [Feature] Implement applicant deletion (#310)
* [Feature] Implement application deletion (#315)
* Display other gender field on permit holders page (#314)
* Move wallet card task in application processing (#313)
* [Feature] Tax receipt (#311)
* [Fix] Fix expiry date for in-progress replacement applications (#274)
* [Fix] Fix APP history permit type badge (#273)
* [Improvement] Adjust spacing of address in invoice (#272)
* [Fix] Show validation error messages on form mount (#271)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants