} elseif ($action == 'searchCustomer') { if (sizeof($data)) { $searchValue = $data['data']; $result = POS::SearchCustomer($searchValue, false); echo json_encode($result); } } elseif ($action == 'addCustomer') { if (sizeof($data)) { $customer = $data['data']; $result = POS::SetCustomer($customer, false); echo json_encode($result); } } elseif ($action == 'addNewProduct') { if (sizeof($data)) { $product = $data['data']; $result = POS::SetProduct($product, false); echo json_encode($result); } } elseif ($action == 'getMoneyCash') { $result = POS::getMoneyCash(); echo json_encode($result); } elseif ($action == 'getConfig') { $result = POS::getConfig(); echo json_encode($result); } elseif ($action == 'closeCash') { if (sizeof($data)) { $cash = $data['data']; $result = POS::setControlCash($cash); echo json_encode($result); } } elseif ($action == 'getPlaces') {