X7ROOT File Manager
Current Path:
/home/mysptejz/public_html/billing/modules/reports
home
/
mysptejz
/
public_html
/
billing
/
modules
/
reports
/
ðŸ“
..
📄
affiliates_overview.php
(2.59 KB)
📄
aging_invoices.php
(4.57 KB)
📄
annual_income_report.php
(3.26 KB)
📄
client.php
(4.66 KB)
📄
client_sources.php
(4.58 KB)
📄
client_statement.php
(6.88 KB)
📄
clients.php
(5.8 KB)
📄
clients_by_country.php
(2.22 KB)
📄
credits_reviewer.php
(6.06 KB)
📄
customer_retention_time.php
(9.07 KB)
📄
daily_performance.php
(4.96 KB)
📄
direct_debit_processing.php
(2.95 KB)
📄
disk_usage_summary.php
(3.19 KB)
📄
domain_renewal_emails.php
(6.09 KB)
📄
domains.php
(8.4 KB)
📄
income_by_product.php
(8.92 KB)
📄
income_forecast.php
(4.26 KB)
📄
index.php
(42 B)
📄
invoices.php
(10.36 KB)
📄
monthly_orders.php
(3.45 KB)
📄
monthly_transactions.php
(4.05 KB)
📄
new_customers.php
(4.36 KB)
📄
pdf_batch.php
(4.43 KB)
📄
product_suspensions.php
(1.55 KB)
📄
promotions_usage.php
(3.53 KB)
📄
sales_tax_liability.php
(5.65 KB)
📄
server_revenue_forecasts.php
(3.63 KB)
📄
services.php
(9.7 KB)
📄
smarty_compatibility.php
(4.35 KB)
📄
ssl_certificate_monitoring.php
(7.92 KB)
📄
support_ticket_replies.php
(2.23 KB)
📄
ticket_feedback_comments.php
(5.31 KB)
📄
ticket_feedback_scores.php
(4.5 KB)
📄
ticket_ratings_reviewer.php
(4.11 KB)
📄
ticket_tags.php
(2.99 KB)
📄
top_10_clients_by_income.php
(2.36 KB)
📄
transactions.php
(7.08 KB)
📄
vat_moss.php
(6.98 KB)
Editing: direct_debit_processing.php
<?php use WHMCS\Billing\Invoice; use WHMCS\Database\Capsule; use WHMCS\Payment\PayMethod\Adapter\BankAccount; if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } if (!function_exists('getClientDefaultBankDetails')) { require ROOTDIR . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'clientfunctions.php'; } $reportdata["title"] = "Direct Debit Processing"; $reportdata["description"] = "This report displays all Unpaid invoices assigned to the Direct Debit payment method and the associated bank account details stored for their owners ready for processing"; $reportdata["tableheadings"] = array("Invoice ID","Client Name","Invoice Date","Due Date","Subtotal","Tax","Credit","Total","Bank Name","Bank Account Type","Bank Code","Bank Account Number"); $defaultBankDetailsPerUser = []; $results = Capsule::table('tblinvoices') ->select('tblinvoices.*', 'tblclients.firstname', 'tblclients.lastname') ->join('tblclients', 'tblclients.id', '=', 'tblinvoices.userid') ->where('tblinvoices.paymentmethod', '=', 'directdebit') ->where('tblinvoices.status', '=', 'Unpaid') ->orderBy('duedate', 'asc') ->get() ->all(); foreach ($results as $result) { $id = $result->id; $userid = $result->userid; $client = $result->firstname . " " . $result->lastname; $date = $result->date; $duedate = $result->duedate; $subtotal = $result->subtotal; $credit = $result->credit; $tax = ($result->tax + $result->tax2); $total = $result->total; $invoice = Invoice::find($id); if ($invoice && $invoice->payMethod && $invoice->payMethod->payment->isBankAccount()) { /** @var BankAccount $payment */ $payment = $invoice->payMethod->payment; $bankDetails["bankname"] = $payment->getBankName(); $bankDetails["banktype"] = $payment->getAccountType(); $bankDetails["bankcode"] = $payment->getRoutingNumber(); $bankDetails["bankacct"] = $payment->getAccountNumber(); } else { if (!isset($defaultBankDetailsPerUser[$userid])) { $defaultBankDetailsPerUser[$userid] = getClientDefaultBankDetails($userid); } $bankDetails = $defaultBankDetailsPerUser[$userid]; } $bankname = $bankDetails["bankname"]; $banktype = $bankDetails["banktype"]; $bankcode = $bankDetails["bankcode"]; $bankacct = $bankDetails["bankacct"]; $currency = getCurrency($userid); $date = fromMySQLDate($date); $duedate = fromMySQLDate($duedate); $subtotal = formatCurrency($subtotal); $credit = formatCurrency($credit); $tax = formatCurrency($tax); $total = formatCurrency($total); $reportdata["tablevalues"][] = [ '<a href="invoices.php?action=edit&id=' . $id . '">' . $id . '</a>', $client, $date, $duedate, $subtotal, $tax, $credit, $total, $bankname, $banktype, $bankcode, $bankacct, ]; } $reportdata["footertext"] = "";
Upload File
Create Folder