Skip to content

Commit

Permalink
Unable to set list price as 0 for inventory records. It's fixed now
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthchilka committed Jan 25, 2019
1 parent bbfd92c commit 256b8f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/zoho/crm/library/api/handler/EntityAPIHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public function getLineItemJSON($lineItemsArray)
}
$lineItemData['line_tax']=$lineTaxArray;

array_push($lineItemsAsJSONArray,array_filter($lineItemData));
array_push($lineItemsAsJSONArray,array_filter($lineItemData,'CommonUtil::removeNullValuesAlone'));
}
return array_filter($lineItemsAsJSONArray);
}
Expand Down
4 changes: 4 additions & 0 deletions src/com/zoho/crm/library/common/CommonUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@ public static function getEmptyJSONObject()
{
return new ArrayObject();
}
public static function removeNullValuesAlone($value)
{
return $value!==null;
}
}
?>

0 comments on commit 256b8f6

Please sign in to comment.