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

Minor code cleanup #13839

Merged
merged 1 commit into from
Mar 16, 2019
Merged

Minor code cleanup #13839

merged 1 commit into from
Mar 16, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code cleanup

Before

Less maintainable _

After

More readable

Technical Details

Invoicing code has been poorly integrated into CiviCRM with much copy & paste,
no following of settings spec and an awful lot of outright hacking.

This is a small step towards moving invoice logic to a centralised place -
specifically in this case the unpacking of the non-standard settings that have been
used. Perhaps once using these functions we can standardise them!

Ideally I'd like to see all the invoicing assigns in a function on this
class, better yet once which mimics the pre or buildForm hook & even
better one day to grow up & be a real hook

Comments

Invoicing code has been poorly integrated into CiviCRM with much copy & paste,
no following of settings spec and an awful lot of outright hacking.

This is a small step towards moving invoice logic to a centralised place -
specifically in this case the unpacking of the non-standard settings that have been
used. Perhaps once using these functions we can standardise them!

Ideally I'd like to see all the invoicing assigns in a function on this
class, better yet once which mimics the pre or buildForm hook & even
better one day to grow up & be a real hook
@civibot
Copy link

civibot bot commented Mar 15, 2019

(Standard links)

@seamuslee001
Copy link
Contributor

The change makes sense and confirmed that CRM_Invoicing_Utils::isInvoicingEnabled() is sensible in these usages Merging

@seamuslee001 seamuslee001 merged commit 2905735 into civicrm:master Mar 16, 2019
@seamuslee001 seamuslee001 deleted the invoicing branch March 16, 2019 06:52
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.

2 participants