Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.112 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/accounts/vendor/../ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php // First we execute our common code to connection to the database and start the session // Everything below this point in the file is secured by the login system // We can display the user's username to them by reading it from the session array. Remember that because // a username is user submitted content we must use htmlentities on it before displaying it to the user. //and `Cr_Ledger_Type` !='Liabilirties' and `Cr_Ledger_Type` !='Assets' include 'config/config.php'; $income_sql_res = "SELECT DISTINCT `Cr_Ledger` FROM `vochers` WHERE `Type` = 'Recipt'"; $expenditure_sql_res = "SELECT DISTINCT `Dr_Ledger` FROM `vochers` WHERE `Type` = 'Payment' "; //ho "$income_sql_res"; $expenditure_Total=""; $expenditure_res=mysqli_query($con,$expenditure_sql_res); while($expenditure_1=mysqli_fetch_array($expenditure_res)) { //cho "SELECT SUM(Cr_Amount) FROM `vochers` WHERE `Cr_Ledger` = '$expenditure_1[Cr_Ledger]'"; $expenditure_1_res=mysqli_query($con, "SELECT SUM(Dr_Amount) FROM `vochers` WHERE `Dr_Ledger` = '$expenditure_1[Dr_Ledger]'"); while($expenditure=mysqli_fetch_array($expenditure_1_res)) { $expenditure_Total+=$expenditure['0']; } } ?> <!-- Expenditure Tab End--> <?php $income_Total=""; $income_res=mysqli_query($con,$income_sql_res); while($income_1=mysqli_fetch_array($income_res)) { //cho "SELECT SUM(Cr_Amount) FROM `vochers` WHERE `Cr_Ledger` = '$expenditure_1[Cr_Ledger]'"; $income_1_res=mysqli_query($con, "SELECT SUM(Cr_Amount) FROM `vochers` WHERE `Cr_Ledger` = '$income_1[Cr_Ledger]'"); while($income=mysqli_fetch_array($income_1_res)) { $income_Total+=$income['0']; } } $CashInHand=$income_Total-$expenditure_Total; echo "$CashInHand"; ?>