コード例 #1
0
ファイル: autoinvoice.php プロジェクト: nanoprime/sureinvoice
echo " -Getting Companies with unbilled time.\n";
$company = new SI_Company();
$companies_time = $company->getCompanysWithUnbilledAmount();
if ($companies === FALSE) {
    echo "****ERR: Could not retrieve Outstanding Hours list! ****\n";
    debug_message($company->getLastError());
} elseif (count($companies_time) > 0) {
    foreach ($companies_time as $comp_time) {
        $comp_ids[] = $comp_time->id;
        echo "  * {$comp_time->name} - " . formatLengthOfTime($comp_time->time_spent) . " " . SureInvoice::getCurrencySymbol() . number_format($comp_time->amount, 2) . "\n";
    }
}
echo " -Getting Upcoming Scheduled Payment.\n";
$ps = new SI_PaymentSchedule();
$time = time() + 16 * (24 * (60 * 60));
$ps_items = $ps->getUpcoming($time);
if ($ps_items === FALSE) {
    echo "****ERR: Could not retreive upcoming scheduled billings! ****\n";
    debug_message($ps->getLastError());
} elseif (count($ps_items) > 0) {
    foreach ($ps_items as $scheduled_payment) {
        $ps_comp = $scheduled_payment->getCompany();
        $comp_ids[] = $ps_comp->id;
        echo "  * {$ps_comp->id} \n";
    }
}
echo " -Getting unbilled expenses.\n";
$expense = new SI_Expense();
$expenses = $expense->getUnbilled();
if ($expenses === FALSE) {
    echo "****ERR: Could not retreive unbilled expenses! ****\n";
コード例 #2
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
require_once('includes/common.php');
require_once('includes/SI_PaymentSchedule.php');

checkLogin('accounting');

$ps = new SI_PaymentSchedule();
$ps_items = $ps->getUpcoming();
if($ps_items === FALSE){
	$error_msg .= "Could not retreive upcoming scheduled billings!\n";
	debug_message($ps->getLastError());
}
$title = "Scheduled Billings";

require('header.php'); ?>
<div class="tableContainer">
<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)">
<img src="images/arrow_down.jpg" alt="Hide table" />All Scheduled Billings</a><div>
<table border="0" cellspacing="0" cellpadding="0" class="dg_table">
<?    if(count($ps_items) > 0){?>
	<tr>
		<th class="dg_header_cell"><a class="link1" href="" onclick="return sortTable('bodyId5', 0, 1, false)">Company</a></th>
		<th class="dg_header_cell"><a class="link1" href="" onclick="return sortTable('bodyId5', 1, 0, false)">Project</a></th>