OXIESEC PANEL
- Current Dir:
/
/
home
/
u116888525
/
domains
/
aretetesting.in
/
public_html
/
imc_testing
/
cms
Server IP: 82.112.239.19
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/11/2024 05:53:15 AM
rwxr-xr-x
📄
advance_report.php
5.35 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
applications_list.php
36.88 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
appr_committee-05-10-20.php
14.35 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
appr_committee.php
22.72 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
approval_report.php
20.25 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📁
certs
-
10/11/2024 05:51:58 AM
rwxr-xr-x
📄
cms_add_signature.php
3.01 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_committee.php
15.42 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_event_mailer.php
7.32 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_event_transactions.php
10.9 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_events.php
135.15 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_events.php.12.1.2021
121.98 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_events_calendar.php
4.04 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_functions.php
29.98 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_general.php
17.1 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_journal.php
14.6 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_lw_reg.php
70.44 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_lw_stallbooking.php
20.88 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_lw_transactions.php
11.07 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_lw_transactions_export.php
2.82 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_media.php
11.31 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_membership_transactions.php
9.87 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_reports.php
91.17 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_reports_accounts.php
11.09 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_revenue_reports.php
90.31 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_users.php
17.81 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_venue.php
24.9 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_venue_tracker.php
49.28 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_venue_transactions.php
10.88 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_venues_calendar.php
3.3 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
cms_ylf_transactions.php
8.73 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_add_signature2.php
5.12 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_add_signature2_last_year.php
5.02 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_advance_vouchers.php
14.73 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_billing.php
46.6 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_billing.php.2.11.2021
45.57 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_cha.php
25.18 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_export_to_excel.php
64.54 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_generate_pdf.php
5.72 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_generate_pdf_last_year.php
5.62 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_get_cha.php
1.19 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_get_cha_balance.php
706 bytes
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_get_company_id.php
3.45 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_get_membership_details.php
1.57 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_grn.php
19.04 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_irn_qrcode.php
1 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_irn_qrcode_delhi.php
1.01 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_member_status_update.php
2.26 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_members.php
52.31 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_membership_reconcile.php
2.42 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_online_manager.php
30.02 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_online_test_stamping.php
4.47 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_print_invoice.php
28.48 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_print_other.php
4.9 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_quick_print.php
6.54 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_receipts.php
22.54 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_recharge.php
19.01 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_recharge_balance_update.php
2.34 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_recharge_transfer.php
19.59 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_reports.php
89.15 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
co_visa_request.php
23.38 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
coo_add_signature.php
5.85 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📁
css
-
10/11/2024 05:51:58 AM
rwxr-xr-x
📄
dashboard.php
6.32 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
dblib.php
4.55 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
dm_applications_list.php
37.17 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📁
e-invoice
-
10/11/2024 05:51:58 AM
rwxr-xr-x
📄
ed_course_track.php
12.14 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_courses.php
20.47 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_exam_registrations.php
38.45 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_exams.php
10.8 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_export_excel.php
3.42 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_generate_pdf.php
5.25 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_institutes.php
14.49 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_print.php
20.65 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_seats.php
1.73 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_students.php
21.29 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_students_export.php
1.51 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_transactions.php
50.62 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
ed_transactions_export.php
2.87 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
events_calendar_public.php
6.28 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
events_mark_attendance.php
956 bytes
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
example_052.php
3.77 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
export_to_excel.php
59.34 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
export_to_excel_revenue.php
59.7 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
fee_structure.php
3.17 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
footer.php
1.53 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
forgot-password.html
2.05 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
func_lib.php
29.33 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
generate_doc.php
29.58 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
generate_pdf-09-11-20.php
13.16 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
generate_pdf.php
12.32 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
get_company_details.php
3.58 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
get_exhibitor_details.php
1.43 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
get_lw_details.php
1.45 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
gulpfile.js
3.21 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
header-bare.php
1.72 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
header.php
5.28 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📁
images
-
10/11/2024 05:51:58 AM
rwxr-xr-x
📄
index.php
2.36 KB
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
interstitial.php
804 bytes
10/11/2024 05:51:58 AM
rw-rw-rw-
📄
irn_qrcode.php
1006 bytes
10/11/2024 05:51:58 AM
rw-rw-rw-
📁
js
-
10/11/2024 05:51:59 AM
rwxr-xr-x
📄
label_print.php
8.82 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
login.php
2.54 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
lw_label_print.php
5.61 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
mailtest.php
598 bytes
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
member_data_print.php
16.79 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
member_renewal.php
12.86 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
members-13-10-2020.php
227 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
members-16-03-21.php
241.02 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
members-23-12-20.php
235.39 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
members.php
266.25 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
members.php.28.10.2021
260.54 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
membership_cost.php
8.9 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
membership_dashboard.php
6.13 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
membership_dashboard_test.php
6.19 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
membership_export_to_excel.php
62.55 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
membership_filters.php
26.02 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
menu.php
2.14 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
order_process.php
3.94 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
order_report.php
39.43 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📁
phpqrcode
-
10/11/2024 05:51:59 AM
rwxr-xr-x
📄
print-09-11-2020.php
19.9 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
print.php
25.41 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
print_approval_report-approvaldate.php
16.64 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
print_approval_report.php
18.89 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
register.html
3.33 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
renew_membership.php
10.77 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
requirements.php
22.47 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📁
scss
-
10/11/2024 05:51:59 AM
rwxr-xr-x
📄
tables.html
25.73 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
tally.php
24.87 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_renewal_pending.php
2.59 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_report.php
5.38 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_report_coo.php
5.83 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_report_coo_advance.php
5.8 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_report_invoices.php
5.46 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
test_report_lw.php
5.36 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
testexport.php
2.36 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
track-test.php
1.46 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📁
vendor
-
10/11/2024 05:51:59 AM
rwxr-xr-x
📁
vendor1
-
10/11/2024 05:51:59 AM
rwxr-xr-x
📄
visiting_card.php
17.32 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
📄
year_selection_module.php
3.44 KB
10/11/2024 05:51:59 AM
rw-rw-rw-
Editing: co_billing.php.2.11.2021
Close
<?php /*ini_set('display_errors', 'On'); error_reporting(E_ALL);*/ session_start(); include('../admin/dblib.php'); include('../admin/func_lib.php'); include('cms_functions.php'); //Replace the code below with get & post on top of every page $getar = $_GET; $getkeys = array_keys($getar); for($i=0; $i<count($getkeys); $i++){ $k = $getkeys[$i]; $v = $getar[$k]; ${$k}=cleanQuery($v,"yes"); } $getar = $_POST; $getkeys = array_keys($getar); for($i=0; $i<count($getkeys); $i++){ $k = $getkeys[$i]; $v = $getar[$k]; ${$k}=cleanQuery($v,"yes"); } $user_session = $_SESSION["user_session"]; if ($user_session != "") { if ($_SESSION['location'] == "BOD") { $main_data_table = "co_orders_delhi_2021_2022"; $main_track_table = "co_orders_track_delhi_2021_2022"; $main_recharge_table = "co_orders_recharge_2021_2022"; } else { $main_data_table = "co_orders_2021_2022"; $main_track_table = "co_orders_track_2021_2022"; $main_recharge_table = "co_orders_recharge_2021_2022"; } include('header.php'); ?> <script> $(document).ready(function() { $(window).keydown(function(event){ if(event.keyCode == 13) { event.preventDefault(); return false; } }); }); </script> <?php echo "<div id=\"content-wrapper\">\n"; echo "<div class=\"container-fluid\">\n"; include('interstitial.php'); if ($action == "") { echo "<h5 style=\"padding-bottom:0px; margin-bottom:0px;\">COO Billing Console\n"; if ($trans_type == "co") { echo " > COO Services"; } if ($trans_type == "visa") { echo " > Visa"; } if ($trans_type == "pad") { echo " > Pad Sale"; } if ($trans_type == "recharge") { echo " > Member Deposit Recharge"; } if ($trans_type == "cha_recharge") { echo " > CHA Deposit Recharge"; } echo "<div style=\"float:right; font-size:14px;\">\n"; echo "<a href=\"co_billing.php?trans_type=co\" style=\"font-size:14px;margin-left:5px;\">COO Services</a> | \n"; echo "<a href=\"co_billing.php?trans_type=pad\" style=\"font-size:14px;margin-left:5px;\">Sale of Pads</a> | \n"; echo "<a href=\"co_billing.php?trans_type=visa\" style=\"font-size:14px; margin-left:5px;\">Visa</a> | \n"; echo "<a href=\"co_billing.php?trans_type=recharge\" style=\"font-size:14px; margin-left:5px;\">Recharge</a>\n"; echo "</div>\n"; echo "</h5>\n"; echo "<hr style=\"margin-top:2px;\">\n"; if ($trans_type == "") { $trans_type = "co"; } // Populate Country Dropdown $country_dropdown = ""; $sql_countries = "select country from country_master order by country"; $qid_countries = db_query($sql_countries); $num_countries = db_num_rows($qid_countries); for ($j=0;$j<=$num_countries-1;$j++) { $result_countries = db_fetch_row($qid_countries); $country_dropdown .= "<option value=\"".$result_countries[0]."\">".$result_countries[0]."</option>\n"; } // Populate Currency Dropdown $currency_dropdown = ""; $sql_currency = "select country, currency from currency_master order by country"; $qid_currency = db_query($sql_currency); $num_currency = db_num_rows($qid_currency); for ($j=0;$j<=$num_currency-1;$j++) { $result_currency = db_fetch_row($qid_currency); $currency_dropdown .= "<option value=\"".$result_currency[1]."\""; if ($result_currency[1] == "USD") { $currency_dropdown .= " selected "; } $currency_dropdown .= ">".$result_currency[1]." (".$result_currency[0].")</option>\n"; } $sql1 = "select count(*) from co_products where prod_type = '".$trans_type."'"; $qid1 = db_query($sql1); $result1 = db_fetch_row($qid1); $num_products = $result1[0]; if ($trans_type == "co" || $trans_type == "visa") { $max_docs = 15; } else { $max_docs = 1; } if ($num_products == "" || $num_products == 0) { $num_products = 1; } echo "<div id=\"co_console\" class=\"container\">\n"; ?> <script> function final_validate() { total_everything(); var submit_flag = 0; if ($('#grand_total').val() <= 0) { submit_flag = 1; msg = "- Grand Total Cannot Be Zero"; } if ($('#imc_no').val() == '') { submit_flag = 1; msg = "- Member details cannot be blank"; } if ($("input[name='payment_method']:checked"). val() === undefined) { submit_flag = 1; msg = "- Payment method has to be selected."; } if ($("input[name='payment_method']:checked").val() == 'Recharge' && ( parseFloat($('#grand_total').val()) > parseFloat($('#current_balance').val()))) { submit_flag = 1; msg = "- Total amount cannot execeed recharge balance."; } if ($("input[name='payment_method']:checked").val() == 'CHA Recharge' && ( parseFloat($('#grand_total').val()) > parseFloat($('#cha_balance').val()))) { submit_flag = 1; msg = "- Total amount cannot execeed recharge balance."; } //if ($('#sgst').val() == 0 && $('#cgst').val() == 0 && $('#igst').val() == 0) { submit_flag = 1; } if (submit_flag == 0) { $("#save_button").attr("disabled", true); document.form1.submit(); } else { alert('Incorrect data. Please update the form correctly.\n'+msg); } } function get_cha(imc_no) { $.ajax({ url: "co_get_cha.php", data : { 'imc_no' : imc_no }, type: 'POST', success: function(result){ if (result.trim() != 'No result') { $('#cha_container').html(result); $('#cha_container').parent().show(); get_cha_balance(); total_everything(); } } }); } function get_cha_balance() { //$('#cha_balance').val(cha_no); cha_no = $('#cha_no').val(); $.ajax({ url: "co_get_cha_balance.php", data : { 'cha_no' : cha_no }, type: 'POST', success: function(result){ $('#cha_balance').val(result); if ($('#cha_balance').val() > 0) { $('#cha_balance').css({'font-weight':'bold','color':'red'}); } total_everything(); } }); } function clear_all() { $('#keysearch').val(''); $('#imc_no').val(''); $('#membership_no').val(''); $('#membership_status').val(''); $('#account').val(''); $('#address').val(''); $('#city').val(''); $('#state').val(''); $('#pincode').val(''); $('#gstin').val(''); } function total_everything() { subtotal = 0; num_products = <?php echo $num_products; ?>; user_location = '<?php echo $_SESSION['location']; ?>'; membership_status = $('#membership_status').val(); trans_type = $('#trans_type').val(); apply_igst = $('#apply_igst').val(); gst_exempt = $('#gst_exempt').val(); if (membership_status == 'active' && trans_type != 'recharge' && trans_type != 'cha_recharge') { $('.member_rates').show(); $('.non_member_rates').hide(); } else { $('.member_rates').hide(); $('.non_member_rates').show(); } var msg = '<b>Document List</b><br /><table class=\"table table-bordered table-sm\">'; for (k=1;k<=<?php echo $max_docs; ?>;k++) { msg_this = ''; for (j=1;j<=num_products;j++) { temp =0; if (membership_status == 'active' && trans_type != 'recharge' && trans_type != 'cha_recharge') { temp = parseFloat($('#qty_'+ k + '_' + j).val())* parseFloat($('#member_rate_'+ k + '_' + j).val()) } else { temp = parseFloat($('#qty_'+ k + '_' + j).val())* parseFloat($('#non_member_rate_'+ k + '_' + j).val()) } $('#amt_'+ k + '_' + j).val(temp); subtotal = subtotal + parseFloat($('#amt_'+ k + '_' + j).val()); if (temp > 0) { msg_this = msg_this + ' ' + $('#item_'+ k + '_' + j).val() + ': ' + $('#qty_'+ k + '_' + j).val() + ', '; } } if (msg_this != '') { msg = msg + '<tr><td>Document Set ' + k + '</td><td>' + msg_this + '</td></tr>'; } } msg = msg + '</table>'; $('#order_summary').html(msg); $('#subtotal').val(subtotal); taxable_amount = subtotal + parseFloat($('#misc_charges').val()); $('#taxable_amount').val(taxable_amount); // Check if GST is necessary if (trans_type == "co" || trans_type == "visa" || trans_type == "pad") { if (user_location != 'BOD') { if ($('#state').val().toLowerCase() == "maharashtra" && apply_igst == 0) { cgst = Math.round(taxable_amount*9/100); sgst = Math.round(taxable_amount*9/100); igst = 0; gst = cgst+sgst; } else { cgst = 0; sgst = 0; igst = Math.round(taxable_amount*18/100); gst = igst; } if (gst_exempt == 1) { cgst = 0; sgst = 0; igst = 0; gst = 0; } } if (user_location == 'BOD') { if (($('#state').val().toLowerCase() == "delhi" || $('#state').val().toLowerCase() == "new delhi") && apply_igst == 0) { cgst = Math.round(taxable_amount*9/100); sgst = Math.round(taxable_amount*9/100); igst = 0; gst = cgst+sgst; } else { cgst = 0; sgst = 0; igst = Math.round(taxable_amount*18/100); gst = igst; } if (gst_exempt == 1) { cgst = 0; sgst = 0; igst = 0; gst = 0; } } } else { cgst = 0; sgst = 0; igst = 0; gst = 0; } $('#sgst').val(sgst); $('#cgst').val(cgst); $('#igst').val(igst); $('#gst_total').val(gst); tds = parseFloat($('#tds').val()); $('#grand_total').val(gst+taxable_amount-tds); grand_total = parseFloat($('#grand_total').val()); current_balance = parseFloat($('#current_balance').val()); cha_balance = parseFloat($('#cha_balance').val()); // Select the correct payment option if (trans_type != 'recharge' && trans_type != 'cha_recharge' && $('#change_flag').val() == 0) { if (current_balance >= grand_total && grand_total > 0 && current_balance > 0) { $('#payment_method3').prop("disabled", false); $('#payment_method3').prop('checked', true); } else { $('#payment_method3').prop("disabled", true); $('#payment_method3').prop('checked', false); } if (cha_balance >= grand_total && grand_total > 0 && cha_balance > 0) { $('#payment_method4').prop("disabled", false); $('#payment_method4').prop('checked', true); } else { $('#payment_method4').prop("disabled", true); $('#payment_method4').prop('checked', false); } } } </script> <style> #co_console .form-control::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: #000; opacity: 1; /* Firefox */ font-size:10px; } #co_console .form-control:-ms-input-placeholder { /* Internet Explorer 10-11 */ color: #000; font-size:10px; } #co_console .form-control::-ms-input-placeholder { /* Microsoft Edge */ color: #000; font-size:10px; } #co_console .form-control { border:1px solid #aaaaaa; border-radius:0px; height:20px; color:#000000; font-size:10px; } #co_console .table td, #co_console .table th { padding:2px; } </style> <?php echo "<form method=\"post\" action=\"co_billing.php?action=process\" name=\"form1\" id=\"form1\">\n"; echo "<input type=\"hidden\" name=\"num_products\" id=\"num_products\" value=\"".$num_products."\" />\n"; echo "<input type=\"hidden\" name=\"max_docs\" id=\"max_docs\" value=\"".$max_docs."\" />\n"; echo "<input type=\"hidden\" name=\"trans_type\" id=\"trans_type\" value=\"".$trans_type."\" />\n"; echo "<input type=\"hidden\" name=\"year\" id=\"year\" value=\"18\" />\n"; ?> <script> $(function() { $( "#keysearch" ).autocomplete({ appendTo: '.ContainerDiv', source:'co_get_company_id.php', select: function (event, ui) { $('#imc_no').val(ui.item.imc_no); $('#account').val(ui.item.account); $('#address').val(ui.item.address); $('#city').val(ui.item.city); $('#state').val(ui.item.state); $('#pincode').val(ui.item.pincode); $('#gstin').val(ui.item.gstin); $('#membership_no').val(ui.item.membership_no); $('#membership_status').val(ui.item.membership_status); $('#current_balance').val(ui.item.current_balance); $('#apply_igst').val(ui.item.apply_igst); $('#gst_exempt').val(ui.item.gst_exempt); if ($('#membership_status').val() == 'active') { $('#membership_status').css('background','lightgreen'); } if ($('#current_balance').val() > 0) { $('#current_balance').css({'font-weight':'bold','color':'red'}); } get_cha(ui.item.imc_no); total_everything(); } }); }); </script> <?php // If No CHA Recharge if ($trans_type != "cha_recharge") { echo "<div class=\"row\" style=\"padding:0px 0px 10px;\">\n"; echo "<div class=\"col12 col-sm-12 col-md-5\" style=\"font-size:11px; padding-left:0px;\">Search For Member\n"; echo "<input type=\"text\" name=\"keysearch\" id=\"keysearch\" class=\"form-control\" placeholder=\"Search by Company Name / No\">\n"; //echo "<a href=\"javascript:void(0);\" onclick=\"javascript:clear_all(); \" style=\"font-size:11px;float:right;\">Clear</a>\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-2\" style=\"font-size:11px; padding-left:0px;\">GSTIN\n"; echo "<input type=\"text\" name=\"gstin\" id=\"gstin\" class=\"form-control\" readonly placeholder=\"GSTIN\" tabindex=\"-1\">\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-1\" style=\"font-size:11px; padding-left:0px;\">IMC No\n"; echo "<input type=\"text\" name=\"imc_no\" id=\"imc_no\" class=\"form-control\" readonly placeholder=\"IMC No\" tabindex=\"-1\">\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-1\" style=\"font-size:11px; padding-left:0px;\">Mem No\n"; echo "<input type=\"text\" name=\"membership_no\" id=\"membership_no\" class=\"form-control\" style=\"padding-left:2px;\" readonly placeholder=\"-----\" tabindex=\"-1\">\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-1\" style=\"font-size:11px; padding-left:0px;\">Status\n"; echo "<input type=\"text\" name=\"membership_status\" id=\"membership_status\" readonly class=\"form-control\" placeholder=\"----\" tabindex=\"-1\">\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-2\" style=\"font-size:11px; padding-left:0px;\">Recharge Balance\n"; echo "<input type=\"text\" name=\"current_balance\" id=\"current_balance\" readonly class=\"form-control\" placeholder=\"Balance\" tabindex=\"-1\">\n"; echo "</div>\n"; echo "</div>\n"; if ($trans_type != "recharge" && $trans_type != "cha_recharge") { echo "<div class=\"row\" style=\"display:none; padding:0px 0px 10px;\">\n"; echo "<div id=\"cha_container\" class=\"col12 col-sm-12 col-md-3\" style=\"font-size:11px; padding-left:0px;\">CHA\n"; echo "</div>\n"; echo "<div class=\"col12 col-sm-12 col-md-2\" style=\"font-size:11px; padding-left:0px;\">CHA Balance\n"; echo "<input type=\"text\" name=\"cha_balance\" id=\"cha_balance\" value=\"0\" readonly class=\"form-control\" placeholder=\"CHA Balance\">\n"; echo "</div>\n"; echo "</div>\n"; } } else { echo "<div class=\"row\" style=\"padding:10px 0px;\">\n"; echo "<div class=\"col12 col-sm-12 col-md-3\" style=\"font-size:12px; padding-left:0px;\">CHA\n"; echo "<select id=\"cha_no\" name=\"cha_no\" class=\"form-control\" style=\"padding:0px\" onchange=\"javascript:$('#account').val($('#cha_no option:selected').text());\">\n"; echo "<option value=\"\">Select CHA</option>\n"; $sql_cha = "select cha_no, account, current_balance from co_cha_master"; $qid_cha = db_query($sql_cha); $num_cha = db_num_rows($qid_cha); for ($k=0;$k<=$num_cha-1;$k++) { $result_cha = db_fetch_object($qid_cha); echo "<option value=\"".$result_cha->cha_no."\">".$result_cha->account."</option>\n"; } echo "</select>\n"; echo "</div>\n"; echo "</div>\n"; } echo "<div class=\"row\" style=\"padding:0px;\">\n"; echo "<input type=\"hidden\" name=\"account\" id=\"account\" class=\"form-control\" placeholder=\"Account\">\n"; echo "<input type=\"hidden\" name=\"address\" id=\"address\" class=\"form-control\" placeholder=\"Address\">\n"; echo "<input type=\"hidden\" name=\"city\" id=\"city\" class=\"form-control\" placeholder=\"City\">\n"; echo "<input type=\"hidden\" name=\"state\" id=\"state\" class=\"form-control\" placeholder=\"State\">\n"; echo "<input type=\"hidden\" name=\"pincode\" id=\"pincode\" class=\"form-control\" placeholder=\"Pincode\">\n"; echo "<input type=\"hidden\" name=\"apply_igst\" id=\"apply_igst\" class=\"form-control\" placeholder=\"Apply IGST\">\n"; echo "<input type=\"hidden\" name=\"gst_exempt\" id=\"gst_exempt\" class=\"form-control\" placeholder=\"SEZ GST Exempt\">\n"; //echo "<input type=\"hidden\" name=\"gstin\" id=\"gstin\" class=\"form-control\" placeholder=\"GSTIN\">\n"; echo "</div>\n"; echo "<div class=\"row\">\n"; echo "<div class=\"col12 col-sm-12 col-md-9\" style=\"font-size:12px;\">\n"; echo "<div style=\"width:100%; padding:0px 20px 0px; margin-bottom:0px; border:1px solid #dedede;\">\n"; //max-height:400px; overflow:auto; for ($j=1;$j<=$max_docs;$j++) { echo "<div id=\"set_".$j."\" class=\"sets row\""; if ($j > 1) { echo " style=\"display:none;\" "; } echo ">\n"; echo "<div class=\"col-12 col-sm-12 col-md-4\" style=\"padding:5px;\">\n"; if ($j>1) { echo "<a href=\"javascript:void(0);\" onclick=\"javascript:$('.sets').hide(); $('#set_".($j-1)."').show();\" style=\"float:left;\" class=\"btn btn-secondary btn-sm\">Previous</a>\n"; } echo "</div>\n"; echo "<div class=\"col-12 col-sm-12 col-md-4\" style=\"text-align:center;padding:10px; font-size:16px;\">\n"; if ($trans_type != "recharge" && $trans_type != "cha_recharge") { echo "<b>Document Set ".$j."</b>"; } echo "</div>\n"; echo "<div class=\"col-12 col-sm-12 col-md-4\" style=\"padding:5px;\">\n"; if ($j<$max_docs) { echo "<a href=\"javascript:void(0);\" onclick=\"javascript:$('.sets').hide(); $('#set_".($j+1)."').show();\" style=\"float:right;\" tabindex=\"-1\" class=\"btn btn-secondary btn-sm\">Next</a>\n"; } echo "</div>\n"; echo "<div class=\"col-12 col-sm-12 col-md-12\" style=\"padding-bottom:10px;\">\n"; // Co Options if ($trans_type == "co") { echo "<div class=\"row\">\n"; echo "<div class=\"col-12 col-sm-4 col-md-2\" style=\"padding-left:0px; font-size:11px; padding-left:0px;\">Country of Origin\n"; echo "<select name=\"origin_country_".$j."\" name=\"origin_country_".$j."\" class=\"form-control\" style=\"padding:0px; height:25px;\" >\n"; echo "<option value=\"\">Country of Origin</option>\n"; echo str_replace(">India", " selected >India",$country_dropdown); echo "</select>\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-4 col-md-3\" style=\"padding-left:0px; font-size:11px; padding-left:0px;\">Destination\n"; echo "<select name=\"destination_country_".$j."\" name=\"destination_country_".$j."\" class=\"form-control input-sm\" style=\"padding:0px;height:25px; font-size:12px;\" >\n"; echo "<option value=\"\">Select Country</option>\n"; echo $country_dropdown; echo "</select>\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-2\" style=\"padding-left:0px; font-size:11px; padding-left:0px;\">Currency\n"; echo "<select name=\"currency_".$j."\" name=\"currency_".$j."\" class=\"form-control input-sm\" style=\"padding:0px;height:25px;\" >\n"; echo "<option value=\"\">Select Currency</option>\n"; echo $currency_dropdown; echo "</select>\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-4 col-md-2\" style=\"padding-left:0px; font-size:11px; padding-left:0px;\"> Invoice Value\n"; echo "<input name=\"commercial_value_".$j."\" name=\"commercial_value_".$j."\" class=\"form-control input-sm\" style=\"height:25px;\" placeholder=\"Commercial Invoice Value\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px;\">\n"; echo "<a href=\"javascript:void(0);\" onclick=\"javascript:$(this).next().show()\" tabindex=\"-1\">Same No Same Date</a>\n"; echo "<input name=\"document_no_".$j."\" name=\"document_no_".$j."\" class=\"form-control input-sm\" style=\"display:none; height:25px;\" placeholder=\"Same No Same Date\">\n"; echo "</div>\n"; echo "</div>\n"; } // Pad Options if ($trans_type == "pad") { echo "<div class=\"row\">\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">From Serial No\n"; echo "<input name=\"pad_from_".$j."\" name=\"pad_from_".$j."\" class=\"form-control\" placeholder=\"From Serial No\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">To Serial No\n"; echo "<input name=\"pad_to_".$j."\" name=\"pad_to_".$j."\" class=\"form-control\" placeholder=\"To Serial No\">\n"; echo "</div>\n"; echo "</div>\n"; } // Visa Options if ($trans_type == "visa") { echo "<div class=\"row\">\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">Person Name\n"; echo "<input name=\"person_name_".$j."\" name=\"person_name_".$j."\" class=\"form-control\" placeholder=\"Person Name\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">Departure Date\n"; echo "<input name=\"departure_date_".$j."\" name=\"departure_date_".$j."\" class=\"form-control\" placeholder=\"Departure Date\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">Arrival Date\n"; echo "<input name=\"arrival_date_".$j."\" name=\"arrival_date_".$j."\" class=\"form-control\" placeholder=\"Arrival Date\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;font-size:11px; \">Passport No\n"; echo "<input name=\"passport_no_".$j."\" name=\"passport_no_".$j."\" class=\"form-control\" placeholder=\"Passport No\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-9 col-md-9\" style=\"padding-left:0px;padding-top:5px; font-size:11px; \">Purpose\n"; echo "<input name=\"purpose_".$j."\" name=\"purpose_".$j."\" class=\"form-control\" placeholder=\"Purpose\">\n"; echo "</div>\n"; echo "<div class=\"col-12 col-sm-3 col-md-3\" style=\"padding-left:0px;padding-top:5px; font-size:11px; \">Country of Visit\n"; echo "<select name=\"country_".$j."\" name=\"country_".$j."\" class=\"form-control\" style=\"padding:0px; height:20px;\" >\n"; echo "<option value=\"\">Country of Visit</option>\n"; echo $country_dropdown; echo "</select>\n"; echo "</div>\n"; echo "</div>\n"; } echo "</div>\n"; if ($trans_type == "visa" || $trans_type == "co" || $trans_type == "pad") { // Quantity Table echo "<div style=\"width:100%;\">\n"; // height:300px; overflow:auto; echo "<table class=\"table\">\n"; echo "<tr>\n"; echo "<th>Type of Service</th>\n"; echo "<th>Rate</th>\n"; echo "<th>Quantity</th>\n"; echo "<th>Amount</th>\n"; echo "</tr>\n"; $sql1 = "select prod_id, prod_name, member_rate, non_member_rate from co_products where prod_type = '".$trans_type."'"; $qid1 = db_query($sql1); $num1 = db_num_rows($qid1); for ($i=1;$i<=$num1;$i++) { $result1 = db_fetch_row($qid1); echo "<tr>\n"; echo "<td>\n"; if ($i == 9) { echo "<textarea class=\"form-control item-control\" style=\"height:110px; resize:none;\" name=\"item_".$j."_".$i."\" id=\"item_".$j."_".$i."\" readonly tabindex=\"-1\">".$result1[1]."</textarea>\n"; } else { echo "<input type=\"text\" class=\"form-control item-control\" name=\"item_".$j."_".$i."\" id=\"item_".$j."_".$i."\" value=\"".$result1[1]."\" readonly tabindex=\"-1\">\n"; } echo "</td>\n"; echo "<td>\n"; echo "<input type=\"text\" class=\"form-control member_rates\" style=\"max-width:75px; display:none;\" name=\"member_rate_".$j."_".$i."\" id=\"member_rate_".$j."_".$i."\" value=\"".$result1[2]."\" readonly tabindex=\"-1\">\n"; echo "<input type=\"text\" class=\"form-control non_member_rates\" style=\"max-width:75px;\" name=\"non_member_rate_".$j."_".$i."\" id=\"non_member_rate_".$j."_".$i."\" value=\"".$result1[3]."\" readonly tabindex=\"-1\">\n"; echo "</td>\n"; echo "<td>\n"; echo "<input type=\"text\" class=\"form-control\" style=\"max-width:75px;\" name=\"qty_".$j."_".$i."\" id=\"qty_".$j."_".$i."\" "; if ($trans_type == "visa" && $j == 1) { echo " value=\"1\" "; } else { echo " value=\"0\" "; } echo "onchange=\"javascript:total_everything();\">\n"; echo "</td>\n"; echo "<td>\n"; echo "<input type=\"text\" class=\"form-control\" style=\"max-width:75px;\" name=\"amt_".$j."_".$i."\" id=\"amt_".$j."_".$i."\" value=\"0\" readonly tabindex=\"-1\">\n"; echo "</td>\n"; echo "</tr>\n"; } echo "</table>\n"; echo "</div>\n"; echo "</div>\n"; // Row } // If trans type is co, visa or pad } // Recharge Simple Table if ($trans_type == "recharge" || $trans_type == "cha_recharge") { // Quantity Table echo "<div style=\"width:100%;\">\n"; // height:300px; overflow:auto; echo "<table class=\"table\">\n"; echo "<tr>\n"; echo "<th>Type of Service</th>\n"; echo "<th>Amount</th>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td>\n"; echo "<input type=\"text\" class=\"form-control\" name=\"item_1_1\" id=\"item_1_1\" value=\"Recharge Amount\" readonly>\n"; echo "</td>\n"; echo "<td>\n"; echo "<input type=\"text\" class=\"form-control non_member_rates\" style=\"max-width:125px;\" name=\"non_member_rate_1_1\" id=\"non_member_rate_1_1\" value=\"0\" onchange=\"javascript:total_everything();\">\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"max-width:75px;\" name=\"qty_1_1\" id=\"qty_1_1\" value=\"1\">\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"max-width:75px;\" name=\"amt_1_1\" id=\"amt_1_1\" value=\"0\" readonly>\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</div>\n"; echo "</div>\n"; // Row } echo "</div>\n"; // Product Table Div echo "<div id=\"order_summary\"></div>\n"; echo "</div>\n"; // col-8 div echo "<div class=\"col12 col-sm-12 col-md-3\" style=\"font-size:12px; padding-top:10px;\">\n"; echo "<table class=\"table\">\n"; echo "<tr><td width=\"50%\">Total Charges</td><td width=\"50%\"><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"subtotal\" id=\"subtotal\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; if ($trans_type != "recharge" && $trans_type != "cha_recharge") { echo "<tr><td>Xerox / Email Printing per page / Courier Charges</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"misc_charges\" id=\"misc_charges\" value=\"0\" onchange=\"javascript:total_everything();\"></td></tr>\n"; } else { echo "<tr><td colspan=\"2\"><input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"misc_charges\" id=\"misc_charges\" value=\"0\" onchange=\"javascript:total_everything();\"></td></tr>\n"; } //echo "<tr><td>Discount</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"discount\" id=\"discount\" value=\"0\" ></td></tr>\n"; echo "<tr><td>Taxable Amount</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"taxable_amount\" id=\"taxable_amount\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; if ($trans_type != "recharge" && $trans_type != "cha_recharge") { echo "<tr><td>SGST</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"sgst\" id=\"sgst\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; echo "<tr><td>CGST</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"cgst\" id=\"cgst\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; echo "<tr><td>IGST</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"igst\" id=\"igst\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; echo "<tr><td>GST Tax Total</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"gst_total\" id=\"gst_total\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; } else { echo "<tr><td colspan=\"2\">\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"sgst\" id=\"sgst\" value=\"0\" readonly>\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"cgst\" id=\"cgst\" value=\"0\" readonly>\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"igst\" id=\"igst\" value=\"0\" readonly>\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"gst_total\" id=\"gst_total\" value=\"0\" readonly>\n"; echo "</td></tr>\n"; } echo "<tr><td>GRAND TOTAL</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"grand_total\" id=\"grand_total\" value=\"0\" readonly tabindex=\"-1\"></td></tr>\n"; if ($trans_type == "recharge" || $trans_type == "cha_recharge") { echo "<tr><td>TDS</td><td><input type=\"text\" class=\"form-control\" style=\"height:25px;\" name=\"tds\" id=\"tds\" value=\"0\" onchange=\"javascript:total_everything();\"></td></tr>\n"; } else { echo "<tr><td colspan=\"2\"><input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"tds\" id=\"tds\" value=\"0\" onchange=\"javascript:total_everything();\"></td></tr>\n"; } echo "<tr><td>\n"; echo "<input type=\"hidden\" class=\"form-control\" style=\"height:25px;\" name=\"change_flag\" id=\"change_flag\" value=\"0\"\">\n"; echo "<input type=\"radio\" value=\"Cash\" name=\"payment_method\" id=\"payment_method1\" checked onchange=\"javascript:$('#cheque_container').hide(); $('#change_flag').val(1);\"> Cash <br />\n"; echo "<input type=\"radio\" value=\"Cheque\" name=\"payment_method\" id=\"payment_method2\" onchange=\"javascript:$('#cheque_container').show(); $('#change_flag').val(1);\"> Cheque/DD <br />\n"; if ($trans_type == "recharge" || $trans_type == "cha_recharge") { echo "<input type=\"radio\" value=\"ECS\" name=\"payment_method\" id=\"payment_method2\" onchange=\"javascript:$('#cheque_container').show(); $('#change_flag').val(1);\"> ECS \n"; } echo "</td><td>\n"; if ($trans_type == "co" || $trans_type == "visa" || $trans_type == "pad") { echo "<input type=\"radio\" value=\"Recharge\" name=\"payment_method\" id=\"payment_method3\" disabled = \"true\" onchange=\"javascript:$('#cheque_container').hide(); $('#change_flag').val(1);\"> Recharge <br />\n"; echo "<input type=\"radio\" value=\"CHA Recharge\" name=\"payment_method\" id=\"payment_method4\" disabled = \"true\" onchange=\"javascript:$('#cheque_container').hide(); $('#change_flag').val(1);\">CHA Recharge\n"; } echo "</td></tr>\n"; echo "<tr id=\"cheque_container\" style=\"display:none;\"><td colspan=\"2\">\n"; echo "<input type=\"text\" id=\"cheque_no\" name=\"cheque_no\" class=\"form-control\" placeholder=\"Cheque No / ECS No.\" />\n"; echo "<input type=\"text\" id=\"cheque_date\" name=\"cheque_date\" class=\"form-control\" placeholder=\"Cheque Date/ ECS Date\" />\n"; echo "<input type=\"text\" id=\"bank_name_chq\" name=\"bank_name_chq\" class=\"form-control\" placeholder=\"Bank Name\" />\n"; echo "<input type=\"text\" id=\"bank_branch\" name=\"bank_branch\" class=\"form-control\" placeholder=\"Bank Branch\" /><br />\n"; if ($trans_type == "recharge" || $trans_type == "cha_recharge") { echo "<input type=\"radio\" id=\"deposit_bank1\" name=\"deposit_bank\" value=\"Union Bank of India\" checked> Union Bank of India<br />\n"; echo "<input type=\"radio\" id=\"deposit_bank2\" name=\"deposit_bank\" value=\"Bank of Baroda\"> Bank of Baroda<br />\n"; echo "<input type=\"radio\" id=\"deposit_bank3\" name=\"deposit_bank\" value=\"State Bank of India, Delhi\"> State Bank of India, Delhi\n"; } echo "</td></tr>\n"; echo "<tr><td style=\"padding:5px;\" colspan=\"2\">\n"; echo "<a href=\"javascript:void(0);\" onclick=\"javascript:total_everything();\" class=\"btn btn-primary btn-sm\">Refresh Total</a>\n"; echo "<input id=\"save_button\" type=\"button\" onclick=\"javascript:final_validate();\" value=\"Save & Print\" class=\"btn btn-primary btn-sm float-right\" />\n"; echo "</td></tr>\n"; echo "</table>\n"; echo "</div>\n"; echo "</div>\n"; echo "</div>\n"; } //------------------------------------------------------------------------------ // Process //------------------------------------------------------------------------------ if ($action == "process") { $receipt_date = date("Y-m-d h:i:s"); $month = date("m"); $year = date("Y"); if ($month >= 1 && $month <=3) { $year_range = ($year-1)."-".$year; } else { $year_range = ($year)."-".($year+1); } if ($payment_method == "Cheque" || $payment_method == "ECS"){ $payment_details = $cheque_no."|".$cheque_date."|".$bank_name_chq."|".$bank_branch; } // Main Query if ($trans_type == "recharge" || $trans_type == "cha_recharge") { $sql1 = "insert into ".$main_recharge_table." (receipt_date, year, user, location, imc_no, membership_id, cha_no, company, address, city, state, country, pincode, gstin, trans_type, subtotal, misc_charges, discount, igst, sgst, cgst, apply_igst, grand_total, tds, payment_method, payment_details, deposit_bank, status) values ('".$receipt_date."','".$year."','".$_SESSION['name']."','".$_SESSION['location']."','".$imc_no."','".$membership_no."','".$cha_no."','".$account."','".$address."','".$city."','".$state."','India','".$pincode."','".$gstin."','".$trans_type."','".$subtotal."','".$misc_charges."','".$discount."','".$igst."','".$sgst."','".$cgst."','".$apply_igst."','".$grand_total."','".$tds."','".$payment_method."','".$payment_details."','".$deposit_bank."','executed')"; $qid1 = db_query($sql1); // Get Order No. $order_no = db_insert_id(); $receipt_no = "ADV/".$order_no."/".substr($year_range,2,2)."-".substr($year_range,7,2); } else { $sql1 = "insert into ".$main_data_table." (receipt_date, year, user, location, imc_no, membership_id, cha_no, company, address, city, state, country, pincode, gstin, trans_type, subtotal, misc_charges, discount, igst, sgst, cgst, apply_igst, gst_exempt, grand_total, tds, payment_method, payment_details, status) values ('".$receipt_date."','".$year."','".$_SESSION['name']."','".$_SESSION['location']."','".$imc_no."','".$membership_no."','".$cha_no."','".$account."','".$address."','".$city."','".$state."','India','".$pincode."','".$gstin."','".$trans_type."','".$subtotal."','".$misc_charges."','".$discount."','".$igst."','".$sgst."','".$cgst."','".$apply_igst."','".$gst_exempt."','".$grand_total."','".$tds."','".$payment_method."','".$payment_details."','executed')"; $qid1 = db_query($sql1); // Get Order No. $order_no = db_insert_id(); if ($_SESSION['location'] == "BOD") { $receipt_no = "COD/".$order_no."/".substr($year_range,2,2)."-".substr($year_range,7,2); } else { $receipt_no = "CO/".$order_no."/".substr($year_range,2,2)."-".substr($year_range,7,2); } } //echo $sql1."<br /><br />\n"; // Update Recharge Track for Member if ($trans_type == "recharge") { $sql2 = "insert into co_recharge_track (imc_no, cha_no, post_date, location, user, order_no, receipt_no, receipt_date, recharge_type, amount, status) values ('".$imc_no."','".$cha_no."','".date("Y-m-d h:i:s")."','".$_SESSION['location']."','".$_SESSION['name']."','".$order_no."','".$receipt_no."','".$receipt_date."','CR','".($grand_total+$tds)."','pending')"; $qid2 = db_query($sql2); $sql_temp = "select current_balance from co_member_master where imc_no = '".$imc_no."'"; $qid_temp = db_query($sql_temp); $result_temp = db_fetch_row($qid_temp); $current_balance = $result_temp[0]; $new_balance = $current_balance; } // Update Recharge Track for CHA if ($trans_type == "cha_recharge") { $sql2 = "insert into co_recharge_track (imc_no, cha_no, post_date, location, user, order_no, receipt_no, receipt_date, recharge_type, amount, status) values ('".$imc_no."','".$cha_no."','".date("Y-m-d h:i:s")."','".$_SESSION['location']."','".$_SESSION['name']."','".$order_no."','".$receipt_no."','".$receipt_date."','CR','".($grand_total+$tds)."','pending')"; $qid2 = db_query($sql2); $sql_temp = "select current_balance from co_cha_master where cha_no = '".$cha_no."'"; $qid_temp = db_query($sql_temp); $result_temp = db_fetch_row($qid_temp); $current_balance = $result_temp[0]; $new_balance = $current_balance; } // Deduct amount if Recharge if ($payment_method == "Recharge") { $sql_temp = "select current_balance from co_member_master where imc_no = '".$imc_no."'"; $qid_temp = db_query($sql_temp); $result_temp = db_fetch_row($qid_temp); $current_balance = $result_temp[0]; $new_balance = $current_balance - $grand_total; $sql2 = "insert into co_recharge_track (imc_no, post_date, location, user, order_no, receipt_no, receipt_date, recharge_type, amount, status) values ('".$imc_no."','".date("Y-m-d h:i:s")."','".$_SESSION['location']."','".$_SESSION['name']."','".$order_no."','".$receipt_no."','".$receipt_date."','DR','".$grand_total."','executed')"; $qid2 = db_query($sql2); $sql3 = "update co_member_master set current_balance = '".$new_balance."' where imc_no = '".$imc_no."'"; $qid3 = db_query($sql3); } // Deduct amount if CHA Recharge if ($payment_method == "CHA Recharge") { $sql_temp = "select account, current_balance from co_cha_master where cha_no = '".$cha_no."'"; $qid_temp = db_query($sql_temp); $result_temp = db_fetch_row($qid_temp); $current_balance = $result_temp[1]; $new_balance = $current_balance - $grand_total; $sql2 = "insert into co_recharge_track (cha_no, post_date, location, user, order_no, receipt_no, receipt_date, recharge_type, amount, status) values ('".$cha_no."','".date("Y-m-d h:i:s")."','".$_SESSION['location']."','".$_SESSION['name']."','".$order_no."','".$receipt_no."','".$receipt_date."','DR','".$grand_total."','executed')"; $qid2 = db_query($sql2); $sql3 = "update co_cha_master set current_balance = '".$new_balance."' where cha_no = '".$cha_no."'"; $qid3 = db_query($sql3); } // Update Orders if ($trans_type == "recharge" || $trans_type == "cha_recharge") { $sql_temp = "update ".$main_recharge_table." set receipt_no = '".$receipt_no."', current_balance = '".$new_balance."' where order_no = '".$order_no."'"; } else { $sql_temp = "update ".$main_data_table." set receipt_no = '".$receipt_no."', current_balance = '".$new_balance."' where order_no = '".$order_no."'"; } $qid_temp = db_query($sql_temp); // Populate Orders Track if ($trans_type != "recharge" && $trans_type != "cha_recharge") { for ($i=1;$i<=$max_docs;$i++) { $first_flag = 0; for ($k=1;$k<=10;$k++) { // Get Misc data for each document set if ($trans_type == "co") { eval("\$origin_country=\"\$origin_country_".$i."\";"); eval("\$destination_country=\"\$destination_country_".$i."\";"); eval("\$currency=\"\$currency_".$i."\";"); eval("\$commercial_value=\"\$commercial_value_".$i."\";"); eval("\$document_no=\"\$document_no_".$i."\";"); $details = $origin_country."|".$destination_country."|".$currency."|".$commercial_value; } if ($trans_type == "pad") { eval("\$pad_from=\"\$pad_from_".$i."\";"); eval("\$pad_to=\"\$pad_to_".$i."\";"); } if ($trans_type == "visa") { eval("\$person_name=\"\$person_name_".$i."\";"); eval("\$departure_date=\"\$departure_date_".$i."\";"); eval("\$arrival_date_=\"\$arrival_date_".$i."\";"); eval("\$passport_no=\"\$passport_no_".$i."\";"); eval("\$purpose=\"\$purpose_".$i."\";"); eval("\$country=\"\$country_".$i."\";"); $details = $person_name."|".$departure_date."|".$arrival_date_."|".$passport_no."|".$purpose."|".$country; } // Create query set for each item in the document set eval("\$item_name=\"\$item_".$i."_".$k."\";"); if ($membership_status == "active") { eval("\$item_rate=\"\$member_rate_".$i."_".$k."\";"); } else { eval("\$item_rate=\"\$non_member_rate_".$i."_".$k."\";"); } eval("\$item_qty=\"\$qty_".$i."_".$k."\";"); eval("\$item_amt=\"\$amt_".$i."_".$k."\";"); if ($item_qty > 0) { $sql2 = "insert into ".$main_track_table." (order_no, item, rate, qty, cost, subtotal, doc_group, doc_no, location, pad_from, pad_to, details) values ('".$order_no."','".$item_name."','".$item_rate."','".$item_qty."','".$item_amt."','".$subtotal."','".$i."','".$doc_no."','".$_SESSION['location']."','".$pad_from."','".$pad_to."','".$details."')"; //echo $sql2."<br />\n"; $qid2 = db_query($sql2); if ($first_flag == 0) { $this_item_name = $item_name; $first_flag = 1; } } } // Generate Unique document number if (($trans_type == "co" || $trans_type == "visa")) { if ($document_no == "") { if (chop($this_item_name) != "Registration Fees for New Registration" && chop($this_item_name) != "Xerox and Email printing per page") { $sql_doc1 = "select max(doc_no) from ".$main_track_table." where location = '".$_SESSION['location']."'"; $qid_doc1 = db_query($sql_doc1); $result_doc1 = db_fetch_row($qid_doc1); $sql_doc2 = "update ".$main_track_table." set doc_no = '".($result_doc1[0]+1)."' where doc_group = '".$i."' and order_no = '".$order_no."'"; $qid_doc2 = db_query($sql_doc2); //$result_doc2 = db_fetch_row($qid_doc2); } } else { $sql_docs = "update ".$main_track_table." as t1 set t1.same_doc_no = '".$document_no."' where t1.doc_group = '".$i."' and t1.order_no = '".$order_no."'"; $qid_docs = db_query($sql_docs); } } } if ($misc_charges > 0) { $sql2 = "insert into ".$main_track_table." (order_no, item, rate, qty, cost, subtotal, location, pad_from, pad_to, details) values ('".$order_no."','Xerox / Email Printing per page / Courier Charges','".$misc_charges."','1','".$misc_charges."','".$subtotal."','".$_SESSION['location']."','','','')"; $qid2 = db_query($sql2); } } // Go and Print echo "<script>\n"; echo "document.location = \"co_generate_pdf.php?trans_type=".$trans_type."&order_no=".$order_no."\"; \n"; echo "</script>\n"; } if ($action == "print_bills") { if ($location_flag == "BOD") { $main_data_table = "co_orders_delhi"; $main_track_table = "co_orders_track_delhi"; } else { $main_data_table = "co_orders_2018"; $main_track_table = "co_orders_track_2018"; } if ($order_no != "") { $sql = "select receipt_date, invoice_filename, receipt_filename, receipt_no, trans_type from ".$main_data_table." where order_no = '".$order_no."'"; $qid = db_query($sql); $result = db_fetch_row($qid); $receipt_date = $result[0]; $invoice_filename = $result[1]; $receipt_filename = $result[2]; $trans_type = $result[4]; $year = substr($receipt_date,0,4); $month = substr($receipt_date,5,2); if ($month >= 1 && $month <=3) { $year_range = ($year-1)."-".$year; } else { $year_range = ($year)."-".($year+1); } echo "<h2>Print Invoice/Receipt (".$result[3].")\n"; echo "<a href=\"co_billing.php?trans_type=visa\" class=\"btn btn-primary btn-sm float-right\" style=\"margin-left:5px;\">Visa</a>\n"; echo "<a href=\"co_billing.php?trans_type=pad\" class=\"btn btn-primary btn-sm float-right\" style=\"margin-left:5px;\">Sale of Pads</a>\n"; echo "<a href=\"co_billing.php?trans_type=co\" class=\"btn btn-primary btn-sm float-right\" style=\"margin-left:5px;\">Certificate of Origin</a>\n"; echo "</h2>\n"; echo "<div class=\"row\">\n"; ?> <script> function print_invoice() { var objInvoice1 = document.getElementById('invoice_container'); objInvoice1.contentWindow.focus(); objInvoice1.contentWindow.print(); } function print_receipt() { var objInvoice2 = document.getElementById('receipt_container'); objInvoice2.contentWindow.focus(); objInvoice2.contentWindow.print(); } </script> <?php if ($trans_type != "recharge" && $trans_type != "cha_recharge") { echo "<div class=\"col12 col-sm-12 col-md-6\" style=\"font-size:12px;\">\n"; echo "<iframe id=\"invoice_container\" src=\"../storage/coo/invoices/".$year_range."/".$invoice_filename."\" width=\"100%\" height=\"400\"></iframe>\n"; echo "<a href=\"javascript:void(0);\" onclick=\"javascript:print_invoice();\" class=\"btn btn-primary\">Print Invoice</a>\n"; echo "<a href=\"../storage/coo/invoices/".$year_range."/".$invoice_filename."\" target=\"_blank\" class=\"btn btn-primary\">View Invoice</a>\n"; echo "</div>\n"; } echo "<div class=\"col12 col-sm-12 col-md-6\" style=\"font-size:12px;\">\n"; echo "<iframe id=\"receipt_container\" src=\"../storage/coo/receipts/".$year_range."/".$receipt_filename."\" width=\"100%\" height=\"400\"></iframe>\n"; echo "<a href=\"javascript:void(0);\" onclick=\"javascript:print_receipt();\" class=\"btn btn-primary\">Print Receipt</a>\n"; echo "<a href=\"../storage/coo/receipts/".$year_range."/".$receipt_filename."\" target=\"_blank\" class=\"btn btn-primary\">View Receipt</a>\n"; echo "</div>\n"; echo "</div>\n"; } } echo "</div>\n"; echo "</div>\n"; include('footer.php'); } else { echo "<script>\n"; echo "parent.document.location = \"index.php\";\n"; echo "</script>\n"; } ?>