Пример #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;
 }
Пример #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;
 }
Пример #3
0
	$inventory = new inventory();
	$inventory->id=$_GET['id'];
	$inventory->domain_id=domain_id::get();
	$inventory->product_id=$_POST['product_id'];
	$inventory->quantity=$_POST['quantity'];
	$inventory->cost=$_POST['cost'];
	$inventory->date=$_POST['date'];
	$inventory->note=$_POST['note'];
	$result = $inventory->update();

	$saved = !empty($result) ? "true" : "false";
}      

$invoices = new invoice();
$invoices->sort='id';
$invoice_all = $invoices->select_all('count');

$get_inventory = new inventory();
$get_inventory->id = $_GET['id'];
$inventory = $get_inventory->select();

$product_all = product::get_all();
$smarty -> assign('product_all',$product_all);
$smarty -> assign('saved',$saved);
$smarty -> assign('inventory',$inventory);

$smarty -> assign('pageActive', 'inventory');
$smarty -> assign('subPageActive', 'inventory_edit');
$smarty -> assign('active_tab', '#product');
Пример #4
0
<?php

if ($_POST['op'] == 'add' and !empty($_POST['product_id'])) {
    $inventory = new inventory();
    $inventory->domain_id = domain_id::get();
    $inventory->product_id = $_POST['product_id'];
    $inventory->quantity = $_POST['quantity'];
    $inventory->cost = $_POST['cost'];
    $inventory->date = $_POST['date'];
    $inventory->note = $_POST['note'];
    $result = $inventory->insert();
    $saved = !empty($result) ? "true" : "false";
}
$productobj = new product();
$product_all = $productobj->get_all();
$smarty->assign('product_all', $product_all);
$smarty->assign('saved', $saved);
$smarty->assign('pageActive', 'inventory');
$smarty->assign('subPageActive', 'inventory_add');
$smarty->assign('active_tab', '#product');