GravityPDF / gravity-pdf

Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.
https://gravitypdf.com
88 stars 21 forks source link

Add Product quantity on Field_Product #1418

Closed jestonihpi closed 1 year ago

jestonihpi commented 1 year ago

Description

Added the product quantity to Non Grouped products. If the Product's quantity field is disabled, the quantity should not display on the pdf, same goes to Product with linked quantity field.

1417

Testing instructions

Screenshots

image

Checklist:

Additional Comments

codecov[bot] commented 1 year ago

Codecov Report

Merging #1418 (688f488) into development (0a58c81) will increase coverage by 17.53%. The diff coverage is n/a.

:exclamation: Current head 688f488 differs from pull request most recent head 6aed57a. Consider uploading reports for the commit 6aed57a to get more accurate results

@@                Coverage Diff                 @@
##             development    #1418       +/-   ##
==================================================
+ Coverage          75.76%   93.30%   +17.53%     
==================================================
  Files                243       57      -186     
  Lines              12830     1464    -11366     
  Branches             370      370               
==================================================
- Hits                9721     1366     -8355     
+ Misses              3101       90     -3011     
  Partials               8        8               

see 186 files with indirect coverage changes

jestonihpi commented 1 year ago

This PR is now ready for review @jakejackson1. Thanks!

jakejackson1 commented 1 year ago

@jestonisumande I've kind of co-opted this PR to better handle the display of individual Pricing fields in the PDF. The changes make it much clearer exactly how much an individual product (+ options) costs when ungrouped from the Product Table.

Individual Pricing.pdf

Unit tests will need to be written to verify the accuracy of the output. But this could use another test of eyes and thorough testing against a range of forms + pricing fields to check the validity of the output.

jakejackson1 commented 1 year ago

@jestonihpi we should also include the discount amount in the PDF when displaying an individual Coupon Code -£ 4.00 (COUPON), instead of only displaying the coupon name COUPON.

jestonihpi commented 1 year ago

Copy @jakejackson1.

jestonihpi commented 1 year ago

If you have the time @jakejackson1, can you review this PR as well? Thanks!