TenderReport

Revised: 14Feb2013

Tender reporting needs and conventions can vary pretty widely. If the included reports don't meet your needs, you can create a custom one. Just create a class that inherits from the TenderReport base class. Inside the class, define a static method named get. This method should return a string containing what you'd like to print. Functions in the ReceiptLib class are useful for text formatting and positioning. Functions in the Database class are useful for consulting transaction data to determine what to print. The details are entirely up to you.

By convention, the file name should match the class name (i.e., the example would be named ExampleTenderReport.php). If the file is in lib/ReceiptBuilding/TenderReports or anywhere inside an enabled plugin, the custom tender report will be listed as an option on the Extras tab of the configuration page.

Example:

class ExampleTenderReport extends TenderReport {
	public static function get(){
		return ReceiptLib::centerString('A very useless report');
	}
}


Change Log:

14Feb13 Andy Theuninck - Moved into API section
12Feb13 Andy Theuninck - Created document