Jump to content

Search the Community

Showing results for tags 'php print'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I have school fees management system it's work perfect but now I need to add email print on receipt I have email table but I don't know to print too on receipt kindly give me any idea to print ( <?php include 'db_connect.php'; $fees = $conn->query("SELECT ef.*,s.name as sname,s.id_no,concat(c.course,' - ',c.level) as `class` FROM student_ef_list ef inner join student s on s.id = ef.student_id inner join courses c on c.id = ef.course_id where ef.id = {$_GET['ef_id']}"); foreach($fees->fetch_array() as $k => $v){ $$k= $v; } $payments = $conn->query("SELECT * FROM payments where ef_id = $id "); $pay_arr = array(); while($row=$payments->fetch_array()){ $pay_arr[$row['id']] = $row; } ?> <style> .flex{ display: inline-flex; width: 100%; } .w-50{ width: 50%; } .text-center{ text-align:center; } .text-right{ text-align:right; } table.wborder{ width: 100%; border-collapse: collapse; } table.wborder>tbody>tr, table.wborder>tbody>tr>td{ border:1px solid; } p{ margin:unset; } </style> <div class="container-fluid"> <p class="text-center"><b><?php echo $_GET['pid'] == 0 ? "Payments" : 'Payment Receipt' ?></b></p> <hr> <div class="flex"> <div class="w-50"> <p>EF. No: <b><?php echo $ef_no ?></b></p> <p>Student: <b><?php echo ucwords($sname) ?></b></p> <p>Course/Level: <b><?php echo $class ?></b></p> </div> <?php if($_GET['pid'] > 0): ?> <div class="w-50"> <p>Payment Date: <b><?php echo isset($pay_arr[$_GET['pid']]) ? date("M d,Y",strtotime($pay_arr[$_GET['pid']]['date_created'])): '' ?></b></p> <p>Paid Amount: <b><?php echo isset($pay_arr[$_GET['pid']]) ? number_format($pay_arr[$_GET['pid']]['amount'],2): '' ?></b></p> <p>Remarks: <b><?php echo isset($pay_arr[$_GET['pid']]) ? $pay_arr[$_GET['pid']]['remarks']: '' ?></b></p> </div> <?php endif; ?> </div> <hr> <p><b>Payment Summary</b></p> <table class="wborder"> <tr> <td width="50%"> <p><b>Fee Details</b></p> <hr> <table width="100%"> <tr> <td width="50%">Fee Type</td> <td width="50%" class='text-right'>Amount</td> </tr> <?php $cfees = $conn->query("SELECT * FROM fees where course_id = $course_id"); $ftotal = 0; while ($row = $cfees->fetch_assoc()) { $ftotal += $row['amount']; ?> <tr> <td><b><?php echo $row['description'] ?></b></td> <td class='text-right'><b><?php echo number_format($row['amount']) ?></b></td> </tr> <?php } ?> <tr> <th>Total</th> <th class='text-right'><b><?php echo number_format($ftotal) ?></b></th> </tr> </table> </td> <td width="50%"> <p><b>Payment Details</b></p> <table width="100%" class="wborder"> <tr> <td width="50%">Date</td> <td width="50%" class='text-right'>Amount</td> </tr> <?php $ptotal = 0; foreach ($pay_arr as $row) { if($row["id"] <= $_GET['pid'] || $_GET['pid'] == 0){ $ptotal += $row['amount']; ?> <tr> <td><b><?php echo date("Y-m-d",strtotime($row['date_created'])) ?></b></td> <td class='text-right'><b><?php echo number_format($row['amount']) ?></b></td> </tr> <?php } } ?> <tr> <th>Total</th> <th class='text-right'><b><?php echo number_format($ptotal) ?></b></th> </tr> </table> <table width="100%"> <tr> <td>Total Payable Fee</td> <td class='text-right'><b><?php echo number_format($ftotal) ?></b></td> </tr> <tr> <td>Total Paid</td> <td class='text-right'><b><?php echo number_format($ptotal) ?></b></td> </tr> <tr> <td>Balance</td> <td class='text-right'><b><?php echo number_format($ftotal-$ptotal) ?></b></td> </tr> </table> </td> </tr> </table> </div> ) My WhatsApp number is +923409871374 Pls help me
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.