Custom Events for plugin triggers

- Add custom events for item changes, sales, returns, and inventory.
- Add custom events for item and customer csv imports.
- Refactor variable names for PSR-12 compliance.
- Refactor function names for PSR-12 compliance.
- Moved retrieving of $employeeId to actually where it's going to be used for readability.
- Added trigger point for item save.
- Added trigger point for item delete.
- Added debug logging for item_change event trigger.
- Added itemId to be sent in the item_change event.

Signed-off-by: objecttothis <objecttothis@gmail.com>
This commit is contained in:
objecttothis
2025-05-29 17:48:10 +04:00
parent 6540a4970f
commit 919acdfd57
27 changed files with 199 additions and 197 deletions

View File

@@ -44,7 +44,7 @@ class Secure_Controller extends BaseController
exit();
}
$logged_in_employee_info = $this->employee->get_logged_in_employee_info();
$logged_in_employee_info = $this->employee->getLoggedInEmployeeInfo();
if (
!$this->employee->has_module_grant($module_id, $logged_in_employee_info->person_id)
|| (isset($submodule_id) && !$this->employee->has_module_grant($submodule_id, $logged_in_employee_info->person_id))
@@ -91,7 +91,7 @@ class Secure_Controller extends BaseController
public function getCheckNumeric(): void
{
foreach ($this->request->getGet() as $value) {
if (parse_decimals($value) === false) {
if (parseDecimals($value) === false) {
echo 'false';
return;
}