2 namespace Stock\Report;
7 * Stock Contyrol Report.
10 class StockGrid extends \Utility\Service\Report
18 protected $_title = 'Stock Data Export';
22 protected $_subject = 'Vehicles in stock.';
26 protected $_description = 'Export of vehicles in stock.';
30 protected $_notes = array(
31 'Confidential information, generated using Bid 4 Cars, for more information visit bid4cars.co.za'
36 protected $_headers = array(
41 'Registration Number',
47 'Main Exterior Colour',
51 'Retail Amount Required',
54 'Date loaded on price guide',
58 'Date loaded on auction',
64 protected $_fields = array(
68 'stock_referenceNumber',
69 'stock_registrationNumber',
75 'exteriorColour_name',
79 'stock_retailAmountRequired',
82 'stock_loadedOnPriceGuide',
83 'stock_numberOfOffers',
85 'valuation_amountOffered',
87 'auction_currentBidPrice'
92 protected $_totals = array(
96 'stock_retailAmountRequired',
98 'valuation_amountOffered',
99 'auction_currentBidPrice'
104 protected $_currencyFields = array(
108 'stock_retailAmountRequired',
109 'stock_highestOffer',
110 'valuation_amountOffered',
111 'auction_currentBidPrice'
117 * Build the dataset, or not.
119 public function build()
121 #-> Data passed by DataBin Grid functionality.
122 $dateTimeFormat = \Utility\Definitions\Locale::getDateTimeFormat();
123 foreach ($this->_data as $rowId => $rowData)
125 $this->_data[$rowId]['stock_created'] = $rowData['stock_created']->format($dateTimeFormat);