1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +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]); $term = strtolower($matches[2]);
$price = $invoice_item->cost; $price = $invoice_item->cost;
if ($plan == PLAN_ENTERPRISE) { if ($plan == PLAN_ENTERPRISE) {
if (count($matches)) { preg_match('/###[\d] [\w]* (\d*)/', $invoice_item->notes, $numUserMatches);
$numUsers = $matches[1]; if (count($numUserMatches)) {
$numUsers = $numUserMatches[1];
} else { } else {
$numUsers = 5; $numUsers = 5;
} }