Skip to content

Commit

Permalink
Merge pull request #981 from compucorp/CIWEMB-514-fix-contribcreate
Browse files Browse the repository at this point in the history
CIWEMB-514: Fix not able to create non-salesorder contribution
  • Loading branch information
olayiwola-compucorp authored Oct 2, 2023
2 parents b8be601 + 56aec87 commit 460c3e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CRM/Civicase/Hook/Post/CaseSalesOrderPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function run($op, $objectName, $objectId, &$objectRef) {
->execute()
->first();

$this->updateQuotationFinancialStatuses($contribution['Opportunity_Details.Quotation']);
$this->updateCaseOpportunityFinancialDetails($contribution['Opportunity_Details.Case_Opportunity']);
$this->updateQuotationFinancialStatuses($contribution['Opportunity_Details.Quotation'] ?: NULL);
$this->updateCaseOpportunityFinancialDetails($contribution['Opportunity_Details.Case_Opportunity'] ?: NULL);
}

/**
Expand All @@ -51,7 +51,7 @@ public function run($op, $objectName, $objectId, &$objectRef) {
* @param int $salesOrderID
* CaseSalesOrder ID.
*/
private function updateQuotationFinancialStatuses(int $salesOrderID): void {
private function updateQuotationFinancialStatuses(?int $salesOrderID): void {
if (empty($salesOrderID)) {
return;
}
Expand Down

0 comments on commit 460c3e8

Please sign in to comment.