<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:42 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597383822
WHERE `id` = ''
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:42 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('f172f13dbc4444c4c9f0e89037f32ae3') AS ci_session_lock
ERROR - 2020-08-14 13:43:42 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:43 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597383823
WHERE `id` = ''
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 13:43:43 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('f172f13dbc4444c4c9f0e89037f32ae3') AS ci_session_lock
ERROR - 2020-08-14 13:43:43 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 15:29:20 --> Why else: Array
(
    [product_id] => 16
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY01
    [product_name] => Minion Bananas
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:32:10 --> Why else: Array
(
    [product_id] => 17
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY02
    [product_name] => Minion Big
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:33:59 --> Why else: Array
(
    [product_id] => 18
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY03
    [product_name] => Minion Crazy
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:39:27 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:39:58 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:40:32 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:40:57 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:41:17 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:42:55 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:43:41 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:44:25 --> Why else: Array
(
    [product_id] => 19
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY04
    [product_name] => Minion Hello
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:45:10 --> Severity: Warning --> A non-numeric value encountered /Users/saleem/Sites/sma/app/controllers/admin/Returns.php 141
ERROR - 2020-08-14 15:45:10 --> More than zero: 2 = 1.0000 + 1.0000 PI: stdClass Object
(
    [id] => 66
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 19
    [product_code] => TOY04
    [product_name] => Minion Hello
    [option_id] => 
    [net_unit_cost] => 9.4340
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 0.5660
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 10.0000
    [quantity_balance] => 1.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 15:46:12 --> Severity: Warning --> A non-numeric value encountered /Users/saleem/Sites/sma/app/controllers/admin/Returns.php 141
ERROR - 2020-08-14 15:46:12 --> More than zero: 3 = 2.0000 + 1 PI: stdClass Object
(
    [id] => 66
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 19
    [product_code] => TOY04
    [product_name] => Minion Hello
    [option_id] => 
    [net_unit_cost] => 9.4340
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 0.5660
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 10.0000
    [quantity_balance] => 2.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 15:48:36 --> More than zero: 3 = 2.0000 + 1 PI: stdClass Object
(
    [id] => 66
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 19
    [product_code] => TOY04
    [product_name] => Minion Hello
    [option_id] => 
    [net_unit_cost] => 9.4340
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 0.5660
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 10.0000
    [quantity_balance] => 2.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 15:48:50 --> More than zero: 3 = 2.0000 + 1 PI: stdClass Object
(
    [id] => 66
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 19
    [product_code] => TOY04
    [product_name] => Minion Hello
    [option_id] => 
    [net_unit_cost] => 9.4340
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 0.5660
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 10.0000
    [quantity_balance] => 2.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 15:54:25 --> Why else: Array
(
    [product_id] => 12
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 3
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => IT05
    [product_name] => Keyboard
    [item_tax] => 3.9623
    [unit_cost] => 70.0000
    [real_unit_cost] => 70.0000
    [net_unit_cost] => 66.0377
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 70
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 15:56:12 --> Less than zero: 1 = 0.0000 + 1 PI: stdClass Object
(
    [id] => 67
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 12
    [product_code] => IT05
    [product_name] => Keyboard
    [option_id] => 3
    [net_unit_cost] => 66.0377
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 3.9623
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 70.0000
    [quantity_balance] => 0.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 70.0000
    [real_unit_cost] => 70.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 16:16:13 --> Severity: Notice --> Trying to get property 'name' of non-object /Users/saleem/Sites/sma/themes/default/admin/views/sales/index.php 236
ERROR - 2020-08-14 16:17:30 --> Severity: Notice --> Trying to get property 'name' of non-object /Users/saleem/Sites/sma/themes/default/admin/views/sales/index.php 236
ERROR - 2020-08-14 16:17:31 --> Severity: Notice --> Undefined variable: opt /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:17:31 --> Severity: Notice --> Trying to get property 'price' of non-object /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:17:32 --> Severity: Notice --> Undefined variable: opt /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:17:32 --> Severity: Notice --> Trying to get property 'price' of non-object /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:21:43 --> Severity: Notice --> Undefined variable: opt /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:21:43 --> Severity: Notice --> Trying to get property 'price' of non-object /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2032
ERROR - 2020-08-14 16:23:28 --> Severity: Notice --> Undefined variable: option_id /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:23:28 --> Severity: Notice --> Undefined variable: option_id /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2031
ERROR - 2020-08-14 16:24:03 --> Severity: Notice --> Undefined variable: option_id /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:24:03 --> Severity: Notice --> Undefined variable: option_id /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2031
ERROR - 2020-08-14 16:24:17 --> Severity: Notice --> Undefined variable: option_id /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:24:17 --> Severity: Notice --> Undefined variable: r /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2031
ERROR - 2020-08-14 16:24:49 --> Severity: Notice --> Undefined property: Sales::$returns_model /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:24:49 --> Severity: error --> Exception: Call to a member function getProductOptionByID() on null /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:25:01 --> Severity: Notice --> Undefined property: Sales::$returns_model /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:25:01 --> Severity: error --> Exception: Call to a member function getProductOptionByID() on null /Users/saleem/Sites/sma/app/controllers/admin/Sales.php 2030
ERROR - 2020-08-14 16:35:44 --> Why else: Array
(
    [product_id] => 11
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 1
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => IT04
    [product_name] => Hard Disk
    [item_tax] => 11.3208
    [unit_cost] => 200.0000
    [real_unit_cost] => 200.0000
    [net_unit_cost] => 188.6792
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 200
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 16:36:13 --> Why else: Array
(
    [product_id] => 11
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 1
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => IT04
    [product_name] => Hard Disk
    [item_tax] => 11.3208
    [unit_cost] => 200.0000
    [real_unit_cost] => 200.0000
    [net_unit_cost] => 188.6792
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 200
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 16:41:29 --> Less than zero: 1 = 0.0000 + 1 PI: stdClass Object
(
    [id] => 69
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 11
    [product_code] => IT04
    [product_name] => Hard Disk
    [option_id] => 1
    [net_unit_cost] => 188.6792
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 11.3208
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 200.0000
    [quantity_balance] => 0.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 200.0000
    [real_unit_cost] => 200.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 16:42:24 --> Why else: Array
(
    [product_id] => 22
    [warehouse_id] => 1
    [purchase_id] => 
    [transfer_id] => 
    [option_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [product_code] => TOY07
    [product_name] => Minion Amazed
    [item_tax] => 0.5660
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [net_unit_cost] => 9.434
    [quantity_received] => 1
    [unit_quantity] => 1
    [quantity] => 1
    [quantity_balance] => 1
    [subtotal] => 10
    [tax] => 6%
    [tax_rate_id] => 3
    [status] => received
    [date] => 2020-08-14
)

ERROR - 2020-08-14 16:44:04 --> More than zero: 2 = 1.0000 + 1 PI: stdClass Object
(
    [id] => 70
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 22
    [product_code] => TOY07
    [product_name] => Minion Amazed
    [option_id] => 
    [net_unit_cost] => 9.4340
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 0.5660
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 10.0000
    [quantity_balance] => 1.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 10.0000
    [real_unit_cost] => 10.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 16:45:47 --> Less than zero: 1 = 0.0000 + 1 PI: stdClass Object
(
    [id] => 69
    [purchase_id] => 
    [transfer_id] => 
    [product_id] => 11
    [product_code] => IT04
    [product_name] => Hard Disk
    [option_id] => 1
    [net_unit_cost] => 188.6792
    [quantity] => 1.0000
    [warehouse_id] => 1
    [item_tax] => 11.3208
    [tax_rate_id] => 3
    [tax] => 6%
    [discount] => 
    [item_discount] => 
    [expiry] => 
    [subtotal] => 200.0000
    [quantity_balance] => 0.0000
    [date] => 2020-08-14
    [status] => received
    [unit_cost] => 200.0000
    [real_unit_cost] => 200.0000
    [quantity_received] => 1.0000
    [supplier_part_no] => 
    [purchase_item_id] => 
    [product_unit_id] => 4
    [product_unit_code] => pc
    [unit_quantity] => 1.0000
    [gst] => 
    [cgst] => 
    [sgst] => 
    [igst] => 
    [base_unit_cost] => 
)

ERROR - 2020-08-14 16:54:31 --> Severity: error --> Exception: Call to undefined method Datatables::group_start() /Users/saleem/Sites/sma/app/controllers/admin/Products.php 1561
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:06:04 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597395964
WHERE `id` = ''
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:06:04 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('b7f53e1d55219c2a5320d167d0e68c80') AS ci_session_lock
ERROR - 2020-08-14 17:06:04 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:11 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597396031
WHERE `id` = ''
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:11 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('b7f53e1d55219c2a5320d167d0e68c80') AS ci_session_lock
ERROR - 2020-08-14 17:07:11 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:13 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597396033
WHERE `id` = ''
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 17:07:13 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('b7f53e1d55219c2a5320d167d0e68c80') AS ci_session_lock
ERROR - 2020-08-14 17:07:13 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 18:20:19 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:20:19 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:21:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:21:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:25:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:25:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 905
ERROR - 2020-08-14 18:25:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 923
ERROR - 2020-08-14 18:25:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 923
ERROR - 2020-08-14 18:25:32 --> Severity: Notice --> Undefined property: stdClass::$unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 923
ERROR - 2020-08-14 18:25:32 --> Severity: error --> Exception: Object of class stdClass could not be converted to string /Users/saleem/Sites/sma/app/models/admin/Products_model.php 932
ERROR - 2020-08-14 18:25:32 --> Severity: Warning --> Cannot modify header information - headers already sent by (output started at /Users/saleem/Sites/sma/system/core/Exceptions.php:271) /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 18:28:06 --> Severity: error --> Exception: Object of class stdClass could not be converted to string /Users/saleem/Sites/sma/app/models/admin/Products_model.php 932
ERROR - 2020-08-14 19:12:18 --> Query error: Table 'sma.sma_base_unit_cost' doesn't exist - Invalid query: SELECT *
FROM `sma_base_unit_cost`, `sma_unit_cost`, `sma_quantity_balance`
WHERE `product_id` = '11'
AND `quantity_balance` > 0
ERROR - 2020-08-14 19:13:01 --> Severity: Notice --> Undefined property: stdClass::$warehouse_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 928
ERROR - 2020-08-14 19:13:01 --> Severity: Notice --> Undefined property: stdClass::$warehouse_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 928
ERROR - 2020-08-14 19:13:01 --> Severity: Notice --> Undefined property: stdClass::$warehouse_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 928
ERROR - 2020-08-14 19:13:01 --> Severity: Notice --> Undefined property: stdClass::$warehouse_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 928
ERROR - 2020-08-14 19:13:01 --> Severity: Warning --> Division by zero /Users/saleem/Sites/sma/app/models/admin/Products_model.php 941
ERROR - 2020-08-14 19:13:01 --> Query error: Unknown column 'NAN' in 'field list' - Invalid query: UPDATE `sma_warehouses_products` SET `avg_cost` = NAN
WHERE `product_id` = '11'
AND `warehouse_id` = '1'
ERROR - 2020-08-14 19:13:01 --> Severity: Warning --> Cannot modify header information - headers already sent by (output started at /Users/saleem/Sites/sma/system/core/Exceptions.php:271) /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Notice --> Undefined property: stdClass::$product_unit_id /Users/saleem/Sites/sma/app/models/admin/Products_model.php 931
ERROR - 2020-08-14 19:13:47 --> Severity: Warning --> Cannot modify header information - headers already sent by (output started at /Users/saleem/Sites/sma/system/core/Exceptions.php:271) /Users/saleem/Sites/sma/system/helpers/url_helper.php 564
ERROR - 2020-08-14 19:20:21 --> Severity: Warning --> Division by zero /Users/saleem/Sites/sma/app/models/admin/Products_model.php 922
ERROR - 2020-08-14 19:20:21 --> Query error: Unknown column 'NAN' in 'field list' - Invalid query: UPDATE `sma_warehouses_products` SET `avg_cost` = NAN
WHERE `product_id` = '11'
AND `warehouse_id` = '1'
ERROR - 2020-08-14 19:21:00 --> Severity: Warning --> Division by zero /Users/saleem/Sites/sma/app/models/admin/Products_model.php 922
ERROR - 2020-08-14 19:21:00 --> Query error: Unknown column 'NAN' in 'field list' - Invalid query: UPDATE `sma_warehouses_products` SET `avg_cost` = NAN
WHERE `product_id` = '11'
AND `warehouse_id` = '1'
ERROR - 2020-08-14 19:29:24 --> Severity: Warning --> Division by zero /Users/saleem/Sites/sma/app/models/admin/Products_model.php 936
ERROR - 2020-08-14 19:29:24 --> Query error: Unknown column 'NAN' in 'field list' - Invalid query: UPDATE `sma_warehouses_products` SET `avg_cost` = NAN
WHERE `product_id` = '15'
AND `warehouse_id` = '1'
ERROR - 2020-08-14 19:30:39 --> Severity: Warning --> Division by zero /Users/saleem/Sites/sma/app/models/admin/Products_model.php 934
ERROR - 2020-08-14 19:30:39 --> Query error: Unknown column 'NAN' in 'field list' - Invalid query: UPDATE `sma_warehouses_products` SET `avg_cost` = NAN
WHERE `product_id` = '15'
AND `warehouse_id` = '1'
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:36 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597405116
WHERE `id` = ''
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:36 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('dd1c687909f1a26ea77ebecc31468355') AS ci_session_lock
ERROR - 2020-08-14 19:38:36 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> mysqli::real_escape_string(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 393
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:37 --> Query error:  - Invalid query: UPDATE `sma_sessions` SET `timestamp` = 1597405117
WHERE `id` = ''
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> Unknown: Cannot call session save handler in a recursive manner Unknown 0
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> Unknown: Failed to write session data using user defined save handler. (session.save_path: ) Unknown 0
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> mysqli::query(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 307
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> CI_DB_mysqli_driver::error(): Couldn't fetch mysqli /Users/saleem/Sites/sma/system/database/drivers/mysqli/mysqli_driver.php 511
ERROR - 2020-08-14 19:38:37 --> Query error:  - Invalid query: SELECT RELEASE_LOCK('dd1c687909f1a26ea77ebecc31468355') AS ci_session_lock
ERROR - 2020-08-14 19:38:37 --> Severity: Warning --> Cannot modify header information - headers already sent /Users/saleem/Sites/sma/system/core/Common.php 570
