From 00f413f12b0635864222dbcce4f82d98351b08cf Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 7 Aug 2023 21:17:15 +0200 Subject: [PATCH] PHP 8.2 Compatibility Improvement, better implementation. --- includes/hooks.inc | 4 ++-- includes/prefs/userprefs.inc | 4 ++-- includes/ui/allocation_cart.inc | 3 ++- reporting/includes/class.graphic.inc | 19 ++++++++++++++++++- sales/includes/cart_class.inc | 3 ++- 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/includes/hooks.inc b/includes/hooks.inc index 63e1684c..1fbcd0e7 100644 --- a/includes/hooks.inc +++ b/includes/hooks.inc @@ -18,9 +18,9 @@ // // To find how various hooks are processed look into respective hook_* functions below. // -class hooks extends \stdClass { +class hooks { var $module_name; // extension module name. - + var $path = null; // // Helper for updating databases with extension scheme // diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index 24cd15c5..1939d6f4 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -10,7 +10,7 @@ See the License here . ***********************************************************************/ -class user_prefs extends \stdClass +class user_prefs { var $language; @@ -37,7 +37,7 @@ class user_prefs extends \stdClass var $sticky_date; // save date on subsequent document entry var $startup_tab; // default start-up menu tab var $transaction_days; // transaction days in inquiries - var $save_report_selection; // save report selections days 0... + var $save_report_selections; // save report selections days 0... var $use_date_picker; // use date picker for all date fields var $def_print_destination; // default print destination. 0 = PDF/Printer, 1 = Excel var $def_print_orientation; // default print orientation. 0 = Portrait. 1 = Landscape diff --git a/includes/ui/allocation_cart.inc b/includes/ui/allocation_cart.inc index 34f1784c..fe232f06 100644 --- a/includes/ui/allocation_cart.inc +++ b/includes/ui/allocation_cart.inc @@ -15,7 +15,7 @@ */ //----------------------------------------------------------------------------------- -class allocation extends \stdClass +class allocation { var $trans_no; @@ -26,6 +26,7 @@ class allocation extends \stdClass var $person_curr; var $date_; var $amount = 0; /*Total amount of the transaction in FX */ + var $bank_amount = 0; var $currency; var $allocs; /*array of transactions allocated to */ diff --git a/reporting/includes/class.graphic.inc b/reporting/includes/class.graphic.inc index 2e37b24d..8cfc2ed3 100644 --- a/reporting/includes/class.graphic.inc +++ b/reporting/includes/class.graphic.inc @@ -60,7 +60,7 @@ file for later presentation. Joe Hunt */ define('MAXLEN', 27); // we cut after 25 chars + ... -class Chart extends \stdClass +class Chart { var $id; var $labels = array(); @@ -102,6 +102,23 @@ class Chart extends \stdClass var $lang; var $font; var $path; + var $bar_width = 0; + var $space_between_dots = 0; + var $higher_value = 0; + var $higher_value_str = null; + var $graphic_area_width = 0; + var $graphic_area_height = 0; + var $graphic_area_x1 = 0; + var $graphic_area_x2 = 0; + var $graphic_area_y1 = 0; + var $graphic_area_y2 = 0; + var $legend_exists = false; + var $legend_box_width = 0; + var $legend_box_x1 = 0; + var $legend_box_x2 = 0; + var $legend_box_y1 = 0; + var $legend_box_y2 = 0; + function __construct($type = 1, $id = 'id', $width = 0, $height = 0) { diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 11b2029d..4bef4cd1 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -21,7 +21,7 @@ iv) a delivery note include_once($path_to_root . "/inventory/includes/inventory_db.inc"); include_once($path_to_root . "/taxes/tax_calc.inc"); -class Cart extends \stdClass +class Cart { var $trans_type; // invoice, order, quotation, delivery note ... var $trans_no = array();// array (num1=>ver1,..) or 0 for new @@ -82,6 +82,7 @@ class Cart extends \stdClass var $ex_rate; var $fixed_asset = false; + var $bo_policy = null; //------------------------------------------------------------------------- // -- 2.30.2