0) { $easy_invoice_has_chart_data = true; break 2; } } } if ($easy_invoice_has_chart_data) { wp_enqueue_script( 'easy-invoice-chart-vendor', EASY_INVOICE_PLUGIN_URL . 'assets/js/vendors/chart.min.js', array(), EASY_INVOICE_VERSION, true ); wp_enqueue_script( 'easy-invoice-dashboard-chart', EASY_INVOICE_PLUGIN_URL . 'assets/js/dashboard-chart.js', array('easy-invoice-chart-vendor'), EASY_INVOICE_VERSION, true ); wp_localize_script( 'easy-invoice-dashboard-chart', 'easyInvoiceDashboard', array( 'monthlyRevenue' => $monthly_revenue, 'hasData' => true, ) ); } $invoices_list_url = admin_url('admin.php?page=' . PagesSlugs::ALL_INVOICES); ?>

$data): $is_last = --$currency_count === 0; $amount = isset($data['amount']) && is_numeric($data['amount']) ? $data['amount'] : 0; $symbol = isset($data['symbol']) ? $data['symbol'] : ''; ?>

'bg-green-100 text-green-800', 'unpaid' => 'bg-yellow-100 text-yellow-800', 'overdue' => 'bg-red-100 text-red-800', 'draft' => 'bg-gray-100 text-gray-800' ][$invoice->getStatus()] ?? 'bg-gray-100 text-gray-800'; $invoiceId = $invoice->getId(); $invoiceNumber = $invoice->getNumber() ?: ('INV-' . $invoiceId); $invoiceTotal = $invoice->getTotal(); $clientName = $invoice->getCustomerName() ?: __( 'Client', 'easy-invoice' ); $dueDate = $invoice->getDueDate() ?: date('Y-m-d'); $raw_status = $invoice->getStatus(); $status_map = array( 'paid' => __( 'Paid', 'easy-invoice' ), 'unpaid' => __( 'Unpaid', 'easy-invoice' ), 'overdue' => __( 'Overdue', 'easy-invoice' ), 'draft' => __( 'Draft', 'easy-invoice' ), ); $status = isset( $status_map[ $raw_status ] ) ? $status_map[ $raw_status ] : esc_html( ucfirst( (string) $raw_status ) ); ?>
format($invoiceTotal)); ?>