Topic: degrade doctext.inc vars gracefully. hardcoded strings
In sales/includes/db/sales_order_db.inc in the function get_sales_order_header we have a few hardcoded strings:
Line 310: You have duplicate document in database
Line 317: You have missing or invalid sales document in databaseYou have missing or invalid sales document in database
In the demo company, Reports => Customers => Print Sales Quotations results in the following error:
You have missing or invalid sales document in database (type:32, number:0).
The database does not have any demo data for sales quotations - it does not degrade gracefully.
Almost all variables in reporting/inxludes/doctext.inc need to be gracefully degraded like line 40:
$this->formData['document_date'] = this->formData['ord_date'] ;
which should become
$this->formData['document_date'] = isset($this->formData['ord_date']) ? $this->formData['ord_date'] : '';