Function __global->build_sales_table

Definitions

sources/ecommerce_reports.php

  • The UI to view sales.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$_filters string No No Blank (empty string) N/A N/A Filtercode to use
$show_username boolean No No False N/A N/A Whether to show the username (customer) column
$is_admin boolean No No False N/A N/A Whether the membwer viewing this table is an admin (activates Admin Zone links and the delete column)
$max_default integer No No 20 N/A N/A Default maximum number of records to show
$empty_ok boolean No No False N/A N/A Whether empty results are okay (instead of exiting with a no entries message)

Returns

  • A tuple: The sales table, pagination, database rows, and Filtercode box (null: none)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * The UI to view sales.
 *
 * @param  string $_filters Filtercode to use
 * @param  boolean $show_username Whether to show the username (customer) column
 * @param  boolean $is_admin Whether the membwer viewing this table is an admin (activates Admin Zone links and the delete column)
 * @param  integer $max_default Default maximum number of records to show
 * @param  boolean $empty_ok Whether empty results are okay (instead of exiting with a no entries message)
 * @return ?array A tuple: The sales table, pagination, database rows, and Filtercode box (null: none)
 */

function build_sales_table(string $_filters = '', bool $show_username = false, bool $is_admin = false, int $max_default = 20, bool $empty_ok = false) : ?array