Exemple #1
0
 public static function detail()
 {
     //get customers
     $detail['expense_account_all'] = expenseaccount::get_all();
     //get customers
     $detail['customer'] = customer::get();
     $detail['customer_all'] = customer::get_all();
     //get billers
     $detail['biller_all'] = biller::get_all();
     //get invoices
     $detail['invoice_all'] = invoice::get_all();
     //get products
     $detail['product_all'] = product::get_all();
     return $detail;
 }
Exemple #2
0
 public function detail()
 {
     //get expenseaccount
     $expenseaccountobj = new expenseaccount();
     $detail['expense_account_all'] = $expenseaccountobj->get_all();
     //get customers with domain_id from session by constructor
     $customerobj = new customer();
     $detail['customer'] = $customerobj->get();
     $detail['customer_all'] = $customerobj->get_all();
     //get billers with domain_id from session by constructor
     $billerobj = new biller();
     $detail['biller_all'] = $billerobj->get_all();
     //get invoices
     $invoiceobj = new invoice();
     $detail['invoice_all'] = $invoiceobj->get_all();
     //get products
     $productobj = new product();
     $detail['product_all'] = $productobj->get_all();
     return $detail;
 }
Exemple #3
0
<?php

if ($_POST['op'] == 'edit' and !empty($_POST['invoice_id'])) {
    $cron = new cron();
    $cron->domain_id = domain_id::get();
    $cron->invoice_id = $_POST['invoice_id'];
    $cron->start_date = $_POST['start_date'];
    $cron->end_date = $_POST['end_date'];
    $cron->recurrence = $_POST['recurrence'];
    $cron->recurrence_type = $_POST['recurrence_type'];
    $cron->email_biller = $_POST['email_biller'];
    $cron->email_customer = $_POST['email_customer'];
    $result = $cron->insert();
    $saved = !empty($result) ? "true" : "false";
}
$invoice_all = invoice::get_all();
$get_cron = new cron();
$get_cron->id = $_GET['id'];
$cron = $get_cron->select();
$smarty->assign('invoice_all', $invoice_all);
$smarty->assign('saved', $saved);
$smarty->assign('cron', $cron);
$smarty->assign('pageActive', 'cron');
$smarty->assign('subPageActive', 'cron_view');
$smarty->assign('active_tab', '#money');
Exemple #4
0
<?php

$saved = false;
$invoiceobj = new invoice();
$invoice_all = $invoiceobj->get_all();
if ($_POST['op'] == 'add' and !empty($_POST['invoice_id'])) {
    $invoice = $invoiceobj->select($_POST['invoice_id']);
    $eway_check = new eway();
    $eway_check->invoice = $invoice;
    $eway_pre_check = $eway_check->pre_check();
    if ($eway_pre_check == 'true') {
        //do eway payment
        $eway = new eway();
        $eway->invoice = $invoice;
        $saved = $eway->payment();
    } else {
        $saved = 'check_failed';
    }
}
$smarty->assign('invoice_all', $invoice_all);
$smarty->assign('saved', $saved);
$smarty->assign('pageActive', 'payment');
$smarty->assign('subPageActive', 'payment_eway');
$smarty->assign('active_tab', '#money');