1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix for setting num users

This commit is contained in:
Hillel Coren 2016-09-27 21:03:46 +03:00
parent 2b2cfbc2e5
commit f7b7796f25

View File

@ -623,8 +623,9 @@ class BasePaymentDriver
$term = strtolower($matches[2]);
$price = $invoice_item->cost;
if ($plan == PLAN_ENTERPRISE) {
if (count($matches)) {
$numUsers = $matches[1];
preg_match('/###[\d] [\w]* (\d*)/', $invoice_item->notes, $numUserMatches);
if (count($numUserMatches)) {
$numUsers = $numUserMatches[1];
} else {
$numUsers = 5;
}