extension app is getting ready for billing
This commit is contained in:
parent
fefaa06bea
commit
f77545bf40
|
|
@ -612,4 +612,9 @@
|
||||||
$text['message-required']['pt-pt'] = "Por favor forneça: ";
|
$text['message-required']['pt-pt'] = "Por favor forneça: ";
|
||||||
$text['message-required']['fr-fr'] = "Merci d'indiquer: ";
|
$text['message-required']['fr-fr'] = "Merci d'indiquer: ";
|
||||||
|
|
||||||
|
$text['label-billing_warning']['en-us'] = "Billing is installed, please take note you need to have enough balance to create extensions.";
|
||||||
|
$text['label-billing_warning']['es-cl'] = "La cobranza está instalada, por favor note que necesita suficiente balance para crear extensiones.";
|
||||||
|
$text['label-billing_warning']['pt-pt'] = "A coleção é instalado, por favor, note que você precisa saldo suficiente para criar extensões.";
|
||||||
|
$text['label-billing_warning']['fr-fr'] = "La collection est installée, s'il vous plaît noter que vous devez assez d'équilibre pour créer des extensions.";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
|
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "resources/require.php";
|
require_once "resources/require.php";
|
||||||
|
|
@ -33,6 +34,10 @@ else {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){
|
||||||
|
require_once "app/billings/functions.php";
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
require_once "app_languages.php";
|
require_once "app_languages.php";
|
||||||
foreach($text as $key => $value) {
|
foreach($text as $key => $value) {
|
||||||
|
|
@ -320,6 +325,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$j = 0;
|
||||||
for ($i=1; $i<=$range; $i++) {
|
for ($i=1; $i<=$range; $i++) {
|
||||||
if (extension_exists($extension)) {
|
if (extension_exists($extension)) {
|
||||||
//extension exists
|
//extension exists
|
||||||
|
|
@ -435,6 +441,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
$j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//add or update voicemail
|
//add or update voicemail
|
||||||
|
|
@ -461,6 +468,10 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
//increment the extension number
|
//increment the extension number
|
||||||
$extension++;
|
$extension++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){
|
||||||
|
// Let's bill $j has the number of extensions to bill
|
||||||
|
}
|
||||||
} //if ($action == "add")
|
} //if ($action == "add")
|
||||||
|
|
||||||
//update the database
|
//update the database
|
||||||
|
|
@ -803,6 +814,16 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
// Billing
|
||||||
|
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){
|
||||||
|
if ($action == "add" && permission_exists('extension_add')) { // only when adding
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td colspan='2' width='30%' nowrap='nowrap' align='left' valign='top'>\n";
|
||||||
|
echo " <center>".$text['label-billing_warning']."</center>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
|
||||||
echo " ".$text['label-extension'].":\n";
|
echo " ".$text['label-extension'].":\n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue