billing support for destination objects

This commit is contained in:
luis daniel lucio quiroz
2014-06-23 15:18:22 +00:00
parent 189a5ee5f1
commit bcb25c49e9
2 changed files with 36 additions and 3 deletions
+24 -1
View File
@@ -22,6 +22,7 @@
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
Luis Daniel Lucio Quiroz <dlucio@okay.com.mx>
*/
require_once "root.php";
require_once "resources/require.php";
@@ -34,6 +35,10 @@ else {
exit;
}
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){
require_once "app/billings/functions.php";
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
@@ -61,6 +66,8 @@ else {
$fax_uuid = check_str($_POST["fax_uuid"]);
$destination_enabled = check_str($_POST["destination_enabled"]);
$destination_description = check_str($_POST["destination_description"]);
$destination_sell = check_str($_POST["destination_sell"]);
$currency = check_str($_POST["currency"]);
}
//unset the db_destination_number
@@ -283,6 +290,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
$fax_uuid = $row["fax_uuid"];
$destination_enabled = $row["destination_enabled"];
$destination_description = $row["destination_description"];
$currency = $row["currency"];
$destination_sell = $row["destination_sell"];
break; //limit to 1 row
}
unset ($prep_statement);
@@ -524,6 +533,20 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
// billing
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/app/billings/app_config.php")){
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-monthly_price'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='destination_sell' maxlength='255' value=\"$destination_sell\">\n";
currency_select($currency);
echo "<br />\n";
echo $text['description-monthly_price']."\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-destination_description'].":\n";
@@ -554,4 +577,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//include the footer
require_once "resources/footer.php";
?>
?>