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/test #7230

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
593 commits
Select commit Hold shift + click to select a range
56b6d11
add JEST tests
daniel-fuller Nov 8, 2022
6c169a2
add JEST tests
daniel-fuller Nov 8, 2022
f879f78
remove adding commitment id to the endpoint for commitment updates
daniel-fuller Nov 8, 2022
52c5850
Fixed failing unit tests
voduyemi Nov 8, 2022
0db27ab
Fixing expected endpoints in Commitment request unit tests
lparrott Nov 8, 2022
ace32aa
Merge pull request #7145 from SalesforceFoundation/feature/242__missi…
lparrott Nov 8, 2022
de1b949
Fix error display for gateways not found on gePaymentGatewayManagement.
npsp-reedestockton Nov 8, 2022
fbf242a
Merge ace32aa0841f9e5b1add0932f30df04a5b5cf5b2 into feature/242__bgeW…
salesforce-org-metaci[bot] Nov 9, 2022
440cec4
Merge ace32aa0841f9e5b1add0932f30df04a5b5cf5b2 into feature/242__gate…
salesforce-org-metaci[bot] Nov 9, 2022
9cc2d39
Merge ace32aa0841f9e5b1add0932f30df04a5b5cf5b2 into feature/242__paus…
salesforce-org-metaci[bot] Nov 9, 2022
aa73199
Merge ace32aa0841f9e5b1add0932f30df04a5b5cf5b2 into feature/242__queu…
salesforce-org-metaci[bot] Nov 9, 2022
d614d72
Merge ace32aa0841f9e5b1add0932f30df04a5b5cf5b2 into feature/242__rd2B…
salesforce-org-metaci[bot] Nov 9, 2022
5fd3605
Merge branch 'feature/242__gateway-assignment-jest-tests' of github.c…
npsp-reedestockton Nov 9, 2022
27c3f4d
Added debug statements
voduyemi Nov 9, 2022
4d3d7cc
Added debug statements
voduyemi Nov 9, 2022
bdee147
Added missing changes
voduyemi Nov 9, 2022
5e645cf
Fixing Elevate Commitment GET requests
lparrott Nov 9, 2022
c0440b5
disable save button when elevate recurring type is fixed and add JEST…
daniel-fuller Nov 9, 2022
1c9271a
Merge remote-tracking branch 'origin/feature/242__bgeWidgetFixedValid…
daniel-fuller Nov 9, 2022
6ac9675
Potential Fix for origin issue
voduyemi Nov 9, 2022
fd7036f
add fix to ensure save button is not disabled for non-elevate RDs
daniel-fuller Nov 9, 2022
4a9cb25
add function parentheses
daniel-fuller Nov 9, 2022
21b6a40
StartDate and EndDate timestamp issue
voduyemi Nov 9, 2022
d357dcc
Merge pull request #7146 from SalesforceFoundation/feature/242__missi…
daniel-fuller Nov 9, 2022
cd32b4e
Added PauseRequest Body inner class
voduyemi Nov 9, 2022
d0acad5
Merge d357dccf4c3d0bf4c91df54b4a0c285f06de962f into feature/242__bgeW…
salesforce-org-metaci[bot] Nov 9, 2022
d0a7954
Merge d357dccf4c3d0bf4c91df54b4a0c285f06de962f into feature/242__gate…
salesforce-org-metaci[bot] Nov 9, 2022
41013d1
Merge d357dccf4c3d0bf4c91df54b4a0c285f06de962f into feature/242__paus…
salesforce-org-metaci[bot] Nov 9, 2022
700ac04
Merge d357dccf4c3d0bf4c91df54b4a0c285f06de962f into feature/242__queu…
salesforce-org-metaci[bot] Nov 9, 2022
980bcf1
Merge d357dccf4c3d0bf4c91df54b4a0c285f06de962f into feature/242__rd2B…
salesforce-org-metaci[bot] Nov 9, 2022
6fb21ae
Merge branch 'feature/242__gateway-assignment-jest-tests' of github.c…
npsp-reedestockton Nov 9, 2022
ed57169
Fixed End date issue
voduyemi Nov 10, 2022
fecbd39
Added PATCH Api call for Pause updates; tweaked next installment call
voduyemi Nov 10, 2022
3bff395
Fixed Jest Test
voduyemi Nov 10, 2022
605eca6
Fixed Jest Tests
voduyemi Nov 10, 2022
6aae4b1
Added delete pause logic before saving pause
voduyemi Nov 10, 2022
3de9343
Tweaked PATCH logic
voduyemi Nov 10, 2022
1fc7d1d
add fix so that save button and warning message are not displayed whe…
daniel-fuller Nov 10, 2022
6a3be33
Merge remote-tracking branch 'origin/feature/242__bgeWidgetFixedValid…
daniel-fuller Nov 10, 2022
e4409e3
add fix so that save button and warning message are not displayed whe…
daniel-fuller Nov 10, 2022
3127098
Merge pull request #7132 from SalesforceFoundation/feature/242__rd2Ba…
andrewyu-salesforce Nov 10, 2022
e05d36e
add fix for displaying warning message for fixed recurring type when …
daniel-fuller Nov 10, 2022
2c9fc06
Merge 3127098cc298920422182577f4c5b49adacf1c77 into feature/242__gate…
salesforce-org-metaci[bot] Nov 10, 2022
92db7ed
Merge 3127098cc298920422182577f4c5b49adacf1c77 into feature/242__paus…
salesforce-org-metaci[bot] Nov 10, 2022
00503b7
Merge 3127098cc298920422182577f4c5b49adacf1c77 into feature/242__queu…
salesforce-org-metaci[bot] Nov 10, 2022
7960373
Added missing logic for updating RDs
voduyemi Nov 11, 2022
92699c3
Merge remote-tracking branch 'origin/feature/242__pauseE2EFix' into f…
voduyemi Nov 11, 2022
889f706
Preventing Save on unprocessed Elevate RD that is switched to Recurri…
lparrott Nov 11, 2022
8d40a2d
Merge branch 'feature/242' into feature/242__bgeWidgetFixedValidations
daniel-fuller Nov 11, 2022
bf54894
fix issues with resolving merge conflicts and fix broken JEST tests
daniel-fuller Nov 11, 2022
7eb30f9
fix variable rename causing widget not to tokenize
daniel-fuller Nov 11, 2022
dc45e0b
remove button disable for single gift entry
daniel-fuller Nov 11, 2022
e4b4487
Fix for storing the ACH Last 4 from BGE, update to Save logic when ne…
lparrott Nov 11, 2022
c7fd563
Merge pull request #7144 from SalesforceFoundation/feature/242__bgeWi…
lparrott Nov 14, 2022
8632f24
Merge pull request #7147 from SalesforceFoundation/feature/242__gatew…
daniel-fuller Nov 14, 2022
bc8016f
JEST tests for geGatewaySelectWidget.
npsp-reedestockton Nov 14, 2022
753f434
Merge pull request #7142 from SalesforceFoundation/feature/242__pause…
balsamhindi Nov 14, 2022
586c25c
Fix div test for gateway management mode.
npsp-reedestockton Nov 14, 2022
5901b69
Merge 8632f2433d59c116479f676089918bef5531c216 into feature/242__gate…
salesforce-org-metaci[bot] Nov 14, 2022
02374ac
Merge 8632f2433d59c116479f676089918bef5531c216 into feature/242__queu…
salesforce-org-metaci[bot] Nov 14, 2022
c3fd82f
Correct issues discovered by JEST testing.
npsp-reedestockton Nov 14, 2022
60fd350
Merge branch 'feature/242__gateway-assignment-tests' of github.com:Sa…
npsp-reedestockton Nov 14, 2022
11dcb16
remove brackets from DEFAULT_NAME_ON_CARD for paya validation
screcco-sfdo Nov 14, 2022
0a8fa0c
Merge 753f434d42b4e1673a7021cf65d1112630002b9c into feature/242__gate…
salesforce-org-metaci[bot] Nov 14, 2022
9cb3011
Merge 753f434d42b4e1673a7021cf65d1112630002b9c into feature/242__queu…
salesforce-org-metaci[bot] Nov 14, 2022
ead3d4c
Merge pull request #7143 from SalesforceFoundation/feature/242__queue…
andrewyu-salesforce Nov 14, 2022
1ac5bfc
Remove incomplete toast message test.
npsp-reedestockton Nov 14, 2022
10812e7
Merge branch 'feature/242__gateway-assignment-tests' of github.com:Sa…
npsp-reedestockton Nov 14, 2022
7e56d00
Merge pull request #7150 from SalesforceFoundation/feature/242__payaG…
lparrott Nov 14, 2022
00f0c0e
Merge 7e56d007db383dc996b433e069b597079cc33493 into feature/242__gate…
salesforce-org-metaci[bot] Nov 14, 2022
596cbda
Implement PR feedback.
npsp-reedestockton Nov 15, 2022
15858f0
Merge pull request #7152 from SalesforceFoundation/feature/242__gatew…
daniel-fuller Nov 15, 2022
9a9053c
Fix for Pause Request to use PATCH on Updates
lparrott Nov 15, 2022
2b10f7f
Adding break to avoid extra loops
lparrott Nov 15, 2022
974c86c
Merge pull request #7153 from SalesforceFoundation/feature/242__pause…
lparrott Nov 16, 2022
6a1d197
Add new gateway assignment unit tests.
npsp-reedestockton Nov 16, 2022
a35f1fd
Merge pull request #7154 from SalesforceFoundation/feature/242__GE_Gi…
npsp-reedestockton Nov 17, 2022
28ae7cb
Added logic to only make patch calls for active pauses
voduyemi Nov 17, 2022
fdf146d
Merge pull request #7155 from SalesforceFoundation/feature/242__pause…
lparrott Nov 17, 2022
7ed61ee
Merge pull request #7080 from SalesforceFoundation/feature/242
lparrott Nov 22, 2022
c78c9eb
add back removed custom labels
daniel-fuller Nov 22, 2022
9f85b2c
Merge pull request #7156 from SalesforceFoundation/feature/customLabe…
lparrott Nov 22, 2022
9eb5995
Merge 9f85b2cf70b7c1af3eeb73c600a0d6e0f8179c59 into feature/238
salesforce-org-metaci[bot] Nov 22, 2022
08902d4
Merge 9eb599529213fd8cf20e6d763395479320ed66ed into feature/242
salesforce-org-metaci[bot] Nov 22, 2022
e5e2f50
242 NPSP localized labels
dmkud Nov 30, 2022
698093e
Updated commit with cleanup translation task
balsamhindi Nov 30, 2022
134e924
Remove duplicate elements
balsamhindi Nov 30, 2022
b898cd6
Additional localized labels for 242 NPSP
dmkud Dec 5, 2022
5c3aab3
Updates to translation file changes
balsamhindi Dec 5, 2022
cfc8362
Updating our refund logic to work with negative payments that are not…
lparrott Dec 6, 2022
f049983
Merge pull request #7162 from SalesforceFoundation/feature/fixSubledg…
lparrott Dec 7, 2022
96fe86d
Merge f04998385e6bf14401e7eba1aafc1c220e44aede into feature/238
salesforce-org-metaci[bot] Dec 7, 2022
f3060ce
Merge branch 'main' into feature/242__localization
balsamhindi Dec 14, 2022
aa59b59
Merge pull request #7163 from SalesforceFoundation/feature/242__local…
balsamhindi Dec 15, 2022
9f87a1d
Merge aa59b59855a3c673a39a5b70e7a47d584666e30a into feature/238
salesforce-org-metaci[bot] Dec 15, 2022
e8bdf99
W-12250612 - Fixed issue with BDI matching when using Dupe Mgmt
callen-sfdo Jan 13, 2023
4f252f7
Add Q3 quadrant tags
Safiyab Feb 22, 2023
d5734a9
Merge pull request #7165 from SalesforceFoundation/feature/fixBDIDupe…
balsamhindi Feb 24, 2023
e310e68
Merge d5734a927bd0ac85abf2acfeac2b467abd74f5a9 into feature/238
salesforce-org-metaci[bot] Feb 24, 2023
9cb30d5
Merge branch 'main' into q3_robot_tags
Safiyab Mar 1, 2023
f4250b1
W-12632596 - Fix unit test for Recurring Donation Pause
callen-sfdo Mar 2, 2023
f3e73e8
Merge pull request #7168 from SalesforceFoundation/feature/fixfailing…
lparrott Mar 3, 2023
d44da1b
Merge f3e73e81fb3958bec9dd73871183fdb27459ce47 into feature/238
salesforce-org-metaci[bot] Mar 3, 2023
20e939b
Merge branch 'main' into q3_robot_tags
Safiyab Mar 7, 2023
5ff2436
Merge pull request #7167 from SalesforceFoundation/q3_robot_tags
Safiyab Mar 8, 2023
6f4a128
Merge 5ff24360be13d387c6eb02da590bb2b1ce105ac3 into feature/238
salesforce-org-metaci[bot] Mar 8, 2023
eb03f73
Fix a few locators for Q3 robot tests
Safiyab Mar 12, 2023
64adfef
Merge pull request #7171 from SalesforceFoundation/feature/fix_q3_rob…
Safiyab Mar 13, 2023
30aa454
Merge 64adfef62c5b4aacd9651541338d07b9b5febb61 into feature/238
salesforce-org-metaci[bot] Mar 13, 2023
4b78f89
Updating yml with static release notes
lparrott Mar 14, 2023
44172cb
Update static Release Notes text and link
lparrott Mar 15, 2023
e3c17bd
Updating minimum cci version to support static github notes
lparrott Mar 15, 2023
746385f
Merge branch 'feature/addStaticReleaseNotes' of https://github.com/Sa…
lparrott Mar 15, 2023
4deea16
W-10866049 Manage Allocations XSS fix
lparrott Apr 3, 2023
5f266b9
W-10866127 and W-10866177 fixes, Default Allocations Settings
lparrott Apr 4, 2023
9bffdc6
Fix for W-11553839 Payment Wizard
lparrott Apr 4, 2023
f76e786
Fix for W-11547533, RD Batch settings page
lparrott Apr 4, 2023
b10f13e
W-11548191 fix, Error Log table in Settings
lparrott Apr 4, 2023
93c040b
Fix for W-11564391 Contact Merge
lparrott Apr 5, 2023
a586704
Fix for W-11554050 and W-11553948 Levels page
lparrott Apr 5, 2023
4c5522c
Update HtmlOutput to allow nbsp
lparrott Apr 5, 2023
71687e6
Hiding Application Status component since it is causing confusion in …
lparrott Apr 18, 2023
bbedba5
Add permission check to runBatchDryRun / W-9463070
npsp-reedestockton Apr 19, 2023
7b4843a
Check for Admin user in BDI_ManageAdvancedMapping.getAdvancedMappingO…
npsp-reedestockton Apr 19, 2023
2c96c73
Move AuraEnabled restricted getDataImportSettings to GE_GiftEntryCont…
npsp-reedestockton Apr 19, 2023
3047082
Updating Permission check for Gift Entry
lparrott Apr 19, 2023
03d5f5b
Merge remote-tracking branch 'origin/feature/xssSecurityFixes' into f…
lparrott Apr 20, 2023
1386dd3
Merge pull request #7178 from SalesforceFoundation/feature/security-f…
lparrott May 10, 2023
38e727a
Updating Elevate Validation to ignore newly added Payments
lparrott Jun 26, 2023
3c532e3
Merge pull request #7182 from SalesforceFoundation/feature/W-13635935…
daniel-fuller Jul 6, 2023
db111ef
Merge 3c532e30e8cb1ad42a9d098991e4e136e504c654 into feature/addStatic…
salesforce-org-metaci[bot] Jul 6, 2023
fe23c43
Merge 3c532e30e8cb1ad42a9d098991e4e136e504c654 into feature/238
salesforce-org-metaci[bot] Jul 6, 2023
1052379
Merge pull request #7173 from SalesforceFoundation/feature/addStaticR…
lparrott Jul 6, 2023
b92770f
Merge 10523799ad668cbc0d0e8ad0785665b82666b54d into feature/238
salesforce-org-metaci[bot] Jul 6, 2023
084a16b
Updating solutation for French
dmkud Aug 7, 2023
e6ab6e5
Merge pull request #7186 from SalesforceFoundation/feature/246__local…
lparrott Aug 8, 2023
aa3ca3e
Merge e6ab6e5c5c095604ba8a024dac79351a94b59dce into feature/238
salesforce-org-metaci[bot] Aug 8, 2023
0de80d2
Merge aa3ca3eb09dcd87b042b395aace472b6faf77131 into feature/248
salesforce-org-metaci[bot] Aug 8, 2023
8630c9e
a11y WCAG 2.1 color contrast updates
npsp-reedestockton Sep 7, 2023
2f939e0
Fix missing newlines
npsp-reedestockton Sep 8, 2023
0cc76cf
Merge pull request #7190 from SalesforceFoundation/feature/248__a11y-…
npsp-reedestockton Sep 8, 2023
e2c447b
Potential Duplicates POC
npsp-reedestockton Sep 15, 2023
e452bb9
Make id dynamic in url
npsp-reedestockton Sep 15, 2023
0e4fafb
Make toast conditional
npsp-reedestockton Sep 15, 2023
be1f8f2
Updating Duplicate component to search IDs
lparrott Sep 18, 2023
fca5aad
Cleanup, new Label and starting jest tests
lparrott Sep 18, 2023
3f17dbc
Adding Potential Duplicates jest tests
lparrott Sep 19, 2023
7eda695
Adding Potential Duplicates Apex Tests
lparrott Sep 19, 2023
368259e
Fixing UI when passing serach IDs
lparrott Sep 19, 2023
35678f2
Don't execute methods with security issues. Module is deprecated, so …
npsp-reedestockton Sep 20, 2023
a1bc1ca
Add WITH SECURITY_ENFORCED to Account query.
npsp-reedestockton Sep 20, 2023
7451e11
Fix for namespace link to Duplicates
lparrott Sep 20, 2023
1b4b2b8
Add comments to method changes.
npsp-reedestockton Sep 20, 2023
ff68871
Add comment to method change.
npsp-reedestockton Sep 20, 2023
b198795
Immediate return from method if not running test.
npsp-reedestockton Sep 20, 2023
0a0278c
Change approach. Remove (comment out) insecure methods.
npsp-reedestockton Sep 21, 2023
a7fea9f
Clear the commented code.
npsp-reedestockton Sep 21, 2023
5bca4f6
Change approach to remove insecure method.
npsp-reedestockton Sep 21, 2023
aa723a9
Fix page load issue.
npsp-reedestockton Sep 22, 2023
9c1ad10
Merge remote-tracking branch 'origin/feature/248__acct_viewOverride' …
lparrott Sep 22, 2023
676225f
Merge remote-tracking branch 'origin/feature/248__bde_batchEntry' int…
lparrott Sep 22, 2023
7fa2565
Merge 676225fbc5e17ffff4bea1f59d1fe95b18c0c636 into feature/248__npsp…
salesforce-org-metaci[bot] Sep 22, 2023
9af64e6
Add read check on Status__c to findDIRecords.
npsp-reedestockton Sep 22, 2023
97c5ada
Fix message reference in test & adopt single approach to UTIL_Permiss…
npsp-reedestockton Sep 23, 2023
e610645
Add Delete, Create and FLS checks to saveClose()
npsp-reedestockton Sep 23, 2023
e75a03c
Merge branch 'feature/248__allo_manageAllocations' into feature/248
lparrott Sep 25, 2023
5f5fd86
Merge branch 'feature/248__bdi_dataImportDelete' into feature/248
lparrott Sep 25, 2023
5a5bc60
Merge 5f5fd860f4c051f73198790a7567cd61cc328a35 into feature/248__npsp…
salesforce-org-metaci[bot] Sep 25, 2023
53157c1
Update RD2 preflight class_path to work-around installer errors (#7198)
force2b Oct 9, 2023
7d60e0f
Merge 53157c1b1528c73a07e379fff72a07a3a2803739 into feature/238
salesforce-org-metaci[bot] Oct 9, 2023
34efac3
Merge 7d60e0ff2ee08fc080590f538b985e6e2bda08ee into feature/248
salesforce-org-metaci[bot] Oct 9, 2023
0432b3a
Merge pull request #7191 from SalesforceFoundation/feature/248__npsp-…
npsp-reedestockton Nov 6, 2023
35b0382
Add CRUD/FLS checks
npsp-reedestockton Oct 16, 2023
93e7521
Exclude 'npe03' and '__r' from queryFields
npsp-reedestockton Oct 17, 2023
c77c878
Fix logic for applying UTIL_Namespace.StrTokenNSPrefix()
npsp-reedestockton Oct 17, 2023
febbb83
Change exception class to UTIL_Permissions.InsufficientPermissionExce…
npsp-reedestockton Oct 19, 2023
b663013
Add update check for Opportunity Name
npsp-reedestockton Oct 19, 2023
a51cd13
Change exception class to UTIL_Permissions.InsufficientPermissionExce…
npsp-reedestockton Oct 19, 2023
0d64cfd
Refactor try/catch block
npsp-reedestockton Oct 23, 2023
4c007ee
Check security on Data Import and Form Template
npsp-reedestockton Oct 31, 2023
a76dee9
Fix broken test and aurahandled message
npsp-reedestockton Oct 31, 2023
35e9e25
Refactor try/catch logic
npsp-reedestockton Nov 1, 2023
a2c516a
Remove AuraEnabled notation from deleteFormTemplates()
npsp-reedestockton Nov 1, 2023
bd46c61
Refactor/Move code
npsp-reedestockton Nov 1, 2023
6f7f36a
Refactor canUpsertDataImport()
npsp-reedestockton Nov 2, 2023
7a57eaa
Refactor and add comments.
npsp-reedestockton Nov 3, 2023
8182dd7
Add FLS and refactor.
npsp-reedestockton Nov 5, 2023
19675e5
Add FLS and refactor.
npsp-reedestockton Nov 5, 2023
f422dd2
Add FLS for CampaignMember.Status
npsp-reedestockton Nov 6, 2023
f98e9d7
Add FLS for queries and check CRUD for deletes
npsp-reedestockton Nov 6, 2023
a6b6eca
Check isMergeable and strip inaccessible fields from search results.
npsp-reedestockton Nov 8, 2023
0dc6a96
Add Opportunity fields to required and call check hasFeatureAccess
npsp-reedestockton Nov 9, 2023
ea2a4b9
Fix unit tests / set hasFeatureAccess true
npsp-reedestockton Nov 9, 2023
96a2464
Add OCR read, modify and delete to hasAccess. Check hasAccess in save().
npsp-reedestockton Nov 9, 2023
454e70c
Add hasAccess check to controller and page
npsp-reedestockton Nov 10, 2023
82d6a0c
Revert unnecessary changes...
npsp-reedestockton Nov 10, 2023
626ebad
Fix access checks
npsp-reedestockton Nov 10, 2023
917b6a9
Fix access checks
npsp-reedestockton Nov 10, 2023
c1e144d
Prevent page access without read access to basic lead fields
npsp-reedestockton Nov 10, 2023
636dc39
Fix failing HH_ManageHH_Test.testNewHHObject()
npsp-reedestockton Nov 10, 2023
8c4f932
Check for AuraHandledErrorMessage in shouldNotReturnPauseDataWhenUser…
npsp-reedestockton Nov 10, 2023
81f86c3
Merge 8c4f932b356cfcded2fdf7de6d4afebdd1ae4d8f into feature/248__secu…
salesforce-org-metaci[bot] Nov 10, 2023
a3b24f2
Check for standard Level__c field creation permission
npsp-reedestockton Nov 10, 2023
6e52c17
Remove fields to check from hasFieldReadAccess()
npsp-reedestockton Nov 15, 2023
cb4557e
Remove Undeliverable__c from fields to check for Address read access
npsp-reedestockton Nov 15, 2023
e122060
Add permissions check for CampaignMemberStatus
npsp-reedestockton Nov 15, 2023
1a05e57
Remove @TestVisible annotation
npsp-reedestockton Nov 15, 2023
2245fbf
Fix copy/paste error resulting in bad build
npsp-reedestockton Nov 15, 2023
d8ff2e9
Merge pull request #7216 from SalesforceFoundation/feature/248__secur…
npsp-reedestockton Nov 16, 2023
bd0b2e9
Merge pull request #7215 from SalesforceFoundation/feature/248__secur…
npsp-reedestockton Nov 16, 2023
879ccdb
Fix encryption error in Potential Duplicates test
npsp-reedestockton Nov 16, 2023
70a5ff4
Merge pull request #7195 from SalesforceFoundation/feature/248
npsp-reedestockton Nov 17, 2023
80c26e3
Fix error in PotentialDuplicates_TEST.shouldReturnIdsWhenDuplicatesAr…
npsp-reedestockton Nov 17, 2023
78889bf
Add to comment regarding platform encryption test failure
npsp-reedestockton Nov 17, 2023
3266e56
Merge pull request #7218 from SalesforceFoundation/feature/fix-potent…
npsp-reedestockton Nov 17, 2023
5ed8096
Check for no duplicate rules enabled in PotentialDuplicates_TEST
npsp-reedestockton Nov 17, 2023
9be16b0
Updated translations
dmkud Nov 18, 2023
f1a3e1d
Refactor permission check and set hasAccess = true for HH_CampaignDed…
npsp-reedestockton Nov 18, 2023
f012808
Merge pull request #7220 from SalesforceFoundation/feature/fix-beta-t…
npsp-reedestockton Nov 20, 2023
703c340
Merge f012808aea91635b6da294c665da4e8e2640c15e into feature/238
salesforce-org-metaci[bot] Nov 21, 2023
295de0a
Merge 703c34083d458e634782b4ec3caf3871b0e52c2f into feature/248
salesforce-org-metaci[bot] Nov 21, 2023
1169854
Merge 295de0a5843a104679d7e792a70e1c98ba69d024 into feature/248__loca…
salesforce-org-metaci[bot] Nov 21, 2023
83021df
Replace apostrophe with entity name - '
npsp-reedestockton Nov 27, 2023
03b559b
Use translated picklist values in RD2_StatusAutomationSettings_TEST
npsp-reedestockton Nov 28, 2023
65a391a
Merge pull request #7219 from SalesforceFoundation/feature/248__local…
npsp-reedestockton Nov 28, 2023
6b2c0eb
Fix check for isHHAccount
npsp-reedestockton Dec 7, 2023
6ed53c8
Remove unnecessary field checks
npsp-reedestockton Dec 7, 2023
98919c9
Fix namespace issue in canUpdateHousehold()
npsp-reedestockton Dec 8, 2023
9317c73
Refactor namespace fix
npsp-reedestockton Dec 8, 2023
b204fc9
Testing 2gp failure. Will be reverted...
npsp-reedestockton Dec 9, 2023
57a408e
Revert "Testing 2gp failure. Will be reverted..."
npsp-reedestockton Dec 9, 2023
a7beb6a
Testing 2gp failure. Will be reverted...
npsp-reedestockton Dec 9, 2023
f267088
Testing 2gp failure. Will be reverted...
npsp-reedestockton Dec 9, 2023
ba8bf84
Testing re-introducing HH_ManageHH_CTRL original changes (with !isHHA…
npsp-reedestockton Dec 9, 2023
49ee61b
Revert "Testing re-introducing HH_ManageHH_CTRL original changes (wit…
npsp-reedestockton Dec 9, 2023
e113cdc
Original HH_ManageHH_CTRL and HH_ManageHH visualforce page
npsp-reedestockton Dec 9, 2023
d6b118d
Add back AuraEnabled and isMergeable changes
npsp-reedestockton Dec 9, 2023
c6e3656
Add back structure of saveHouseholdPage and return true from checkAdd…
npsp-reedestockton Dec 9, 2023
8ab333c
Re-introduce check of visible address fields.
npsp-reedestockton Dec 10, 2023
1f0ad88
Re-introduce original HH_ManageHH_CTRL code with reversed !isHHAccount.
npsp-reedestockton Dec 10, 2023
61c5989
Remove isHHAccount reference and check for permission exceptions
npsp-reedestockton Dec 10, 2023
d51b683
Merge pull request #7222 from SalesforceFoundation/feature/248__house…
npsp-reedestockton Dec 12, 2023
3caa07e
Remove unnecessary security check.
npsp-reedestockton Jan 10, 2024
5b8f1ad
Remove sorting and filtering by the MailingState__c field allow it to…
force2b Jan 10, 2024
4cad52b
Remove AuraHandledException catch block
npsp-reedestockton Jan 11, 2024
802c198
Remove use of UTIL_Finder because it appears when the field is encryp…
force2b Jan 12, 2024
3d0db02
Merge pull request #7225 from SalesforceFoundation/feature/bug-W-1477…
npsp-reedestockton Jan 12, 2024
448ece6
Merge pull request #7224 from SalesforceFoundation/feature/bug-fix-ge…
npsp-reedestockton Jan 16, 2024
b66a1b7
Update Repository ReadMe and New Issue Template (#7229)
force2b Feb 20, 2024
5898fa5
Update cumulusci.yml for release notes statement (#7228)
melissabarber Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/read-this-for-all-support-and-questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: READ THIS FOR ALL SUPPORT AND QUESTIONS
about: 'GO HERE: http://sfdc.co/npchub'
title: ''
labels: invalid
assignees: ''

---

==== IMPORTANT NOTES ====

The Nonprofit Success Pack team does not review or respond to support requests or questions posted in this repository.

Instead, please post all questions and issues directly in the Nonprofit Hub of the Trailblazer Community: http://sfdc.co/npchub
========================================================================
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Referenced Packages
*.sublime-project
*.sublime-workspace
**/.sfdx/
**/.sf/
**/.vscode/
**/.idea/
**/.mypy_cache/
Expand All @@ -42,7 +43,8 @@ robot/Cumulus/results/
datasets/dev_org/test_data.db
*.db
.cci

.sfdx
.sf
# LWC
force-app/main/default/lwc/.eslintrc.json
/node_modules
Expand Down
40 changes: 28 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
![Salesforce Nonprofit Success Pack](https://cloud.githubusercontent.com/assets/450473/18836784/15e1774a-83c7-11e6-8434-0521d4fbebc0.png "Salesforce Nonprofit Success Pack")

#### For Users
## Important Note

* <a href="https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000kHitSAE?tab=discussion&sort=LAST_MODIFIED_DATE_DESC" target="_blank">Ask questions or get help</a>
* <a href="https://github.com/SalesforceFoundation/NPSP/issues/new" target="_blank">Log a confirmed Issue</a> or <a href="https://ideas.salesforce.com/s/search#t=All&sort=relevancy" target="_blank">Feature Request</a>
* <a href="https://powerofus.force.com/NPSP_Documentation" target="_blank">User Documentation</a>
* Check out existing <a href="https://github.com/SalesforceFoundation/NPSP/labels/bug" target="_blank">bugs</a> and <a href="https://ideas.salesforce.com/s/search#t=All&sort=relevancy&f:@sfcategoryfull=[Nonprofit%7CNonprofit%20Success%20Pack]" target="_blank">feature and enhancement requests.</a>
* <a href="https://github.com/SalesforceFoundation/NPSP/releases" target="_blank">Release Notes and Beta Releases</a>
In 2023, Salesforce launched the Nonprofit Cloud which is at the foundation of Salesforce for Nonprofits. Nonprofit Cloud helps teams unify their data to work beyond silos and better collaborate, share, learn from, and use their data. Use Nonprofit Cloud as your a single solution to begin or continue in your digital transformation journey. Read more about the [new Nonprofit Cloud](https://www.salesforce.com/blog/new-nonprofit-cloud/). Some key highlights:

* Salesforce will to continue support our managed package products, including the Nonprofit Success Pack. Tens of thousands of customers use our current managed package products to achieve great results.
* Many of our ISV partners are building fantastic solutions for our managed packages as well as the new Nonprofit Cloud. We’re working with these partners to ensure that they understand our new product architecture, and are able to bring their years of experience and learnings to the new Nonprofit Cloud.
* Salesforce remains deeply committed to nonprofit pricing. There are many new capabilities within the new Nonprofit Cloud and we work hard to maintain our nonprofit discounts across the new products. Our goals are to simplify access to nonprofit technology and make it easier for customers to get started.
* Salesforce continues to grant free licenses with the Power of Us Program for the managed packages and Nonprofit Cloud. With Nonprofit Cloud, the Power of Us program also includes more features than ever to accelerate and deepen the nonprofit experience.
* Take the new product for a test drive. Sign-up for a [Nonprofit Cloud Trial org](https://help.salesforce.com/s/articleView?id=sfdo.NPC_Create_Nonprofit_Cloud_Trial_Org.htm&type=5).
* Visit the [Nonprofit Hub](https://trailhead.salesforce.com/trailblazer-community/groups/0F9300000001ocxCAA?tab=discussion&sort=LAST_MODIFIED_DATE_DESC) to chat with others about how nonprofits use Salesforce for social good.

---
### For Nonprofit Success Pack Users and admins

* Check out existing [Nonprofit feature and enhancement requests](https://ideas.salesforce.com/s/search#t=All&sort=relevancy&f:@sfcategoryfull=[Nonprofit%7CNonprofit%20Cloud,Nonprofit%7CNonprofit%20Success%20Pack%20(NPSP)%20-%20Managed%20Package]).
* [Ask questions or get help with the Nonprofit Success Pack](https://trailhead.salesforce.com/trailblazer-community/groups/0F94S000000kHitSAE)
* [Ask for support or questions with other Nonprofit Users and Partners](https://trailhead.salesforce.com/trailblazer-community/groups/0F9300000001ocxCAA)
* [Nonprofit Success Pack (NPSP) Documentation](https://help.salesforce.com/s/articleView?id=sfdo.Nonprofit_Success_Pack.htm)
* [Release Notes](https://sfdc.co/bnL4Cb)
* [Known Issues](https://issues.salesforce.com/#f[sfcategoryfull]=Nonprofit%7CNonprofit%20Success%20Pack%20(NPSP)%20-%20Managed%20Package)

### Try out the Nonprofit Success Pack

#### Try it out
You can install NPSP utilizing our custom application installer into any Developer Edition, Sandbox or Enterprise Edition Salesforce org.
* <a href="https://install.salesforce.org/products/npsp" target="_blank">NPSP Installer</a>

#### Meta
* [NPSP Installer](https://install.salesforce.org/products/npsp)

### Try out the New Nonprofit Cloud

* [Nonprofit Cloud Learning Org Signup](https://help.salesforce.com/s/articleView?id=sfdo.NPC_Create_Nonprofit_Cloud_Trial_Org.htm&type=5)

The Nonprofit Success Pack (“NPSP”) is an open-source package licensed by Salesforce.org (“SFDO”) under the BSD-3 Clause License, found at https://opensource.org/licenses/BSD-3-Clause. ANY MASTER SUBSCRIPTION AGREEMENT YOU OR YOUR ENTITY MAY HAVE WITH SFDO DOES NOT APPLY TO YOUR USE OF NPSP. NPSP IS PROVIDED “AS IS” AND AS AVAILABLE, AND SFDO MAKES NO WARRANTY OF ANY KIND REGARDING NPSP, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, FREEDOM FROM DEFECTS OR NON-INFRINGEMENT, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW.
SFDO WILL HAVE NO LIABILITY ARISING OUT OF OR RELATED TO YOUR USE OF NPSP FOR ANY DIRECT DAMAGES OR FOR ANY LOST PROFITS, REVENUES, GOODWILL OR INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, COVER, BUSINESS INTERRUPTION OR PUNITIVE DAMAGES, WHETHER AN ACTION IS IN CONTRACT OR TORT AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF A REMEDY OTHERWISE FAILS OF ITS ESSENTIAL PURPOSE. THE FOREGOING DISCLAIMER WILL NOT APPLY TO THE EXTENT PROHIBITED BY LAW. SFDO DISCLAIMS ALL LIABILITY AND INDEMNIFICATION OBLIGATIONS FOR ANY HARM OR DAMAGES CAUSED BY ANY THIRD-PARTY HOSTING PROVIDERS.
### Meta

_ducking-octo-happiness, laughing-archer_
The Nonprofit Success Pack (“NPSP”) is an open-source package licensed by Salesforce.org (“SFDO”) under the BSD-3 Clause License, found at https://opensource.org/licenses/BSD-3-Clause. ANY MASTER SUBSCRIPTION AGREEMENT YOU OR YOUR ENTITY MAY HAVE WITH SFDO DOES NOT APPLY TO YOUR USE OF NPSP. NPSP IS PROVIDED “AS IS” AND AS AVAILABLE, AND SFDO MAKES NO WARRANTY OF ANY KIND REGARDING NPSP, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, FREEDOM FROM DEFECTS OR NON-INFRINGEMENT, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW. SFDO WILL HAVE NO LIABILITY ARISING OUT OF OR RELATED TO YOUR USE OF NPSP FOR ANY DIRECT DAMAGES OR FOR ANY LOST PROFITS, REVENUES, GOODWILL OR INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, COVER, BUSINESS INTERRUPTION OR PUNITIVE DAMAGES, WHETHER AN ACTION IS IN CONTRACT OR TORT AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF A REMEDY OTHERWISE FAILS OF ITS ESSENTIAL PURPOSE. THE FOREGOING DISCLAIMER WILL NOT APPLY TO THE EXTENT PROHIBITED BY LAW. SFDO DISCLAIMS ALL LIABILITY AND INDEMNIFICATION OBLIGATIONS FOR ANY HARM OR DAMAGES CAUSED BY ANY THIRD-PARTY HOSTING PROVIDERS.
1 change: 1 addition & 0 deletions StaticResourceSources/npsp-slds/npsp-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ input.lookupInput {
input.lookupInputSLDS {
width: 100%;
margin-right: -30px !important;
border-color: #747474 !important;
}
body .dateInput input[type="text"], .slds-vf-scope .dateInput input[type="text"] {
margin-left: 0;
Expand Down
21 changes: 18 additions & 3 deletions cumulusci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimum_cumulusci_version: 3.23.0
minimum_cumulusci_version: 3.74.0
project:
name: Cumulus
source_format: sfdx
Expand Down Expand Up @@ -221,13 +221,18 @@ tasks:
options:
update_future_releases: True

github_release:
options:
release_content: |
Check out the [Salesforce Release Notes](https://sfdc.co/bnL4Cb) or [Known Issues](https://issues.salesforce.com/) for details.

github_release_notes:
options:
trial_info: "`TBD`"

is_rd2_enabled:
description: This preflight check ensures that Enhanced Recurring Donations is enabled
class_path: tasks.is_rd2_enabled
class_path: tasks.check_rd2_enablement.is_rd2_enabled
group: NPSP

robot:
Expand Down Expand Up @@ -769,6 +774,12 @@ tasks:
- "*.cls"

flows:

release_production:
steps:
3:
task: None

build_unlocked_test_package:
steps:
0:
Expand Down Expand Up @@ -1778,8 +1789,12 @@ orgs:
namespaced: True
trial:
config_file: orgs/trial.json
enterprise:
metecho_trial:
config_file: orgs/enterprise.json
days: 30
setup_flow: config_trial_org
enterprise:
config_file: orgs/dev.json

plans:
existing_org:
Expand Down
5 changes: 4 additions & 1 deletion force-app/main/default/classes/ACCT_ViewOverride_CTRL.cls
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public with sharing class ACCT_ViewOverride_CTRL {
public ACCT_ViewOverride_CTRL (ApexPages.StandardController controller)
{
//get the account with the npe01__one2oneContact__c field for use in the rederict if necessary
List <Account> accounts = [select id, npe01__one2oneContact__c, npe01__SYSTEM_AccountType__c from Account where id = :ApexPages.currentPage().getParameters().get('id')];
// WITH SECURITY_ENFORCED isn't really necessary, but it won't hurt anything and should pass automated
// security checks
List <Account> accounts = [select id, npe01__one2oneContact__c, npe01__SYSTEM_AccountType__c
from Account where id = :ApexPages.currentPage().getParameters().get('id') WITH SECURITY_ENFORCED];
if (accounts.size() > 0)
{
account = accounts[0];
Expand Down
60 changes: 54 additions & 6 deletions force-app/main/default/classes/ALLO_Allocations_TDTM.cls
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,22 @@ public class ALLO_Allocations_TDTM extends TDTM_Runnable {
private void runPaymentTriggerHandler(List<SObject> newlist, List<SObject> oldlist,
TDTM_Runnable.Action triggerAction, Schema.DescribeSObjectResult objResult) {


//do not run if Payment allocations are disabled
if (isPaymentAllocationsEnabled()) {
processPaymentAllocations(newlist, oldlist, triggerAction);
}

if (triggerAction == TDTM_Runnable.Action.AfterInsert || triggerAction == TDTM_Runnable.Action.AfterUpdate) {
handleAllocationsAndOpportunities(newList, oldList);
}
}

private void processPaymentAllocations(List<SObject> newlist, List<SObject> oldlist, TDTM_Runnable.Action triggerAction) {
List<npe01__OppPayment__c> listPmtsForProcessing = new List<npe01__OppPayment__c>();
List<npe01__OppPayment__c> pmtsWithNullOldAmount = new List<npe01__OppPayment__c>();
List<npe01__OppPayment__c> pmtsNeedingAllocations = new List<npe01__OppPayment__c>();

//do not run if Payment allocations are disabled
if (!isPaymentAllocationsEnabled()) {
return;
}

for (integer i=0; i<newList.size(); i++) {
npe01__OppPayment__c pmt = (npe01__OppPayment__c) newlist[i];
Expand Down Expand Up @@ -280,10 +288,49 @@ public class ALLO_Allocations_TDTM extends TDTM_Runnable {
fillMapWrapper(pmts);

paymentAmountCurrencyChange(pmts);
//paymentAmountCurrencyChange(listPmtsForProcessing);
}
}

private void handleAllocationsAndOpportunities(
List<npe01__OppPayment__c> newList,
List<npe01__OppPayment__c> oldList
) {
List<npe01__OppPayment__c> refunds = new List<npe01__OppPayment__c>();
List<npe01__OppPayment__c> oldRefunds = new List<npe01__OppPayment__c>();
for (Integer i = 0; i < newList.size(); i++) {
if (newList[i].npe01__Payment_Amount__c < 0 && String.isBlank(newList[i].Elevate_Payment_ID__c) && hasRefundDebitType(newList[i])) {
refunds.add(newList[i]);
if ( oldList != null) {
oldRefunds.add(oldList[i]);
}
}
}

if (refunds.isEmpty()) {
return;
}

PMT_RefundService refundService = new PMT_RefundService()
.withRefundRecords(refunds)
.withOldRefundRecords(oldRefunds);

refundService.adjustAllocationsAndOpportunities()
.updateAllocationsAndOpportunities();

List<ErrorRecord> errorRecords = refundService.getErrors();

for (ErrorRecord error : errorRecords) {
if (error.hasError()) {
error.getRecord().addError(error.getFirstError());
}
}
}

private Boolean hasRefundDebitType (npe01__OppPayment__c payment) {
return (payment.DebitType__c == PMT_RefundService.PARTIAL_REFUND
|| payment.DebitType__c == PMT_RefundService.FULL_REFUND);
}

/*******************************************************************************************************
* @description Allocations before trigger handler on GAU Allocation. Validates allocation data per
* object and per parent object to avoid badly created allocations, exceeding opportunity amount,
Expand Down Expand Up @@ -799,9 +846,10 @@ public class ALLO_Allocations_TDTM extends TDTM_Runnable {
}
}
//if the Opportunity amount has decreased, we run the risk of allocations exceeding the total opportunity amount
if (oppWrap.totalAmount > oppWrap.parentAmount)
if (oppWrap.totalAmount > oppWrap.parentAmount) {
//using addError here because we want to block opportunity update, display the error inline, and block the DML of updating all the related allocations
opp.Amount.addError(Label.alloExceedsOppAmount);
}
}
//if we have no allocations for this opportunity, defaults are enabled, and the opportunity has an amount, make a default allocation
} else if (settings.Default_Allocations_Enabled__c && opp.Amount != null) {
Expand Down
98 changes: 98 additions & 0 deletions force-app/main/default/classes/ALLO_Allocations_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,104 @@ private with sharing class ALLO_Allocations_TEST {

}

/*******************************************************************************************************
* @description When working with negative and positive Payments:
* A mixture of positive and negative payments should be successfully inserted
* This test was created to ensure we are not breaking Accounting Subledger functionality
********************************************************************************************************/
static testMethod void pmtsWithPositiveAndNegativeAmounts() {
Date todaysDate = System.today();
Date tomorrowsDate = System.today().addDays(1);
Date todayPlusOneMonthsDate = System.today().addMonths(1);
Date todayPlusTwoMonthsDate = System.today().addMonths(2);
Date todayPlusThreeMonthsDate = System.today().addMonths(3);

General_Accounting_Unit__c defaultGau = new General_Accounting_Unit__c(Name='default GAU');
insert defaultGau;

setupSettings(new Allocations_Settings__c(
Payment_Allocations_Enabled__c = true,
Default_Allocations_Enabled__c = true,
Default__c = defaultGau.Id));

Account acc = new Account(Name='Account-pmtAmountChange');
insert acc;

List<General_Accounting_Unit__c> gaus = UTIL_UnitTestData_TEST.createGAUs(4);
insert gaus;

Opportunity opp = new Opportunity(Name='Opp-pmtAmountChange', Amount = 1000, AccountID=acc.Id, CloseDate=System.today(), StageName=UTIL_UnitTestData_TEST.getOpenStage(), npe01__Do_Not_Automatically_Create_Payment__c=true);
insert opp;

//Create Opportunity Allocation Defaults
List<Allocation__c> oppAllocations = new List<Allocation__c>();
Allocation__c opp1Allo1 = new Allocation__c(General_Accounting_Unit__c = gaus[0].Id,
Amount__c = 200, //20%
Opportunity__c = opp.Id);
Allocation__c opp1Allo2 = new Allocation__c(General_Accounting_Unit__c = gaus[1].Id,
Amount__c = 800, //80%
Opportunity__c = opp.Id);

oppAllocations.add(opp1Allo1);
oppAllocations.add(opp1Allo2);

insert oppAllocations;

List<npe01__OppPayment__c> payments = new List<npe01__OppPayment__c>();
npe01__OppPayment__c p1 = new npe01__OppPayment__c(npe01__Opportunity__c = opp.Id,
npe01__Scheduled_Date__c = todaysDate, npe01__Payment_Amount__c = 400);
npe01__OppPayment__c p2 = new npe01__OppPayment__c(npe01__Opportunity__c = opp.Id,
npe01__Scheduled_Date__c = todayPlusOneMonthsDate,
npe01__Payment_Amount__c = 600);
payments.add(p1);
payments.add(p2);

insert payments;

opp.StageName = UTIL_UnitTestData_TEST.getClosedWonStage();
update opp;

payments = new List<npe01__OppPayment__c>();

//Now Insert a mixture of payments
p1 = new npe01__OppPayment__c(
npe01__Opportunity__c = opp.Id,
npe01__Payment_Date__c = todaysDate,
npe01__Paid__c = true,
npe01__Payment_Amount__c = 300);
p2 = new npe01__OppPayment__c(
npe01__Opportunity__c = opp.Id,
npe01__Payment_Date__c = todayPlusOneMonthsDate,
npe01__Paid__c = true,
npe01__Payment_Amount__c = -200);
npe01__OppPayment__c p3 = new npe01__OppPayment__c(
npe01__Opportunity__c = opp.Id,
npe01__Payment_Date__c = todayPlusTwoMonthsDate,
npe01__Paid__c = true,
npe01__Payment_Amount__c = 500);
npe01__OppPayment__c p4 = new npe01__OppPayment__c(
npe01__Opportunity__c = opp.Id,
npe01__Payment_Date__c = todayPlusThreeMonthsDate,
npe01__Paid__c = true,
npe01__Payment_Amount__c = -600);

payments.add(p1);
payments.add(p2);
payments.add(p3);
payments.add(p4);

Test.startTest();
insert payments;
Test.stopTest();

List<Allocation__c> queryAllo = getAllocationsOrderByPercent(p1.Id, gaus[0].Id);
System.assertEquals(300 * 0.2, queryAllo[0].Amount__c, 'The allocation amount should be 20% of the Payment');

queryAllo = getAllocationsOrderByPercent(p2.Id, gaus[0].Id);
System.assertEquals(-200 * 0.2, queryAllo[0].Amount__c, 'The allocation amount should be 20% of the Payment');

}

/*******************************************************************************************************
* @description When working with negative amount Payments:
* Updating the amount will adjust the percentage allocations.
Expand Down
Loading
Loading