<?php

/* * ********************************************************************
  Copyright (C) FrontAccounting, LLC.
  Released under the terms of the GNU General Public License, GPL,
  as published by the Free Software Foundation, either version 3
  of the License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 * ********************************************************************* */
$page_security = 'SA_SETUPCOMPANY';
$path_to_root = "../../..";
include($path_to_root . "/includes/session.inc");

page(_($help_context = "Sms Setup"));
include_once($path_to_root . "/includes/ui.inc");
include_once($path_to_root . "/includes/data_checks.inc");
//include_once(dirname(__FILE__). '/includes/tax_regime.inc');

include_once($path_to_root . "/admin/db/company_db.inc");
include_once( $path_to_root . "/modules/external/includes/db/notification_template_db.php");

//-------------------------------------------------------------------------------------------------

div_start('details');
start_table(TABLESTYLE2);
$sms = new SMS();
$balance = $sms->getAccountBalance();
$bal_txt = '';
if(isset($balance->balance)){
    $bal_txt = $balance->currency . ' ' . $balance->balance;
}
label_row(_('SMS Balance:'), $bal_txt);
end_table(1);
div_end();
echo "<hr>";


//-------------------------------------------------------------------------------------------------

div_start('details');
start_table(TABLESTYLE2);
$sms = new SMS();
$balance = $sms->getAccountBalance();
label_row(_('Top Up Procedure:'),'');
label_cell('1. Go to Safaricom Menu<br/>
            2. Select M-PESA<br/>
            3. Select Lipa na MPESA<br/>
            4. Select Pay Bill<br/>
            5. Enter Business Number: 673230<br/>
            6. Enter Account Number: '.get_company_pref('sms_api_username').'<br/>
            7. Enter Amount (without commas): <br/>
            8. Then Confirm Payment<br/>');
end_table(1);
div_end();
echo "<hr>";
//-------------------------------------------------------------------------------------------------

end_page();
?>
