hmaddy Posted April 3, 2024 Share Posted April 3, 2024 (edited) <?php use WHMCS\Database\Capsule; ?> <html> <head> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous"> </head> <body> <table class="table"> <thead> <tr> <th scope="col">Invoice ID</th> <th scope="col">User ID</th> <th scope="col">Invoice Date</th> <th scope="col">Due Date</th> <th scope="col">Description</th> <th scope="col">Amount</th> </tr> </thead> <tbody> <?php foreach (Capsule::table('tblinvoices')->where("status", "=", "Unpaid")->get() as $client) { // Fetch data from another_table based on $client->id $additional_data = Capsule::table('tblinvoiceitems')->where('invoiceid', $client->id)->first(); <tr> <th scope="row"><?php echo $client->id . PHP_EOL; ?></th> <td><?php echo $client->userid . PHP_EOL; ?></td> <td><?php echo $client->date . PHP_EOL; ?></td> <td><?php echo $client->duedate . PHP_EOL; ?></td> <td><?php echo $additional_data->description . PHP_EOL; ?></td> <td><?php echo $client->total . PHP_EOL; ?></td> </tr> } <?php> </tbody> </table> </body> Above mentioned code throwing the following error. so please help me to fix this issue. Oops! Something went wrong and we couldn't process your request. Please go back to the previous page and try again. For additional assistance, please reference the WHMCS TroubleShooting Guide » ParseError: syntax error, unexpected '<' in /home/hotmaisl/public_html/billing/modules/reports/unpaid_Invoices_with_description.php:47 Stack trace: #0 {main} Edited April 3, 2024 by hmaddy 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted April 3, 2024 Author Share Posted April 3, 2024 Its fixed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.