function testfetchBillingInformationOK() { $billing = WebfinanceMantis::fetchBillingInformation('2012-08-01', '2012-09-01'); $this->assertType('array', $billing); }
<th align="left">Time</th> <th>Support type</th> <th>Price</th> <th>€/h</th> <th>Report</th> <th>Result</th> </tr> <?php $total_price_all_clients = 0; $total_minutes_all_clients = 0; $invoice_description = strftime("Support professionnel hors périmètre de contrat\nPériode: %B %Y", mktime(0, 0, 0, $month, 1, $year)); # Ugly hack to avoid some clients to be invoiced for support $clients_not_invoiced = array(552 => TRUE, 676 => TRUE, 648 => TRUE, 194 => TRUE); // Print preview foreach ($mantis->fetchBillingInformation($year, $month) as $webfinance_id => $billing) { $invoiced = TRUE; $url_webfinance = "/prospection/fiche_prospect.php?id={$webfinance_id}"; // Check that the client has an email address $client = new Client($webfinance_id); if (empty($client->email)) { die("Email address not set for client <a href=\"{$url_webfinance}\">{$client->nom}</a>"); } $total_minutes_client = 0; $total_price_client = 0; $description = strftime("Détails des interventions du support professionnel pour le mois de %B %Y : \n", mktime(0, 0, 0, $month, 1, $year)); foreach ($billing as $ticket_number => $ticket) { $url_ticket = "https://support.isvtec.com/view.php?id={$ticket_number}"; $price = round($ticket['price'] * $ticket['quantity'], 2); /* # Debug: produce fake time entries