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

dev/financial#162 Simplify isPdf code #19486

Merged
merged 1 commit into from
Mar 8, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

This makes the same simplification as https://github.com/civicrm/civicrm-core/pull/19165/files
in another part of the code. The correct setting name has the invoice_ prefix
(although I think our handling code was making the other work)

Before

Drawn out code

After

Agreed simplification -in addition in one place the use of isset rather than !empty was resolving to true even when it should have been false - which is how I wound up in this code

Technical Details

Comments

This makes the same simplification as https://github.com/civicrm/civicrm-core/pull/19165/files
in another part of the code. The correct setting name has the invoice_ prefix
(although I think our handling code was making the other work)
@civibot
Copy link

civibot bot commented Feb 1, 2021

(Standard links)

@civibot civibot bot added the master label Feb 1, 2021
@demeritcowboy
Copy link
Contributor

Jenkins retest this please. (Warning: PDO::query(): MySQL server has gone away)

@eileenmcnaughton
Copy link
Contributor Author

Yeah - it's doing that a lot!

@demeritcowboy
Copy link
Contributor

This is mostly a code review and am relying on the previous PR.

  • General standards
    • [r-explain] Soft pass
      • It's touched on in the other PR but maybe one of the reasons this PR has sat here for a while is that it's not at all clear what civi does voodoo-wise with invoice settings. So when reading this PR it's helpful to know that there are two sets of settings that set/get the same things. There's contribution_invoice_settings which is an array, and then a mirror set of flattened settings where the names are sometimes (?!) prefixed with invoice_, and then also there's one called invoicing which in the original is a subarray, and in its mirror is just a boolean.
    • [r-user] PASS
    • [r-doc] PASS
    • [r-run] Quick PASS
      • I just did a very light run of the contribution page invoice.
  • Developer standards
    • [r-tech] PASS
      • Am relying on whatever other discussions have happened and haven't tried to follow it.
    • [r-code] PASS
    • [r-maint] ?
    • [r-test] Pending Re-running since it's been a while.

Jenkins retest this please.

@eileenmcnaughton
Copy link
Contributor Author

@colemanw OK to merge based on review ^^

@demeritcowboy
Copy link
Contributor

jenkins retest this please (just been a while)

@seamuslee001
Copy link
Contributor

merging as per review from @demeritcowboy

@seamuslee001 seamuslee001 merged commit f00a026 into civicrm:master Mar 8, 2021
@seamuslee001 seamuslee001 deleted the pddemail branch March 8, 2021 05:15
@eileenmcnaughton
Copy link
Contributor Author

Thanks @demeritcowboy @seamuslee001

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.

3 participants