public function getPayments() { $payments = new Payment(); return $payments->getPayments(array("payment_date" => "DESC"), array("service_no" => array($this->no, Equal))); }
# 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, see <http://www.gnu.org/licenses/>. #************************************************************************** header("Content-Type: text/xml"); error_reporting(1); session_name('CentreSIS'); session_start(); require '../../../config.inc.php'; require '../../../database.inc.php'; require '../../../functions/Current.php'; require '../../../functions/PopTable.php'; require '../../../functions/DrawTab.fnc.php'; require '../../../functions/DBGet.fnc.php'; require '../../../functions/User.fnc.php'; require '../../../functions/ParseML.fnc.php'; require '../../../functions/ProgramTitle.fnc.php'; require '../classes/Auth.php'; require '../classes/Payment.php'; $auth = new Auth(); $staffId = User('STAFF_ID'); $profile = User('PROFILE'); if ($auth->checkAdmin($profile, $staffId)) { $studentId = $_REQUEST['STUDENT_ID']; $json = Payment::getPayments($studentId); echo '{"result":[{"success":true}],' . $json . '}'; } else { echo '{"result":[{"success":false}]}'; }
target_text = target_text.toLowerCase(); if(target_text.indexOf(this_text) != -1){ i++; obj.find('td:first').text(i); obj.removeClass('hide'); }else{ obj.addClass('hide'); } }); }); }); </script> <?php include_once "api/payment.php"; $Payment = new Payment(); $Payments = $Payment->getPayments(); ?> <div class="container"> <div class="page-header"> <h2>Paments <small>Order by date</small></h2> </div> <table class="table table-hover table-condensed"> <caption><h2>Payments Table</h2></caption> <colgroup> <col width="20px" /> <col width="" /> <col width="" /> <col width="" /> <col width="" /> <col width="" />
<?php include_once 'include/common.php'; include_once 'include/ServiceRequest.php'; include_once 'include/AccessRights/SuperadminAdminClient.php'; $serviceRequestId = isset($_REQUEST["id"]) ? $_REQUEST["id"] : NULL; $mode = isset($_REQUEST["paymentmode"]) ? $_REQUEST["paymentmode"] : NULL; $isBank = $mode == "bank"; $isPaypal = $mode == "paypal"; $currentUser = $_SESSION["user"]; $serviceRequest = new ServiceRequest(); $serviceRequestDetails = $serviceRequest->getServiceRequest(array("service_no" => "DESC"), array("service_no" => array($serviceRequestId, Equal))); $serviceRequestDetails = $serviceRequestDetails[0]; $payment = new Payment(); $payments = $payment->getPayments(array("payment_no" => "DESC"), array("service_no" => array($serviceRequestId, Equal))); $totalPayments = 0; foreach ($payments as $payment) { $totalPayments += $payment->getAmount(); } if ($isPaypal && isset($_REQUEST["PaypalSubmit"])) { $paypal = new Paypal($_POST); if ($result = $paypal->DoPayment()) { $packageAmount = $serviceRequestDetails->getPackageDetails()[0]->getPrice(); $paymenstatus = $totalPayments + $result["amount"] >= $packageAmount ? "complete" : "partial"; $payment->setOr_id($result["transactionID"]); $payment->setMode("paypal"); $payment->setAmount($result["amount"]); $payment->setService_no($serviceRequestId); $payment->setStat($paymenstatus); $payment->save(); header("Location:ViewPayments.php?id=" . $serviceRequestId);
break; } switch (getView()) { case 'list': //get all invoices //get user $invoices = Invoice::getInvoices($patient_id); $patient = getPatient($patient_id); //set the backLink $backLink = "index.php?com=patient&view=patient&patient_id=" . $patient_id; include 'views/list.php'; break; case 'edit_invoice': $user_id = get_current_user_id(); // get all the uninvoiced payments for the a patient.. $payments = Payment::getPayments($patient_id, 0); $appointments = getAppointments($patient_id); $patient = getPatient($patient_id); if (getVar('invoice_id') != NULL) { $invoice_id = getVar('invoice_id'); } // if letter_id == NULL -> a call was made to create a new invoice. invoice_id is passed from the create_new_invoice task $invoice = Invoice::getInvoice($invoice_id); $invoice_date = new DateTime($invoice->date); //get all invoice items $invoice_items = Invoice::getInvoiceItems($invoice_id); //get the invoice heading for the clinic $invoice_heading = Invoice::getInvoiceHeading($patient->clinic); //get the practitioner name for the invoice $user = get_userdata($patient->practitioner); //get the signature