//
// To find how various hooks are processed look into respective hook_* functions below.
//
-class hooks {
+class hooks extends \stdClass {
var $module_name; // extension module name.
//
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-class user_prefs
+
+class user_prefs extends \stdClass
{
var $language;
*/
//-----------------------------------------------------------------------------------
-class allocation
+class allocation extends \stdClass
{
var $trans_no;
$fields = array('type_no', 'trans_no','description','filename','tran_date' => 'date');
parent::__construct($name, $fields);
$this->class = $class;
- $this->subclass = $subclass;
+ $this->sub_class = $subclass;
$this->entity = $id;
}
parent::__construct($name, $fields);
$this->class = $class;
- $this->subclass = $subclass;
+ $this->sub_class = $subclass;
$this->entity = $id;
}
function list_view() {
br();
- $contacts = get_crm_persons($this->class, $this->subclass, $this->entity);
+ $contacts = get_crm_persons($this->class, $this->sub_class, $this->entity);
start_table(TABLESTYLE, "width='80%'");
$th = array(_('Assignment'), _("Reference"), _("Full Name"), _("Phone"), _("Sec Phone"), _("Fax"),
text_row(_("Reference:"), 'ref', @$this->data['ref'], 35, 40);
crm_category_types_list_row(_("Contact active for:"), 'assgn', @$this->data['contacts'],
- array('subclass' => @$this->subclass,
+ array('subclass' => @$this->sub_class,
'class' => @$this->class,
'multi' =>true)
);
$pastdue1, $pastdue2, _("Total Balance"));
table_header($th);
- start_row();
- label_cell($supplier_record["curr_code"]);
- label_cell($supplier_record["terms"]);
- amount_cell($supplier_record["Balance"] - $supplier_record["Due"]);
- amount_cell($supplier_record["Due"] - $supplier_record["Overdue1"]);
- amount_cell($supplier_record["Overdue1"] - $supplier_record["Overdue2"]);
- amount_cell($supplier_record["Overdue2"]);
- amount_cell($supplier_record["Balance"]);
- end_row();
+ if ($supplier_record != false)
+ {
+ start_row();
+ label_cell($supplier_record["curr_code"]);
+ label_cell($supplier_record["terms"]);
+ amount_cell($supplier_record["Balance"] - $supplier_record["Due"]);
+ amount_cell($supplier_record["Due"] - $supplier_record["Overdue1"]);
+ amount_cell($supplier_record["Overdue1"] - $supplier_record["Overdue2"]);
+ amount_cell($supplier_record["Overdue2"]);
+ amount_cell($supplier_record["Balance"]);
+ end_row();
+ }
end_table(1);
}
//------------------------------------------------------------------------------------------------
Joe Hunt
*/
define('MAXLEN', 27); // we cut after 25 chars + ...
-class Chart
+class Chart extends \stdClass
{
var $id;
var $labels = array();
$rep->filename = "Packing_slip" . $myrow['reference'] . ".pdf";
}
}
- $rep->currency = $cur;
+ $rep->currency = ($cur == null ? "USD" : $cur);
$rep->Font();
$rep->Info($params, $cols, null, $aligns);
include_once($path_to_root . "/inventory/includes/inventory_db.inc");
include_once($path_to_root . "/taxes/tax_calc.inc");
-class Cart
+class Cart extends \stdClass
{
var $trans_type; // invoice, order, quotation, delivery note ...
var $trans_no = array();// array (num1=>ver1,..) or 0 for new
{
$past1 = get_company_pref('past_due_days');
$past2 = 2 * $past1;
- if ($customer_record["dissallow_invoices"] != 0)
+ if ($customer_record && $customer_record["dissallow_invoices"] != 0)
{
echo "<center><font color=red size=4><b>" . _("CUSTOMER ACCOUNT IS ON HOLD") . "</font></b></center>";
}
$th = array(_("Currency"), _("Terms"), _("Current"), $nowdue,
$pastdue1, $pastdue2, _("Total Balance"));
table_header($th);
-
- start_row();
- label_cell($customer_record["curr_code"]);
- label_cell($customer_record["terms"]);
- amount_cell($customer_record["Balance"] - $customer_record["Due"]);
- amount_cell($customer_record["Due"] - $customer_record["Overdue1"]);
- amount_cell($customer_record["Overdue1"] - $customer_record["Overdue2"]);
- amount_cell($customer_record["Overdue2"]);
- amount_cell($customer_record["Balance"]);
- end_row();
+ if ($customer_record != false)
+ {
+ start_row();
+ label_cell($customer_record["curr_code"]);
+ label_cell($customer_record["terms"]);
+ amount_cell($customer_record["Balance"] - $customer_record["Due"]);
+ amount_cell($customer_record["Due"] - $customer_record["Overdue1"]);
+ amount_cell($customer_record["Overdue1"] - $customer_record["Overdue2"]);
+ amount_cell($customer_record["Overdue2"]);
+ amount_cell($customer_record["Balance"]);
+ end_row();
+ }
end_table();
}