echo JsonResponse::success('Successfully deleted bill item.'); exit; } else { echo JsonResponse::error("Could not delete bill item"); exit; } } else { echo JsonResponse::error('Error! Bill item id not set'); exit; } } elseif ($intent == 'editBillItem') { $id = isset($_REQUEST[BillablesTable::billables_id]) ? $_REQUEST[BillablesTable::billables_id] : null; $bill = isset($_REQUEST[BillablesTable::bill]) ? $_REQUEST[BillablesTable::bill] : ""; $amount = isset($_REQUEST[BillablesTable::amount]) ? $_REQUEST[BillablesTable::amount] : 0; if ($id) { $billItems = new BillingController(); $result = $billItems->editBillItem($id, $bill, $amount); if ($result) { echo JsonResponse::success('Successfully edited bill item.'); exit; } else { echo JsonResponse::error("Could not edit bill item"); exit; } } else { echo JsonResponse::error('Error! Bill item id not set'); exit; } } else { echo JsonResponse::error("Invalid intent!"); exit;
$units = new PharmacistController(); $units_added = $units->addDrugUnits($values); if ($units_added) { echo JsonResponse::success('Successfully added hospital information and drug units'); exit; } else { echo JsonResponse::error('Could not add drug units'); exit; } } else { echo JsonResponse::error('Adding hospital information unsuccessful'); exit; } } elseif ($intent == 'addBillingItems') { $values = $_REQUEST['billItems']; $bills = new BillingController(); $result = $bills->addBillingItems($values); if ($result) { echo JsonResponse::success('Successfully added billing items.'); exit; } else { echo JsonResponse::error('Adding of billing items unsuccessful.'); exit; } } elseif ($intent == 'setupComplete') { $result = $setup->setupComplete(); if ($result) { echo JsonResponse::success('Setup Successful'); exit; } else { echo JsonResponse::error('Setup unsuccessful');
public function show_main($settings = array()) { print 'admin'; print '<br>'; parent::show_main($settings); }