public function Charge::needsProration in Commerce Recurring Framework 8
Gets whether the unit price needs to be prorated.
Return value
bool TRUE if the unit price needs to be prorated, FALSE otherwise.
File
- src/
Charge.php, line 161
Class
- Charge
- Represents a charge.
Namespace
Drupal\commerce_recurringCode
public function needsProration() {
return $this->fullBillingPeriod
->getDuration() != $this->billingPeriod
->getDuration();
}