<?php //This is Dashboard at admin side //$obj_payment= new Hmgtinvoice(); $obj_payment = new Gmgtpayment(); if ($active_tab == 'incomelist') { $invoice_id = 0; if (isset($_REQUEST['income_id'])) { $invoice_id = $_REQUEST['income_id']; } $edit = 0; if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') { $edit = 1; $result = $obj_payment->hmgt_get_invoice_data($invoice_id); } ?> <script type="text/javascript"> $(document).ready(function() { jQuery('#tblincome').DataTable({ "responsive": true, "order": [[ 1, "Desc" ]], "aoColumns":[ {"bSortable": true}, {"bSortable": true}, {"bSortable": true}, {"bSortable": false} ] }); } );
<?php //This is Dashboard at admin side $obj_payment = new Gmgtpayment(); ?> <script type="text/javascript"> $(document).ready(function() { $('#expense_form').validationEngine(); $('#invoice_date').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', yearRange:'-65:+0', onChangeMonthYear: function(year, month, inst) { $(this).val(month + "/" + year); } }); } ); </script> <?php if ($active_tab == 'addexpense') { $expense_id = 0; if (isset($_REQUEST['expense_id'])) { $expense_id = $_REQUEST['expense_id']; } $edit = 0; if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') {
<?php //This is Dashboard at admin side $obj_payment = new Gmgtpayment(); ?> <script type="text/javascript"> $(document).ready(function() { $('#income_form').validationEngine(); $('#invoice_date').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', yearRange:'-65:+0', onChangeMonthYear: function(year, month, inst) { $(this).val(month + "/" + year); } }); $(".display-members").select2(); } ); </script> <?php if ($active_tab == 'addincome') { $income_id = 0; if (isset($_REQUEST['income_id'])) { $income_id = $_REQUEST['income_id']; } $edit = 0; if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') {
function gmgt_invoice_print($invoice_id) { $obj_payment = new Gmgtpayment(); if ($_REQUEST['invoice_type'] == 'invoice') { $invoice_data = get_invoice_data($invoice_id); } if ($_REQUEST['invoice_type'] == 'income') { $income_data = $obj_payment->gmgt_get_income_data($invoice_id); } if ($_REQUEST['invoice_type'] == 'expense') { $expense_data = $obj_payment->gmgt_get_income_data($invoice_id); } ?> <div class="modal-body"> <div id="invoice_print" style="width: 90%;margin:0 auto;"> <div class="modal-header"> <h4 class="modal-title"><?php echo get_option('gmgt_system_name'); ?> </h4> </div> <table width="100%" border="0"> <tbody> <tr> <td width="70%"> <img style="max-height:80px;" src="<?php echo get_option('gmgt_system_logo'); ?> "> </td> <td align="right" width="24%"> <h5><?php $issue_date = 'DD-MM-YYYY'; if (!empty($income_data)) { $issue_date = $income_data->invoice_date; $payment_status = $income_data->payment_status; } if (!empty($invoice_data)) { $issue_date = $invoice_data->payment_date; $payment_status = $invoice_data->payment_status; } if (!empty($expense_data)) { $issue_date = $expense_data->invoice_date; $payment_status = $expense_data->payment_status; } echo __('Issue Date', 'gym_mgt') . " : " . $issue_date; ?> </h5> <h5><?php echo __('Status', 'gym_mgt') . " : " . $payment_status; ?> </h5> </td> </tr> </tbody> </table> <hr> <table width="100%" border="0"> <tbody> <tr> <td align="left"> <h4><?php _e('Payment To', 'gym_mgt'); ?> </h4> </td> <td align="right"> <h4><?php _e('Bill To', 'gym_mgt'); ?> </h4> </td> </tr> <tr> <td valign="top" align="left"> <?php echo get_option('gmgt_system_name') . "<br>"; echo get_option('gmgt_gym_address') . ","; echo get_option('gmgt_contry') . "<br>"; echo get_option('gmgt_contact_number') . "<br>"; ?> </td> <td valign="top" align="right"> <?php if (!empty($expense_data)) { echo $party_name = $expense_data->supplier_name; } else { if (!empty($income_data)) { $member_id = $income_data->supplier_name; } if (!empty($invoice_data)) { $member_id = $invoice_data->member_id; } $patient = get_userdata($member_id); echo $patient->display_name . "<br>"; echo get_user_meta($member_id, 'address', true) . ","; echo get_user_meta($member_id, 'city_name', true) . ","; echo get_user_meta($member_id, 'mobile', true) . "<br>"; } ?> </td> </tr> </tbody> </table> <hr> <h4><?php _e('Invoice Entries', 'gym_mgt'); ?> </h4> <table class="table table-bordered" width="100%" border="1" style="border-collapse:collapse;"> <thead> <tr> <th class="text-center">#</th> <th class="text-center"> <?php _e('Date', 'gym_mgt'); ?> </th> <th width="60%"><?php _e('Entry', 'gym_mgt'); ?> </th> <th><?php _e('Price', 'gym_mgt'); ?> </th> <th class="text-center"> <?php _e('Username', 'gym_mgt'); ?> </th> </tr> </thead> <tbody> <?php $id = 1; $total_amount = 0; if (!empty($income_data) || !empty($expense_data)) { if (!empty($expense_data)) { $income_data = $expense_data; } $patient_all_income = $obj_payment->get_oneparty_income_data($income_data->supplier_name); foreach ($patient_all_income as $result_income) { $income_entries = json_decode($result_income->entry); foreach ($income_entries as $each_entry) { $total_amount += $each_entry->amount; ?> <tr> <td class="text-center"><?php echo $id; ?> </td> <td class="text-center"><?php echo $result_income->invoice_date; ?> </td> <td><?php echo $each_entry->entry; ?> </td> <td class="text-right"> <?php echo $each_entry->amount; ?> </td> <td class="text-center"><?php echo gym_get_display_name($result_income->receiver_id); ?> </td> </tr> <?php $id += 1; } } } if (!empty($invoice_data)) { $total_amount = $invoice_data->total_amount; ?> <tr> <td class="text-center"><?php echo $id; ?> </td> <td class="text-center"><?php echo $invoice_data->payment_date; ?> </td> <td><?php echo $invoice_data->title; ?> </td> <td class="text-right"> <?php echo $invoice_data->unit_price; ?> </td> <td class="text-center"><?php echo gym_get_display_name($invoice_data->receiver_id); ?> </td> </tr> <?php } ?> </tbody> </table> <table width="100%" border="0"> <tbody> <?php if (!empty($invoice_data)) { $total_amount = $invoice_data->unit_price; $grand_total = $invoice_data->unit_price - $invoice_data->discount; ?> <tr> <td width="80%" align="right"><?php _e('Sub Total :', 'gym_mgt'); ?> </td> <td align="right"><?php echo $total_amount; ?> </td> </tr> <tr> <td width="80%" align="right"><?php _e('Discount :', 'gym_mgt'); ?> </td> <td align="right"><?php echo $invoice_data->discount; ?> </td> </tr> <tr> <td colspan="2"> <hr style="margin:0px;"> </td> </tr> <?php } if (!empty($income_data)) { $grand_total = $total_amount; } ?> <tr> <td width="80%" align="right"><?php _e('Grand Total :', 'gym_mgt'); ?> </td> <td align="right"><h4><?php echo $grand_total; ?> </h4></td> </tr> </tbody> </table> </div> </div> <?php die; }
<?php $obj_class = new Gmgtclassschedule(); $obj_payment = new Gmgtpayment(); $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'paymentlist'; ?> <!-- POP up code --> <div class="popup-bg"> <div class="overlay-content"> <div class="modal-content"> <div class="invoice_data"> </div> </div> </div> </div> <!-- End POP-UP Code --> <div class="page-inner" style="min-height:1631px !important"> <div class="page-title"> <h3><img src="<?php echo get_option('gmgt_system_logo'); ?> " class="img-circle head_logo" width="40" height="40" /><?php echo get_option('gmgt_system_name'); ?> </h3> </div> <?php if (isset($_POST['save_product'])) { if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') { $result = $obj_payment->gmgt_add_payment($_POST);
<?php //This is Dashboard at admin side $obj_payment = new Gmgtpayment(); if ($active_tab == 'expenselist') { ?> <script type="text/javascript"> $(document).ready(function() { jQuery('#tblexpence').DataTable({ "responsive": true, "order": [[ 2, "Desc" ]], "aoColumns":[ {"bSortable": true}, {"bSortable": true}, {"bSortable": true}, {"bSortable": false} ] }); } ); </script> <div class="panel-body"> <div class="table-responsive"> <table id="tblexpence" class="display" cellspacing="0" width="100%"> <thead> <tr> <th> <?php _e('Supplier Name', 'gym_mgt'); ?>