Compare commits

...

1551 Commits

Author SHA1 Message Date
jekkos
09191b9af7 feat: Add OpenAPI 3.1 specification for REST API
Add comprehensive OpenAPI specification for OSPOS REST API including:

- Customers API (CRUD operations)
- Suppliers API (CRUD operations)
- Items API (CRUD operations with inventory quantities)
- Inventory API (stock adjustments)
- Sales API (read-only queries)
- Receivings API (read-only queries)

Features:
- API Key authentication via X-API-Key header
- Pagination with offset/limit parameters
- Soft delete support for customers, suppliers, items
- Batch operations for delete and update
- Search/suggest endpoints for autocomplete
- Comprehensive schema definitions based on existing models

Includes documentation with:
- Endpoint reference tables
- Schema field descriptions
- Implementation notes and discussion topics
- HTTP status codes and response formats

This is a design proposal for discussion before implementation.
2026-03-06 10:27:11 +00:00
jekkos
19eb43270a Fix broken object-level authorization in Employees controller (CVE-worthy) (#4391)
- Non-admin employees can no longer view/modify admin accounts
- Non-admin employees can no longer delete admin accounts
- Non-admin employees can only grant permissions they themselves have
- Added is_admin() and can_modify_employee() methods to Employee model
- Prevents privilege escalation via permission grants

Add tests for BOLA fix and permission delegation

- EmployeeTest: Unit tests for is_admin() and can_modify_employee() methods
- EmployeesControllerTest: Test cases for authorization checks (integration tests require DB)
- ReportsControllerTest: Test validating the constructor redirect fix pattern

Fix return type error in Employees controller

Use $this->response->setJSON() instead of echo json_encode() + return
to properly satisfy the ResponseInterface return type.
2026-03-05 19:46:39 +01:00
jekkos
df4549bb0b Fix Docker image upload by replacing slashes in TAG 2026-03-05 14:46:45 +00:00
jekkos
bdc965be23 Fix: Refresh session language for employee after update. (#4245) 2026-03-04 22:43:52 +01:00
Lucas Lyimo
5c8905aa1b Language Array Key Typo Fix (#4371)
* Fix typo in stock location translation

* Fix typo in stock location key

* Fix typo in Language Receivings files stock_location

* Add Swahili-TZ Language Files

* Add Swahili-KE Language Files
2026-03-04 22:06:17 +01:00
jekkos
690f43578d Use Content-Type application/json for AJAX responses (#4357)
Complete Content-Type application/json fix for all AJAX responses

- Add missing return statements to all ->response->setJSON() calls
- Fix Items.php method calls from JSON() to setJSON()
- Convert echo statements to proper JSON responses
- Ensure consistent Content-Type headers across all controllers
- Fix 46+ instances across 12 controller files
- Change Config.php methods to : ResponseInterface (all return setJSON only):
  - postSaveRewards(), postSaveBarcode(), postSaveReceipt()
  - postSaveInvoice(), postRemoveLogo()
  - Update PHPDoc @return tags

- Change Receivings.php _reload() to : string (only returns view)
- Change Receivings.php methods to : string (all return _reload()):
  - getIndex(), postSelectSupplier(), postChangeMode(), postAdd()
  - postEditItem(), getDeleteItem(), getRemoveSupplier()
  - postComplete(), postRequisitionComplete(), getReceipt(), postCancelReceiving()
- Change postSave() to : ResponseInterface (returns setJSON)
- Update all PHPDoc @return tags

Fix XSS vulnerabilities in sales templates, login, and config pages

This commit addresses 5 XSS vulnerabilities by adding proper escaping
to all user-controlled configuration values in HTML contexts.

Fixed Files:
- app/Views/sales/invoice.php: Escaped company_logo (URL context) and company (HTML)
- app/Views/sales/work_order.php: Escaped company_logo (URL context)
- app/Views/sales/receipt_email.php: Added file path validation and escaping for logo
- app/Views/login.php: Escaped all config values in title, logo src, and alt
- app/Views/configs/info_config.php: Escaped company_logo (URL context)

Security Impact:
- Prevents stored XSS attacks if configuration is compromised
- Defense-in-depth principle applied to administrative interfaces
- Follows OWASP best practices for output encoding

Testing:
- Verified no script execution with XSS payloads in config values
- Confirmed proper escaping in HTML, URL, and file contexts
- All templates render correctly with valid configuration

Severity: High (4 files), Medium-High (1 file)
CVSS Score: ~6.1
CWE: CWE-79 (Improper Neutralization of Input During Web Page Generation)

Fix critical password validation bypass and add unit tests

This commit addresses a critical security vulnerability where the password
minimum length check was performed on the HASHED password (always 60
characters for bcrypt) instead of the actual password before hashing.

Vulnerability Details:
- Original code: strlen($employee_data['password']) >= 8
- This compared the hash length (always 60) instead of raw password
- Impact: Users could set 1-character passwords like "a"
- Severity: Critical (enables brute force attacks on weak passwords)
- CVE-like issue: CWE-307 (Improper Restriction of Excessive Authentication Attempts)

Fix Applied:
- Validate password length BEFORE hashing
- Clear error message when password is too short
- Added unit tests to verify minimum length enforcement
- Regression test to prevent future vulnerability re-introduction

Test Coverage:
- testPasswordMinLength_Rejects7Characters: Verify 7 chars rejected
- testPasswordMinLength_Accepts8Characters: Verify 8 chars accepted
- testPasswordMinLength_RejectsEmptyString: Verify empty rejected
- testPasswordMinLength_RejectsWhitespaceOnly: Verify whitespace rejected
- testPasswordMinLength_AcceptsSpecialCharacters: Verify special chars OK
- testPasswordMinLength_RejectsPreviousBehavior: Regression test for bug

Files Modified:
- app/Controllers/Home.php: Fixed password validation logic
- tests/Controllers/HomeTest.php: Added comprehensive unit tests

Security Impact:
- Enforces 8-character minimum password policy
- Prevents extremely weak passwords that facilitate brute-force attacks
- Critical for credential security and user account protection

Breaking Changes:
- Users with passwords < 8 characters will need to reset their password
- This is the intended security improvement

Severity: Critical
CVSS Score: ~7.5
CWE: CWE-305 (Authentication Bypass by Primary Weakness), CWE-307

Add GitHub Actions workflow to run PHPUnit tests

Move business logic from views to controllers for better separation of concerns

- Move logo URL computation from info_config view to Config::getIndex()
- Move image base64 encoding from receipt_email view to Sales controller
- Improves separation of concerns by keeping business logic in controllers
- Simplifies view templates to only handle presentation

Fix XSS vulnerabilities in report views - escape user-controllable summary data and labels

Fix base64 encoding URL issue in delete payment - properly URL encode base64 string

Fix remaining return type declarations for Sales controller

Fixed additional methods that call _reload():
- postAdd() - returns _reload($data)
- postAddPayment() - returns _reload($data)
- postEditItem() - returns _reload($data)
- postSuspend() - returns _reload($data)
- postSetPaymentType() - returns _reload()

All methods now return ResponseInterface|string to match _reload() signature.
This resolves PHP TypeError errors.
2026-03-04 21:42:35 +01:00
jekkos
0858a1c23c Fix permission bypass in Reports submodule access control (#4389)
The redirect() in constructor returned a RedirectResponse that was never executed, allowing unauthorized access to report submodules. Replaced with header() + exit() to enforce permission checks.
2026-03-04 21:18:42 +01:00
jekkos
3c217bbddd Fix XSS vulnerabilities in invoice_email.php view 2026-03-04 17:54:01 +00:00
jekkos
87a0606141 Fix XSS vulnerability in register (#3965) 2026-03-03 22:40:50 +01:00
jekkos
b6a90f7880 Fix XSS vulnerability in register (#3965) 2026-03-03 22:37:08 +01:00
jekkos
b93359bcaf Fix XSS vulnerability in attributes (#3965) 2026-03-03 22:28:32 +01:00
jekkos
79427481b3 Fix XSS vulnerabilities in invoices + receipts (#3965) (#4363) 2026-02-23 20:14:55 +01:00
dependabot[bot]
b23351a45c Bump jspdf and jspdf-autotable (#4373)
Bumps [jspdf](https://github.com/parallax/jsPDF) and [jspdf-autotable](https://github.com/simonbengtsson/jsPDF-AutoTable). These dependencies needed to be updated together.

Updates `jspdf` from 3.0.2 to 4.1.0
- [Release notes](https://github.com/parallax/jsPDF/releases)
- [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md)
- [Commits](https://github.com/parallax/jsPDF/compare/v3.0.2...v4.1.0)

Updates `jspdf-autotable` from 5.0.2 to 5.0.7
- [Release notes](https://github.com/simonbengtsson/jsPDF-AutoTable/releases)
- [Commits](https://github.com/simonbengtsson/jsPDF-AutoTable/compare/v5.0.2...v5.0.7)

---
updated-dependencies:
- dependency-name: jspdf
  dependency-version: 4.1.0
  dependency-type: direct:production
- dependency-name: jspdf-autotable
  dependency-version: 5.0.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 11:46:11 +00:00
dependabot[bot]
bee0c8e364 Bump lodash from 4.17.21 to 4.17.23 (#4369)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 20:51:03 +01:00
jekkos
849439c71e Fix multiple XSS vulnerabilities (#3965) (#4356) 2025-12-22 17:21:49 +01:00
Chathura Dilushanka
25680f05db Add equals as permitted URI character (#4329)
This should resolve the 400 error when deleting payments with base64 encoded IDs containing `=`.
2025-12-21 22:41:36 +01:00
jekkos
a11fb099e2 Fix travis build after merge (#4130) 2025-12-21 19:51:21 +01:00
BhojKamal
aee5f31cf5 Add show/hide cost price & profit feature - in reports #4130 (#4350)
* Add show/hide cost price & profit feature

* .env should be ignored.

* js code formatted. .vscode folder ignore for vscode user settings.json

* style is replaced with bootstrap class, formatted and .env.example

* toggle button on table to like in other

* comment corrected.

* class re-factored

* minor refactor

* formatted with 4 space

---------

Co-authored-by: Lotussoft Youngtech <lotussoftyoungtech@gmail.com>
2025-12-21 15:23:39 +05:45
jekkos
643b0ac499 Fix for detailed suppliers report (#4351) 2025-12-17 22:46:59 +01:00
jekkos
3e844f2f89 Escape return_policy in receipt + invoice (#4349)
* Escape return_policy in receipt + invoice

* Enable CSRF using session token (#3632)
2025-12-17 20:39:58 +01:00
jekkos
2acdec431f Fix wrong migration script location (#4285) 2025-12-08 23:06:48 +01:00
jekkos
f245f585da Fix creation of date attribute value (#4310) (#4344)
Fix type hints in case search string is empty in sales
2025-12-02 07:19:14 +01:00
jekkos
e48ab45094 Fix toast notifications in config (#4341) (#4343) 2025-11-28 09:01:07 +01:00
jekkos
46e31b1c16 Allow anonymous giftcard creation (#4278)
* Allow giftcard without person (#4276)

* Update giftcard form validation (#4276)
2025-11-24 22:54:52 +01:00
jekkos
bea69c7aa1 Add DOMPurify to JS includes (#4341) 2025-11-23 22:20:40 +01:00
jekkos
30da69a382 Fix attachment cid (#4314)
* Add attachment cid when sending emails (#4308)

Also check if an encryption key is set before decrypting the SMTP
password.

* Upgrade to CI 4.6.3 (#4308)

* Fix for changing invoice id in email (#4308)
2025-11-23 21:37:32 +01:00
jekkos
6dd5a9162f Add DOMpurify + fix XSS (#4341) 2025-11-23 21:35:47 +01:00
jekkos
26a398f7d2 Add recent releases to issue template (#4317) 2025-11-21 23:55:24 +01:00
jekkos
ce73d9bb31 Add env variable to disallow pwd change (#4325) 2025-11-21 23:46:48 +01:00
jekkos
83af580d40 Add server side validation for password (#4335) 2025-11-21 23:45:47 +01:00
jekkos
ca7adf76c1 Update SECURITY.md contact (#4335) 2025-11-21 23:22:39 +01:00
jekkos
832db664e5 Fix tax configuration pages (#4331) 2025-11-21 22:13:35 +01:00
jekkos
36e73a84af Clean up docker compose setup (#4308) 2025-10-27 21:57:12 +01:00
Joe Williams
bcddf482fe [Feature] Add logging to migrations (#4327)
* `execute_script()` now returns a boolean for error handling.

* Added transaction to `Migration_MissingConfigKeys.up()`.

* Added logging to various migrations.

* Added transaction to `Migration_MissingConfigKeys.up()`.

* Added logging to various migrations.

* Formatting and function call fixes

Fixed a minor formatting issue in the migration helper.
Replaced a few remaining error_log() calls.
Updated executeScriptWithTransaction() to use log_message()

* Function call fix

Replaced the last error_log() calls with log_message().

---------

Co-authored-by: Joe Williams <hey-there-joe@outlook.com>
2025-10-19 22:10:28 -07:00
Joe Williams
759356288b Add transactions to missing config keys migration. (#4318)
* `execute_script()` now returns a boolean for error handling.

* Added transaction to `Migration_MissingConfigKeys.up()`.

* Added `executeScriptWithTransaction()` to migration helpers.

* Many changes for testing; also minor formatting fixes.

* Removed test code and pointed the `NullableTaxCategoryId` migration at the right SQL file.

* Fixed header.php

* Code cleanup from code review:
- Added IGNORE to SQL scripts.
- Added try-catch to executeScriptWithTransaction().
- Various comment changes.

* Fixed naming issue

Nullable tax category ID migration now runs the correct script.

* Updated SQL

Replaced INSERT WHERE NOT EXISTS in missing config keys sql script to use a single INSERT IGNORE.

* Updated migration helper

Updated executeScriptWithTransaction to use transRollback

---------

Co-authored-by: Joe Williams <hey-there-joe@outlook.com>
2025-10-15 22:53:14 -07:00
j2272850861-pixel
d1e5575ac1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/pt_BR/
2025-10-10 12:58:48 +02:00
j2272850861-pixel
b3f67a5e0f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/pt_BR/
2025-10-10 12:58:48 +02:00
j2272850861-pixel
41b349134a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/pt_BR/
2025-10-10 12:58:48 +02:00
jekkos
b1f6ae6d35 Fix mount path for uploads (#4308)
Remove duplicated compose sections in nginx version.  We will include
parts of the main file instead of duplicating it here.
2025-08-29 09:12:02 +02:00
dependabot[bot]
4153c69ccd Bump jspdf from 3.0.1 to 3.0.2 (#4309)
Bumps [jspdf](https://github.com/parallax/jsPDF) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/parallax/jsPDF/releases)
- [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md)
- [Commits](https://github.com/parallax/jsPDF/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: jspdf
  dependency-version: 3.0.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-29 07:32:54 +02:00
jekkos
87fbd72478 Add generic try/catch in import (#4302) 2025-08-28 00:05:58 +02:00
jekkos
a4ac42b4ad Fix reference to uploads folder (#4270) (#4286) 2025-08-18 21:19:36 +02:00
jekkos
2eff79a8b6 Fix for suspended sales (#4283) (#4303) 2025-08-15 23:12:35 +02:00
Aril Apria Susanto
880fb8faef Translated using Weblate (Indonesian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
4d2347173b Translated using Weblate (Indonesian)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
82d36d01fb Translated using Weblate (Indonesian)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
13314b7da1 Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2025-08-11 10:27:22 +02:00
jekkos
43808c5970 Revert toast message sanitization (#4302) 2025-08-07 23:49:54 +02:00
jekkos
1615ef3832 Set release version to 3.4.2 2025-08-07 21:06:11 +02:00
jekkos
e089dc5e2c Fix item kits update (#4294) 2025-08-06 23:40:00 +02:00
jekkos
4cf70a95e6 Fix security incident email address (#4298) 2025-07-30 08:05:58 +02:00
jekkos
e08367aaae Allow empty tax category id (#4285) (#4288) 2025-07-29 23:59:23 +02:00
jekkos
9cd2f685ff Fix barcode generation in items (#4270) 2025-07-29 23:56:50 +02:00
jekkos
6800f338e7 Upgrade to ci 4.6.2 (#4296) (#4298) 2025-07-29 23:20:24 +02:00
jekkos
d4ab56b742 Fix migration 20250522000000 (#4284)
* Fix migration errors

Add dropColumnIfExists to migration_helper

* Add config key/values if missing (#4282)
2025-07-16 23:28:24 +02:00
jekkos
1eb75d6e05 Fix typo in writeable (#4270) 2025-07-11 23:23:13 +02:00
jekkos
8833420917 Upgrade github workflow (#3708) (#4280)
Co-authored-by: El_Coloso <diegoramosp@gmail.com>
2025-07-11 23:13:44 +02:00
jekkos
0d1f4efe3c Extended payment delete fix (#4274)
* Create a  Base64 URL-Safe encoding and decoding helper

* Rename web_helper to url_helper

---------

Co-authored-by: El_Coloso <diegoramosp@gmail.com>
2025-07-07 13:57:03 +02:00
jekkos
b9e17daac7 Fix writable folder permission check (#4270) (#4273) 2025-07-06 22:04:17 +02:00
jekkos
5f395d987b Set release version to 3.4.1 2025-06-05 21:28:32 +02:00
objecttothis
6f587498e6 Migration fix for MariaDB databases
- This fix properly creates Primary Keys on both MariaDB and MySQL

Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-06-01 10:15:57 +02:00
jekkos
29c3c55fcc Fix item number lookup in sales/receivings (#4212) (#4250)
* Fix item number lookup in sales/receivings (#4212)

* Remove item_number check in exists()
2025-05-30 22:29:35 +02:00
objecttothis
e1fedab9b7 Bugfix: constraint migration fixes (#4230)
- Refactored function names for PSR-12 compliance
- Programmatically cascade delete attribute_link rows when a drop-down attribute is deleted but leave attribute_link rows associated with transactions.
- Added `WHERE item_id IS NOT NULL` to migration to prevent failure on MySQL databases during migration
- Retroactive correction of migration to prevent MySQL databases from failing.
- Refactored generic functions to helper
- Reverted attribute_links foreign key to ON DELETE RESTRICT which is required for a unique constraint on this table. Cascading deletes are now handled programmatically.
- Migration Session table to match Code Igniter 4.6
- Add index to attribute_links to prevent query timeout in items view on large databases
- Added overridePrefix() function to the migration_helper. Any time QueryBuilder is adding a prefix to the query when we don't want it to, this query can be used to override the prefix then set it back after you're done.
- Added dropAllForeignKeyConstraints() helper function.
- Added deleteIndex() helper function.
- Added indexExists() helper function.
- Added primaryKeyExists() helper function.
- Added recreateForeignKeyConstraints() helper function.
- Added CRUD section headings to the Attribute model.
- Replaced `==` with `===` to prevent type juggling.
- Removed unused delete_value function.
- Reworked deleteDefinition() and deleteDefinitionList() functions to delete rows from the attribute_links table which are associated.
- Added deleteAttributeLinksByDefinitionId() function

Implement Cascading Delete
- Function to delete attribute links with one or more attribute definitions.
- Call function to implement an effective cascading delete.
- Refactor function naming to meet PSR-12 conventions

Fix Migration
- Add drop of Generated Column to prevent failure of migration on MySQL databases.

Fix Migration
- Removed blank lines
- Refactored function naming for PSR compliance
- Reformatted code for PSR compliance
- Added logic to drop dependent foreign key constraints before deleting an index then recreating them.

Migrate ospos_sessions table
- DROP and CREATE session table to prevent migration problems on populated databases

Fixed Bug in Migration
- In the event that item_id = null (e.g., it's a dropdown) it should not be included in the results.

Fixed bug in Dropdown deletes
- Removed delete_value function in Attributes Controller as it is unused.
- Renamed postDelete_attribute_value function for PSR-12 compliance.
- Renamed delete_value Attribute model function for PSR-12 compliance.
- Refactored out function to getAttributeIdByValue
- Replaced == with === to prevent type juggling
- Reorganized parts of model to make it easier to find CRUD functions.

Refactoring
- PSR-12 Compliance formatting changes
- Refactored several generic functions into the migration_helper.php
- First check if primary key exists before attempting to create it.
- Grouped functions together in migration_helper.php
- phpdoc commenting functions

Optimizing Indices
- There are two queries run while opening the Items view which time out on large databases with weak hardware. These indices cut the query execution in half or better.

Add Unique constraint back into attribute_links
- This migration reverts ospos_attribute_links_ibfk_1 and 2 to ON DELETE RESTRICT. Cascade delete is done programmatically. This is needed to have a unique column on the attribute_links table which prevents duplicate attributes from begin created with the same item_id-attribute_id-definition_id combination

Correct spacing after if for PSR-12

Minor code cleanup.
- Removed Comments separating sections of code in Attribute model
- Removed extra log line to prevent cluttering of the log
2025-05-29 15:24:08 +04:00
Maxime
3c846e6324 Fixed broken escape string for success & warning messages (#4253)
* Fixed broken escape string for success & warning messages

* Fixed issue in sales register

---------

Co-authored-by: Franchovy <franchovy@pm.me>
2025-05-27 23:27:27 +02:00
diego-ramos
85120fa4be Fix encoding issue for payment types with special characters (#4232) 2025-05-22 22:34:39 +02:00
Mohamed-Qadir
7ba60ba58b Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
64f34933c4 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
1c0442c4f6 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
8bc4ee3792 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-10 02:04:31 +02:00
Mohamed-Qadir
c200561eb5 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-10 02:04:19 +02:00
Mohamed-Qadir
a55d5b415e Translated using Weblate (Kurdish (Central))
Currently translated at 73.3% (33 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-09 19:33:42 +02:00
Mohamed-Qadir
f31d004fb7 Translated using Weblate (Kurdish (Central))
Currently translated at 55.2% (21 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-09 19:33:41 +02:00
Mohamed-Qadir
40e4ad3d38 Translated using Weblate (Kurdish (Central))
Currently translated at 35.8% (42 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-09 19:33:41 +02:00
Mohamed-Qadir
7658ca8dd2 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-09 19:33:41 +02:00
Mohamed-Qadir
f38272cb59 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ckb/
2025-05-09 19:33:40 +02:00
Mohamed-Qadir
dca3cdeaf5 Translated using Weblate (Kurdish (Central))
Currently translated at 31.1% (14 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-09 19:11:03 +02:00
Mohamed-Qadir
41eb07caec Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-09 19:11:03 +02:00
Mohamed-Qadir
766c9bb0f2 Translated using Weblate (Kurdish (Central))
Currently translated at 33.3% (39 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-09 19:11:02 +02:00
Mohamed-Qadir
7113e1167c Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-05-09 19:11:02 +02:00
Mohamed-Qadir
eaeb9cb426 Translated using Weblate (Kurdish (Central))
Currently translated at 89.7% (61 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-09 19:11:01 +02:00
Mohamed-Qadir
1971519629 Translated using Weblate (Kurdish (Central))
Currently translated at 31.5% (12 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-09 19:11:00 +02:00
Mohamed-Qadir
b4e010dab8 Translated using Weblate (Kurdish (Central))
Currently translated at 33.8% (23 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-09 17:52:39 +02:00
Mohamed-Qadir
75e709d0b5 Translated using Weblate (Kurdish (Central))
Currently translated at 51.7% (75 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-09 17:52:39 +02:00
Mohamed-Qadir
605f550666 Translated using Weblate (Kurdish (Central))
Currently translated at 20.0% (9 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-09 17:52:38 +02:00
Mohamed-Qadir
bc55908af2 Translated using Weblate (Kurdish (Central))
Currently translated at 20.5% (24 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-09 17:52:38 +02:00
Mohamed-Qadir
707339f3b5 Translated using Weblate (Kurdish (Central))
Currently translated at 27.9% (19 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-09 16:40:06 +02:00
Mohamed-Qadir
d0bb7998a9 Translated using Weblate (Kurdish (Central))
Currently translated at 18.8% (22 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-09 16:40:06 +02:00
Mohamed-Qadir
c47ea659bc Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/ckb/
2025-05-09 16:40:06 +02:00
Mohamed-Qadir
9b8d6acb79 Translated using Weblate (Kurdish (Central))
Currently translated at 16.2% (19 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-07 22:48:28 +02:00
Mohamed-Qadir
640bdfd0f9 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
0ea4fcd474 Translated using Weblate (Kurdish (Central))
Currently translated at 42.0% (61 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
056add7979 Translated using Weblate (Kurdish (Central))
Currently translated at 11.7% (8 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
4577525566 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
75d4d894a4 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
e4b07125d6 Translated using Weblate (Kurdish (Central))
Currently translated at 89.4% (17 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ckb/
2025-05-07 22:48:27 +02:00
Mohamed-Qadir
2d35346d16 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ckb/
2025-05-04 15:27:04 +02:00
Mohamed-Qadir
e0969a8c2b Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ckb/
2025-05-03 23:45:43 +02:00
Mohamed-Qadir
965f3706da Translated using Weblate (Kurdish (Central))
Currently translated at 36.3% (20 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-05-03 23:45:00 +02:00
BudsieBuds
e83c23cf0c Improve code style and PSR-12 compliance (#4204)
* Improve code style and PSR-12 compliance
- refactored code formatting to adhere to PSR-12 guidelines
- standardized coding conventions across the codebase
- added missing framework files and reverted markup changes
- reformatted arrays for enhanced readability
- updated language files for consistent styling and clarity
- minor miscellaneous improvements
2025-05-02 19:37:06 +02:00
Mohamed-Qadir
1456feae58 Translated using Weblate (Kurdish (Central))
Currently translated at 75.0% (15 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ckb/
2025-05-02 12:54:14 +02:00
Mohamed-Qadir
32c0b74e0a Translated using Weblate (Kurdish (Central))
Currently translated at 35.0% (7 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ckb/
2025-05-02 12:05:16 +02:00
Mohamed-Qadir
9ecbe5770c Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 11:31:10 +02:00
Mohamed-Qadir
cedcbf459e Translated using Weblate (Kurdish (Central))
Currently translated at 41.6% (5 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/ckb/
2025-05-02 11:31:09 +02:00
Mohamed-Qadir
73df6db4f8 Translated using Weblate (Kurdish (Central))
Currently translated at 94.4% (309 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 10:55:23 +02:00
Mohamed-Qadir
b0e0b5b429 Translated using Weblate (Kurdish (Central))
Currently translated at 94.1% (308 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 10:50:44 +02:00
Mohamed-Qadir
36f41db6aa Translated using Weblate (Kurdish (Central))
Currently translated at 15.5% (7 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-02 10:50:44 +02:00
Mohamed-Qadir
a6c9011954 Translated using Weblate (Kurdish (Central))
Currently translated at 16.2% (19 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-02 10:50:43 +02:00
Mohamed-Qadir
9f19a15845 Translated using Weblate (Kurdish (Central))
Currently translated at 11.7% (8 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-02 10:50:34 +02:00
Mohamed-Qadir
c33bd9a868 Translated using Weblate (Kurdish (Central))
Currently translated at 26.3% (10 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-02 10:50:33 +02:00
Mohamed-Qadir
d4e775d252 Translated using Weblate (Kurdish (Central))
Currently translated at 42.0% (61 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-02 10:50:33 +02:00
Mohamed-Qadir
aeda461743 Translated using Weblate (Kurdish (Central))
Currently translated at 90.5% (296 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 10:39:47 +02:00
Mohamed-Qadir
c1c74279f1 Translated using Weblate (Kurdish (Central))
Currently translated at 32.4% (47 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-02 10:39:46 +02:00
Mohamed-Qadir
aecb4deac0 Translated using Weblate (Kurdish (Central))
Currently translated at 90.2% (295 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 10:38:12 +02:00
Mohamed-Qadir
fb2d61fc49 Translated using Weblate (Kurdish (Central))
Currently translated at 23.6% (9 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-02 10:38:11 +02:00
Mohamed-Qadir
ea21abf7a7 Translated using Weblate (Kurdish (Central))
Currently translated at 28.9% (42 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-02 10:38:11 +02:00
Mohamed-Qadir
0acd52cfdd Translated using Weblate (Kurdish (Central))
Currently translated at 86.2% (282 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-02 00:56:40 +02:00
Mohamed-Qadir
e2cfcc07a4 Translated using Weblate (Kurdish (Central))
Currently translated at 10.2% (7 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-01 23:35:24 +02:00
Mohamed-Qadir
fc676091c3 Translated using Weblate (Kurdish (Central))
Currently translated at 24.1% (35 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-01 23:35:24 +02:00
Mohamed-Qadir
bcf17ae4c3 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ckb/
2025-05-01 23:35:23 +02:00
Mohamed-Qadir
2c598c6e3c Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/ckb/
2025-05-01 23:35:23 +02:00
Mohamed-Qadir
6139659c94 Translated using Weblate (Kurdish (Central))
Currently translated at 75.2% (246 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-05-01 23:35:22 +02:00
Mohamed-Qadir
17c14c8a41 Translated using Weblate (Kurdish (Central))
Currently translated at 8.3% (1 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/ckb/
2025-05-01 23:35:21 +02:00
Mohamed-Qadir
c7223e4b75 Translated using Weblate (Kurdish (Central))
Currently translated at 38.2% (18 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ckb/
2025-05-01 23:35:21 +02:00
Mohamed-Qadir
7e1895d06c Translated using Weblate (Kurdish (Central))
Currently translated at 34.5% (19 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-05-01 23:35:20 +02:00
Mohamed-Qadir
3b959bb1e8 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ckb/
2025-05-01 23:35:20 +02:00
Mohamed-Qadir
33b8fc1607 Translated using Weblate (Kurdish (Central))
Currently translated at 14.5% (17 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-01 23:35:20 +02:00
Mohamed-Qadir
0f5718e53e Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/ckb/
2025-04-30 13:17:01 +02:00
Mohamed-Qadir
42feed19a0 Translated using Weblate (Kurdish (Central))
Currently translated at 12.1% (27 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ckb/
2025-04-30 13:17:01 +02:00
Mohamed-Qadir
bbab34e6ba Translated using Weblate (Kurdish (Central))
Currently translated at 12.7% (7 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-04-30 13:17:01 +02:00
Mohamed-Qadir
d6bf2d11a0 Translated using Weblate (Kurdish (Central))
Currently translated at 18.6% (27 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-04-30 13:17:00 +02:00
Mohamed-Qadir
f38661bd76 Translated using Weblate (Kurdish (Central))
Currently translated at 89.1% (41 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
1fe6cf67f6 Translated using Weblate (Kurdish (Central))
Currently translated at 17.0% (8 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
45b39cf8c5 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
6056ebf9d4 Translated using Weblate (Kurdish (Central))
Currently translated at 17.9% (26 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
9726b46b15 Translated using Weblate (Kurdish (Central))
Currently translated at 12.8% (15 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
16307105a4 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
86325263bc Translated using Weblate (Kurdish (Central))
Currently translated at 95.1% (39 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
0fd1bd9b50 Translated using Weblate (Kurdish (Central))
Currently translated at 22.3% (73 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
0339ed8292 Translated using Weblate (Kurdish (Central))
Currently translated at 3.7% (3 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
2b6d5eae77 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
b0c71621a9 Translated using Weblate (Kurdish (Central))
Currently translated at 16.6% (2 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
b9c97324fa Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
546b90e5f7 Translated using Weblate (Kurdish (Central))
Currently translated at 21.0% (8 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
205346ff90 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
edb0bcf206 Translated using Weblate (Kurdish (Central))
Currently translated at 7.3% (5 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-04-30 09:05:35 +02:00
Mohamed-Qadir
6987e14147 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/ckb/
2025-04-30 09:05:35 +02:00
odiea
d5910f2e75 Fix ajax cashup total (#4238) 2025-04-27 09:31:46 +02:00
odiea
7fb75dbea9 Fix reports to show table details (#4231) 2025-04-22 17:51:31 +02:00
diego-ramos
febe5109f0 Fix error when sending a receipt of a sale without invoice (#4229) 2025-04-21 18:21:30 +02:00
jekkos
a32519fe4a Fix password change submission (#1479) 2025-04-20 18:53:32 +02:00
jekkos
e0cb950083 Fix datetime rendering (#4226) (#4227) 2025-04-20 18:42:12 +02:00
BudsieBuds
9c963814dd Some bug fixes (#4225)
- use unminified login css since gulp doesn't minify it
- adjust container max width to bootstrap 5's container-xxl
- add rtl css to bootstrap theme, to match bootswatch standards
2025-04-20 18:27:36 +02:00
BudsieBuds
2fec49e7df Enhance license handling (#4223)
- automate license updates
- license text rendered in monospace font
- removed old bower license generation code
2025-04-19 20:20:50 +02:00
BudsieBuds
1bdc19f14f Convert menu icons to SVG (#4220)
* Convert menu icons to SVG
- replaced png images with svg
- 20% decrease in file size, improving load times
- removed 384 unused files from repo

* Transferred package to organisation
2025-04-18 19:48:19 +02:00
BudsieBuds
02d63fe067 Update install docs (#4217)
- updated to show support for php 8.4
2025-04-16 07:17:28 +02:00
BudsieBuds
3e996b7818 Update language names (#4218) 2025-04-16 07:16:28 +02:00
BudsieBuds
fc37848fa7 Add default bootstrap to themes (#4219)
- also update bootstrap
2025-04-16 07:15:27 +02:00
Omer Qadir
477942beea Translated using Weblate (Kurdish (Central))
Currently translated at 5.2% (1 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
f7e12d6ba1 Translated using Weblate (Kurdish (Central))
Currently translated at 21.0% (8 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
a0f49d70b1 Translated using Weblate (Kurdish (Central))
Currently translated at 5.8% (4 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
66502af0ad Translated using Weblate (Kurdish (Central))
Currently translated at 11.7% (26 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
b099161dd1 Translated using Weblate (Kurdish (Central))
Currently translated at 3.7% (3 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
2e2bbf35b9 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
bc8c42ee0d Translated using Weblate (Kurdish (Central))
Currently translated at 11.1% (13 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-04-15 22:11:51 +02:00
Omer Qadir
2b361aaaed Translated using Weblate (Kurdish (Central))
Currently translated at 17.2% (25 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-04-15 22:11:51 +02:00
BudsieBuds
82f0e75bf0 Fix PHP 8.4 errors (#4200) 2025-04-15 20:38:52 +02:00
Omer Qadir
4d8403eb2b Translated using Weblate (Kurdish (Central))
Currently translated at 50.9% (27 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ckb/
2025-04-15 16:55:14 +02:00
Omer Qadir
d89cf3c9ad Translated using Weblate (Kurdish (Central))
Currently translated at 19.5% (8 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ckb/
2025-04-15 16:55:14 +02:00
Omer Qadir
adfd708613 Translated using Weblate (Kurdish (Central))
Currently translated at 11.2% (25 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ckb/
2025-04-15 16:55:14 +02:00
Omer Qadir
4166ee96d5 Translated using Weblate (Kurdish (Central))
Currently translated at 10.9% (6 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-04-15 16:55:13 +02:00
Omer Qadir
123606e842 Translated using Weblate (Kurdish (Central))
Currently translated at 8.5% (4 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ckb/
2025-04-15 16:55:13 +02:00
Omer Qadir
9d02e288e7 Translated using Weblate (Kurdish (Central))
Currently translated at 10.2% (12 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-04-15 16:55:12 +02:00
Omer Qadir
c7f379f8a4 Translated using Weblate (Kurdish (Central))
Currently translated at 18.4% (7 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-04-15 16:55:12 +02:00
Omer Qadir
229685f8e0 Translated using Weblate (Kurdish (Central))
Currently translated at 16.5% (24 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-04-15 16:55:11 +02:00
Omer Qadir
d10b38a03b Translated using Weblate (Kurdish (Central))
Currently translated at 12.4% (18 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-04-15 13:32:59 +02:00
Omer Qadir
264a449496 Translated using Weblate (Kurdish (Central))
Currently translated at 14.6% (6 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ckb/
2025-04-15 13:32:59 +02:00
Omer Qadir
12a57d5701 Translated using Weblate (Kurdish (Central))
Currently translated at 10.5% (4 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-04-15 13:32:59 +02:00
Omer Qadir
27f769e3f4 Translated using Weblate (Kurdish (Central))
Currently translated at 9.4% (11 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-04-15 13:32:58 +02:00
Omer Qadir
fc60a09f28 Translated using Weblate (Kurdish (Central))
Currently translated at 5.6% (3 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ckb/
2025-04-15 13:32:58 +02:00
Omer Qadir
59798cae28 Translated using Weblate (Kurdish (Central))
Currently translated at 4.4% (3 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-04-15 13:32:58 +02:00
Omer Qadir
7a170b7f7f Translated using Weblate (Kurdish (Central))
Currently translated at 9.9% (22 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ckb/
2025-04-15 13:32:57 +02:00
Omer Qadir
9c6023e7f0 Translated using Weblate (Kurdish (Central))
Currently translated at 2.5% (2 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ckb/
2025-04-15 13:32:57 +02:00
Omer Qadir
70352ba954 Translated using Weblate (Kurdish (Central))
Currently translated at 8.2% (27 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ckb/
2025-04-15 13:32:57 +02:00
Omer Qadir
01d0555586 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/ckb/
2025-04-15 13:32:56 +02:00
Omer Qadir
22203a83d7 Translated using Weblate (Kurdish (Central))
Currently translated at 7.2% (4 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ckb/
2025-04-15 13:32:55 +02:00
Omer Qadir
2d99655400 Translated using Weblate (Kurdish)
Currently translated at 7.6% (9 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ku/
2025-04-15 11:55:07 +02:00
Omer Qadir
b8be47d4ef Translated using Weblate (Kurdish)
Currently translated at 11.7% (17 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ku/
2025-04-15 11:55:07 +02:00
Omer Qadir
fd86e08e7e Translated using Weblate (Kurdish)
Currently translated at 1.4% (1 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ku/
2025-04-15 11:55:07 +02:00
Omer Qadir
a1d2d19a5b Translated using Weblate (Kurdish)
Currently translated at 33.3% (7 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/ku/
2025-04-15 11:55:07 +02:00
BudsieBuds
766b3b967e Convert language ku to ckb (#4211)
- convert ku (Kurdish) to ckb (Central Kurdish)
- replaced tabs with spaces
- replace single quotation marks with double
2025-04-15 08:31:40 +02:00
BudsieBuds
a62bef53b4 Add Kurdish language option to UI (#4210) 2025-04-14 18:33:05 +02:00
jekkos
eb643cc74c Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:47:11 +02:00
jekkos
a0fb5f317c Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:46:35 +02:00
jekkos
1f7da93189 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:45:28 +02:00
jekkos
ed00395243 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:44:04 +02:00
jekkos
f47f474335 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:43:47 +02:00
jekkos
e0cebb86bd Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:43:29 +02:00
jekkos
78d0193121 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:28:07 +02:00
jekkos
3d5d2ebb89 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:27:06 +02:00
jekkos
075d261758 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:26:32 +02:00
jekkos
8e9c3d7df5 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:25:56 +02:00
jekkos
1428ad2789 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:25:38 +02:00
jekkos
89919c88a2 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:25:03 +02:00
jekkos
31edc87348 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:24:13 +02:00
jekkos
8565e73f0c Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:22:53 +02:00
jekkos
942ea19fe4 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-13 00:22:25 +02:00
Omer Qadir
c4fbdb1231 Translated using Weblate (Kurdish (Central, Iraq))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ckb_IQ/
2025-04-12 15:15:31 +02:00
Omer Qadir
fd441d57a1 Translated using Weblate (Kurdish (Central, Iraq))
Currently translated at 88.2% (75 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ckb_IQ/
2025-04-12 14:21:16 +02:00
Omer Qadir
2080f5b187 Translated using Weblate (Kurdish (Central, Iraq))
Currently translated at 74.1% (63 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ckb_IQ/
2025-04-12 14:16:15 +02:00
Omer Qadir
ad2902cb19 Translated using Weblate (Kurdish (Central, Iraq))
Currently translated at 72.9% (62 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ckb_IQ/
2025-04-12 04:10:00 +02:00
Omer Qadir
606b9461d2 Translated using Weblate (Kurdish (Central, Iraq))
Currently translated at 40.0% (34 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ckb_IQ/
2025-04-12 01:13:11 +02:00
jekkos
d37016a9f5 Added translation using Weblate (Kurdish (Central, Iraq)) 2025-04-12 00:29:25 +02:00
objecttothis
09530c1609 Feature bump ci to 4.6.0 (#4197)
* Replace tabs with spaces

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Composer package bumps

- Bump codeigniter4/framework to 4.6.0
- Bump codeIgniter/coding-standard to ^1.8
- Bump codeigniter4/devkit to ^1.3
- Updated framework files required by CI4.6.0
- Removed Deprecated variables
- Added new file in the repo from framework

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Reflect PHP 8.4 support
Updates for PHP 8.4 support introduced with the upgrade to CodeIgniter 4.6.x

* Update INSTALL.md

- Revert PHP 8.4 support for now.
- Removed extra space before comma

---------

Signed-off-by: objecttothis <objecttothis@gmail.com>
Co-authored-by: BudsieBuds <bas_hubers@hotmail.com>
2025-04-03 14:16:06 +04:00
dependabot[bot]
2c9ae36247 Bump jspdf and jspdf-autotable (#4190)
Bumps [jspdf](https://github.com/MrRio/jsPDF) and [jspdf-autotable](https://github.com/simonbengtsson/jsPDF-AutoTable). These dependencies needed to be updated together.

Updates `jspdf` from 2.5.1 to 3.0.1
- [Release notes](https://github.com/MrRio/jsPDF/releases)
- [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md)
- [Commits](https://github.com/MrRio/jsPDF/compare/v2.5.1...v3.0.1)

Updates `jspdf-autotable` from 3.8.2 to 5.0.2
- [Release notes](https://github.com/simonbengtsson/jsPDF-AutoTable/releases)
- [Commits](https://github.com/simonbengtsson/jsPDF-AutoTable/compare/v3.8.2...v5.0.2)

---
updated-dependencies:
- dependency-name: jspdf
  dependency-type: direct:production
- dependency-name: jspdf-autotable
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 13:03:50 +04:00
dependabot[bot]
69a507f879 Bump canvg from 3.0.10 to 3.0.11 (#4189)
Bumps [canvg](https://github.com/canvg/canvg) from 3.0.10 to 3.0.11.
- [Release notes](https://github.com/canvg/canvg/releases)
- [Changelog](https://github.com/canvg/canvg/blob/v3.0.11/CHANGELOG.md)
- [Commits](https://github.com/canvg/canvg/commits/v3.0.11)

---
updated-dependencies:
- dependency-name: canvg
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 11:40:49 +04:00
jekkos
e1e3a30fc0 Add CI4 coding standards linter (#3708) (#4198) 2025-03-31 11:39:44 +04:00
Almubaraq Ratomi
c1906727ec Translated using Weblate (Indonesian)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/id/
2025-03-28 22:21:40 +01:00
Almubaraq Ratomi
8dde4c3425 Translated using Weblate (Indonesian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/id/
2025-03-28 22:21:40 +01:00
jekkos
f399714dc3 Add .env to dist zip (#4194) 2025-03-28 22:19:26 +01:00
objecttothis
e90b5b87da Replace tabs with spaces (#4196)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-03-28 21:24:21 +04:00
jekkos
69bcd84699 Update INSTALL instructions (#4194) 2025-03-26 19:43:34 +01:00
jekkos
f3fae110d6 Update install instructions + remove build on tag 2025-03-23 22:49:27 +01:00
jekkos
e9e82e4e50 Set release version to 3.4 2025-03-11 21:08:11 +01:00
Chathura Dilushanka
2bd38737e1 Update locale_config.php 2025-03-04 21:36:39 +01:00
JoseLuisKukMagana
2a789bb583 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
e8a79910fe Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
9bfe6c7c4e Translated using Weblate (Spanish (Mexico))
Currently translated at 98.8% (84 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
bc0e2c6833 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
196375d594 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
fafba87894 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
66a097d9f2 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
f3931577be Translated using Weblate (Spanish (Mexico))
Currently translated at 69.1% (47 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
f125960fe2 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (221 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
787977ed3e Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
502b5fd6b9 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
ec2b941f3f Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/es_MX/
2025-03-03 00:22:29 +01:00
JoseLuisKukMagana
8723274418 Translated using Weblate (Spanish (Mexico))
Currently translated at 55.5% (65 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es_MX/
2025-03-03 00:22:29 +01:00
jekkos
cf73ffa825 Fix attribute dropdown delete (#4176) 2025-03-01 00:37:23 +01:00
jekkos
eeaa693ede Fix for giftcard numbering (#4182) 2025-02-15 01:12:35 +01:00
jekkos
1378794e7e Revert "Use app language for current_lang (#4175)"
This reverts commit 19974bc8e0.
2025-02-15 01:10:16 +01:00
jekkos
d1d8aa0401 Fix greyed out submit after validation (#4174) 2025-02-15 01:09:53 +01:00
jekkos
882f3b4522 Fix table header translations (#4175) 2025-02-15 01:08:19 +01:00
jekkos
19974bc8e0 Use app language for current_lang (#4175) 2025-02-10 08:53:11 +01:00
SONKO ABDOU
d0b2b3e80b Translated using Weblate (French)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/fr/
2025-02-09 20:35:46 +01:00
BudsieBuds
57c36e7ba7 Fixes for CHANGELOG 2025-02-08 00:00:56 +01:00
jekkos
8516ffe216 Add php-json to dependency list (#4168) 2025-02-07 23:59:59 +01:00
jekkos
534f7361d6 Update CHANGELOG 2025-02-06 23:25:39 +01:00
jekkos
5609859fdf Fix attribute dropdown creation (#4171) 2025-02-05 22:24:33 +01:00
jekkos
c6c5fcac26 Fix sales tax summary with time filter (#4166) 2025-02-05 22:01:59 +01:00
BudsieBuds
4d9cd80f8b Random fixes #2
- change old directories to new (ci4)
- updated documentation for clarity
2025-02-05 21:58:28 +01:00
jekkos
2924a889c7 Remove localhost in port mapping (#4168) 2025-02-04 12:11:54 +01:00
BudsieBuds
beb18ff96b Random fixes (#4144)
Random fixes in time for the 3.4.0 release.
- corrects typo in the items controller
- small update to login view
- removes deprecated code from header view
- ospos license updated to end 2024
- moved gulp packages to dev dependencies
- updated gulp-zip and npm-check-updates to latest version
- updated readme for consistency
- makes ospos license in config fully readable
- fixes composer libraries license view in config
- gulp now updates composer libraries license and ospos license
- updated other license views in config
2025-01-28 23:48:45 +01:00
El_Coloso
7ad1bfa0fb Fix requisitions (#4147)
* Fix data types on null values
* Fix receiving receipt image tag
* Fix error on Receiving Model
2025-01-28 23:32:05 +01:00
El_Coloso
9cc24f0c70 Send receipt by email as PDF (#2682) 2025-01-26 22:13:27 +01:00
jekkos
b86e5ca6ef Use parse_decimal in decimal validation (#4152) 2025-01-24 00:17:57 +01:00
jekkos
4879fe2cf3 Show error when hitting enter in sales (#4155) 2025-01-24 00:17:57 +01:00
El_Coloso
a5b2b5f771 Fixes for receipt + invoice (#2682)
* Email invoice bar code
* Send invoice by email
* Remove default comment on invoice if comment was set
2025-01-24 00:17:25 +01:00
jekkos
ac90c07c90 Remove support for PHP7.4 for now 2025-01-13 01:13:28 +01:00
jekkos
c81c546286 Remove prepare_decimal and filter_var 2025-01-13 01:13:28 +01:00
Derek Christman
a87b6eebb2 Removed PSR12 reformatting 2025-01-13 01:13:28 +01:00
Derek Christman
487e7dc0bd Revert "Fixed cast to int and inadvertant cast of false to double when parsing locale values to float"
This reverts commit 3e4c987894e3790f671e49398c9db7820bc3378d.
2025-01-13 01:13:28 +01:00
Derek Christman
467144f884 Fixed cast to int and inadvertant cast of false to double when parsing locale values to float 2025-01-13 01:13:28 +01:00
jekkos
2f365dce91 Parse prices directly using numberformatter (#4107) 2025-01-13 01:13:28 +01:00
jekkos
5bee124965 Add php linter (#3708) 2025-01-10 19:15:38 +01:00
jekkos
6195368dfc Fix person suggestion (#4142) 2025-01-06 23:47:48 +01:00
jekkos
deb9d1e65d Fix item kits addition (#4142) 2025-01-06 23:37:07 +01:00
jekkos
b541d473cf Fix requisitions (#4142) 2025-01-06 22:33:32 +01:00
jekkos
ff6ec1bd4e Fix image inclusion in gulp compress (#3916) 2025-01-05 17:41:43 +01:00
khao_lek
6b48078b44 Translated using Weblate (Thai)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/th/
2024-12-31 22:05:15 +01:00
jekkos
3e63b99aef Add reference to unstable in INSTALL.md (#4136) 2024-12-27 00:34:21 +01:00
jekkos
0f3175bc19 Add delete unstable release after push (#4136) 2024-12-27 00:23:32 +01:00
jekkos
ebc923801b Fix gulp compress dir layout (#3916) 2024-12-26 15:58:12 +01:00
jekkos
6128924723 Use github releases for unstable (#2814) 2024-12-22 21:42:08 +01:00
jekkos
3faa48330a Fix category as dropdown save (#4134) 2024-12-22 17:12:47 +01:00
Aril Apria Susanto
86763e460c Translated using Weblate (Indonesian)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/id/
2024-12-16 12:46:53 +01:00
Aril Apria Susanto
1463151f64 Translated using Weblate (Indonesian)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2024-12-16 12:46:53 +01:00
Aril Apria Susanto
ae83b47b5b Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2024-12-16 12:46:52 +01:00
Aril Apria Susanto
a925cb3f22 Translated using Weblate (Indonesian)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/id/
2024-12-16 12:46:52 +01:00
Aril Apria Susanto
564df8aff0 Translated using Weblate (Indonesian)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/id/
2024-12-16 12:46:52 +01:00
Aril Apria Susanto
8aee7350ae Translated using Weblate (Indonesian)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/id/
2024-12-16 12:46:51 +01:00
Aril Apria Susanto
91f1863617 Translated using Weblate (Indonesian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/id/
2024-12-16 12:46:51 +01:00
Aril Apria Susanto
ae18737c6b Translated using Weblate (Indonesian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/id/
2024-12-16 12:46:51 +01:00
Aril Apria Susanto
bf6ef090e7 Translated using Weblate (Indonesian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/id/
2024-12-16 12:46:51 +01:00
Aril Apria Susanto
b8883954a4 Translated using Weblate (Indonesian)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/id/
2024-12-16 12:46:50 +01:00
Aril Apria Susanto
618c942529 Translated using Weblate (Indonesian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2024-12-16 12:46:50 +01:00
Munibullah Shah
16d3a8bab1 Translated using Weblate (Urdu)
Currently translated at 5.0% (1 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ur/
2024-12-13 20:37:41 +01:00
Munibullah Shah
8b2d0b5208 Translated using Weblate (Urdu)
Currently translated at 15.7% (35 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ur/
2024-12-13 20:37:41 +01:00
Munibullah Shah
e4d5ba70eb Translated using Weblate (Urdu)
Currently translated at 10.6% (5 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ur/
2024-12-13 20:37:40 +01:00
Munibullah Shah
507b2b3cf3 Translated using Weblate (Urdu)
Currently translated at 17.6% (15 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ur/
2024-12-13 20:37:40 +01:00
Munibullah Shah
a848fbe432 Translated using Weblate (Urdu)
Currently translated at 3.7% (2 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ur/
2024-12-13 20:37:40 +01:00
Munibullah Shah
05ec5f2e7a Translated using Weblate (Urdu)
Currently translated at 23.9% (11 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/ur/
2024-12-13 20:37:40 +01:00
Munibullah Shah
4fd1c64c61 Translated using Weblate (Urdu)
Currently translated at 12.5% (1 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ur/
2024-12-13 20:37:39 +01:00
Munibullah Shah
55cba0c30d Translated using Weblate (Urdu)
Currently translated at 36.8% (7 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ur/
2024-12-13 20:37:39 +01:00
Munibullah Shah
ffd957ba2f Translated using Weblate (Urdu)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/ur/
2024-12-13 20:37:39 +01:00
objecttothis
aeee79c494 Translated using Weblate (Azerbaijani)
Currently translated at 99.3% (144 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/az/
2024-12-09 22:53:57 +01:00
odiea
4d65bd6c92 Fix sticky header issue in reports (#3854) 2024-12-05 21:08:59 +01:00
jekkos
248299521b Revert IntlFormatter refactor (#4126) 2024-12-03 00:15:06 +01:00
jekkos
cea8717378 Fix disappearing avatar (#4128) 2024-12-02 00:50:39 +01:00
jekkos
6eade2eed6 Add DigitalOcean credits (#4122) 2024-12-02 00:11:46 +01:00
jekkos
3cac58965a Remove html space in headers (#4125) 2024-11-29 00:25:33 +01:00
jekkos
255968f5ea Remove sticky headers offset (#3854) 2024-11-29 00:19:12 +01:00
jekkos
150210cee3 Add code of conduct 2024-11-15 22:53:10 +01:00
jekkos
6d106d69d2 Use npmv2 deploy (#2834) 2024-11-15 00:13:18 +01:00
jekkos
555a00d385 Apply decimal rule to receivings (#4117) 2024-11-13 23:46:12 +01:00
objecttothis
71d6502929 Use custom rule to account for all locales (#4117)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-11-13 23:22:33 +01:00
Ludwittge
46e14a3642 Fixed translation error (#4119) 2024-11-13 23:00:29 +01:00
dependabot[bot]
6d712f3a1e Bump symfony/process from 7.1.6 to 7.1.7 (#4111)
Bumps [symfony/process](https://github.com/symfony/process) from 7.1.6 to 7.1.7.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v7.1.6...v7.1.7)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-12 10:48:11 +04:00
objecttothis
2d895b4a9e Adapt Configuration checker for CI4 (#4108)
- Removed $import variable as it is never used and the code generates the csv file for item imports
- Refactored import_customers.csv to match PSR-12 standard file names
- Refactored variable names to match PSR-12 standard variable names
- Updated .editorconfig to reflect PSR-12 requirement for spaces rather than tab symbols. https://www.php-fig.org/psr/psr-12/#24-indenting
- Added version number to browser reporting
- Corrected timezone reporting

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Revert .editorconfig (#3708)

---------

Signed-off-by: objecttothis <objecttothis@gmail.com>
Co-authored-by: jekkos <jeroen.peelaerts@gmail.com>
2024-11-10 09:23:42 +01:00
jekkos
ae27cba6f6 Use v2 npm deploy (#2834) 2024-11-10 00:37:32 +01:00
objecttothis
00a5e1b897 Bump CodeIgniter4 to 4.5.5 (#4106)
Updated composer.json and composer.lock.

- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_452.html
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_453.html (this bumps several packages)
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_454.html
- Ran through steps in https://codeigniter.com/user_guide/installation/upgrade_455.html

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-11-05 22:38:54 +01:00
objecttothis
d946b31cf4 Bugfix Attributes not saving (#4080)
Fixed issue with Attribute Values not saving correctly

This issue was caused by the Attribute->attributeValueExists function receiving a date which was already in Y-m-d format, so the conversion was returning false. Added logic to pass the date through if it was already in Y-m-d format.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-11-05 22:37:47 +01:00
Kristoffer Grundström
f66ffc81b7 Translated using Weblate (Swedish)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/sv/
2024-11-03 01:59:10 +01:00
Kristoffer Grundström
07a38f5a90 Translated using Weblate (Swedish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/sv/
2024-11-03 01:59:10 +01:00
Kristoffer Grundström
801639957e Translated using Weblate (Swedish)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/sv/
2024-11-03 01:59:09 +01:00
Kristoffer Grundström
e384378d27 Translated using Weblate (Swedish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/sv/
2024-11-03 01:59:09 +01:00
Kristoffer Grundström
289fd78113 Translated using Weblate (Swedish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/sv/
2024-10-31 05:54:42 +01:00
Kristoffer Grundström
fc8e7dc116 Translated using Weblate (Swedish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2024-10-31 05:54:42 +01:00
Kristoffer Grundström
ebb1546995 Translated using Weblate (Swedish)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
06edce9ee2 Translated using Weblate (Swedish)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
0164d451b1 Translated using Weblate (Swedish)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
50fe205026 Translated using Weblate (Swedish)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
07d97de067 Translated using Weblate (Swedish)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
fbb2a0d8ab Translated using Weblate (Swedish)
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
d4f0a1d509 Translated using Weblate (Swedish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
c20cf68e37 Translated using Weblate (Swedish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
e64f04dba6 Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
1d538ba60c Translated using Weblate (Swedish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
41bfeab725 Translated using Weblate (Swedish)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
3053e6a7c9 Translated using Weblate (Swedish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
bf1aa1f986 Translated using Weblate (Swedish)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
1d4f7eace1 Translated using Weblate (Swedish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/sv/
2024-10-29 08:06:42 +01:00
Kristoffer Grundström
f6914701d2 Translated using Weblate (Swedish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2024-10-29 08:06:42 +01:00
objecttothis
004f2b5b65 Populated CSP related directives
- Added TODO
- Copied directives from .htaccess to the ContentSecurityPolicy.php config file.
- Left CSPEnabled set to false in App.php because there is currently no CSP3 support in CI4
- Added `img-src blob:` To Content-Security-Policy header to remove error.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-28 22:22:37 +01:00
objecttothis
18b400ee56 Fix #3633
- Moved PSR/Log to the replace block of the composer json which gets rid of the problem with duplicate installs of PSR/Log.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-28 22:22:37 +01:00
objecttothis
4d6a7fff96 Fix deprecated code
- strlen() can no longer take null as an argument. This change resolves the issue.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-28 22:22:37 +01:00
objecttothis
28b8ff2ea6 Bump Bootstrap-table to 1.23.5
- This does not resolve #3854 but keeps the version up to date.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-28 22:22:37 +01:00
khao_lek
3404ce99d9 Translated using Weblate (Thai)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2024-10-24 16:04:34 +02:00
khao_lek
3fb5b997ef Translated using Weblate (Thai)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/th/
2024-10-24 16:04:34 +02:00
jekkos
2da941725e Increase table width on bigger screens 2024-10-19 10:44:38 +02:00
jekkos
6a0f33e5db Fix print after sale (#3985) 2024-10-19 00:35:26 +02:00
jekkos
4369a94363 Fix sale edit form 2024-10-13 23:16:55 +02:00
jekkos
0f7d0a7903 Fix expenses entry (#4075) 2024-10-06 01:29:52 +02:00
jekkos
691ba1e8ca Fix definition flags (#4081) 2024-10-05 02:45:39 +02:00
jekkos
f3277b0d38 Try to fix checkNumeric (#4082) 2024-10-05 02:35:17 +02:00
jekkos
b8a74ba30a Fix employee, supplier, customer (#4086) 2024-10-05 02:27:25 +02:00
jekkos
0f4d06af61 Blind SQL injection fix (#3284) 2024-10-03 00:00:55 +02:00
jekkos
72f147074d Enable html escape + fix XSS (#3965) 2024-10-02 21:29:09 +02:00
objecttothis
951279aabe Pre-view filtering Items Controller
- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

Signed-off-by: objecttothis <objecttothis@gmail.com>

Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

Signed-off-by: objecttothis <objecttothis@gmail.com>

Minor changes

- Refactored for code clarity.
- Removed extra blank lines.
- Minor reformatting.
- Added PHPdocs
- bumped bootstrap-table to 1.23.2

Signed-off-by: objecttothis <objecttothis@gmail.com>

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

Signed-off-by: objecttothis <objecttothis@gmail.com>

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

Signed-off-by: objecttothis <objecttothis@gmail.com>

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

Removed unnecessary use statement

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-02 21:29:09 +02:00
objecttothis
0e361107ca Explicitly define variables
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-01 00:47:03 +02:00
dependabot[bot]
99530d64e0 Bump micromatch from 4.0.5 to 4.0.8 (#4078)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 13:43:59 +04:00
dependabot[bot]
1662ef5856 Bump braces from 3.0.2 to 3.0.3 (#4077)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 13:43:17 +04:00
dependabot[bot]
07ee353113 Bump dompurify from 2.5.1 to 2.5.6 (#4057)
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.5.1 to 2.5.6.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/2.5.1...2.5.6)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-30 13:37:28 +04:00
objecttothis
0aaac04344 Fixed Only Group By problem (#4073)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-09-24 14:20:46 +04:00
jekkos
a197226c28 Fix employee search suggestion 2024-09-23 23:31:35 +02:00
jekkos
c606bde733 More giftcard fixes (#2935) 2024-09-23 00:54:46 +02:00
jekkos
42c86ec684 Fix detailed sales report (#4064) 2024-09-22 22:13:43 +02:00
jekkos
4293f70cd5 Fix column refresh after attribute delete (#2911) 2024-09-20 01:15:13 +02:00
jekkos
1406c232a5 Fix attribute save (#4016) 2024-09-20 00:46:50 +02:00
jekkos
822bebaf64 Giftcard modal improvements (#2935) 2024-09-20 00:41:34 +02:00
jekkos
3e32a5e121 Giftcard number validation (#2935) 2024-09-20 00:00:35 +02:00
jekkos
4b8d009c76 Add english fallback if no translation (#3995) 2024-09-17 17:47:30 +02:00
jekkos
7d04371425 Fix checkNumeric validation (#3872) 2024-09-17 02:02:05 +02:00
jekkos
d69e7be848 Fix bugs in expenses form (#3840) 2024-09-17 01:50:35 +02:00
jekkos
9a032d1891 Add refresh after submit in expenses (#3840) 2024-09-17 01:39:34 +02:00
jekkos
7003b124d4 Revert to english (#3995) 2024-09-17 00:54:26 +02:00
jekkos
687ded433f Fix sales date table filtering (#3999) 2024-09-17 00:46:13 +02:00
jekkos
f279877cd6 Fix customer suggestion (#4031) 2024-09-17 00:32:10 +02:00
jekkos
3a7470b4fd Sort on MAX(sale_time) in supplier report (#4055)
Sort on aggregate field reports (#4055)
2024-09-16 23:43:50 +02:00
jekkos
e91a0181af Sort on MAX(sale_time) in supplier report (#4055) 2024-09-16 23:41:59 +02:00
jekkos
b41196966c Remove duplicate attribute_links constraint (#4012) 2024-09-16 14:18:17 +02:00
jekkos
8a346b0b4c Use sqlscript container to read init script (#3826) 2024-09-16 14:18:17 +02:00
jekkos
2e56cf766f Move queries to new migration script (#4012)
Iterate over empty array if no query result
Switch compose back to master
Only remove index if no pk
Remove drop indices
Only person_id changes in this migration
Do not name primary key
2024-09-16 14:18:17 +02:00
Steve Ireland
1c95d35a74 This is intended to start resolving #3634. CIR4 query() now returns false for failed queries
Minor improvements to migrations to report to the log any failures and remove unnecessary key definitions. (#4043)
2024-09-16 14:18:17 +02:00
objecttothis
6eb22276f3 Locale handling of decimals in attribute saves
- Added check in controller to convert locale-specific decimal formats to use a period decimal separator.
- Added PHPdoc explanation

Signed-off-by: objecttothis <objecttothis@gmail.com>

Add TODO to clarify workaround

Signed-off-by: objecttothis <objecttothis@gmail.com>

Fixed bugs in SQL

- Added checks before attempting to delete non-existing values.
- Corrected function which deletes duplicate attribute values and replaces the attribute_ids

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-09-16 14:18:17 +02:00
Johntini
5434eaed03 Translated using Weblate (Spanish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/es/
2024-09-10 13:13:13 +02:00
Johntini
94a72abf49 Translated using Weblate (Spanish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es/
2024-09-10 13:13:13 +02:00
Johntini
b3c8081738 Translated using Weblate (Spanish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es/
2024-09-10 13:13:12 +02:00
Johntini
92927e1572 Translated using Weblate (Spanish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2024-09-10 13:13:12 +02:00
Johntini
502db509a2 Translated using Weblate (Spanish)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2024-09-10 13:13:12 +02:00
Johntini
439572e403 Translated using Weblate (Spanish)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/es/
2024-09-10 13:13:11 +02:00
jekkos
3540fa2f6c Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/en_GB/
2024-09-08 12:44:47 +02:00
jekkos
61894c89cd Fix translations file format (#3468) 2024-09-08 01:39:20 +02:00
BNSHKEL
7c0d749d3b Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ar_LB/
2024-09-07 22:11:27 +02:00
Agung Hari Wijaya
fbd384ecdb Translated using Weblate (Indonesian)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2024-09-07 22:11:27 +02:00
Agung Hari Wijaya
84be846b5f Translated using Weblate (Indonesian)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/id/
2024-09-07 22:11:26 +02:00
Agung Hari Wijaya
900893109e Translated using Weblate (Indonesian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/id/
2024-09-07 22:11:26 +02:00
Agung Hari Wijaya
70b8217f23 Translated using Weblate (Indonesian)
Currently translated at 100.0% (222 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2024-09-07 22:11:26 +02:00
jekkos
c1dcf4e3c6 Fix for giftcard suggestions (#4030)
Switch back to master in docker-compose.yml
2024-08-28 00:04:56 +02:00
jekkos
f49d763254 XSS mitigation features (#4041)
* Remove HtmlPurifier calls

- All calls to Services::htmlPurifier()->purify() removed from data received from view.
- Bootstrap and bootswatch bump in package-lock.json

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Pre-view filtering Customers Controller

- Refactored code for clarity
- Replaced == with === operator to prevent type juggling
- Added Sanitization of Customer data before being sent to the view

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Bump bootstrap-table to 1.23.1

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Minor changes

- Refactored for code clarity.
- Removed extra blank lines.
- Minor reformatting.
- Added PHPdocs
- bumped bootstrap-table to 1.23.2

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

Signed-off-by: objecttothis <objecttothis@gmail.com>

---------

Signed-off-by: objecttothis <objecttothis@gmail.com>
Co-authored-by: objecttothis <objecttothis@gmail.com>
2024-08-26 11:35:56 +04:00
jekkos
402997f0da Update INSTALL.md 2024-08-17 01:24:27 +02:00
jekkos
0be9488cfb Fix customer sale suggestion (#4031) 2024-08-04 00:13:07 +02:00
objecttothis
e1f8b73005 Add check to migration to prevent errors (#4032)
* Add check to migration

- Only drop the constraint if it exists.

Signed-off-by: objecttothis <objecttothis@gmail.com>

* Automatic bump of package-lock.json

Signed-off-by: objecttothis <objecttothis@gmail.com>

---------

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-07-27 00:08:49 +04:00
Steve Ireland
05538570ec Supplementing issue #3997, this change allows the discount amount to be deleted by the user (instead of needing to enter a zero). 2024-07-26 21:36:19 +02:00
Steve Ireland
82aac4ec79 Resolving issue #3997 for discount type toggle not staying put. 2024-07-26 21:36:19 +02:00
Steve Ireland
d2622e94d7 An attempt to resolve issue #4025. Since a kit item code is prefixed by "KIT" it's not going to work to always assume that the item id is numeric. So "int" needs to be replaced with "string". 2024-07-22 08:38:18 +02:00
Steve Ireland
034f79e157 Start Daily Sales with selected customer (#4019) 2024-07-08 20:48:31 -04:00
Steve Ireland
c972cdfaf4 Correct a constraint that wasn't using the full unique key based on composite keys. (#4014) 2024-07-01 13:25:11 -04:00
Steve Ireland
a1e8841129 Missed a comma (#4012) 2024-06-27 19:38:47 +02:00
jekkos
70ac367761 Reinstate required_username translation (#3468) 2024-06-27 19:38:37 +02:00
Temuri Doghonadze
a9fcbc624b Translated using Weblate (Georgian)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/ci4-upgrade
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/ci4-upgrade/ka/
2024-06-27 19:38:37 +02:00
Temuri Doghonadze
fd163923ad Added translation using Weblate (Georgian) 2024-06-27 19:38:37 +02:00
khao_lek
35fe460692 Translated using Weblate (Thai)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/ci4-upgrade
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/ci4-upgrade/th/
2024-06-27 19:38:37 +02:00
Steve Ireland
0b889ec443 Clean up install.md a bit (#4012)
Corrected primary keys involving person_id.
Corrected a couple of errors in constraints involving compound keys.
2024-06-27 19:38:09 +02:00
jekkos
154fe9f9e3 Temporarily remove linter (#3708) 2024-06-15 17:19:15 +02:00
objecttothis
0bd0d48c91 revert fallback language to en
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
c942f53bf1 Minor fixes.
- Correct capitalization.
- Revert assignment to an invalid language code.
- Correct dynamic assignment in config singleton.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
BudsieBuds
c39b733c90 Language fallback improvement
- Changes for following best practice for CI4 localization
- Norwegian and Urdu languages now working again
- Sort languages by alphabet in config
2024-06-15 17:19:15 +02:00
jekkos
fea38e1608 Sync language files (#3468) 2024-06-15 17:19:15 +02:00
SpookedByRoaches
4436d7396d Fixed get_definition_by_name so that it does not get deleted
definitions.
2024-06-15 17:19:15 +02:00
objecttothis
52723ceeec Updated PHPDocs
- Added @noinspection PhpUnused to AJAX-called functions to remove weak warning that the function is unused. This will be needed for the linter.
- Referenced where the function is called in the PHPdocs.
- Removed redundant transaction. batch_save() is already being run in a transaction.
- Fixed function name in controller and view.
- Removed form helper load because it's autoloaded.
- Corrected variable reference in Secure_Controller.php

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
b3b8e7ec1d HTMLPurifier filtering on searches
- Formatting
- Added calls to HTMLPurifier
- Added filtering
- Refactored out variable for clarity

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
8408bb0d80 Revert push
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
14248edc06 HTMLPurifier filtering
- Replaced == with === to avoid type juggling
- Removed unneeded TODO
- Added HTMLPurifier to composer.json
- Added Service to allow singleton instance of purifier.
- Implemented use in Customer Controller Search function.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
061ed57bf2 - Corrected capitalization
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
SpookedByRoaches
11d5abe6d7 Fixed csv import when updating items that have a barcode 2024-06-15 17:19:15 +02:00
BudsieBuds
e4c1f4a146 Update README.md
Updated Travis CI badge
2024-06-15 17:19:15 +02:00
BudsieBuds
c384909cf6 Update BUILD.md
Reflect changes in #3826
2024-06-15 17:19:15 +02:00
jekkos
dfe614efaf Fix pie charts (#3773) 2024-06-15 17:19:15 +02:00
jekkos
a1c3b2090b Fix graphical reports (#3773) 2024-06-15 17:19:15 +02:00
jekkos
07e09e1948 Fix register functionality
Fix controller method names
2024-06-15 17:19:15 +02:00
jekkos
f81dfe1b0b Fix permissions checkbox state (#3993) 2024-06-15 17:19:15 +02:00
BudsieBuds
9fe578504c Update login screen
- Updated deprecated BS5 classes
- Throw errors in separate alert boxes and not as an <ul>
- Make error translatable
- Small updates/fixes
2024-06-15 17:19:15 +02:00
jekkos
f9f40c7f3c Remove linter overrides (#3708) 2024-06-15 17:19:15 +02:00
jekkos
46009b2062 Remove admin folder from linter (#3708) 2024-06-15 17:19:15 +02:00
jekkos
24772f856f Remove action for userguide (#3708) 2024-06-15 17:19:15 +02:00
jekkos
857ef96724 Add workflow to test coding standards 2024-06-15 17:19:15 +02:00
jekkos
9da7c73415 Fix gulp font copy issue (#3987) 2024-06-15 17:19:15 +02:00
objecttothis
63ae5494a7 - Converted raw queries to QueryBuilder where possible
- Removed completed TODOs
- Added TODOs and comments where needed.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
1328b4d9b8 - Removed TODOs that had been completed
- Added TODO where we need to convert to querybuilder
- Converted to switch statement.
- Removed unnecessary local variable
- Replaced Qualifiers with imports
- Replaced isset() call with null coalescing operator
- Replaced strpos function calls in if statements with str_contains calls
- Removed unnecessary leading \ in use statement
- Replaced deprecated functions
- Updated PHPdocs to match function signature
- Added missing type declarations
- Made class variables private.
- Explicitly declared dynamic properties
- use https:// links instead of http://
- Fixed type error from sending null when editing transactions
- Fixed Search Suggestion function name in Employees, Persons, Suppliers controller
- Fixed function name on Receivings Controller

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
41d06f5f79 Remove unneeded use statement
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
5824f78d55 Convert raw query to querybuilder for security
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
SpookedByRoaches
17908b55ef Make register background colors use bootswatch 2024-06-15 17:19:15 +02:00
jekkos
3963b2c924 Fix redirect + no permission error message 2024-06-15 17:19:15 +02:00
jekkos
8d59cd9d83 Fix no_access route (#3984) 2024-06-15 17:19:15 +02:00
jekkos
bd1af2b854 Fix delete payment (#3983) 2024-06-15 17:19:15 +02:00
jekkos
8886cac056 Update travis file (#3916) 2024-06-15 17:19:15 +02:00
jekkos
8f52e283bb Add gulp compress task (#3916) 2024-06-15 17:19:15 +02:00
jekkos
c9c6a88c5d Add suffix to exported filename (#3970) 2024-06-15 17:19:15 +02:00
jekkos
2fdddbc043 Revert gulp downgrade (#3909) 2024-06-15 17:19:15 +02:00
jekkos
75b00be637 Upgrade jspdf (#3909) 2024-06-15 17:19:15 +02:00
BudsieBuds
dd5a20229d Docker compose typo
Fixed a typo in docker-compose.test file
2024-06-15 17:19:15 +02:00
BudsieBuds
0f098bb741 Docs updated
Updated documentation. Fixed image links, links in changelog, and minor typos.
2024-06-15 17:19:15 +02:00
objecttothis
1bc3d141e9 Bump npm dependencies
- Revert jspdf and jspdf-autotable bump due to problems caused in npm run build
- Correct gulpfile for fixed reference.
- Reverted chartist dependency changes since it broke the build.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
2985b8c6ae Bump npm dependencies
- Revert jspdf and jspdf-autotable bump due to problems caused in npm run build
- Correct gulpfile for fixed reference.
- Reverted chartist dependency changes since it broke the build.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
87b4526078 Bump npm dependencies
- bootstrap-tagsinput-2021 replaced bootstrap-tagsinput because the latter has vulnerabilities.
- Chartist and addons bumped to attempt to resolve issues with graphical reports.
- jspdf and addons bumped due to vulnerabilities.  It's still be broken however.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
c60d81dd88 Removed escaping of data
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
141a644d14 Summary Taxes Report fix
- Added name to group by to satisfy only full groupby settings
- Added commented replacement of the query using query builder which is buggy. See https://forum.codeigniter.com/showthread.php?tid=90756&pid=418212#pid418212

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
84e01d14c6 Summary Reports fix
- Converted query to use QueryBuilder for security.
- Reworked code to generate a BaseBuilder instance and pass it.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
SpookedByRoaches
3d163e1969 Fix for attribute addition for items 2024-06-15 17:19:15 +02:00
WShells
a105308ad4 Fix for Edit Sales Receipt Details
Modal not displaying
2024-06-15 17:19:15 +02:00
WShells
70f464c094 Gift Card edit
Refining code to ensure consistency among other sections.
Replacing FILTER_SANITIZE_NUMBER_FLOAT as it's removing all other chars
2024-06-15 17:19:15 +02:00
WShells
95a1d0b4f1 Fix for Receivings Receipt display
Receivings receipt returning the following errors:
. Param count in the URI are greater than the controller method
. ($supplier_id) must be of type int
2024-06-15 17:19:15 +02:00
WShells
32c05b475d Fix for Receivings Edit form
Receiving form wasn't popping up for update.
2024-06-15 17:19:15 +02:00
WShells
e779ac8a79 Fix for Low Inventory Report
. Param count in the URI are greater than the controller method params.
Now displaying and listing items as needed
2024-06-15 17:19:15 +02:00
objecttothis
80e83448ee Minor formating fix
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
34503b73b8 Fixing Reports
- Corrected sale_time data

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
35e3adeca8 Fixing Reports
- Added checks for array keys not set
- Renamed functions so that reports would generate
- Minor reformatting
- Added sale_id to the groupBy() call to remove error when only full group by is enabled.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
658a9ce553 Fixing routes
- Refactored function name to match the route.
- Added null check on sale date.
- enabled escaping in bootstrap-tables
- removed the esc() function from the

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
6b44aea1c5 Fixing routes
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
WShells
9c0d597159 Fix for invoice barcode 2024-06-15 17:19:15 +02:00
WShells
9516073084 Fix for line break in invoice 2024-06-15 17:19:15 +02:00
WShells
128ac0c63e Fix for New Kit
Fix new kit modal not displaying expecting int
2024-06-15 17:19:15 +02:00
WShells
ffa92dd37c Fix for Receipt & Invoice Reprint / Display through Daily Sales
The param count in the URI are greater than the controller method params. Handler:\App\Controllers\Sales::getIndex
2024-06-15 17:19:15 +02:00
WShells
3d88d1a387 Fix For Gift Card: Always displaying invalid when generated randomly
Upon creating a new gift card and using it to complete the sales alphabetical identifiers are being removed due to FILTER_SANITIZE_NUMBER_FLOAT thus detecting gift card as invalid.
This is a fix unless we should rewrite it in a different way.
2024-06-15 17:19:15 +02:00
WShells
77420083ef Fix for Gift Card Number Display
Gift card number field wasn't displaying
2024-06-15 17:19:15 +02:00
WShells
f5bc497602 Fix for Sale Suspend/Unsuspend 2024-06-15 17:19:15 +02:00
WShells
f75c7fad15 Fix for Sale Suspend/Unsuspend 2024-06-15 17:19:15 +02:00
jekkos
1f2d2efbc2 Set default timezone to UTC 2024-06-15 17:19:15 +02:00
WShells
e07cfd4143 Fix for Shortcuts
Keyboard Shortcuts Help modl returning 404 / not displaying
2024-06-15 17:19:15 +02:00
WShells
9fc2a4edbd Refactoring Change Register Mode
Switched from conditional if stmt to case
2024-06-15 17:19:15 +02:00
WShells
ec283e24dc Fix for Gift Cards creation
($value) must be of type string, int given
Unable to load view upon new gift card creation
2024-06-15 17:19:15 +02:00
WShells
b2f5a94859 Fix for Quantity Update in Register
($decimal) must be of type string, null given
2024-06-15 17:19:15 +02:00
WShells
75f435787c Fix for Update Inventory
Update inventory form ( Adding/Subtracting Qty )
2024-06-15 17:19:15 +02:00
WShells
5e55296ea7 Fix for Item Update in Items
Qty Per Pack: ($decimal) must be of type string, null given
2024-06-15 17:19:15 +02:00
objecttothis
9d083f2fe7 Fixing routes
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
b07051e448 Fixing routes
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
WShells
9508770f47 Fix for Serialnumber & Discount Type
($discount_type) must be of type int
($serialnumber) must be of type string
2024-06-15 17:19:15 +02:00
objecttothis
9ad99a92e0 Cast tax code id's to string
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
57755a338d Routes change
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
WShells
18d0345370 Adding item to sales fix 2024-06-15 17:19:15 +02:00
objecttothis
b593de9f83 Receivings Bugfixes
- Fixed incorrect variable name
- Return empty string on null
- Added return types for mixed return functions

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
5500d3989f Filtering
- Added filtering to decimals which may have different comma separator
- Added formatting of decimals before concatenating into string
- Cast int to string in form_hidden() call

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
73cec25468 Clean up code
- Removed unneeded use statements

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
8197e1918a - Refactor file name to match class name.
- Updated autoload in composer.json to reflect actual structure.
- Removed unneeded use statements

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
665ef5aeef - Updated .gitattributes to automatically convert line endings on commit to LF.
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
e8c6d7e01d - Updated .gitattributes to automatically convert line endings on commit to LF.
- Changed Line endings.
- Prepared Decimals before filtering them for number_float.
- Refactored variable names
- Reworked code for clarity
- Added empty check to POST var.
- Removed unneeded code.
- Removed old TODO.
- changed POST variable check to !empty

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
730d01fb74 CI 4.5.1 fixes
Changed .editorconfig
- Force lf line endings for compatibility with all systems.

Fixed Login
- Removed strtolower() call because getMethod() now returns all uppercase

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
d8ec3a4c6c Changed .editorconfig
- Force lf line endings for compatibility with all systems.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
09f84526ac Added missing filters
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
865044f114 Bump CodeIgniter to 4.5.1
- CodeIgniter 4.5.1
- PSR/Log 3.0.0
- PHP >= 8.1
- Replaced mandatory files.
- Modified breaking change code.
- Modified updated code.
- Added missing files.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
00fed097b0 Update .env template 2024-06-15 17:19:15 +02:00
objecttothis
4c689ec6fd Bump CodeIgniter to 4.5.1
- CodeIgniter 4.5.1
- PSR/Log 3.0.0
- PHP >= 8.1
- Replaced mandatory files.
- Modified breaking change code.
- Modified updated code.
- Added missing files.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
68d3482065 Attribute item form and decimal fixes
- Updated formatting to reflect standard
- Wrapped Decimal type in to_decimals() function for localization
- Fixed function name
- Removed unneeded TODO
- Fixed problems with sales register not receiving decimals with comma for separator properly.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
9428d1cd61 Attribute item form
- Updated formatting to reflect standard
- Wrapped Decimal type in to_decimals() function for localization

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
34476ce374 Bump CI4 to 4.4.8
- Merged changed files since 4.4.8
- Fixed Breaking changes

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
79812c5982 Fixing accidentally deleted line of code
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
c71c75d69f - Minor HTML formatting
Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
34246ee885 Prepped barcode for being able to be set by width. 2024-06-15 17:19:15 +02:00
objecttothis
21c84efd2d Formatting
- Added missing ; to "nbsp"
- Remove filtering from checkbox items in controller
- Added null check to checkboxes in controller
- Fixed function naming to avoid 404
- Removed escaping from fixed urls
- Removed esc() wrapping around site_url() which already returns escaped urls.
2024-06-15 17:19:15 +02:00
objecttothis
e71c035671 Formatting
- Made view CI form helper function call format uniform.
- replaced calls to array() with []
- Placed { on its own line
- Removed empty lines where there shouldn't be any.
- Replaced text/javascript with application/javascript as the former is deprecated
2024-06-15 17:19:15 +02:00
odiea
27a4ccdff6 Update Persons.php (#3962)
Back to the original
2024-06-15 17:19:15 +02:00
odiea
ab88f1eec1 Update Persons.php (#3961)
added use Tamtamchik\NameCase\Formatter;
2024-06-15 17:19:15 +02:00
odiea
0f33c399a9 Changed < 0 to == NEW_ENTRY (#3960)
* Update Cashup.php

If(!count_only) was causing the table view to not show properly.

* Update Cashups.php

empty it must not be.

* Update Cashups.php

* Update Expenses.php

* Update Persons.php
2024-06-15 17:19:15 +02:00
odiea
9f78a8a075 Changes to Cash_up and Cash_ups for better date feature and Table view to show data (#3958)
* Update Cashup.php

If(!count_only) was causing the table view to not show properly.

* Update Cashups.php

empty it must not be.
2024-06-15 17:19:15 +02:00
objecttothis
c1c2e9df77 Bumped bootstrap-table to 1.22.4 2024-06-15 17:19:15 +02:00
objecttothis
3d6f0a912a Removed escaping
- Removed escaping from anchor() functions
- Removed escaping from form_helper functions
- added context
2024-06-15 17:19:15 +02:00
objecttothis
6d37414444 Removed escaping 2024-06-15 17:19:15 +02:00
objecttothis
a6b674e995 Barcode & escaping
- Removed overflow-visible as it is not needed.
- Bumped TamTamChik/nameCase to latest.
- Workaround to prevent nameCase from capitalizing the first letter of html entities
- Autoload security_helper.php
- Develop means of escaping outputs without encoding characters we don't want encoded.
- proof of concept in form_basic_info.php
2024-06-15 17:19:15 +02:00
odiea
a2df771f19 Update Customers.php
To keep coding the same
2024-06-15 17:19:15 +02:00
odiea
9926577b2f Update Suppliers.php
this allows correct sorting
2024-06-15 17:19:15 +02:00
odiea
5b8ccb6e2a Update Supplier.php (#3952)
* Update Supplier.php

Only way I could get supplier Category to show properly

* Update receipt.php

This changes display to show Address and New Barcode correctly
2024-06-15 17:19:15 +02:00
objecttothis
e327bb3780 Suppliers Fixes
- Added html_entity_decode() to outputs which had been html encoded
- Added escaping of direct data from the database.
2024-06-15 17:19:15 +02:00
objecttothis
b42d43d71d Change generated Barcodes to SVG 2024-06-15 17:19:15 +02:00
odiea
3555de87f6 Item Kits updates for form and Barcodes to show (#3949)
* Update Item_kits.php

* Update Item_kits.php Barcode Issue

public function Generate Barcodes
changed Code to just c and it started working
2024-06-15 17:19:15 +02:00
objecttothis
0fbbc26ab6 Convert Barcode to new Types 2024-06-15 17:19:15 +02:00
objecttothis
68d6479f0d Decimal changes
- Format percentage per locale rules
- Format sequence as integer, not per quantity rules
- Minor formatting changes
2024-06-15 17:19:15 +02:00
objecttothis
7356500d86 - Fixed missing call to helper and helper function
- Format percentage per locale rules
- Moved constants to Constants.php
- Added PHPdoc comments
- Refactor code for clarity and simplicity.
- Added decimal formatting per locale for display.
- autoload locale helper
- Remove unneeded calls to helpers
- Removed unneeded comments
- fixed errors causing checks in parse_decimals to return false due to locales which use a comma.
2024-06-15 17:19:15 +02:00
objecttothis
7cb9ffd7aa Formattings
- Format of ternary changed for readability
- Corrected CSS to use : instead of =
- Removed Label for item name to allow more text
2024-06-15 17:19:15 +02:00
objecttothis
453ee6c061 Formattings
- Format of ternary changed for readability
- Corrected CSS to use : instead of =
2024-06-15 17:19:15 +02:00
objecttothis
a5b5fccd5e Barcode Changes
- Strip out old code
- Added missing variable declaration
2024-06-15 17:19:15 +02:00
objecttothis
20828ea421 Barcode Changes
- Barcode content is item_id if barcode_number is empty.
- Styling fixes
- Bump picquer/php-barcode-generator version to 2.4.0
- Ported over Receipt Barcode Generation
2024-06-15 17:19:15 +02:00
odiea
5d1670fe65 Update Config.php (#3944)
Remove /Name from config language
2024-06-15 17:19:15 +02:00
odiea
2446b23f6e Update general_config.php (#3942) 2024-06-15 17:19:15 +02:00
odiea
c4d293b1a0 Update Customer form.php 2024-06-15 17:19:15 +02:00
objecttothis
24fd80e4fd Barcode Changes
- Removed mixed type-hint
- Replacing emberlabs code with picquer/php-barcode-generator
2024-06-15 17:19:15 +02:00
objecttothis
183f2472eb Fixed issues related to barcode generation 2024-06-15 17:19:15 +02:00
objecttothis
bf167a06b6 Removed log_message() call for debugging 2024-06-15 17:19:15 +02:00
objecttothis
b4b0b5ff8b CodeIgniter 4.4.5 version bump
- Corrected syntax to allow all 8.x versions of PHP in composer.json
- Bumped CodeIgniter from 4.4.3 to 4.4.5
- Bumped Code from 4.4.3 format to 4.4.4 format
2024-06-15 17:19:15 +02:00
objecttothis
5b725d04d5 Company logo upload
- Added conversion to migration file for delimiter in image_allowed_types
- Corrected business logic for image upload in items form.
- Removed log message used for debugging.
- Replaced '|' with ',' in image_allowed_types save/populate.
2024-06-15 17:19:15 +02:00
objecttothis
5c0325511c Company logo upload
- Corrected errors uploading file
- Renamed remove_logo for proper routing
- Corrected name
- Assigned file extension based on guessFileExtension() for security
- Don't call file upload if no file was specified
- added missing jpeg mime type
- fixed company logo change
2024-06-15 17:19:15 +02:00
objecttothis
a5296e81bb Bump PHP require version range 2024-06-15 17:19:15 +02:00
jekkos
204734570b Inline docker-mysql (#3826)
Fix database.sql mapping
2024-06-15 17:19:15 +02:00
jekkos
cefd200b29 Add suggestion for receiving validation (#3878) 2024-06-15 17:19:15 +02:00
objecttothis
61cc93ab57 Updated helper
- Removed TODO which is already a github issue (https://github.com/opensourcepos/opensourcepos/issues/3833)
- Removed call to auto_detect_line_endings which was deprecated in php 8.1. This only negatively affects files created using macOS 9 or earlier which had an EOL in 2002.
- Updated PHPdoc comments
- Removed unnecessary comments
2024-06-15 17:19:15 +02:00
objecttothis
a810100ca1 Added check to javascript
- Checks to see if response.id is undefined before trying to call toString() against it.
2024-06-15 17:19:15 +02:00
objecttothis
34bc4540bf Added Error log
- Logs message when error encountered during Customers CSV Import
2024-06-15 17:19:15 +02:00
jekkos
b25273ceee Fix docker compose version (#3826) 2024-06-15 17:19:15 +02:00
jekkos
a4b3469369 Fix user/groupadd in container (#3826) 2024-06-15 17:19:15 +02:00
jekkos
84f3bd3bfb Add docker build args (#3826) 2024-06-15 17:19:15 +02:00
Doug Hutcheson
9315d56408 ci4-bugfix to stock locations and item csv import
Stock locations are now being handled correctly in the Configuration stock page, due to a fix to Models/Stock_locations.php  and imports to stock locations from csv are now working due to a correction to Controllers/Items.php
2024-06-15 17:19:15 +02:00
Doug Hutcheson
b36ef3a603 ci4-bugfix to items customers and attributes
Attributes: Noticed log_message() being called with uppercase letters in the level which causes errors in the system; Customers: improved the layout of the stats page in the information dialog issue 3892; Items: got csv import working issue 3896 and bulk edits working - barcode generation does not work yet.
2024-06-15 17:19:15 +02:00
jekkos
fba33ed995 Update packaga-lock.json (#3923) 2024-06-15 17:19:15 +02:00
jekkos
c0cdff7e11 Fix reference to chartist-tooltip (#3923) 2024-06-15 17:19:15 +02:00
objecttothis
cb1b269d7a Datepicker fixes
- Updated datepicker_locale.php to prevent array/string conversion.
- changed bootstrap-datepicker_locale version in package.json to specify which version.
- Changed bootstrap-table back to latest since the github commit did not resolve the issue.
2024-06-15 17:19:15 +02:00
Doug Hutcheson
c01b514596 ci4-bugfix further corrections for lang calls
These files have been patched to correct anomalies in the calls to lang().
2024-06-15 17:19:15 +02:00
Doug Hutcheson
f7bb778351 ci4-bugfix ucase first letter of controller name
Many labels were not picking up the language stings because the langauge file name was being passes to lang() without an uppercase first letter.
2024-06-15 17:19:15 +02:00
Doug Hutcheson
c6d51bff04 ci4 bug fix Sales controller_name and Receivings function name
In Views/sales/register.php two button labels did not show the correct language strings, because the variable '$controller_name' was passed to lang(), but this needed to be given literally as 'Sales'. In Views/receivings/receiving.php, the suggested items autocomplete function was called as stock_item_search and needed to be changed to stockItemSearch. There is also an almost identical function itemSearch, which may indicate that one of the two is redundant and should be pruned, but without documentation to guide me I am unwilling to do that at this time.
2024-06-15 17:19:15 +02:00
jekkos
de9038f450 Remove free query + update CSP (#3885) 2024-06-15 17:19:15 +02:00
jekkos
09bf4d2f31 Update npm dependencies (#3909) 2024-06-15 17:19:15 +02:00
jekkos
7523c0fed8 Fix bstables to commit ca85b98 2024-06-15 17:19:15 +02:00
jekkos
ff4ef97b25 Add back debian base layer in Dockerfile (#3875) 2024-06-15 17:19:15 +02:00
jekkos
5e3fa3c580 Map uid in container (#3875) 2024-06-15 17:19:15 +02:00
jekkos
0669428026 Bump bstables (#3854) 2024-06-15 17:19:15 +02:00
jekkos
9f2474e156 Use loading animation only (#3891) 2024-06-15 17:19:15 +02:00
Doug Hutcheson
9723e82b61 CI4 bug fixes on behalf of DEV-byoos 3776
Changes to Controllers/Receivings.php and Controllers/Sales.php identified by @DEV-byoos, plus a change to Controllers/Customers.php to deal with the new way PHP 8.2 handles missing array keys.
2024-06-15 17:19:15 +02:00
jekkos
8457f1460e Replace Cal. with Calendar (#3864) 2024-06-15 17:19:15 +02:00
jekkos
1789311299 Strip prefix in calendar files (#3864) 2024-06-15 17:19:15 +02:00
jekkos
6b8d788185 Add english calendar language files (#3864) 2024-06-15 17:19:15 +02:00
jekkos
dedb6f9836 Add calendar language files (#3864) 2024-06-15 17:19:15 +02:00
jekkos
c20153aa00 Sync language files (#3468) 2024-06-15 17:19:15 +02:00
jekkos
245dcd2dd1 Add missing docker-mysql.yml (#3826) 2024-06-15 17:19:15 +02:00
jekkos
33a6356cc4 Create backup folder if it does not exist (#3826) 2024-06-15 17:19:15 +02:00
jekkos
8dbb8f8f69 Enable docker config override (#3908) 2024-06-15 17:19:15 +02:00
jekkos
60c3a9a96f Remove stale .bowerrc, update INSTALL.md 2024-06-15 17:19:15 +02:00
jekkos
b4fea6dddc Fix database.sql mount (#3875) 2024-06-15 17:19:15 +02:00
jekkos
681ec28131 Add .git to .dockerignore
This decreases docker image size locally by 700MB
2024-06-15 17:19:15 +02:00
jekkos
cd3581ce28 Try to build with default travis docker (#3875) 2024-06-15 17:19:15 +02:00
jekkos
b89faa3a94 Add back debian base layer in Dockerfile (#3875) 2024-06-15 17:19:15 +02:00
objecttothis
60a5bfdc9a Corrected Function names for routes
- generate_barcode function name changes in Controllers
- generate_barcode function name calls in views
- Added PHPdocs
2024-06-15 17:19:15 +02:00
objecttothis
47341f1a07 Bump tableexport.jquery.plugin
- New version 1.28.0
2024-06-15 17:19:15 +02:00
objecttothis
29d0703426 Fixed report error
- can_show_report() was returning an unexpected value.
2024-06-15 17:19:15 +02:00
objecttothis
ff676aeb93 Fixes
- Removed XLSX export format due to errors.
- Upgraded Fakerphp to try to resolve datepicker issues.
- Attempted to fix datepicker language issues.
- Removed duplicate Sunday in the picker.
2024-06-15 17:19:15 +02:00
objecttothis
05d39ff896 Attempts at correcting problem with JSPDF 2024-06-15 17:19:15 +02:00
objecttothis
b5f93b6325 Fixed Customer CSV import
- Corrected function name for CI4
- Removed trailing whitespace
2024-06-15 17:19:15 +02:00
objecttothis
2efda51309 Fixes
- Removed unneeded use statements
- Corrected function name for routes
- Moved import_customers.csv to writable folder to prevent unauthorized access
- Added return to function to force download
2024-06-15 17:19:15 +02:00
objecttothis
728a6a67e0 Fixed incorrect verb 2024-06-15 17:19:15 +02:00
objecttothis
ae44e38855 Dependencies
- Updated bootstrap-table
- Updated jquery
- Refactored local variable name
- fixed problem with null being sent on no filters
- fixed incorrect reference in view of variables
2024-06-15 17:19:15 +02:00
objecttothis
f662f45bf7 bootstrap-table
- Updated dependency
- Added XLSX format to export formats.
2024-06-15 17:19:15 +02:00
objecttothis
ac3a11c6a3 Corrected ID
- company_name id was overriding in the CSS so that text in the form was 150% and bold.  Changed the ID field
2024-06-15 17:19:15 +02:00
objecttothis
d18d2cf814 PHPdocs
- Removed unnecessary ReflectionException in PHPdoc
- Corrected return details of insert function
- Replaced deprecated class
- Removed Inventory model's insert function because it wasn't providing functionality that the Model class wasn't.
- Corrected the calling method signature for Inventory->insert()
2024-06-15 17:19:15 +02:00
objecttothis
cc58cecff0 Compatibility changes
- Removed `mixed` function return type from some functions for backward compatibility with php 7.4
- Refactored string concatination for readability.
- Added TODO for later
- Corrected PHPdocs
- Removed unneeded TODO
- Refactored function names with mixed snake and pascal case names
2024-06-15 17:19:15 +02:00
objecttothis
ba9bcd7786 PHPdocs
- Added missing PHPdocs
- Corrected Syntax
- Added noinspection parameters to PHPdoc for AJAX called functions
- Added missing function return types
- Added missing parameter types
- Added public keyword to functions without visibility modifier
- Corrected incorrectly formatted PHPdocs
- Added public to constants and functions missing a visibility keyword
2024-06-15 17:19:15 +02:00
objecttothis
88007f56be Fixed enforce_privacy checkbox 2024-06-15 17:19:15 +02:00
objecttothis
4a23adbb2f Corrected Function call
- setAttribute() expects the second parameter to be an int or float. setTextAttribute() resolves this.
- Added TODO
2024-06-15 17:19:15 +02:00
objecttothis
2245aacf81 Refactoring
- Minor formatting fix
- Refactored function name for clarity
- Corrected name of route
2024-06-15 17:19:15 +02:00
objecttothis
a8d67895e7 Remove debugging log_message() references 2024-06-15 17:19:15 +02:00
objecttothis
2a3317a270 Removed htmlspecialchars() calls 2024-06-15 17:19:15 +02:00
objecttothis
1dfa428989 Fixed bug causing checkbox not to populate
- The two values set for show_office_group in the database are 0 and 999. Testing for 1 will always leave the checkbox disabled.
2024-06-15 17:19:15 +02:00
objecttothis
01512b0835 Fixed incorrectly named function for route. 2024-06-15 17:19:15 +02:00
objecttothis
3e3da57543 Fixed multiselect form issues
- Missing `[]` in name of multiselect form.
2024-06-15 17:19:15 +02:00
odiea
d5c767aeb9 Update Config.php (#3884) 2024-06-15 17:19:15 +02:00
objecttothis
7124e4ca5f Minor changes and fixes
- Convert space to tab indents
- Fix location of company_logo file to uploads
2024-06-15 17:19:15 +02:00
objecttothis
c8773ad7b1 Formatting fixes
- Convert space to tab indents
2024-06-15 17:19:15 +02:00
objecttothis
7b224be665 PSR compliance and formatting changes
- Replaced TRUE/FALSE constants with true/false keywords
- Replaced NULL constant with null keyword
- Replaced `<?php echo` in views with shortened `<?=`
- Added missing variable declaration
- Added missing function return type in declaration
- replaced `== true`, `== false`, `=== true` and `=== false` in if statements with simplified forms
2024-06-15 17:19:15 +02:00
objecttothis
588f96a945 Added missing return type to function 2024-06-15 17:19:15 +02:00
objecttothis
0754f2f6e6 Fix Request variable retrieval
- getSearch functions to properly retrieve HTTP vars.
- getVar() function calls replaced with getGet() or getPost()
- replaced TRUE/FALSE constants with true/false keywords
2024-06-15 17:19:15 +02:00
objecttothis
48c04417b8 Fixes
- PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
- Add Elvis operator to set search string to an empty string when it's value is null to get rid of an error in the search function call.
- Imported class for OSPOS config
- Replaced private with protected in parent controller's property.
- Removed unneeded TODO
- Refactored local variables
- Replaced ternary notation
- Removed unneeded comments
- Removed unneeded class property
- Removed unneeded @property declarations
- Fixed database version
2024-06-15 17:19:15 +02:00
objecttothis
70ee1ed36e Declared class properties
PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
2024-06-15 17:19:15 +02:00
objecttothis
283ee4d7c6 Corrected Problems
- Add missing use statement
- Remove log messages used for debug
2024-06-15 17:19:15 +02:00
objecttothis
0a527abfa0 Corrected Problems
- Corrected type of config property.
- Added property declarations.
2024-06-15 17:19:15 +02:00
objecttothis
3890f50e77 Corrected Problems
- Added types to config.
- Added formatting to DB_log messages
- Corrected bug referencing non-existent OSPOS config property timezone
- set the date_default_timezone to the php-specified default when timezone is not set in the app rather than 'America/New York'
- Added TODO indicating problem.
2024-06-15 17:19:15 +02:00
objecttothis
c4cd60ad58 Update .env
- Corrected order.
- Added db_log_only_long boolean
2024-06-15 17:19:15 +02:00
objecttothis
3da79fc47c Added long running query tag
- Now if queries run for longer than 0.5 s, a tag will be appended to the log [LONG RUNNING QUERY]
- If app.db_log_only_long is set to true in the .env file, the db log will only show long running queries.
2024-06-15 17:19:15 +02:00
objecttothis
e90029dea6 Changed db log file type
- It's inaccurate to log these as .php files since they do not contain php.
2024-06-15 17:19:15 +02:00
objecttothis
ad9645020c Database Logging fixes
- Corrected the event listener names. `post_controller` no longer exists.
- Corrected the db_log_queries function to pull just the most recent query
- Added function to convert time into a more easily understood unit when small
2024-06-15 17:19:15 +02:00
objecttothis
2bb4b7c865 Formatting and naming refactor
- Added `@noinspection PhpUnused` tags to PHPdocs for functions which are called via AJAX.
- removed conversion to array in getResult in favor of returning an array to begin with.
- Refactored variable for clarity.
- declared variable in view coming from controller
- Added PHPdocs
- Refactored nested if/else statements into ternary notation.
- Corrected tab type
- added missing model declaration in view
- Modified query builder to extrapolate out the set() command for clarity
2024-06-15 17:19:15 +02:00
objecttothis
c971e025b8 Fix gitignore
- Removed ignore from master .gitignore
- Added .gitignore to item_pics directory.
- Added .gitignore to uploads directory.
2024-06-15 17:19:15 +02:00
jekkos
05372b96cc Fix string escape (#3468) 2024-06-15 17:19:15 +02:00
objecttothis
086a90b04d Code fixes
- Added PHPdoc tags for the IDE to ignore unused function inspections on AJAX calls.
- set TRUE, FALSE, NULL to true, false, null for PSR-2,12 compliance
2024-06-15 17:19:15 +02:00
objecttothis
6074d984ed Code fixes
- Replaced ternary notation with null coalescing version.
- Removed unnecessary semi-colon
- Replaced `<? echo` with short echo ``<?=`
- declared stay_open explicitly with `let`
- Updated PHPdocs
- Replaced force_download() from the CI3 download helper with CI4 version
- Removed unneeded using statements
- added needed call to db_connect()
- Removed parameter that matches the default value since it's redundant.
2024-06-15 17:19:15 +02:00
objecttothis
20bbe8c783 Formatting fixes 2024-06-15 17:19:15 +02:00
objecttothis
a5cdbe4523 Attributes fixes and warning removal
- Declared variable in view coming down from controller
- refactored javascript variable name to remove duplicate declaration warning
- Import missing class
2024-06-15 17:19:15 +02:00
objecttothis
405583c832 Attributes fixes and warning removal
- when the payments array was folded into sale_data there was an earlier payments[] reference in the foreach loop that didn't get folded in.
- Update PHPdoc
- Added ::class to remove polymorphic call warning
- Removed unreachable 'break;' statement after return statement.
- Added missing return type
- fixed missing assignment of mailchimp_api_key
2024-06-15 17:19:15 +02:00
objecttothis
6a316c56f6 Attributes fixes and warning removal
- missing return type in Events->load_config(), added void
- Dynamic property creation is deprecated starting in php 8.2. The solution is to declare the property in the class before using it.
- Added ::class to model instantiations to remove "potentially polymorphic call" warnings
- Corrected phpdoc
2024-06-15 17:19:15 +02:00
objecttothis
54f5b6fa8f Downgraded laminas/laminas-escaper
- 2.13 drops support for php 7.4 and 8.0
- Fixed 2.12 support for now
2024-06-15 17:19:15 +02:00
objecttothis
e5dcdd5970 Attributes queries fixes
- Minor formatting fixes
- Adding back bitwise equals into query using RawSql()
- Corrected GET method to POST
- Removed if statement causing no attribute values
- Removed param in get() from CI3
- Changed setAttribute to setTextAttribute
- Replaced NULL constant with null keyword PSR-2,12
- Replaced TRUE/FALSE constants with true/false keywords PSR-2,12
- explicit cast to get rid of deprecation warning
2024-06-15 17:19:15 +02:00
jekkos
6b7608fd62 Fix bootstrap tables prefix in conversion 2024-06-15 17:19:15 +02:00
jekkos
43c37da01a Sync language files (#3468) 2024-06-15 17:19:15 +02:00
objecttothis
af21beb19e Resolve issue with item_pics
- item_pics were being escaped by bootstrap-table
2024-06-15 17:19:15 +02:00
objecttothis
0de0f3ec89 bump bootstrap5
- bootstrap5 to 5.3.2
- bootswatch5 to 5.3.2
2024-06-15 17:19:15 +02:00
objecttothis
aa5bfd9b18 bump readable-stream to 4.4.2 2024-06-15 17:19:15 +02:00
objecttothis
3536454638 bump gulp-debug to 5.0.1 2024-06-15 17:19:15 +02:00
objecttothis
08f1318268 bump npm-check-updates to 16.14.6 2024-06-15 17:19:15 +02:00
objecttothis
397194f2ca ignore files in uploads 2024-06-15 17:19:15 +02:00
objecttothis
75d66f62c0 ignore webp files 2024-06-15 17:19:15 +02:00
objecttothis
b19b4818e3 Roll back committed injections 2024-06-15 17:19:15 +02:00
objecttothis
2601fbb7b0 Formatting fixes
- Removed TODOs
- String Interpolation
- Changed quotes in html to match the rest of code
2024-06-15 17:19:15 +02:00
objecttothis
e8e3073553 - Converted statement to ternary notation for readability
- Removed space
- Removed TODO
- Added TODO
2024-06-15 17:19:15 +02:00
objecttothis
6c6b1cb4bc gitignore transient files 2024-06-15 17:19:15 +02:00
objecttothis
8081a98243 gitignore debugbar 2024-06-15 17:19:15 +02:00
objecttothis
3025615ff8 gitignore logs 2024-06-15 17:19:15 +02:00
objecttothis
2fa3ef3c30 Removed non-existent folders from gitignore 2024-06-15 17:19:15 +02:00
objecttothis
aa5fd5d0aa Fixed Thumbnail Generation Endpoint
- String interpolation
- Removed TODO
- Reworked thumbnail creation for CI4
- Corrected capitalization in calling function URL
- Added send() to return the HTTP response
2024-06-15 17:19:15 +02:00
objecttothis
f661284612 fixed out of range segment 2024-06-15 17:19:15 +02:00
objecttothis
fd77dcfc5e Syntax errors
- Deleted extra closing parenthesis
2024-06-15 17:19:15 +02:00
objecttothis
c5c4a528b4 Fixed incorrect session table name 2024-06-15 17:19:15 +02:00
objecttothis
85de6adadb Upgrade CI to 4.4.3
- Bump composer.json/lock to codeigniter 4.4.3
- Fix base_url() call without arguments
- Updated files in the project space
- Bump composer.json/lock to kint 5.0.4
- Update composer.json to include missing CI elements
- Corrected composer.json regarding minimum versions
- Updated README.md to reflect CI4 implementation
- Migrated some Routes.php to Routing.php
- Removed deprecated settings from Config/App.php
2024-06-15 17:19:15 +02:00
objecttothis
93a3788467 Replaced BASEPATH with FCPATH 2024-06-15 17:19:15 +02:00
objecttothis
62cfc67779 add location to gitignore 2024-06-15 17:19:15 +02:00
objecttothis
3072b4c1c0 Remove location from gitignore 2024-06-15 17:19:15 +02:00
jekkos
2c4a2f7af1 Remove Gruntfile.js + bower.json (#3842) 2024-06-15 17:19:15 +02:00
objecttothis
7d791ba59f Corrected keys for Bootstrap_tables.php 2024-06-15 17:19:15 +02:00
objecttothis
74210bead5 Bump to allow php 8.1 2024-06-15 17:19:15 +02:00
Doug Hutcheson
044170b2b1 CI4: Bugfix test sanity of config item
Add a !empty test when dereferencing mailchimp_api_key and mailchimp_list_id from the config array.
2024-06-15 17:19:15 +02:00
Doug Hutcheson
8ea5fc5078 CI4: Bugfix to correct two config issues
Adds 'payment_message' to the app_config table and corrects a typo in Views/login.php where 'Login.form' should have been 'login_form'.
2024-06-15 17:19:15 +02:00
jekkos
b4d117011a Add CI4 language migration scripts (#3468) 2024-06-15 17:19:15 +02:00
Doug Hutcheson
1a465621e0 Ci4 bugfix string interpolation (#3836)
* CI4: Bugfix string interpolation language files

These are the language files with all placeholders converted to CI4 numbered style eg {0}.

* CI4: Bugfix string interpolation source code files

These are the controllers and views which call lang() with parameters to be interpolated.

* CI4: Bugfix string interpolation shell scripts

These are the Linux bash scripts which use the sed (stream editor) utility to convert earlier forms of placeholders to CI4 numeric type. A number of typographical errors in the original Language files were corrected by these scripts.
2024-06-15 17:19:15 +02:00
Edwin Smith
af51e4c735 Clean up work on reports listing view and lang() methods (#3707)
* reworked reports and listing page to handle lang() functions in CI_4

* removed old methods

* update code style

* updated bracket style

---------

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2024-06-15 17:19:15 +02:00
Doug Hutcheson
310585d8af CI4: Bugfix - add function to remove .env.bak issue #3826
Added function remove_backup() to security_helper.php. Added a call to this from the two places that call check_encryption where the backup is created. Added more defensive code to Config.php to ensure the encrypter  objectexists before it is called to avoid a crash.
2024-06-15 17:19:15 +02:00
jekkos
3690296766 Add CI4 coding standards linter 2024-06-15 17:19:15 +02:00
Doug Hutcheson
9b86ddaac0 CI4: string interpolation changes (#3811)
* Initial setup in a new environment

The result of running the npm build and editing the .env file

* Revert "Initial setup in a new environment"

This reverts commit 23e06dea7f.

* Language interpolation update

I have edited all the interpolations in the en-US tree. To be consistent in using named parameters and not just positional numbers, I also edited the relevant lines in two controllers (Sales.php and Items.php) to send named variables to the lang() calls. The language string 'Sales.invoice_number_duplicate' contains an interploation for 'invoice_number'. This is sent when used by Controllers/Sales.php, but not sent when used by Views/sales/form.php, which means that string will contain a double space where the invoice number should be. The language string 'Customers.csv_import_partially_failed' contains no interpolations but two parameters are not being sent where it is used by Controllers/Customers.php. The string appears to be a near duplicate of 'Items.csv_import_partially_failed' which contains two interpolations. Either the Customers controller needs to be edited, or the Customers language string needs to be revised to look like the Items string.

---------

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2024-06-15 17:19:15 +02:00
jekkos
d47143bfef Reinstate en-US files (#3468) 2024-06-15 17:19:15 +02:00
objecttothis
76cefada53 added note about intl 2024-06-15 17:19:15 +02:00
jekkos
2b7e37c8d9 Revert to last working Dockerfile (#3584) 2024-06-15 17:19:15 +02:00
Steve Ireland
78a6316062 Correct dockerignore to pick up changes to path folder names. 2024-06-15 17:19:15 +02:00
jekkos
9e182c323b Add back database Dockerfile (#3584) 2024-06-15 17:19:15 +02:00
Steve Ireland
477ceb2317 In Token_lib change App\Models\tokens\Token to App\Models\Tokens\Toke 2024-06-15 17:19:15 +02:00
jekkos
24539101d2 Bump docker base image to php8 2024-06-15 17:19:15 +02:00
Steve Ireland
f5094d62a2 Restore the tables.sql to its virgin state. 2024-06-15 17:19:15 +02:00
jarebear6expepjozn6rakjq5iczi3irqwphcvbswgkahd6b6twnxxid
a2610c3bc9 update int(1) columns in _customers and _cash_up tables to use tinyint (#3709) 2024-06-15 17:19:15 +02:00
Steve Ireland
4798041408 Tack on the void return type onto the Employee:logout method. 2024-06-15 17:19:15 +02:00
objecttothis
1d87de6f7d Sales MVC
- Added todo to Stock_location.php
- make library function return nullable
- Added missing model instantiation
- Commented out Sale model instantiation in library because it's causing infinite loop
- Changed function name prepending get and post required by CI4 autorouting
2024-06-15 17:19:15 +02:00
Steve Ireland
13a14ec310 Remove grunt045 from zipped opensourcepos file. Also fix the call to array_walker since the parameters (even if not used) are validated in PHP 8. 2024-06-15 17:19:15 +02:00
objecttothis
8d80f5a261 CI4 bugfixes
- Added session variable instantiation where needed.
- Added tabular helper to autoload
- removed tabular helper reference where no longer needed.
- Remove esc() references where it was causing display problems.
- Remove excess whitespace on blank line
- Remove unecessary using reference
- Make parameters for dinner table functions nullable
2024-06-15 17:19:15 +02:00
Steve Ireland
145930ce5b Mostly clean up the build documentation, but also corrects an error in the creation of the database script that supports migration from phppos 2024-06-15 17:19:15 +02:00
objecttothis
525c65ffb3 Convert encryption to CI4
- automatic upgrade of encryption key.
- automatic decryption of CI3 data, then re-encryption in CI4 and update of table.
- Fixing save function in app_config model
2024-06-15 17:19:15 +02:00
Steve Ireland
2e06f89724 This revises the build process to handle grunt components requiring two versions of grunt. The new BUILD.md file documents the changes. 2024-06-15 17:19:15 +02:00
objecttothis
ae357cab4a Formatting
- Convert indents to tabs
- Remove unnecessary else statement
- Correct PHPDoc formatting
2024-06-15 17:19:15 +02:00
Steve Ireland
38a1815d31 Adjust the build config to allow building the CI4 branch. 2024-06-15 17:19:15 +02:00
objecttothis
1dd58e922f Corrected link in README.md 2024-06-15 17:19:15 +02:00
jekkos
4123d9d8f7 Use double quotes in language files (#3468) 2024-06-15 17:19:15 +02:00
Samuel
8526947df1 Item thumbnail creation ported to CI4 (#3597)
* pic_thumb() now using CI4 service image

* remove unused lines

Co-authored-by: Samuel Bentil <bentilebo@gmail.com>
2024-06-15 17:19:15 +02:00
jekkos
828fd639b2 Porting over 4f3226b 2024-06-15 17:19:15 +02:00
chunter2
e4fed64976 Porting over e4ca111 2024-06-15 17:19:15 +02:00
objecttothis
de531e20c6 Migrations
- Delete old CI3 file
- Correct format of Migrations file datetime
2024-06-15 17:19:15 +02:00
jekkos
1745e973a1 Apply changes from master 2024-06-15 17:19:15 +02:00
objecttothis
b4f0aaa587 Porting 5669dff 2024-06-15 17:19:15 +02:00
jekkos
2d45ca626b Apply changes from master 2024-06-15 17:19:15 +02:00
objecttothis
f84b795ee6 Upgrade to CodeIgniter 4.1.3 2024-06-15 17:19:15 +02:00
jekkos
73b189b6d4 Prepare rebase: move files to new folder structure 2024-06-15 17:19:15 +02:00
Oleg
a6f4558829 Translated using Weblate (Russian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ru/
2024-06-04 13:33:51 +02:00
jekkos
bfdffbb944 Update README.md 2024-04-26 08:42:20 +02:00
Poedeloel
7355ee6154 Translated using Weblate (Dutch)
Currently translated at 98.1% (52 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/nl/
2024-04-22 10:54:34 +02:00
Poedeloel
6ecacabe16 Translated using Weblate (Dutch)
Currently translated at 98.1% (217 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/nl/
2024-04-22 10:54:33 +02:00
Poedeloel
0c1cd830f7 Translated using Weblate (Dutch)
Currently translated at 96.2% (76 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/nl/
2024-04-22 10:22:44 +02:00
objecttothis
83a0ca4a5b Update bug report.yml (#3950)
* Update bug report.yml

Changed order of bug report

* Update bug report.yml

Converted values into placeholders
2024-03-20 17:17:52 +04:00
SONKO ABDOU
6c6eb09dcc Translated using Weblate (French)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/fr/
2024-03-17 21:19:57 +01:00
SONKO ABDOU
cad41e5576 Translated using Weblate (French)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/fr/
2024-03-17 21:19:57 +01:00
SONKO ABDOU
dda927ad09 Translated using Weblate (French)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/fr/
2024-03-17 16:42:11 +01:00
SONKO ABDOU
585e674e4d Translated using Weblate (French)
Currently translated at 96.5% (28 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/fr/
2024-03-17 16:42:11 +01:00
Emin Tufan Çetin
d56c78ebc0 Translated using Weblate (Turkish)
Currently translated at 99.1% (116 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/tr/
2024-03-13 03:20:30 +01:00
objecttothis
698f9bb3d7 Update bug report.yml (#3946)
Add option to select a development build
2024-03-12 20:42:27 +04:00
iscdavidhernandez
dc943aecb8 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/es_MX/
2024-03-02 17:50:34 +01:00
jekkos
2618772f20 Update issue templates (#3895) (#3936)
Co-authored-by: odiea <oagnew@aim.com>
2024-02-29 00:16:07 +04:00
khao_lek
d4ee5c12dd Translated using Weblate (Thai)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/th/
2024-02-28 18:28:07 +01:00
khao_lek
1fdebed0e2 Translated using Weblate (Thai)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2023-12-19 11:05:19 +01:00
khao_lek
5cf744d885 Translated using Weblate (Thai)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/th/
2023-12-19 11:05:18 +01:00
khao_lek
1b8c66122f Translated using Weblate (Thai)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/th/
2023-12-19 11:05:18 +01:00
khao_lek
40a1ec8baf Translated using Weblate (Thai)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/th/
2023-12-19 11:05:17 +01:00
khao_lek
eb4ef3f487 Translated using Weblate (Thai)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/th/
2023-12-19 11:05:16 +01:00
khao_lek
ead1603213 Translated using Weblate (Thai)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/th/
2023-12-19 11:05:15 +01:00
khao_lek
26f10c09b1 Translated using Weblate (Thai)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/th/
2023-12-19 11:05:15 +01:00
donjade
bf7f2e03b7 Translated using Weblate (Chinese (Simplified))
Currently translated at 60.3% (32 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/zh_Hans/
2023-11-14 08:05:17 +01:00
donjade
d21b3f7ba9 Translated using Weblate (Chinese (Simplified))
Currently translated at 28.5% (2 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/zh_Hans/
2023-11-14 08:05:17 +01:00
donjade
c0fce5fabb Translated using Weblate (Chinese (Simplified))
Currently translated at 93.6% (44 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/zh_Hans/
2023-11-14 08:05:17 +01:00
donjade
9bdaeaa95b Translated using Weblate (Chinese (Simplified))
Currently translated at 63.9% (209 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hans/
2023-11-14 08:05:17 +01:00
donjade
ed371a0568 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/zh_Hans/
2023-11-14 08:05:17 +01:00
donjade
5b003c6519 Translated using Weblate (Chinese (Simplified))
Currently translated at 72.7% (8 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/zh_Hans/
2023-11-14 08:05:17 +01:00
jekkos
c00ff28d10 Update npm package secret 2023-11-06 22:29:19 +01:00
jekkos
351ab93523 Update .travis.yml secret 2023-11-06 19:44:06 +01:00
jekkos
7c87ac6f60 Bump to 3.3.9 2023-11-06 09:55:29 +01:00
jekkos
f7b5c6542d Bump jspdf to 1.3.5 2023-11-06 09:47:20 +01:00
FrancescoUK
676e09068e Fix cash_adjustment NULL exception 2023-11-05 13:50:48 +00:00
Flibble
f0067757e2 Translated using Weblate (Czech)
Currently translated at 76.9% (170 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/cs/
2023-11-02 09:35:57 +01:00
Flibble
5ad8af8fe9 Translated using Weblate (Czech)
Currently translated at 54.7% (29 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/cs/
2023-11-02 09:35:56 +01:00
jekkos
7109ab3521 Translated using Weblate (English)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/en/
2023-10-16 23:53:22 +02:00
Johntini
4e182fcde8 Translated using Weblate (Spanish)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/es/
2023-10-09 08:05:23 +02:00
truchosky
bd65957d02 Translated using Weblate (Spanish)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/es/
2023-10-09 08:05:23 +02:00
Johntini
a9e5a0fcfe Translated using Weblate (Spanish)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2023-10-09 08:05:23 +02:00
Johntini
fc15db9d2c Translated using Weblate (Spanish)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/es/
2023-10-09 08:05:23 +02:00
Johntini
7db56e8ee8 Translated using Weblate (Spanish)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/es/
2023-10-09 08:05:23 +02:00
Johntini
f035fe7ab3 Translated using Weblate (Spanish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/es/
2023-10-09 08:05:23 +02:00
Johntini
8cc8ab61ae Translated using Weblate (Spanish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2023-10-09 08:05:23 +02:00
daN4cat
10b245399d Revert config.php changes 2023-09-02 18:18:32 +01:00
daN4cat
4806c0f700 Various fixes 2023-08-30 23:54:13 +02:00
jekkos
82d7f48ee0 Add semicolon (#3792) 2023-08-29 00:49:20 +02:00
Denis Baryshev
9f377fa40a Update config.php 2023-08-29 00:35:04 +02:00
Denis Baryshev
d0209a711b allow unattended scheme mode
Signed-off-by: Denis Baryshev <dennybaa@gmail.com>
2023-08-29 00:35:04 +02:00
jekkos
57eb9c1e35 Fix tagsinput bower dependency 2023-08-29 00:33:44 +02:00
Jan Kadlec
5ad6097fd1 Fixing typo 2023-08-07 23:45:01 +02:00
Jorge Ivan Contreras Pacheco
712d4c60ae Translated using Weblate (Spanish (Mexico))
Currently translated at 57.3% (39 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/es_MX/
2023-07-28 00:35:48 +02:00
Jorge Ivan Contreras Pacheco
79618f3877 Translated using Weblate (Spanish (Mexico))
Currently translated at 22.2% (26 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es_MX/
2023-07-27 19:29:17 +02:00
Jorge Ivan Contreras Pacheco
a67872f66d Translated using Weblate (Spanish (Mexico))
Currently translated at 99.3% (325 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2023-07-19 20:41:28 +02:00
WebShells
8659c17ddd Translated using Weblate (Croatian)
Currently translated at 68.3% (151 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/hr/
2023-07-08 18:02:51 +02:00
jekkos
dcb797571e evert "Prepare rebase: move files to new folder structure"
This reverts commit eed0cd1ca0.
2023-05-30 17:52:17 +02:00
Oleg
5bd358dd24 Translated using Weblate (Russian)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ru/
2023-05-26 20:42:38 +02:00
Oleg
427aa592d9 Translated using Weblate (Russian)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ru/
2023-05-24 13:35:59 +02:00
Oleg
6d2e95c4ed Translated using Weblate (Russian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ru/
2023-05-24 08:57:22 +02:00
Oleg
5852c0a709 Translated using Weblate (Russian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ru/
2023-05-24 08:57:21 +02:00
Oleg
31ca72fbde Translated using Weblate (Russian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ru/
2023-05-24 08:57:21 +02:00
Oleg
e6811ce2a1 Translated using Weblate (Russian)
Currently translated at 97.6% (83 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ru/
2023-05-23 19:25:35 +02:00
Oleg
4d960c7b78 Translated using Weblate (Russian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ru/
2023-05-23 19:25:35 +02:00
Oleg
a1f50e1df7 Translated using Weblate (Russian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ru/
2023-05-23 19:25:28 +02:00
Oleg
9de467fd30 Translated using Weblate (Russian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ru/
2023-05-23 14:47:28 +02:00
Oleg
9be17a277a Translated using Weblate (Russian)
Currently translated at 94.9% (75 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ru/
2023-05-23 14:47:27 +02:00
Oleg
6c5982b5f2 Translated using Weblate (Russian)
Currently translated at 95.5% (43 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ru/
2023-05-23 14:47:26 +02:00
Oleg
fd8da94487 Translated using Weblate (Russian)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/ru/
2023-05-23 14:47:26 +02:00
Oleg
4c04279b1e Translated using Weblate (Russian)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ru/
2023-05-23 14:47:25 +02:00
Oleg
a56fd88247 Translated using Weblate (Russian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ru/
2023-05-23 14:47:24 +02:00
Oleg
15edc925ca Translated using Weblate (Russian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ru/
2023-05-23 14:47:23 +02:00
Oleg
ff4b04757a Translated using Weblate (Russian)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ru/
2023-05-23 14:47:22 +02:00
Oleg
3c5ab264ea Translated using Weblate (Russian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ru/
2023-05-23 11:31:44 +02:00
Oleg
c85fccd99a Translated using Weblate (Russian)
Currently translated at 95.5% (43 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ru/
2023-05-23 11:31:44 +02:00
Oleg
80cdd2f2d1 Translated using Weblate (Russian)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/ru/
2023-05-23 11:31:44 +02:00
Oleg
28ffc64af1 Translated using Weblate (Russian)
Currently translated at 89.6% (130 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ru/
2023-05-23 11:31:43 +02:00
Oleg
ad0476d99e Translated using Weblate (Russian)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ru/
2023-05-23 11:31:43 +02:00
Oleg
bc2d1f587b Translated using Weblate (Russian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ru/
2023-05-22 19:01:11 +02:00
Oleg
62f53e110e Translated using Weblate (Russian)
Currently translated at 97.6% (83 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ru/
2023-05-22 19:01:11 +02:00
Oleg
cf5e6dee39 Translated using Weblate (Russian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ru/
2023-05-22 19:01:10 +02:00
Oleg
8890dc30e8 Translated using Weblate (Russian)
Currently translated at 93.1% (109 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ru/
2023-05-22 19:01:10 +02:00
Oleg
35d44ffccc Translated using Weblate (Russian)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ru/
2023-05-22 19:01:09 +02:00
Oleg
b69280ec55 Translated using Weblate (Russian)
Currently translated at 98.1% (52 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ru/
2023-05-22 19:01:09 +02:00
Oleg
6459ee7ddb Translated using Weblate (Russian)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ru/
2023-05-22 19:01:08 +02:00
Oleg
3004f1e9ea Translated using Weblate (Russian)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ru/
2023-05-22 19:01:08 +02:00
Oleg
ab88c76596 Translated using Weblate (Russian)
Currently translated at 30.4% (14 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/ru/
2023-05-22 19:01:08 +02:00
Oleg
0e697e3c53 Translated using Weblate (Russian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ru/
2023-05-22 19:01:07 +02:00
Oleg
75c61b3e49 Translated using Weblate (Russian)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/ru/
2023-05-22 19:00:59 +02:00
Oleg
cf45b25a3a Translated using Weblate (Russian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/ru/
2023-05-22 19:00:59 +02:00
Oleg
5347c4981b Translated using Weblate (Russian)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ru/
2023-05-22 19:00:59 +02:00
Oleg
383ffd2e73 Translated using Weblate (Russian)
Currently translated at 28.5% (2 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/ru/
2023-05-22 19:00:58 +02:00
Oleg
a981387e9f Translated using Weblate (Russian)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ru/
2023-05-22 19:00:58 +02:00
Oleg
90ad5ae115 Translated using Weblate (Russian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/ru/
2023-05-22 12:20:21 +02:00
jekkos
568678587e Revert compose file to v2 (#3754) 2023-05-07 15:12:59 +02:00
jekkos
eed0cd1ca0 Prepare rebase: move files to new folder structure 2023-05-07 15:10:27 +02:00
titusito
a312434b87 Update system_info.php
add php_Xml dependecie check
2023-04-22 21:43:36 +02:00
titusito
69b2c4c51c Update INSTALL.md
add php-xml to needed extensions
2023-04-22 21:08:07 +02:00
Aril Apria Susanto
f2faf1cf32 Translated using Weblate (Indonesian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2023-04-12 14:03:43 +02:00
Aril Apria Susanto
2c508f3fe5 Translated using Weblate (Indonesian)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/id/
2023-04-12 14:03:43 +02:00
Aril Apria Susanto
20fad5890f Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2023-04-12 14:03:42 +02:00
Aril Apria Susanto
099d324d2e Translated using Weblate (Indonesian)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2023-04-12 14:03:42 +02:00
Aril Apria Susanto
2fe82484d7 Translated using Weblate (Indonesian)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/id/
2023-04-12 14:03:42 +02:00
Aril Apria Susanto
ea99d0234d Translated using Weblate (Indonesian)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/id/
2023-04-12 14:03:41 +02:00
WebShells
0f435621ad Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/en_GB/
2023-04-03 07:50:57 +02:00
WebShells
fda088d4f2 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/en_GB/
2023-04-03 07:50:56 +02:00
WebShells
d71c831a58 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/en_GB/
2023-04-03 07:50:56 +02:00
WebShells
fb40550756 Translated using Weblate (French)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/fr/
2023-04-03 07:50:56 +02:00
WebShells
bb2fc5e888 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/en_GB/
2023-04-03 07:50:55 +02:00
WebShells
d6a35c66f5 Translated using Weblate (French)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/fr/
2023-04-03 07:50:55 +02:00
WebShells
782438892e Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ar_EG/
2023-04-03 07:50:55 +02:00
WebShells
9d5d1ced07 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/en_GB/
2023-04-03 07:50:54 +02:00
WebShells
beea0efee8 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/en_GB/
2023-04-03 07:50:54 +02:00
WebShells
f73740547b Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/en_GB/
2023-04-03 07:50:54 +02:00
WebShells
d125c8a5d7 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ar_LB/
2023-04-03 07:50:54 +02:00
WebShells
610fdf9213 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ar_EG/
2023-04-03 07:50:53 +02:00
FrancescoUK
21d41ae371 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2023-04-03 07:50:52 +02:00
WebShells
a35004f1a5 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2023-04-03 07:50:52 +02:00
WebShells
8c40242a4c Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en_GB/
2023-04-03 07:50:52 +02:00
WebShells
ca7ea81769 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ar_EG/
2023-04-03 07:50:51 +02:00
WebShells
05df1dae4b Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/en_GB/
2023-04-03 07:50:51 +02:00
WebShells
d5b4a2745e Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ar_EG/
2023-04-03 07:50:51 +02:00
WebShells
fd96bac495 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en_GB/
2023-04-03 07:50:51 +02:00
WebShells
52d1da53d0 Translated using Weblate (Lao)
Currently translated at 55.1% (16 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/lo/
2023-04-03 07:50:49 +02:00
WebShells
abf5bffeff Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/en_GB/
2023-04-03 07:50:49 +02:00
WebShells
a045296b77 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/en_GB/
2023-04-03 07:50:47 +02:00
WebShells
04fb87fd8e Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/en_GB/
2023-04-03 07:50:47 +02:00
WebShells
89d7fcc3ca Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/en_GB/
2023-04-03 07:50:47 +02:00
WebShells
51daf2b70e Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/en_GB/
2023-04-03 07:50:47 +02:00
WebShells
8a2f125c52 Translated using Weblate (French)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/fr/
2023-04-03 07:50:46 +02:00
WebShells
0f83096296 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/en_GB/
2023-04-03 07:50:46 +02:00
WebShells
6f0b35bb2c Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ar_EG/
2023-04-03 07:50:46 +02:00
BudsieBuds
003f68a681 Translated using Weblate (English)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en/
2023-04-03 07:50:46 +02:00
BudsieBuds
f696731b1d Translated using Weblate (English)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/en/
2023-04-03 07:50:45 +02:00
WebShells
d8ade4b023 Translated using Weblate (English)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2023-04-03 07:50:45 +02:00
BudsieBuds
36e3861894 Translated using Weblate (English)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2023-04-03 07:50:45 +02:00
WebShells
1657510ca2 Translated using Weblate (English)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/en/
2023-04-03 07:50:44 +02:00
WebShells
7215747000 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ar_LB/
2023-03-29 11:49:14 +02:00
WebShells
71bfb4681b Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ar_LB/
2023-03-29 11:49:14 +02:00
WebShells
a98fa2b166 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ar_EG/
2023-03-29 11:49:14 +02:00
WebShells
922d8491da Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ar_EG/
2023-03-29 11:49:14 +02:00
WebShells
b7b8c314c7 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ar_LB/
2023-03-29 11:49:13 +02:00
WebShells
580f04dea4 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ar_EG/
2023-03-29 11:49:13 +02:00
WebShells
3422a15fb1 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ar_LB/
2023-03-29 11:49:13 +02:00
WebShells
3392c5357f Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ar_EG/
2023-03-29 11:49:13 +02:00
WebShells
dd329840dc Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ar_EG/
2023-03-29 11:49:12 +02:00
WebShells
a79d553d5c Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ar_EG/
2023-03-29 11:49:12 +02:00
WebShells
1eead53cd7 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ar_EG/
2023-03-29 11:49:12 +02:00
WebShells
8a8235c1e5 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ar_EG/
2023-03-29 11:49:12 +02:00
WebShells
c28a7fba63 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ar_EG/
2023-03-29 11:49:12 +02:00
WebShells
ecbb00fb1b Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/ar_LB/
2023-03-29 11:49:11 +02:00
WebShells
08f6a1a151 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ar_LB/
2023-03-29 11:49:11 +02:00
WebShells
f9a6d8ce77 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ar_EG/
2023-03-29 11:49:11 +02:00
WebShells
253e76b21d Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ar_LB/
2023-03-29 11:49:10 +02:00
WebShells
312b965c66 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ar_EG/
2023-03-29 11:49:10 +02:00
WebShells
8bdbd77422 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ar_LB/
2023-03-29 11:49:10 +02:00
WebShells
af286f00b9 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ar_LB/
2023-03-29 11:49:10 +02:00
WebShells
dac42b1630 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ar_LB/
2023-03-29 11:49:09 +02:00
WebShells
3a92ec0da7 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ar_LB/
2023-03-29 11:49:09 +02:00
WebShells
3766a90540 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ar_EG/
2023-03-29 11:49:09 +02:00
WebShells
0d2affadc5 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ar_LB/
2023-03-29 11:49:09 +02:00
WebShells
e5b8a2063f Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ar_LB/
2023-03-29 11:49:08 +02:00
WebShells
6556e40aff Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ar_LB/
2023-03-29 11:49:08 +02:00
WebShells
3a0b0af047 Translated using Weblate (Arabic (Egypt))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ar_EG/
2023-03-29 11:49:08 +02:00
WebShells
6d3eee6bea Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/ar_LB/
2023-03-29 11:49:08 +02:00
Pascual Marcone
cfdc3cf9a8 Translated using Weblate (Spanish)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2023-03-20 02:42:47 +01:00
kampvogn
5ecb68a384 Translated using Weblate (Danish)
Currently translated at 20.3% (45 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/da/
2023-03-07 18:54:03 +01:00
dependabot[bot]
3c4dff5ac1 Bump dompdf/dompdf from 2.0.2 to 2.0.3 (#3653)
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 00:40:41 +04:00
dependabot[bot]
eacd7d1f07 Bump mout and grunt-wiredep (#3651)
Bumps [mout](https://github.com/mout/mout) to 1.2.4 and updates ancestor dependency [grunt-wiredep](https://github.com/stephenplusplus/grunt-wiredep). These dependencies need to be updated together.


Updates `mout` from 0.9.1 to 1.2.4
- [Release notes](https://github.com/mout/mout/releases)
- [Changelog](https://github.com/mout/mout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mout/mout/compare/v0.9.1...v1.2.4)

Updates `grunt-wiredep` from 2.0.0 to 3.0.1
- [Release notes](https://github.com/stephenplusplus/grunt-wiredep/releases)
- [Commits](https://github.com/stephenplusplus/grunt-wiredep/compare/v2.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: mout
  dependency-type: indirect
- dependency-name: grunt-wiredep
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 09:17:22 +04:00
dependabot[bot]
702d0c773c Bump http-cache-semantics and npm (#3645)
Removes [http-cache-semantics](https://github.com/kornelski/http-cache-semantics). It's no longer used after updating ancestor dependency [npm](https://github.com/npm/cli). These dependencies need to be updated together.


Removes `http-cache-semantics`

Updates `npm` from 6.14.15 to 9.4.1
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v6.14.15...v9.4.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
- dependency-name: npm
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 06:48:46 +04:00
dependabot[bot]
56994b1b85 Bump dompdf/dompdf from 0.8.6 to 2.0.2 (#3643)
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 0.8.6 to 2.0.2.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v0.8.6...v2.0.2)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 06:43:27 +04:00
dependabot[bot]
6c7ff029d3 Bump debug and grunt-contrib-watch (#3625)
Bumps [debug](https://github.com/debug-js/debug) to 3.2.7 and updates ancestor dependency [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch). These dependencies need to be updated together.


Updates `debug` from 0.7.4 to 3.2.7
- [Release notes](https://github.com/debug-js/debug/releases)
- [Commits](https://github.com/debug-js/debug/compare/0.7.4...3.2.7)

Updates `grunt-contrib-watch` from 0.5.3 to 1.1.0
- [Release notes](https://github.com/gruntjs/grunt-contrib-watch/releases)
- [Changelog](https://github.com/gruntjs/grunt-contrib-watch/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt-contrib-watch/compare/v0.5.3...v1.1.0)

---
updated-dependencies:
- dependency-name: debug
  dependency-type: indirect
- dependency-name: grunt-contrib-watch
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 06:41:44 +04:00
Clifford Cheefoon
57662183f9 update readme 2023-01-31 22:51:42 +01:00
objecttothis
98eff67702 Translated using Weblate (Azerbaijani)
Currently translated at 96.0% (314 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/az/
2023-01-31 01:12:13 +01:00
Boors96
1547663439 Translated using Weblate (Arabic (ar_LB))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ar_LB/
2023-01-08 16:11:12 +01:00
jekkos
babe06132c Update README.md 2022-11-28 23:04:10 +01:00
jekkos
db9da86df5 Update version badge 2022-11-27 00:15:17 +01:00
jekkos
b44993f2fa Fix logout race condition (#3578) 2022-10-18 23:00:50 +02:00
khao_lek
3c32944ce9 Translated using Weblate (Thai)
Currently translated at 99.0% (219 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-10-15 05:16:34 +02:00
Nicolás Gómez Solano
8d8487a637 Translated using Weblate (Spanish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2022-10-08 06:20:07 +02:00
Aamir Shahzad
b449c10f0d Updated my info 2022-10-04 22:32:14 +02:00
Aamir Shahzad
a91f21ca05 Timezone added for Pakistan 2022-10-04 22:32:14 +02:00
Aamir Shahzad
a501dc9b99 Fix closing parenthesis, otherwise ENVIRONMENT always resulted true & path added as tests/ 2022-10-04 22:32:14 +02:00
jekkos
06ca9e9f74 Update DO offer 2022-10-04 14:41:21 +02:00
Aril Apria Susanto
56bb57ba8a Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2022-09-26 09:50:58 +02:00
Cheabhak Ezecom
20dad261fd Translated using Weblate (Central Khmer)
Currently translated at 43.8% (97 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/km/
2022-09-14 16:53:36 +02:00
Cheabhak Ezecom
6c60a6aa78 Translated using Weblate (Central Khmer)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/km/
2022-09-13 14:41:01 +02:00
Cheabhak Ezecom
e48f408635 Translated using Weblate (Central Khmer)
Currently translated at 97.4% (114 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/km/
2022-09-13 14:41:01 +02:00
Cheabhak Ezecom
87af7df2a5 Translated using Weblate (Central Khmer)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/km/
2022-09-13 14:41:00 +02:00
Cheabhak Ezecom
67aadb48ae Translated using Weblate (Central Khmer)
Currently translated at 31.6% (70 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/km/
2022-09-13 14:41:00 +02:00
Cheabhak Ezecom
5248e964ff Translated using Weblate (Central Khmer)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/km/
2022-09-13 14:40:59 +02:00
Cheabhak Ezecom
fd474f548e Translated using Weblate (Central Khmer)
Currently translated at 37.9% (11 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/km/
2022-09-12 22:03:30 +02:00
robbytriadi
78d2ca72b2 Translated using Weblate (Indonesian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/id/
2022-09-10 12:37:34 +02:00
robbytriadi
ed7613b7da Translated using Weblate (Indonesian)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2022-09-10 12:37:33 +02:00
Cheabhak Ezecom
0b2198e229 Translated using Weblate (Central Khmer)
Currently translated at 65.0% (13 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/km/
2022-09-09 10:43:01 +02:00
Cheabhak Ezecom
5f5fe5eb47 Translated using Weblate (Central Khmer)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/km/
2022-09-09 10:43:01 +02:00
Cheabhak Ezecom
1da81e95b3 Translated using Weblate (Central Khmer)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/km/
2022-09-09 10:43:01 +02:00
Cheabhak Ezecom
c45e164a83 Translated using Weblate (Central Khmer)
Currently translated at 95.2% (81 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/km/
2022-09-06 09:56:48 +02:00
Cheabhak Ezecom
2bf9effe1d Translated using Weblate (Central Khmer)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/km/
2022-09-06 09:56:48 +02:00
Kasper
bd4ec13b9a Translated using Weblate (Danish)
Currently translated at 51.7% (75 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/da/
2022-09-05 00:07:06 +02:00
Aril Apria Susanto
44651de42b Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2022-08-11 18:03:57 +02:00
jekkos
ffe49278fc Bump to 3.3.8 2022-08-03 08:50:41 +02:00
Nguyen Tuan Anh
2eb6d85818 Translated using Weblate (Vietnamese)
Currently translated at 99.0% (219 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/vi/
2022-08-02 03:21:05 +02:00
Johntini
d5e371d0ef Translated using Weblate (Spanish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es/
2022-07-29 02:30:19 +02:00
Johntini
306cfbef7c Translated using Weblate (Spanish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es/
2022-07-29 02:30:19 +02:00
Johntini
9ce55583f5 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2022-07-29 02:30:18 +02:00
Johntini
f2dd1131a2 Translated using Weblate (Spanish)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es/
2022-07-29 02:30:16 +02:00
Johntini
4df6d708dc Translated using Weblate (Spanish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2022-07-29 02:30:16 +02:00
Johntini
dbf2ee711e Translated using Weblate (Spanish)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2022-07-29 02:30:15 +02:00
Johntini
aff43196eb Translated using Weblate (Spanish)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/es/
2022-07-29 02:30:14 +02:00
Johntini
8d8d9b7b54 Translated using Weblate (Spanish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/es/
2022-07-29 02:30:14 +02:00
Johntini
76a96503da Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2022-07-28 13:05:40 +02:00
Johntini
6cfb6abbf9 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/es_MX/
2022-07-28 13:05:37 +02:00
khao_lek
b864e684b6 Translated using Weblate (Thai)
Currently translated at 97.7% (44 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/th/
2022-07-28 13:05:37 +02:00
Ricardo Vargas
1516006646 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2022-07-28 13:05:37 +02:00
Johntini
86757cb11a Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2022-07-28 13:05:36 +02:00
Johntini
96abcf6ba9 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es_MX/
2022-07-28 05:09:28 +02:00
Johntini
4ae8505a19 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2022-07-28 05:09:27 +02:00
Johntini
5b6ada58d4 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/es_MX/
2022-07-28 05:09:25 +02:00
Val Thi
d2301dbfde Translated using Weblate (French)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/fr/
2022-07-14 21:48:12 +02:00
Val Thi
0ec9a85990 Translated using Weblate (French)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/fr/
2022-07-14 21:48:11 +02:00
Val Thi
6181953039 Translated using Weblate (French)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/fr/
2022-07-14 21:48:11 +02:00
Val Thi
d81d0b2fc5 Translated using Weblate (French)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/fr/
2022-07-14 21:48:10 +02:00
Val Thi
b37cc5ee8b Translated using Weblate (French)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/fr/
2022-07-14 21:48:09 +02:00
Val Thi
5daed8cc84 Translated using Weblate (French)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/fr/
2022-07-14 21:48:09 +02:00
Val Thi
8ea4869f4d Translated using Weblate (French)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/fr/
2022-07-14 07:25:56 +02:00
Val Thi
2b3818c5da Translated using Weblate (French)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/fr/
2022-07-14 07:25:56 +02:00
Val Thi
1bb96f6dda Translated using Weblate (French)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/fr/
2022-07-14 07:25:56 +02:00
Val Thi
f3f1d0e28c Translated using Weblate (French)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/fr/
2022-07-14 07:25:56 +02:00
Val Thi
05229bc2f6 Translated using Weblate (French)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/fr/
2022-07-14 07:25:55 +02:00
Val Thi
fbb4739673 Translated using Weblate (French)
Currently translated at 92.9% (79 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/fr/
2022-07-14 07:25:55 +02:00
Val Thi
90186bc667 Translated using Weblate (French)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/fr/
2022-07-14 07:25:55 +02:00
Val Thi
bd9d2c00a7 Translated using Weblate (French)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/fr/
2022-07-14 07:25:55 +02:00
Val Thi
e91fcd8bb9 Translated using Weblate (French)
Currently translated at 88.0% (288 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/fr/
2022-07-14 07:25:55 +02:00
Val Thi
d44dbb8760 Translated using Weblate (French)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/fr/
2022-07-14 07:25:54 +02:00
Val Thi
1649b81038 Translated using Weblate (French)
Currently translated at 93.1% (109 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/fr/
2022-07-14 07:25:54 +02:00
Val Thi
16ded77931 Translated using Weblate (French)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/fr/
2022-07-14 07:25:54 +02:00
Val Thi
f8f186ca2e Translated using Weblate (French)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/fr/
2022-07-14 07:25:53 +02:00
Val Thi
94bd295188 Translated using Weblate (French)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/fr/
2022-07-14 07:25:53 +02:00
Val Thi
0aa2dd3f6c Translated using Weblate (French)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/fr/
2022-07-14 07:25:53 +02:00
Val Thi
cbed9e4882 Translated using Weblate (French)
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/fr/
2022-07-14 07:25:52 +02:00
Val Thi
31fa79e27a Translated using Weblate (French)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/fr/
2022-07-14 07:25:52 +02:00
Val Thi
7f1411edbc Translated using Weblate (French)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/fr/
2022-07-14 02:37:27 +02:00
Val Thi
2e41975c4e Translated using Weblate (French)
Currently translated at 92.1% (35 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/fr/
2022-07-14 02:37:27 +02:00
Val Thi
1740a69e7c Translated using Weblate (French)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/fr/
2022-07-14 02:37:27 +02:00
Val Thi
0544e13211 Translated using Weblate (French)
Currently translated at 84.8% (123 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/fr/
2022-07-14 02:37:27 +02:00
Val Thi
2da2895062 Translated using Weblate (French)
Currently translated at 90.9% (10 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/fr/
2022-07-14 02:37:27 +02:00
Val Thi
f11f4eeb2d Translated using Weblate (French)
Currently translated at 95.0% (19 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/fr/
2022-07-14 02:37:27 +02:00
Val Thi
71efb0262f Translated using Weblate (French)
Currently translated at 96.5% (28 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/fr/
2022-07-14 02:37:27 +02:00
jekkos
f061a83317 Substract refund from total rewards (#3536) 2022-06-30 14:22:26 +02:00
jekkos
e09875e5f3 Use POST to prevent CSRF logo attack (#3533) 2022-06-30 00:25:35 +02:00
Josuw
6a244d1beb Translated using Weblate (Spanish (Mexico))
Currently translated at 21.3% (25 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es_MX/
2022-06-24 01:04:04 +02:00
Josuw
5695b74f1b Translated using Weblate (Spanish (Mexico))
Currently translated at 98.8% (84 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es_MX/
2022-06-24 01:04:04 +02:00
jekkos
77393d1d21 Add zipfile to releases (#3519) 2022-06-16 10:53:30 +02:00
Dzung Do
b366641fbc Translated using Weblate (Vietnamese)
Currently translated at 90.9% (10 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/vi/
2022-06-03 05:54:03 +02:00
Dzung Do
bde0dc0b7c Translated using Weblate (Vietnamese)
Currently translated at 34.7% (16 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/vi/
2022-06-03 05:54:03 +02:00
Dzung Do
f99d0dca8d Translated using Weblate (Vietnamese)
Currently translated at 49.3% (39 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/vi/
2022-06-03 05:54:03 +02:00
Dzung Do
24f8c94c49 Translated using Weblate (Vietnamese)
Currently translated at 91.7% (78 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/vi/
2022-06-03 05:54:03 +02:00
dependabot[bot]
7e3d048bfc Bump grunt from 1.5.2 to 1.5.3
Bumps [grunt](https://github.com/gruntjs/grunt) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/gruntjs/grunt/releases)
- [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: grunt
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 09:47:02 +02:00
FastAct
122a827645 Translated using Weblate (Flemish)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/nl_BE/
2022-05-25 14:01:36 +02:00
FastAct
427c4c7d3d Translated using Weblate (Flemish)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/nl_BE/
2022-05-25 14:01:36 +02:00
FastAct
6ca1cb739f Translated using Weblate (Flemish)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/nl_BE/
2022-05-25 14:01:36 +02:00
FastAct
070d989548 Translated using Weblate (Flemish)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/nl_BE/
2022-05-25 14:01:36 +02:00
FastAct
cd0132c22c Translated using Weblate (Flemish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl_BE/
2022-05-25 14:01:35 +02:00
FastAct
9f8cf48467 Translated using Weblate (Flemish)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl_BE/
2022-05-25 14:01:35 +02:00
FastAct
206b56333a Translated using Weblate (Flemish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/nl_BE/
2022-05-25 14:01:35 +02:00
FastAct
cf59d6779e Translated using Weblate (Flemish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/nl_BE/
2022-05-25 14:01:35 +02:00
FastAct
68ed73ab3b Translated using Weblate (Flemish)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/nl_BE/
2022-05-25 14:01:34 +02:00
FastAct
e5236dd510 Translated using Weblate (Flemish)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/nl_BE/
2022-05-25 14:01:34 +02:00
FastAct
d1f8c15f3e Translated using Weblate (Flemish)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/nl_BE/
2022-05-25 14:01:33 +02:00
FastAct
6810f613a0 Translated using Weblate (Flemish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/nl_BE/
2022-05-25 14:01:32 +02:00
FastAct
3980f248ed Translated using Weblate (Flemish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/nl_BE/
2022-05-25 14:01:32 +02:00
Natig Asadov
bf2cf416db Translated using Weblate (Azerbaijani)
Currently translated at 99.5% (220 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/az/
2022-05-18 04:36:03 +02:00
knnhsn
772d42490b Translated using Weblate (Azerbaijani)
Currently translated at 97.8% (46 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/az/
2022-05-16 12:43:12 +02:00
Natig Asadov
c580e4cdee Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/az/
2022-05-13 05:44:30 +02:00
Natig Asadov
efe4becfab Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/az/
2022-05-13 05:44:30 +02:00
Natig Asadov
d1c25991fe Translated using Weblate (Azerbaijani)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/az/
2022-05-13 05:44:29 +02:00
khao_lek
528ebf8e20 Translated using Weblate (Thai)
Currently translated at 99.0% (219 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-05-10 21:47:53 +02:00
jekkos
4f3226b1ba Add item_pic to escape ignore list (#3379) 2022-05-03 11:26:34 +02:00
jekkos
82ae2e0931 Enable search in detailed reports (#3495) 2022-05-01 11:59:35 +02:00
chunter2
e4ca111977 Add cost price column to item summary report (#3495) 2022-04-30 01:16:32 +02:00
jekkos
31944f491c Enable search in reports (#3491) 2022-04-29 21:30:23 +02:00
dependabot[bot]
19342e4d6f Bump simple-get from 3.1.0 to 3.1.1
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](https://github.com/feross/simple-get/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 18:36:35 +02:00
jekkos
c8a83fbb57 Update unstable build URL
NPM package uploads are working again. Update the URL in the documentation.
2022-04-29 15:26:29 +02:00
jekkos
c3d06fc6f5 Remove markup last row expenses (#3779) 2022-04-29 15:17:53 +02:00
jekkos
553eae19a3 Add version string echo 2022-04-29 15:16:32 +02:00
jekkos
63f282a8b5 3.3.7-master-564465 2022-04-29 15:16:32 +02:00
jekkos
cfd5973f0e Add npm version --from-git
Rotate npm token
2022-04-29 15:16:32 +02:00
dependabot[bot]
e44bc3e674 Bump grunt from 1.4.1 to 1.5.2
Bumps [grunt](https://github.com/gruntjs/grunt) from 1.4.1 to 1.5.2.
- [Release notes](https://github.com/gruntjs/grunt/releases)
- [Changelog](https://github.com/gruntjs/grunt/blob/main/CHANGELOG)
- [Commits](https://github.com/gruntjs/grunt/compare/v1.4.1...v1.5.2)

---
updated-dependencies:
- dependency-name: grunt
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 15:16:32 +02:00
Casper Hsiao
d6b66d9fe2 Translated using Weblate (Chinese (Traditional))
Currently translated at 95.4% (211 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/zh_Hant/
2022-04-27 20:32:20 +02:00
jekkos
a6b4f826c5 Update changelog 2022-04-26 23:49:58 +02:00
jekkos
d26498d1ad Do not escape email and phone_numbers (#3379) 2022-04-26 23:49:58 +02:00
jekkos
5897130e0a Fix sales last row style (#3379) 2022-04-25 23:32:50 +02:00
khao_lek
a0c3a532aa Translated using Weblate (Thai)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-04-19 19:36:33 +02:00
jekkos
9331d82313 Add escape flag for XSS mitigation (#3379) 2022-04-14 09:28:12 +02:00
khao_lek
3e60b74c4c Translated using Weblate (Thai)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-04-07 09:45:36 +02:00
jekkos
4a591e89b6 Mount database.sql from docker volume (#3352) 2022-04-05 21:52:52 +02:00
jekkos
8c1977b1ec Fix transaction summary for serialized items (#3445) 2022-04-01 08:56:15 +02:00
Aril Apria Susanto
4a8aaf8ef0 Translated using Weblate (Indonesian)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
c4b8f8654d Translated using Weblate (Indonesian)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
cb3d84f1bf Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
166d2b586c Translated using Weblate (Indonesian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
ca792b44cd Translated using Weblate (Indonesian)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
4825248a1a Translated using Weblate (Indonesian)
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
17973151e4 Translated using Weblate (Indonesian)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/id/
2022-04-01 07:34:24 +02:00
Aril Apria Susanto
5b9301567c Translated using Weblate (Indonesian)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/id/
2022-04-01 07:34:24 +02:00
jekkos
6028bc408d Run build if git tag is added 2022-03-29 22:30:59 +02:00
khao_lek
5974d01453 Translated using Weblate (Thai)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-03-29 19:13:13 +02:00
khao_lek
c83db2f5c7 Translated using Weblate (Thai)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/th/
2022-03-29 19:12:49 +02:00
khao_lek
8e24570cfb Translated using Weblate (Thai)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/th/
2022-03-29 09:00:18 +02:00
khao_lek
fdf49e9038 Translated using Weblate (Thai)
Currently translated at 99.0% (219 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-03-29 09:00:18 +02:00
khao_lek
559b354925 Translated using Weblate (Thai)
Currently translated at 97.7% (44 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/th/
2022-03-29 09:00:17 +02:00
khao_lek
af864aefd5 Translated using Weblate (Thai)
Currently translated at 99.6% (326 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/th/
2022-03-29 09:00:15 +02:00
ALink3133
5e55952ce8 Translated using Weblate (Thai)
Currently translated at 97.2% (215 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-02-23 10:46:51 +01:00
ALink3133
8e1a8fe480 Translated using Weblate (Thai)
Currently translated at 90.9% (10 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/th/
2022-02-23 10:46:51 +01:00
ALink3133
99e51bcdf9 Translated using Weblate (Thai)
Currently translated at 93.3% (42 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/th/
2022-02-23 10:46:51 +01:00
Mats Pålsson
48217895bb Translated using Weblate (Swedish)
Currently translated at 95.2% (81 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2022-02-18 11:26:14 +01:00
Steve Ireland
96c59245e3 Change register to show anticipated invoice number. (#3408) 2022-01-28 14:35:22 -05:00
Elio Enzo Papais
9cf4e6e07b Translated using Weblate (Italian)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/it/
2022-01-27 18:28:34 +01:00
Elio Enzo Papais
bb73d48d37 Translated using Weblate (Italian)
Currently translated at 93.6% (44 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/it/
2022-01-27 18:28:34 +01:00
Elio Enzo Papais
2af5642fe7 Translated using Weblate (Italian)
Currently translated at 0.0% (0 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/it/
2022-01-27 18:28:34 +01:00
Elio Enzo Papais
c1207b64df Translated using Weblate (Italian)
Currently translated at 97.6% (83 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/it/
2022-01-27 18:28:33 +01:00
Elio Enzo Papais
5e02f0531a Translated using Weblate (Italian)
Currently translated at 94.3% (50 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/it/
2022-01-27 18:28:33 +01:00
Elio Enzo Papais
bea49e6eeb Translated using Weblate (Italian)
Currently translated at 96.3% (53 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/it/
2022-01-27 18:28:33 +01:00
Elio Enzo Papais
a7772f3e1b Translated using Weblate (Italian)
Currently translated at 93.1% (109 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/it/
2022-01-27 18:28:33 +01:00
Elio Enzo Papais
e6072ee9fa Translated using Weblate (Italian)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/it/
2022-01-27 05:34:23 +01:00
Elio Enzo Papais
dd24a3c8d0 Translated using Weblate (Italian)
Currently translated at 95.7% (112 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/it/
2022-01-27 05:34:23 +01:00
Elio Enzo Papais
7857206999 Translated using Weblate (Italian)
Currently translated at 100.0% (46 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/it/
2022-01-27 05:34:22 +01:00
Elio Enzo Papais
4c642bd8d3 Translated using Weblate (Italian)
Currently translated at 98.7% (323 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/it/
2022-01-27 05:34:22 +01:00
Elio Enzo Papais
0ec68c8b99 Translated using Weblate (Italian)
Currently translated at 98.6% (218 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/it/
2022-01-27 05:34:22 +01:00
Elio Enzo Papais
0e2e808635 Translated using Weblate (Italian)
Currently translated at 97.9% (142 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/it/
2022-01-26 03:10:19 +01:00
Elio Enzo Papais
4f81d602ea Translated using Weblate (Italian)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/it/
2022-01-26 03:10:19 +01:00
Elio Enzo Papais
db14ea80e2 Translated using Weblate (Italian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/it/
2022-01-26 03:10:19 +01:00
Elio Enzo Papais
09d0005724 Translated using Weblate (Italian)
Currently translated at 98.1% (217 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/it/
2022-01-26 03:10:18 +01:00
Elio Enzo Papais
9bb48cee59 Translated using Weblate (Italian)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/it/
2022-01-26 03:10:18 +01:00
Elio Enzo Papais
38e718774f Translated using Weblate (Italian)
Currently translated at 92.3% (302 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/it/
2022-01-26 03:10:18 +01:00
Elio Enzo Papais
1470cce981 Translated using Weblate (Italian)
Currently translated at 88.0% (288 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
ff55e966ce Translated using Weblate (Italian)
Currently translated at 91.4% (202 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
de4ea6299f Translated using Weblate (Italian)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
d3906cbbc4 Translated using Weblate (Italian)
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
8df3735bbf Translated using Weblate (Italian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
85b9048041 Translated using Weblate (Italian)
Currently translated at 88.8% (104 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
7f7de97920 Translated using Weblate (Italian)
Currently translated at 90.9% (10 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
912c035e27 Translated using Weblate (Italian)
Currently translated at 84.8% (123 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
bd1baad7f1 Translated using Weblate (Italian)
Currently translated at 90.5% (77 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
d61d1ad878 Translated using Weblate (Italian)
Currently translated at 73.9% (34 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
d14e21cc68 Translated using Weblate (Italian)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/it/
2022-01-25 00:16:21 +01:00
Elio Enzo Papais
780db269de Translated using Weblate (Italian)
Currently translated at 64.5% (51 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/it/
2022-01-25 00:16:21 +01:00
jekkos
669a5b33f3 Bump to 3.3.7 2022-01-23 23:01:32 +01:00
khao_lek
3d4dc0fc56 Translated using Weblate (Thai)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2022-01-17 19:38:10 +01:00
khao_lek
7a4e16422e Translated using Weblate (Thai)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/th/
2022-01-17 19:38:10 +01:00
khao_lek
0dc7da8a3b Translated using Weblate (Thai)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/th/
2022-01-17 19:38:09 +01:00
khao_lek
ba66e8d8c7 Translated using Weblate (Thai)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/th/
2022-01-17 19:38:08 +01:00
Nicolas Hurtubise
5eea70dca4 Translated using Weblate (French)
Currently translated at 94.1% (208 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/fr/
2022-01-16 09:14:51 +01:00
Nicolas Hurtubise
f7bbc7c634 Translated using Weblate (French)
Currently translated at 87.5% (7 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/fr/
2022-01-16 09:14:51 +01:00
Nicolas Hurtubise
0df712fbd7 Translated using Weblate (French)
Currently translated at 93.6% (207 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/fr/
2022-01-14 18:53:46 +01:00
Nicolas Hurtubise
511c6238a8 Translated using Weblate (English)
Currently translated at 100.0% (221 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2022-01-14 18:53:46 +01:00
jekkos
730ec1292d Use anchor in supplier regex (#3402)
Adding a unit test to check the url patterns allowed/disallowed would be a good idea. I should practice what I preach.
2022-01-12 00:34:16 +01:00
jekkos
6e1db1458b Rotate npm token (#2834) 2022-01-11 23:32:13 +01:00
jekkos
5c425febfb Use https for git-script-link-tags 2022-01-11 23:31:11 +01:00
jekkos
81087fc093 Update link to unstable builds (#2834) 2022-01-10 12:25:19 +01:00
jekkos
0231c0bc4f Use git tag in case of release (#2834) 2022-01-09 18:13:18 +01:00
jekkos
bece3b5fea Enable npm package uploads for unstable (#2834) 2022-01-08 12:27:21 +01:00
jekkos
b309b631f2 Update CHANGELOG.md 2022-01-08 01:11:16 +01:00
jacekz123
f3e41a4535 Translated using Weblate (Polish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/pl/
2022-01-07 13:20:30 +01:00
jacekz123
5675aeed12 Translated using Weblate (Polish)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/pl/
2022-01-06 23:54:53 +01:00
jacekz123
2c331b6244 Translated using Weblate (Polish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/pl/
2022-01-06 23:54:53 +01:00
jacekz123
3841502704 Translated using Weblate (Polish)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/pl/
2022-01-06 23:54:53 +01:00
jacekz123
e94af0ddbc Translated using Weblate (Polish)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/pl/
2022-01-06 23:54:53 +01:00
jacekz123
11a05501c5 Translated using Weblate (Polish)
Currently translated at 2.9% (2 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/pl/
2022-01-06 23:54:53 +01:00
jacekz123
0262f644af Translated using Weblate (Polish)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/pl/
2022-01-06 23:54:53 +01:00
jacekz123
67881c172f Translated using Weblate (Polish)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/pl/
2022-01-06 23:54:53 +01:00
jekkos
40565ea811 Add default user/password in testing (#3374) 2022-01-06 23:26:10 +01:00
jekkos
9332d16ec4 Fix logout csrf 2022-01-01 22:32:36 +01:00
FrancescoUK
bb0e771542 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2021-12-13 03:24:26 +01:00
Cedo
24cb0247d5 Translated using Weblate (Bosnian)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/bs/
2021-12-04 21:30:21 +01:00
Cedo
e22608ba61 Translated using Weblate (Bosnian)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/bs/
2021-12-04 18:37:53 +01:00
Cedo
ac76ab290b Translated using Weblate (Bosnian)
Currently translated at 100.0% (140 of 140 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/bs/
2021-12-04 18:37:53 +01:00
Cedo
07fd9b4c5c Translated using Weblate (Bosnian)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/bs/
2021-12-04 18:37:53 +01:00
programmer111213
8c432c00b0 Translated using Weblate (Russian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ru/
2021-11-27 09:16:03 +01:00
programmer111213
c3cfed5cbf Translated using Weblate (Russian)
Currently translated at 97.3% (37 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ru/
2021-11-22 16:41:03 +01:00
programmer111213
3dbd39058f Translated using Weblate (Russian)
Currently translated at 85.9% (190 of 221 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ru/
2021-11-22 16:41:02 +01:00
programmer111213
df932b8870 Translated using Weblate (Russian)
Currently translated at 25.0% (3 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/ru/
2021-11-22 16:41:02 +01:00
programmer111213
13920e18ad Translated using Weblate (Russian)
Currently translated at 96.3% (53 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ru/
2021-11-22 16:41:02 +01:00
MushlihTechFoundation
7105013c5f Translated using Weblate (Indonesian)
Currently translated at 97.4% (75 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2021-11-20 00:36:48 +01:00
MushlihTechFoundation
01a9810a0c Translated using Weblate (Indonesian)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/id/
2021-11-20 00:36:48 +01:00
jekkos
0618ff47fd Update ISSUE_TEMPLATE.md 2021-11-16 22:08:49 +01:00
Cedo
77eb5e4da3 Translated using Weblate (Bosnian)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/bs/
2021-11-16 05:31:35 +01:00
Cedo
c4dfef10f7 Translated using Weblate (Bosnian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/bs/
2021-11-16 05:31:35 +01:00
Cedo
f3056c155a Translated using Weblate (Bosnian)
Currently translated at 100.0% (140 of 140 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/bs/
2021-11-16 05:31:34 +01:00
Cedo
4a3ac37f22 Translated using Weblate (Bosnian)
Currently translated at 100.0% (302 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/bs/
2021-11-16 03:08:25 +01:00
Cedo
4f07754071 Translated using Weblate (Bosnian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/bs/
2021-11-16 03:08:24 +01:00
Cedo
80e5d94b66 Translated using Weblate (Bosnian)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/bs/
2021-11-16 03:08:24 +01:00
Cedo
ef75301b65 Translated using Weblate (Bosnian)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/bs/
2021-11-16 03:08:24 +01:00
Cedo
4a05748e67 Translated using Weblate (Bosnian)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/bs/
2021-11-15 02:14:46 +01:00
Cedo
59a1725501 Translated using Weblate (Bosnian)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/bs/
2021-11-15 02:14:46 +01:00
Cedo
dd21356b81 Translated using Weblate (Bosnian)
Currently translated at 100.0% (140 of 140 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/bs/
2021-11-15 02:14:45 +01:00
BudsieBuds
65726930bc Translated using Weblate (Dutch)
Currently translated at 94.8% (73 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-11-03 18:16:36 +01:00
crls12opazo
cdeda755fc Translated using Weblate (Spanish)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2021-11-01 16:08:28 +01:00
Cedo
b5d0399205 Translated using Weblate (Bosnian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/bs/
2021-10-31 12:26:05 +01:00
Cedo
871310a83f Translated using Weblate (Bosnian)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/bs/
2021-10-31 12:26:05 +01:00
Cedo
ba4be2fca1 Translated using Weblate (Bosnian)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/bs/
2021-10-31 12:26:05 +01:00
Cedo
4d506fec09 Translated using Weblate (Bosnian)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/bs/
2021-10-31 12:26:05 +01:00
Cedo
a25f9a94ce Translated using Weblate (Bosnian)
Currently translated at 100.0% (140 of 140 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/bs/
2021-10-31 10:37:02 +01:00
Cedo
594b376720 Translated using Weblate (Bosnian)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/bs/
2021-10-31 10:37:01 +01:00
Cedo
f8c8a5874a Translated using Weblate (Bosnian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/bs/
2021-10-31 10:37:01 +01:00
Cedo
b8ff4d9886 Translated using Weblate (Bosnian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/bs/
2021-10-31 10:37:01 +01:00
Cedo
0576cd5bc5 Translated using Weblate (Bosnian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/bs/
2021-10-31 10:37:00 +01:00
Cedo
5fe631c188 Translated using Weblate (Bosnian)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/bs/
2021-10-31 08:59:56 +01:00
Cedo
b9284a7abd Translated using Weblate (Bosnian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/bs/
2021-10-31 08:59:56 +01:00
Cedo
256c83c20f Translated using Weblate (Bosnian)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/bs/
2021-10-31 08:59:55 +01:00
Cedo
da0263c3d7 Translated using Weblate (Bosnian)
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/bs/
2021-10-31 08:59:55 +01:00
Cedo
c9716a890a Translated using Weblate (Bosnian)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/bs/
2021-10-31 08:59:55 +01:00
Cedo
b9a75c0be6 Translated using Weblate (Bosnian)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/bs/
2021-10-31 08:59:55 +01:00
Cedo
0b5453926e Translated using Weblate (Bosnian)
Currently translated at 100.0% (302 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/bs/
2021-10-31 08:59:54 +01:00
Cedo
bfd8e2b727 Translated using Weblate (Bosnian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/bs/
2021-10-31 08:59:53 +01:00
Cedo
11bf7ce3ed Translated using Weblate (Bosnian)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/bs/
2021-10-31 08:59:53 +01:00
Cedo
566d1267fd Translated using Weblate (Bosnian)
Currently translated at 97.8% (137 of 140 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/bs/
2021-10-31 00:37:58 +02:00
programmer111213
1b035cdf8a Translated using Weblate (Russian)
Currently translated at 87.2% (157 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ru/
2021-10-21 17:32:53 +02:00
programmer111213
17fd336ecd Translated using Weblate (Russian)
Currently translated at 80.7% (42 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ru/
2021-10-21 17:32:53 +02:00
programmer111213
d225d9057c Translated using Weblate (Russian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ru/
2021-10-21 17:32:53 +02:00
programmer111213
cfac498232 Translated using Weblate (Russian)
Currently translated at 92.2% (71 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ru/
2021-10-21 17:32:53 +02:00
BudsieBuds
b936306b50 Combine dependencies info, update npm packages
Combined the package.md and composer.md to DEVELOPMENT.md. Updated bootstrap, bootswatch, and grunt-bower packages to newest versions.
2021-10-20 22:32:02 +02:00
BudsieBuds
33cb3fa3f9 Text improvements
Improved some of the non-trivial files.
2021-10-20 22:32:02 +02:00
jekkos
caaa26f9ba Bump to 3.3.6 2021-10-19 23:28:01 +02:00
jekkos
bbac91f421 Sync language files (#2554) 2021-10-19 23:00:00 +02:00
WebShells
6f8b877bd9 Keyboard Shortcuts/Hotkeys (#2618)
Added Shortcuts/Hotkeys to Register

ESC 	Cancels Current Quote/Invoice/Sale
ALT + 1 	Item Search
ALT + 2 	Customer Search
ALT + 3 	Suspend Current Sale
ALT + 4 	Show Suspended Sales
ALT + 5 	Edit Amount Tendered
ALT + 6 	Add Payment
ALT + 7 	Add Payment and Complete Invoice/Sale
ALT + 8 	Finish Quote/Invoice witdout payment
ALT + 9 	Open Shortcuts Window

Layout / Responsiveness

F11 Full Screen mode
CTRL + Zoom in
CTRL - Zoom out
CTRL 0 Reset Zoom

CTRL P Print out current page
CTRL F Search reports tables
2021-10-19 23:00:00 +02:00
jekkos
c5bf78fcbd Fix payment summary refresh after edit (#3329) 2021-10-16 23:21:14 +02:00
jekkos
3ac43c2d26 Use POST for delete supplier & customer (#3336) 2021-10-15 21:46:32 +02:00
FrancescoUK
2e33f32630 Leave cURL default for SSL because more secure 2021-10-10 14:09:49 +01:00
jekkos
986ab7e86c Make footer revision clickable (#3306) 2021-10-08 23:18:46 +02:00
FrancescoUK
9b1def4324 Translated using Weblate (English (United Kingdom))
Currently translated at 86.6% (39 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/en_GB/
2021-10-08 00:34:22 +02:00
FrancescoUK
8d87f35fd8 Fix reCaptcha issue with wrong keys (#3207) 2021-10-07 21:35:30 +01:00
FrancescoUK
35b850a19b Translated using Weblate (English (United Kingdom))
Currently translated at 81.3% (70 of 86 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2021-10-07 21:40:24 +02:00
FrancescoUK
9f13778cdb Translated using Weblate (English (United Kingdom))
Currently translated at 89.7% (105 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/en_GB/
2021-10-07 21:40:24 +02:00
FrancescoUK
1ecb834b4c Translated using Weblate (English (United Kingdom))
Currently translated at 93.1% (135 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/en_GB/
2021-10-07 21:40:23 +02:00
FrancescoUK
8e8008e285 Translated using Weblate (English (United Kingdom))
Currently translated at 92.7% (51 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/en_GB/
2021-10-07 21:40:23 +02:00
FrancescoUK
fa6e8e853b Translated using Weblate (English (United Kingdom))
Currently translated at 88.5% (177 of 200 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en_GB/
2021-10-07 21:40:22 +02:00
FrancescoUK
9c24fd8b3d Translated using Weblate (English (United Kingdom))
Currently translated at 94.1% (308 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en_GB/
2021-10-07 21:40:22 +02:00
FrancescoUK
cf59e06294 Translated using Weblate (English (United Kingdom))
Currently translated at 84.4% (38 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/en_GB/
2021-10-07 21:40:21 +02:00
FrancescoUK
2267bf6896 Translated using Weblate (English (United Kingdom))
Currently translated at 96.2% (51 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/en_GB/
2021-10-07 21:40:19 +02:00
FrancescoUK
b2d187a349 Add dev docker-compose with phpmyadmin 2021-10-06 20:24:08 +01:00
FrancescoUK
d821c69e6c Fix dev docker-compose 2021-10-06 20:22:13 +01:00
FrancescoUK
e36a74ded2 Fix CSP, it needs to be one line + ReCaptcha 2021-10-06 18:39:02 +01:00
FrancescoUK
ee5e06cd0c Fix CSP rules (and tested) 2021-10-06 14:37:11 +01:00
jekkos
d04f1e434c Try unsafe-inline for script-src, add font-src 2021-10-06 14:37:11 +01:00
jekkos
38ebf9e819 Add CSP directive for javascript (#3217) 2021-10-06 14:37:11 +01:00
FrancescoUK
05de93cb68 Update composer.lock 2021-10-05 19:10:33 +01:00
FrancescoUK
970744d8fc Update docker-compose.dev.yml 2021-10-05 19:08:37 +01:00
FrancescoUK
a5f063b382 Remove deprecated MAINTAINER from Dockerfile 2021-10-05 19:06:59 +01:00
jekkos
6b3aa876ed Amend the fix to include delete_supplier (#3332) 2021-10-04 23:23:27 +02:00
jekkos
f1672d9701 Prevent type juggling for password hash comparison (#3324) 2021-09-30 22:51:05 +02:00
Jevinson Lim
2f69841c95 Update Items.php
Fixes the problem where 'Supplier ID' is not saved during csv import.
2021-09-30 00:08:27 +02:00
jekkos
e8f27f547b Extend method hook validation for deletes 2021-09-29 00:20:13 +02:00
jekkos
2b031e6466 Fix reflected XSS vulnerability 2021-09-28 20:44:50 +02:00
WShells
6ef764d9b2 Typo 2021-09-23 08:57:29 +02:00
WebShells
d2d9c9c532 Tax name
Added tax name to tax summary report.
Closes #3009
2021-09-23 08:57:29 +02:00
WebShells
b15d0b046e Time in Reports
Replaced Date by Date/time in detailed and specific reports.
2021-09-23 08:57:29 +02:00
WebShells
e51a3e698a Revert "Time in Reports"
This reverts commit a33f29b713.
2021-09-18 23:31:16 +03:00
WebShells
a33f29b713 Time in Reports
Replaced Date by Date time in detailed reports section and specific ones.
2021-09-18 23:03:31 +03:00
objecttothis
ad7ae23f2c Correct bug preventing new item creation
The `===` (type comparison equality operator) was preventing new items from being created because $item_id was coming through as a string and not an integer.
2021-09-14 07:47:35 +01:00
jekkos
a2e7c0a74b Revert SQLi fixes (#3284) 2021-09-06 21:45:08 +02:00
jekkos
136448444d Enable mode_headers for docker 2021-08-31 08:26:23 +02:00
jekkos
2c9355e8b8 Add X-Frame-Options header (prevent clickjacking) 2021-08-30 22:10:07 +02:00
jekkos
77c30b7f90 Use bootstrap 5.0.2 (#3281) 2021-08-28 11:22:09 +02:00
jekkos
fe727674a5 Merge all unstable builds in one draft release (#3110) 2021-08-27 14:13:21 +02:00
jekkos
b4c48e5141 Blind sql injection fixes (#3284) 2021-08-27 00:20:50 +02:00
jekkos
b925155ba5 Update changelist (#3218) 2021-08-26 08:23:40 +02:00
jekkos
d07b9349e3 Try to upgrade docker version (#3281) 2021-08-26 00:29:50 +02:00
jekkos
51a8cffc9e Bump to 3.3.5 (#3281) 2021-08-25 23:13:40 +02:00
Dan Tiganuc
694b7fe52d Translated using Weblate (Romanian)
Currently translated at 10.2% (12 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ro/
2021-08-24 11:29:46 +02:00
jekkos
5669dff7da Add sorting for quantity and sales (#3262) 2021-08-20 23:36:02 +02:00
Johntini
6d8890f61e Translated using Weblate (Spanish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/es/
2021-08-20 22:41:13 +02:00
Johntini
a4bae6536d Translated using Weblate (Spanish)
Currently translated at 100.0% (41 of 41 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/es/
2021-08-20 22:41:13 +02:00
Johntini
e1e61ba98d Translated using Weblate (Spanish)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/es/
2021-08-20 22:41:13 +02:00
Johntini
225bfda867 Translated using Weblate (Spanish)
Currently translated at 100.0% (79 of 79 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/es/
2021-08-20 22:41:13 +02:00
Johntini
0a2dc49e3e Translated using Weblate (Spanish)
Currently translated at 100.0% (86 of 86 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es/
2021-08-20 22:41:13 +02:00
Johntini
dcc9745991 Translated using Weblate (Spanish)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2021-08-20 22:41:13 +02:00
Johntini
339eca6028 Translated using Weblate (Spanish)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/es/
2021-08-20 22:41:13 +02:00
Johntini
d1e9b6d943 Translated using Weblate (Spanish)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/es/
2021-08-20 22:41:13 +02:00
Johntini
2da34b0789 Translated using Weblate (Spanish)
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es/
2021-08-20 22:41:13 +02:00
Johntini
44d89a5ed2 Translated using Weblate (Spanish)
Currently translated at 100.0% (37 of 37 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/es/
2021-08-20 22:41:13 +02:00
Johntini
0637266560 Translated using Weblate (Spanish)
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es/
2021-08-20 22:41:13 +02:00
Johntini
32c99248af Translated using Weblate (Spanish)
Currently translated at 100.0% (55 of 55 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/es/
2021-08-20 22:41:13 +02:00
Johntini
fad53d52d4 Translated using Weblate (Spanish)
Currently translated at 100.0% (200 of 200 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es/
2021-08-20 22:41:13 +02:00
Johntini
29bdb7b75e Translated using Weblate (Spanish)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/es/
2021-08-20 22:41:13 +02:00
Johntini
3f1bbf99b4 Translated using Weblate (Spanish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/es/
2021-08-20 22:41:13 +02:00
Jeroen Peelaerts
4c3f6e4c31 Fix username verification on insert/update (#3239) 2021-08-07 02:12:30 +02:00
Jeroen Peelaerts
85f577556e Fix employee update (#3239) 2021-08-07 02:12:30 +02:00
Jeroen Peelaerts
dc2b2862f9 Fix employee update (#3239) 2021-08-07 02:12:30 +02:00
objecttothis
9217f2d12f Fixed missing function call
This removes the function call to a function that doesn't exist anymore.
The replacement does the same job in one line of code.
Added comment to bring clarity to what the code is doing.
2021-08-06 19:19:09 +02:00
objecttothis
5ebe626543 Formatting Changes
- Removed unneeded tabs that mess up alignment.
2021-08-06 19:16:52 +02:00
Mehmet Keçeci
e277fc09ac minimal Turkish translation 2021-08-05 10:40:56 +02:00
sonnysk76
7e2a5eb297 Translated using Weblate (Spanish (Mexico))
Currently translated at 94.4% (34 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/es_MX/
2021-08-05 07:09:41 +02:00
sonnysk76
bcc9cac570 Translated using Weblate (Spanish (Mexico))
Currently translated at 35.8% (14 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/es_MX/
2021-08-05 07:09:41 +02:00
sonnysk76
6d4421e13b Translated using Weblate (Spanish (Mexico))
Currently translated at 13.6% (15 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/es_MX/
2021-08-05 07:09:41 +02:00
sonnysk76
9d320772f5 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/es_MX/
2021-08-05 07:09:41 +02:00
sonnysk76
3d441689d0 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/es_MX/
2021-08-05 07:09:40 +02:00
sonnysk76
4eacc65785 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/es_MX/
2021-08-05 07:09:40 +02:00
sonnysk76
a31ae36e18 Translated using Weblate (Spanish (Mexico))
Currently translated at 19.4% (27 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2021-08-05 07:09:40 +02:00
sonnysk76
74ed7488ee Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/es_MX/
2021-08-05 07:09:39 +02:00
khao_lek
be72a0169b Translated using Weblate (Thai)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/th/
2021-08-04 07:03:00 +02:00
khao_lek
d786039765 Translated using Weblate (Thai)
Currently translated at 99.3% (300 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/th/
2021-08-04 07:03:00 +02:00
khao_lek
74724a890f Translated using Weblate (Thai)
Currently translated at 98.7% (76 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/th/
2021-08-04 07:03:00 +02:00
Jeroen Peelaerts
8c201816b9 Update spanish (#3255) 2021-08-03 11:04:03 +02:00
Jeroen Peelaerts
5767a3929f Fix duplicate username error message (#3239) 2021-07-30 21:16:35 +02:00
Jeroen Peelaerts
2311a644ab Fix employee username duplication check (#3239) 2021-07-30 21:09:17 +02:00
objecttothis
3d65c3fffa CSV import optimizations and code cleanup (#3150)
Optimizations and CSV Import Rework
- Replaced " with ' where possible to prevent the parser from being called when not needed.
- Replaced == and != with === and !== where possible for bug prevention and speed.
- Replaced -1 with NEW_ITEM global constant for code clarity.
- Added NEW_ITEM global constant to constants.php.
- Refactored CSV import function names for clarity.
- Added capability to import a CSV file containing updates.
- Replaced array() with [] for speed and consistency.
- Removed hungarian notation from two private functions.
- Refactored QueryBuilder functions to place table name in the get() function call.
- Replaced (int) cast with call to intval() for speed.
- Replaced == and != with === and !== where possible to prevent bugs and for speed.
- Replaced array() with [] for speed and consistency.
- Fixed search_custom call

Optimizations and bugfixes for attributes used in csv_import
- Reordered where statements in queries to match composite index on attribute_links table.
- fixed value_exists() to account for different attribute types.
- Removed hungarian notation on private function.
- Replaced array() with [] for speed and consistency.
- Replaced != with <> in SQL for consistency.
- Removed from() calls in querybuilder where possible to reduce function calls.
- Add get_items_by_value()
- Reworked check_data_validity()
- Remove unneeded comments
- Refactor functions for code clarity.
- Use $this->db->dbprefix() where possible instead of hand-writing ospos_...
- Removed unneeded column from query.
- Replaced (int) cast with intval() call for speed.
- Added get_attribute_values()
- Fixed issue with date format locale not being used
- Refactored save_value to respect different attribute_types
- Added delete_orphaned_links() to remove attribute_links that are no longer linked to any items
- Added get_attributes_by_definition()
- Added attribute_cleanup()

Optimizations used in csv_import
- replaced array() with [] for consistency and speed.
- Removed hungarian notation in private functions.
- Replaced " with ' where possible to prevent the parser from being called.
- Minor formatting
- Refactored if statement to tertiary notation for cleaner implementation.
- Replaced " for ' where possible to prevent the parser from being called.
- Added the Id column in the generate_import_items_csv() template so that users can submit an update to an existing item.
- Removed unused key=>value pairs in foreach loops for speed.
- Removed unneeded comments where the function name was self-explanatory.
- Rework get_csv_file() for speed.
- Rework bom_exists() for speed.
- Replaced array() with [] for speed and consistency.
- Replaced == with === where possible to prevent bugs and for speed.
- Reworked valid_date() and valid_decimal helper functions for speed and accuracy according to the locale_format instead of a fixed format.
- Minor Reformatting for clarity.
- Replaced " for ' to prevent the parser from being called.
- Refactored function call names to reflect new names.
- Added missing ; in &nbsp;
- Used String interpolation where useful.

- Spelling fix in comment

Requested Review Changes
- Fixed indentation in Items.php
- Fixed indentation in Attribute.php
- Refactored variable out of long line of code to make it more readable.
2021-07-29 22:22:59 +02:00
gurulenin
517635181c Translated using Weblate (Tamil)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ta/
2021-07-28 15:46:15 +02:00
Jeroen Peelaerts
1547272665 Check username before employee creation (#3239) 2021-07-23 00:59:40 +02:00
Jeroen Peelaerts
8675aa82df Attribute value encoding fix (#3241) 2021-07-22 19:01:59 +02:00
gurulenin
5acafd4ea8 Translated using Weblate (Tamil)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/ta/
2021-07-22 18:45:40 +02:00
gurulenin
2db50d69d0 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ta/
2021-07-22 18:45:40 +02:00
Jeroen Peelaerts
c6d0582fcb Add category column to item summary report (#3240) 2021-07-21 23:22:53 +02:00
Emin Tufan Çetin
3fbfd8c917 Translated using Weblate (Turkish)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
c38fc60f6a Translated using Weblate (Turkish)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
346a34121f Translated using Weblate (Turkish)
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
9c9c2e8b81 Translated using Weblate (Turkish)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/tr/
2021-07-18 11:06:09 +02:00
Emin Tufan Çetin
510a01e2b5 Translated using Weblate (Turkish)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/tr/
2021-07-18 11:06:09 +02:00
Emin Tufan Çetin
93014dc4d8 Translated using Weblate (Turkish)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
294f63bd31 Translated using Weblate (Turkish)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
1b7531c7f4 Translated using Weblate (Turkish)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
6d1eeb3c62 Translated using Weblate (Turkish)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/tr/
2021-07-18 11:06:07 +02:00
Emin Tufan Çetin
3ada6f8372 Translated using Weblate (Turkish)
Currently translated at 100.0% (302 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/tr/
2021-07-18 11:06:07 +02:00
Emin Tufan Çetin
d15d001b5b Translated using Weblate (Turkish)
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/tr/
2021-07-18 11:06:06 +02:00
BudsieBuds
29d6138951 Translated using Weblate (Dutch)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl/
2021-07-17 04:55:34 +02:00
BudsieBuds
d6a4161416 Translated using Weblate (Dutch)
Currently translated at 96.1% (74 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-07-17 04:55:34 +02:00
BudsieBuds
0604ad121b Translated using Weblate (Dutch)
Currently translated at 99.3% (300 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/nl/
2021-07-17 04:55:34 +02:00
teddy tang
ffdc8f0bd5 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-15 06:59:54 +02:00
teddy tang
83d1194d0c Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/zh_Hant/
2021-07-15 06:59:54 +02:00
gurulenin
e90b58f110 Translated using Weblate (Tamil)
Currently translated at 98.7% (76 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ta/
2021-07-15 06:59:53 +02:00
gurulenin
bee3c7ede0 Translated using Weblate (Tamil)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ta/
2021-07-15 06:59:53 +02:00
gurulenin
bfc1c2e55e Translated using Weblate (Tamil)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ta/
2021-07-15 06:59:53 +02:00
teddy tang
8d0c5c6ee9 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/zh_Hant/
2021-07-15 06:59:53 +02:00
teddy tang
f87c90fdec Translated using Weblate (Chinese (Traditional))
Currently translated at 96.0% (290 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-15 06:59:52 +02:00
FrancescoUK
cb560949ac Translated using Weblate (English (United Kingdom))
Currently translated at 92.2% (71 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2021-07-14 23:56:52 +02:00
FrancescoUK
4d5a2f15c2 Translated using Weblate (English (United Kingdom))
Currently translated at 54.5% (6 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/en_GB/
2021-07-14 23:56:52 +02:00
FrancescoUK
defb484640 Translated using Weblate (English (United Kingdom))
Currently translated at 98.6% (298 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en_GB/
2021-07-14 23:56:52 +02:00
Jeroen Peelaerts
57fb2c98fa Move expenses categories to office menu group 2021-07-14 23:43:36 +02:00
Jeroen Peelaerts
c3bdff6fb4 Fix escape sequence in Polish 2021-07-14 15:50:34 +02:00
teddy tang
4ecfbc2398 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
41152a5b12 Translated using Weblate (Tamil)
Currently translated at 99.4% (179 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ta/
2021-07-14 14:06:17 +02:00
teddy tang
797ac4c9d4 Translated using Weblate (Chinese (Traditional))
Currently translated at 80.5% (240 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
13be0a1b0c Translated using Weblate (Tamil)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ta/
2021-07-14 14:06:17 +02:00
gurulenin
b6ac9e5909 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-07-14 14:06:17 +02:00
gurulenin
3debc57ca8 Translated using Weblate (Tamil)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ta/
2021-07-14 14:06:17 +02:00
teddy tang
fd1e942273 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
c641b1762c Translated using Weblate (Tamil)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ta/
2021-07-14 14:06:17 +02:00
gurulenin
6ee8757b12 Translated using Weblate (Tamil)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ta/
2021-07-14 14:06:17 +02:00
teddy tang
ee575b5109 Translated using Weblate (Chinese (Traditional))
Currently translated at 90.6% (126 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-14 14:06:17 +02:00
Jeroen Peelaerts
e11eba978f Sync language files 2021-07-14 08:35:04 +02:00
Jeroen Peelaerts
a4234a3129 Fix minification (#3213)
Upgrade grunt, grunt-cli and grunt-uglify

Only copy bootswatch 5 using npm.  Remove unused dependencies and tasks
(apigen, mocha, wd, phantomjs). This should decrease the container size.
2021-07-14 08:35:04 +02:00
BudsieBuds
ba8cb0ef86 Create codeql-analysis.yml 2021-07-14 08:35:04 +02:00
BudsieBuds
2eee6313e0 Converted login to BS5 and other changes
Converted the login view to Bootstrap and Bootswatch 5. Added an option to change the login form style. Shifted some translations around and added new ones. Partially moved from Bower to NPM, added new branding logo's. Some other small changes and optimizations.
2021-07-14 08:35:04 +02:00
Jeroen Peelaerts
95f19d6063 Force html2canvas version (#3236) 2021-07-14 00:18:00 +02:00
jacekz123
8a854d1912 Translated using Weblate (Polish)
Currently translated at 2.7% (1 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/pl/
2021-07-13 18:03:01 +02:00
jacekz123
80f8dd9b37 Translated using Weblate (Polish)
Currently translated at 2.5% (1 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/pl/
2021-07-13 18:03:00 +02:00
jacekz123
94e9d35314 Translated using Weblate (Polish)
Currently translated at 3.8% (2 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/pl/
2021-07-13 18:03:00 +02:00
jacekz123
8b5b4f9279 Translated using Weblate (Polish)
Currently translated at 5.5% (2 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/pl/
2021-07-13 18:03:00 +02:00
jacekz123
b3e4b72b30 Translated using Weblate (Polish)
Currently translated at 1.1% (2 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/pl/
2021-07-13 18:03:00 +02:00
jacekz123
ffd511bd06 Translated using Weblate (Polish)
Currently translated at 1.2% (1 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/pl/
2021-07-13 18:02:59 +02:00
jacekz123
393cee62aa Translated using Weblate (Polish)
Currently translated at 55.0% (11 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/pl/
2021-07-13 18:02:58 +02:00
jacekz123
870aad2d67 Translated using Weblate (Polish)
Currently translated at 12.5% (1 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/pl/
2021-07-13 18:02:58 +02:00
jacekz123
789eb82940 Translated using Weblate (Polish)
Currently translated at 3.4% (1 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/pl/
2021-07-13 18:02:58 +02:00
jacekz123
89783bc190 Translated using Weblate (Polish)
Currently translated at 8.3% (1 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/pl/
2021-07-13 18:02:57 +02:00
jacekz123
d11824ffd4 Translated using Weblate (Polish)
Currently translated at 1.9% (1 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/pl/
2021-07-13 18:02:57 +02:00
jacekz123
d0093253a1 Translated using Weblate (Polish)
Currently translated at 2.2% (1 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/pl/
2021-07-13 18:02:57 +02:00
jacekz123
1f7529baf9 Translated using Weblate (Polish)
Currently translated at 8.6% (12 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/pl/
2021-07-13 18:02:57 +02:00
jacekz123
feba68b08f Translated using Weblate (Polish)
Currently translated at 2.8% (1 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/pl/
2021-07-13 18:02:56 +02:00
jacekz123
37cf26b10a Translated using Weblate (Polish)
Currently translated at 12.5% (1 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/pl/
2021-07-13 18:02:56 +02:00
jacekz123
f80f3a9cab Translated using Weblate (Polish)
Currently translated at 4.7% (1 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/pl/
2021-07-13 18:02:55 +02:00
teddy tang
74a4bfac85 Translated using Weblate (Chinese (Traditional))
Currently translated at 74.1% (221 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-12 12:00:34 +02:00
teddy tang
fa347aa281 Translated using Weblate (Chinese (Traditional))
Currently translated at 88.1% (97 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/zh_Hant/
2021-07-12 12:00:33 +02:00
teddy tang
c1f1e6306e Translated using Weblate (Chinese (Traditional))
Currently translated at 84.1% (117 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-12 12:00:32 +02:00
teddy tang
dc9d66f3de Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/zh_Hant/
2021-07-12 08:06:57 +02:00
teddy tang
a4f52b765c Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/zh_Hant/
2021-07-12 08:06:57 +02:00
teddy tang
e023b081c5 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/zh_Hant/
2021-07-12 08:06:56 +02:00
teddy tang
9c6f1e4429 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/zh_Hant/
2021-07-12 08:06:56 +02:00
teddy tang
962a323694 Translated using Weblate (Chinese (Traditional))
Currently translated at 82.7% (91 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/zh_Hant/
2021-07-12 08:06:56 +02:00
teddy tang
49a99c68ff Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/zh_Hant/
2021-07-12 08:06:56 +02:00
teddy tang
44024b0929 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/zh_Hant/
2021-07-12 08:06:55 +02:00
teddy tang
4e52c2f036 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/zh_Hant/
2021-07-12 08:06:55 +02:00
teddy tang
37e757128b Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/zh_Hant/
2021-07-12 08:06:55 +02:00
teddy tang
394bd671aa Translated using Weblate (Chinese (Traditional))
Currently translated at 73.4% (219 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-12 08:06:55 +02:00
teddy tang
d0b29d39bf Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/zh_Hant/
2021-07-12 08:06:54 +02:00
teddy tang
eb970b2315 Translated using Weblate (Chinese (Traditional))
Currently translated at 77.6% (108 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-12 08:06:54 +02:00
teddy tang
c0c2001754 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/zh_Hant/
2021-07-12 08:06:54 +02:00
teddy tang
ec51bb3991 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/zh_Hant/
2021-07-12 08:06:53 +02:00
teddy tang
4ce569d76e Translated using Weblate (Chinese (Traditional))
Currently translated at 58.3% (21 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/zh_Hant/
2021-07-09 17:20:46 +02:00
teddy tang
c08e32d016 Translated using Weblate (Chinese (Traditional))
Currently translated at 66.6% (24 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/zh_Hant/
2021-07-09 17:20:46 +02:00
Ali Alsalman
8a495ffce6 Translated using Weblate (Arabic)
Currently translated at 98.8% (178 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ar_LB/
2021-07-09 17:20:45 +02:00
teddy tang
ea1528f5b9 Translated using Weblate (Chinese (Traditional))
Currently translated at 90.0% (18 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/zh_Hant/
2021-07-09 17:20:45 +02:00
teddy tang
e59dbdf47e Translated using Weblate (Chinese (Traditional))
Currently translated at 79.0% (87 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/zh_Hant/
2021-07-09 17:20:44 +02:00
teddy tang
0e29a7950a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/zh_Hant/
2021-07-09 17:20:44 +02:00
teddy tang
3d32536292 Translated using Weblate (Chinese (Traditional))
Currently translated at 71.8% (214 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-09 17:20:44 +02:00
teddy tang
be24044076 Translated using Weblate (Chinese (Traditional))
Currently translated at 98.5% (67 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/zh_Hant/
2021-07-09 17:20:44 +02:00
teddy tang
3986aa8e0a Translated using Weblate (Chinese (Traditional))
Currently translated at 76.9% (107 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-09 17:20:43 +02:00
teddy tang
d7e40cbe43 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/zh_Hant/
2021-07-09 17:20:42 +02:00
teddy tang
f61307d380 Translated using Weblate (Chinese (Traditional))
Currently translated at 82.0% (64 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/zh_Hant/
2021-07-09 17:20:42 +02:00
Ir. Anggun Nugroho, M.Kom
ebae2eab5d Translated using Weblate (Indonesian)
Currently translated at 99.0% (109 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/id/
2021-07-08 00:27:05 +02:00
Ir. Anggun Nugroho, M.Kom
795e030e07 Translated using Weblate (Indonesian)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2021-07-08 00:27:05 +02:00
Ir. Anggun Nugroho, M.Kom
0a91c0009f Translated using Weblate (Indonesian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/id/
2021-07-08 00:27:05 +02:00
Ir. Anggun Nugroho, M.Kom
5cea9a7555 Translated using Weblate (Indonesian)
Currently translated at 98.0% (51 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2021-07-08 00:27:05 +02:00
Ir. Anggun Nugroho, M.Kom
9838045683 Translated using Weblate (Indonesian)
Currently translated at 99.4% (179 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2021-07-08 00:27:04 +02:00
Ir. Anggun Nugroho, M.Kom
e33c10e8c4 Translated using Weblate (Indonesian)
Currently translated at 87.5% (7 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/id/
2021-07-07 22:23:41 +02:00
Ir. Anggun Nugroho, M.Kom
d680b78e49 Translated using Weblate (Indonesian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/id/
2021-07-07 22:01:53 +02:00
jeffyeh
4d7561d311 Translated using Weblate (Chinese (Traditional))
Currently translated at 66.6% (24 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/zh_Hant/
2021-07-07 17:10:13 +02:00
jeffyeh
ad37b2cc24 Translated using Weblate (Chinese (Traditional))
Currently translated at 74.3% (29 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/zh_Hant/
2021-07-07 17:10:13 +02:00
jeffyeh
562d760174 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/zh_Hant/
2021-07-07 17:10:13 +02:00
jeffyeh
3ea32e7444 Translated using Weblate (Chinese (Traditional))
Currently translated at 71.8% (214 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-07 17:10:12 +02:00
jeffyeh
2953cf47ed Translated using Weblate (Chinese (Traditional))
Currently translated at 28.5% (2 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/zh_Hant/
2021-07-07 17:10:12 +02:00
jeffyeh
0066447fdb Translated using Weblate (Chinese (Traditional))
Currently translated at 63.7% (190 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-07 12:22:53 +02:00
jeffyeh
8af2466b20 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/zh_Hant/
2021-07-07 12:22:52 +02:00
jeffyeh
fb7fd0fc38 Translated using Weblate (Chinese (Traditional))
Currently translated at 64.1% (50 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/zh_Hant/
2021-07-07 12:22:52 +02:00
William Levesque
52c08e9210 Translated using Weblate (French)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/fr/
2021-07-06 16:58:06 +02:00
William Levesque
f17388e755 Translated using Weblate (French)
Currently translated at 93.1% (27 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/fr/
2021-07-06 16:58:06 +02:00
Jeroen Peelaerts
a39b3ec1bc Fallback to english if translations are missing (#3205) 2021-07-04 22:18:46 +02:00
Jeroen Peelaerts
ddc7215424 Make Dockerfile windows compatible 2021-07-04 22:18:46 +02:00
khao_lek
2e09cd31c2 Translated using Weblate (Thai)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/th/
2021-07-02 13:44:39 +02:00
Jeroen Peelaerts
7726adbd6f Revert compose container to 3.3.4 2021-06-29 22:33:02 +02:00
Ricardo Vargas
7bce75f5b6 Translated using Weblate (Spanish (Mexico))
Currently translated at 16.5% (23 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2021-06-21 13:23:12 +02:00
jekkos
ef612fb0c9 Update package.json 2021-06-12 11:35:14 +02:00
jekkos
107745d683 Update grunt to 1.4
A CVE was found in the old version of Grunt. Update to the latest.
2021-06-12 11:35:14 +02:00
Jeroen Peelaerts
1117c39c27 Upgrade node & grunt buildbox (#3208) 2021-06-12 10:34:52 +02:00
BudsieBuds
ae93341f75 Translated using Weblate (Dutch)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl/
2021-06-09 23:20:00 +02:00
BudsieBuds
d24624d1f6 Translated using Weblate (English)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/en/
2021-06-09 23:20:00 +02:00
jekkos
d87d27dec9 Extract version from config.php (#3110) 2021-06-09 17:51:19 +02:00
jekkos
92f25c3993 Remove bintray link (#3110) 2021-06-09 15:46:07 +02:00
jekkos
3116903129 Add newline to .travis.yml (#3110) 2021-06-09 15:30:52 +02:00
jekkos
cff79601e4 Keep only one zip build per branch (#3110) 2021-06-09 13:15:30 +02:00
BudsieBuds
9ca998d523 Translated using Weblate (Dutch)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/nl/
2021-06-09 04:30:43 +02:00
jekkos
0efd58217f Publish to github releases (#3110) 2021-06-09 00:02:32 +02:00
khao_lek
72eab0cd28 Translated using Weblate (Thai)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/th/
2021-06-07 21:45:10 +02:00
khao_lek
a258567955 Translated using Weblate (Thai)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/th/
2021-06-07 21:45:10 +02:00
khao_lek
ca4782f751 Translated using Weblate (Thai)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/th/
2021-06-07 21:45:10 +02:00
khao_lek
e638ff8595 Translated using Weblate (Thai)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/th/
2021-06-07 21:45:10 +02:00
khao_lek
5f10fda2c1 Translated using Weblate (Thai)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/th/
2021-06-07 21:45:10 +02:00
khao_lek
1faeccc596 Translated using Weblate (Thai)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/th/
2021-06-07 21:45:10 +02:00
khao_lek
fb328e4fb0 Translated using Weblate (Thai)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/th/
2021-06-07 21:45:10 +02:00
jekkos
136f778028 Update build badge for travis-ci.com (#3063) 2021-06-06 14:37:13 +02:00
truchosky
8ed0091400 Translated using Weblate (Spanish)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/es/
2021-06-03 16:35:11 +02:00
truchosky
977d1869e6 Translated using Weblate (Spanish)
Currently translated at 98.6% (71 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/es/
2021-06-03 16:35:11 +02:00
truchosky
cc527d8426 Translated using Weblate (Spanish)
Currently translated at 87.5% (7 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/es/
2021-06-03 16:35:10 +02:00
truchosky
aa28c0dbf0 Translated using Weblate (Spanish)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/es/
2021-06-03 16:35:10 +02:00
Mats Pålsson
15f41c129c Translated using Weblate (Swedish)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2021-06-02 07:54:24 +02:00
Mats Pålsson
ee30b4d544 Translated using Weblate (Swedish)
Currently translated at 98.7% (77 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/sv/
2021-06-02 07:54:24 +02:00
Mats Pålsson
2d0029e605 Translated using Weblate (Swedish)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/sv/
2021-06-02 07:54:24 +02:00
Mats Pålsson
3fb4b398ea Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/sv/
2021-06-02 07:54:24 +02:00
Mats Pålsson
ebe1860858 Translated using Weblate (Swedish)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/sv/
2021-06-02 07:54:24 +02:00
Mats Pålsson
7f18d7c1fa Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/sv/
2021-06-02 07:54:23 +02:00
Mats Pålsson
e77b357b38 Translated using Weblate (Swedish)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/sv/
2021-06-02 07:54:23 +02:00
Mats Pålsson
3e90244410 Translated using Weblate (Swedish)
Currently translated at 99.6% (297 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/sv/
2021-06-02 07:54:23 +02:00
Mats Pålsson
2689426e15 Translated using Weblate (Swedish)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/sv/
2021-06-02 07:54:22 +02:00
Mats Pålsson
fc3cff5225 Translated using Weblate (Swedish)
Currently translated at 98.0% (51 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/sv/
2021-06-02 07:54:22 +02:00
Mats Pålsson
5cee7cd005 Translated using Weblate (Swedish)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/sv/
2021-06-02 07:54:22 +02:00
Mats Pålsson
e29b8b1b87 Translated using Weblate (Swedish)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/sv/
2021-06-02 07:54:22 +02:00
Mats Pålsson
b3e49f05d1 Translated using Weblate (Swedish)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/sv/
2021-06-02 07:54:21 +02:00
Mats Pålsson
274ad1afde Translated using Weblate (Swedish)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/sv/
2021-06-02 07:54:21 +02:00
Mats Pålsson
d4df4e96b6 Translated using Weblate (Swedish)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/sv/
2021-06-02 07:54:21 +02:00
Mats Pålsson
20f104abc8 Translated using Weblate (Swedish)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/sv/
2021-06-02 07:54:21 +02:00
Mats Pålsson
25b22a2ebe Translated using Weblate (Swedish)
Currently translated at 98.8% (178 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/sv/
2021-06-02 07:54:20 +02:00
Mats Pålsson
6ecd9a91c4 Translated using Weblate (Swedish)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/sv/
2021-06-02 07:54:20 +02:00
Mats Pålsson
d2f48a9987 Translated using Weblate (Swedish)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/sv/
2021-06-02 07:54:20 +02:00
Mats Pålsson
c90631fe38 Translated using Weblate (Swedish)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/sv/
2021-06-02 07:54:19 +02:00
Mats Pålsson
dfb47060fa Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/sv/
2021-05-31 13:08:38 +02:00
Mats Pålsson
f50cbbf29d Translated using Weblate (Swedish)
Currently translated at 28.5% (2 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/sv/
2021-05-31 13:08:38 +02:00
Mats Pålsson
a186de7db2 Translated using Weblate (Swedish)
Currently translated at 98.6% (71 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/sv/
2021-05-31 13:08:38 +02:00
Mats Pålsson
4845230bd3 Translated using Weblate (Swedish)
Currently translated at 66.6% (8 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/sv/
2021-05-31 13:08:38 +02:00
Mats Pålsson
ac0ec7d729 Translated using Weblate (Swedish)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/sv/
2021-05-31 13:08:38 +02:00
Mats Pålsson
25b3de4f2f Translated using Weblate (Swedish)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/sv/
2021-05-31 13:08:38 +02:00
Jeroen Peelaerts
aee186b2a6 Bump to 3.4.0-dev (#2942) 2021-05-26 00:48:42 +02:00
objecttothis
352036209f Requested Changes
- Removed unnecessary indices on deleted column where there would not be many rows.
- Removed unnecessary parenthesis in Item Model.
- Added Composite indices based on MySQL EXPLAIN results.
2021-05-25 14:04:01 +02:00
objecttothis
9ff8611672 Requested Changes
- Removed unnecessary indices on deleted column where there would not be many rows.
- Explicitly stated NULL in second parameter of WHERE to improve readability.
2021-05-25 14:04:01 +02:00
objecttothis
2f4c95ecd2 Corrected a duplicated line in the query 2021-05-25 14:04:01 +02:00
objecttothis
97159d42c7 Database Optimizations
- Add indexes to tables to improve query times.
- Delete orphaned attribute values.
- Resolve duplicate attribute values.
- Deleted whitespace after migration which was causing Severity: Warning --> Cannot modify header information - headers already sent by
2021-05-25 14:04:01 +02:00
Miguel Martins
2b9155d2f1 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es_MX/
2021-05-24 20:51:50 +02:00
Miguel Martins
dab1640e70 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/es_MX/
2021-05-24 20:51:50 +02:00
Miguel Martins
2bc70f6426 Translated using Weblate (Spanish (Mexico))
Currently translated at 15.8% (22 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/es_MX/
2021-05-24 20:51:49 +02:00
Miguel Martins
15130140be Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2021-05-24 06:01:58 +02:00
Miguel Martins
aab5ae685a Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/en_GB/
2021-05-24 06:01:58 +02:00
Miguel Martins
afedaa4510 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en_GB/
2021-05-24 06:01:58 +02:00
Miguel Martins
0e79e145c3 Translated using Weblate (Spanish)
Currently translated at 95.9% (286 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/es/
2021-05-24 06:01:58 +02:00
Miguel Martins
fabc4d7153 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/pt_BR/
2021-05-24 06:01:58 +02:00
Miguel Martins
0e2b7a87d9 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/en_GB/
2021-05-24 06:01:58 +02:00
Miguel Martins
115b014a8c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/pt_BR/
2021-05-24 06:01:58 +02:00
Miguel Martins
70bb633581 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/pt_BR/
2021-05-24 06:01:58 +02:00
Miguel Martins
1c86b0b697 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/pt_BR/
2021-05-24 06:01:58 +02:00
Miguel Martins
75684ab009 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/pt_BR/
2021-05-24 06:01:58 +02:00
Miguel Martins
b7e164a4a6 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en_GB/
2021-05-24 06:01:58 +02:00
Miguel Martins
ddc12be596 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/en_GB/
2021-05-24 06:01:58 +02:00
Steve Ireland
0147c3a80e Fix Discounted Item Kit bug #3129 (#3186) 2021-05-23 18:30:31 -04:00
robbytriadi
6dc3816c46 Translated using Weblate (Indonesian)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/id/
2021-05-23 00:47:39 +02:00
robbytriadi
88ca4aca87 Translated using Weblate (Indonesian)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2021-05-23 00:47:39 +02:00
robbytriadi
ae37dd9bea Translated using Weblate (Indonesian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/id/
2021-05-23 00:47:39 +02:00
robbytriadi
e24cd75f0d Translated using Weblate (Indonesian)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2021-05-23 00:47:38 +02:00
Natig Asadov
b79e93ccb6 Translated using Weblate (Azerbaijani)
Currently translated at 97.2% (35 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/az/
2021-05-21 22:11:14 +02:00
Anton
ad3399b1f6 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/uk-UA/
2021-05-21 04:52:42 +02:00
Anton
a3b45f0f4b Translated using Weblate (Ukrainian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/uk-UA/
2021-05-21 04:52:42 +02:00
Anton
200cab389a Translated using Weblate (Ukrainian)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/uk-UA/
2021-05-21 04:52:42 +02:00
Anton
b53d0ad821 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/uk-UA/
2021-05-21 04:52:42 +02:00
Anton
8fa6992b00 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
fe6d599005 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
374cacd860 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
fcd65a6e9c Translated using Weblate (Ukrainian)
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
309417c405 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
50bca01126 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/uk-UA/
2021-05-21 04:52:41 +02:00
Anton
fa9bb50b73 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/uk-UA/
2021-05-21 04:52:40 +02:00
Anton
2ec186d3a3 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/uk-UA/
2021-05-21 04:52:40 +02:00
Anton
1574e99338 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/uk-UA/
2021-05-21 04:52:40 +02:00
Anton
1c36e649d6 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/uk-UA/
2021-05-21 04:52:39 +02:00
Anton
01b8828871 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/uk-UA/
2021-05-21 04:52:39 +02:00
BudsieBuds
0e2fbb9832 Translated using Weblate (English)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/en/
2021-05-19 23:49:49 +02:00
BudsieBuds
87c788af62 Translated using Weblate (English)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/en/
2021-05-19 23:49:49 +02:00
BudsieBuds
ac9830ec2b Translated using Weblate (Dutch)
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/nl/
2021-05-19 23:49:48 +02:00
BudsieBuds
3d3c928d98 Translated using Weblate (Dutch)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/nl/
2021-05-19 23:49:48 +02:00
BudsieBuds
a3d8b11be0 Translated using Weblate (Dutch)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/nl/
2021-05-19 23:49:48 +02:00
BudsieBuds
4929d7c8ce Translated using Weblate (Dutch)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/nl/
2021-05-19 23:49:47 +02:00
BudsieBuds
5493c75320 Translated using Weblate (English)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2021-05-19 23:49:47 +02:00
BudsieBuds
1e1e992f94 Translated using Weblate (Dutch)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-05-19 23:49:47 +02:00
BudsieBuds
e26f9e9fa7 Translated using Weblate (English)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/en/
2021-05-19 23:49:47 +02:00
BudsieBuds
a90af8dd9e Translated using Weblate (Dutch)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/nl/
2021-05-19 23:49:46 +02:00
BudsieBuds
13a6ce3e45 Translated using Weblate (Dutch)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/nl/
2021-05-19 23:49:46 +02:00
BudsieBuds
7af15c253c Translated using Weblate (Dutch)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/nl/
2021-05-19 23:49:46 +02:00
BudsieBuds
3f18619497 Translated using Weblate (Dutch)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/nl/
2021-05-19 23:49:46 +02:00
BudsieBuds
8a904ba749 Translated using Weblate (Dutch)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/nl/
2021-05-19 23:49:45 +02:00
BudsieBuds
aaa1055adc Translated using Weblate (Dutch)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/nl/
2021-05-19 23:49:45 +02:00
BudsieBuds
cddc67bb2d Translated using Weblate (English)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en/
2021-05-19 23:49:45 +02:00
BudsieBuds
246a121203 Translated using Weblate (Dutch)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/nl/
2021-05-19 23:49:44 +02:00
BudsieBuds
4402d35ed7 Translated using Weblate (Dutch)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/nl/
2021-05-19 23:49:43 +02:00
BudsieBuds
3696e7237b Translated using Weblate (Dutch)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/nl/
2021-05-19 23:49:43 +02:00
BudsieBuds
f2e20266d3 Translated using Weblate (Dutch)
Currently translated at 14.0% (42 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/nl/
2021-05-18 23:31:03 +02:00
BudsieBuds
12952aaa26 Translated using Weblate (Dutch)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/nl/
2021-05-18 23:31:02 +02:00
BudsieBuds
faebbce51a Translated using Weblate (Dutch)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/nl/
2021-05-18 23:31:02 +02:00
BudsieBuds
5f9ed5c576 Translated using Weblate (Dutch)
Currently translated at 98.6% (71 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-05-18 23:31:02 +02:00
BudsieBuds
24644eaf19 Translated using Weblate (Dutch)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/nl/
2021-05-18 23:31:01 +02:00
BudsieBuds
3314705d7a Translated using Weblate (Dutch)
Currently translated at 94.8% (37 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/nl/
2021-05-18 23:31:01 +02:00
BudsieBuds
c9552585bf Translated using Weblate (Dutch)
Currently translated at 90.4% (19 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/nl/
2021-05-18 23:31:01 +02:00
BudsieBuds
e9f4e81f37 Translated using Weblate (Dutch)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/nl/
2021-05-18 23:31:01 +02:00
BudsieBuds
763cb0c06b Translated using Weblate (English)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en/
2021-05-18 23:31:01 +02:00
BudsieBuds
493e295701 Translated using Weblate (Dutch)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/nl/
2021-05-18 20:46:32 +02:00
BudsieBuds
a4a31ade22 Translated using Weblate (Dutch)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/nl/
2021-05-18 20:46:32 +02:00
BudsieBuds
03187da0d9 Translated using Weblate (Dutch)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/nl/
2021-05-18 20:46:32 +02:00
BudsieBuds
ac6e421906 Translated using Weblate (Dutch)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/nl/
2021-05-18 20:46:32 +02:00
BudsieBuds
feb7d1847c Translated using Weblate (Dutch)
Currently translated at 59.7% (43 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-05-18 20:46:32 +02:00
BudsieBuds
b0190e416f Translated using Weblate (Dutch)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl/
2021-05-18 20:46:32 +02:00
jekkos
19bd43280d Update badges in README.md 2021-05-18 14:56:30 +02:00
BudsieBuds
3ebda3cc98 Translated using Weblate (Dutch)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl/
2021-05-18 12:55:56 +02:00
BudsieBuds
6503621f1d Translated using Weblate (Dutch)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/nl/
2021-05-18 12:55:56 +02:00
BudsieBuds
c8ad6b911a Translated using Weblate (Dutch)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/nl/
2021-05-18 12:55:56 +02:00
BudsieBuds
20eb15beaf Translated using Weblate (Dutch)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/nl/
2021-05-18 12:55:56 +02:00
BudsieBuds
7dca1decd5 Translated using Weblate (Dutch)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/nl/
2021-05-18 12:55:56 +02:00
BudsieBuds
6e11b1d242 Translated using Weblate (Dutch)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/nl/
2021-05-18 12:55:55 +02:00
BudsieBuds
a60a4904cb Translated using Weblate (Dutch)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/nl/
2021-05-18 12:55:55 +02:00
BudsieBuds
dce47200bf Translated using Weblate (Dutch)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/nl/
2021-05-18 12:55:55 +02:00
sathisharumugams
b255ce8609 Translated using Weblate (Tamil)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ta/
2021-05-15 16:55:40 +02:00
sathisharumugams
5fd211d3a8 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-05-13 17:23:04 +02:00
sathisharumugams
c977f16859 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-05-13 09:07:57 +02:00
sathisharumugams
2bebfba3ef Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-05-12 21:04:05 +02:00
sathisharumugams
1c9a1a3550 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-05-12 14:58:47 +02:00
robbytriadi
fa6d0004de Translated using Weblate (Indonesian)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2021-05-08 00:55:30 +02:00
NGUYỄN HỮU DŨNG
dce9e889e4 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/vi/
2021-05-03 22:53:30 +02:00
NGUYỄN HỮU DŨNG
ef488fe0cd Translated using Weblate (Vietnamese)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/vi/
2021-05-03 22:53:30 +02:00
NGUYỄN HỮU DŨNG
e2a3647227 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/vi/
2021-05-03 22:53:29 +02:00
karikalan-cherian
c19612814e Translated using Weblate (Tamil)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ta/
2021-04-23 07:20:41 +02:00
karikalan-cherian
bb64e1db00 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-04-23 07:20:41 +02:00
karikalan-cherian
49137f5a76 Translated using Weblate (Tamil)
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/ta/
2021-04-23 07:20:41 +02:00
karikalan-cherian
e9dd350222 Translated using Weblate (Tamil)
Currently translated at 100.0% (20 of 20 strings)

Translation: opensourcepos/datepicker
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/datepicker/ta/
2021-04-23 07:20:41 +02:00
jekkos
663da89293 Fix decimal render (#2975) 2021-04-22 22:28:12 +02:00
Jeroen Peelaerts
8513a2b85b Disable https in docker-compose (#3164) 2021-04-22 22:01:27 +02:00
karikalan-cherian
d70a90e12c Translated using Weblate (Tamil)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ta/
2021-04-22 19:01:18 +02:00
karikalan-cherian
aa9d2519f4 Translated using Weblate (Tamil)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ta/
2021-04-22 16:14:42 +02:00
jekkos
fc4e320ee3 Remove cPanel instructions as it's not maintained 2021-04-22 15:36:17 +02:00
oviya22
b42b26b469 Translated using Weblate (Tamil)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ta/
2021-04-22 15:12:34 +02:00
NGUYỄN HỮU DŨNG
392d92b3b9 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/vi/
2021-04-22 09:26:20 +02:00
NGUYỄN HỮU DŨNG
3405c9f974 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/vi/
2021-04-22 09:26:20 +02:00
NGUYỄN HỮU DŨNG
72465d36e3 Translated using Weblate (Vietnamese)
Currently translated at 98.8% (178 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/vi/
2021-04-22 09:26:19 +02:00
karikalan-cherian
e596cd43c2 Translated using Weblate (Tamil)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/ta/
2021-04-22 09:26:19 +02:00
zv20
48daa94926 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/bg/
2021-04-22 00:17:46 +02:00
Kumaran
810a2f7e7a Translated using Weblate (Tamil)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ta/
2021-04-22 00:17:46 +02:00
Kumaran
96c69f927f Translated using Weblate (Tamil)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ta/
2021-04-22 00:17:46 +02:00
Kumaran
8229092cad Translated using Weblate (Tamil)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/ta/
2021-04-22 00:17:46 +02:00
Kumaran
34e0c28886 Translated using Weblate (Tamil)
Currently translated at 100.0% (2 of 2 strings)

Translation: opensourcepos/error
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/error/ta/
2021-04-22 00:17:46 +02:00
Kumaran
73fe8a0e0b Translated using Weblate (English)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2021-04-22 00:17:46 +02:00
zv20
0ff1782cd3 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/bg/
2021-04-22 00:17:46 +02:00
zv20
e89aed188b Translated using Weblate (Bulgarian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/bg/
2021-04-22 00:17:46 +02:00
zv20
2b4cdfb2a1 Translated using Weblate (Bulgarian)
Currently translated at 98.8% (178 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/bg/
2021-04-22 00:17:46 +02:00
zv20
4f8dc9003a Translated using Weblate (Bulgarian)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/bg/
2021-04-22 00:17:46 +02:00
Jeroen Peelaerts
5cac9bb5ed Bump to 3.3.4 2021-04-21 21:47:33 +02:00
zv20
59fe090b5e Translated using Weblate (English)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/en/
2021-04-21 21:13:17 +02:00
Jeroen Peelaerts
080e8ac20c Add Tamil language (#3162) 2021-04-18 22:48:00 +02:00
Jeroen Peelaerts
46346a5b46 Fix discount rendering in receiving receipt (#3114) 2021-04-18 21:31:02 +02:00
Jeroen Peelaerts
dfd19c38f2 Render percentage discounts in configured locale (#3114) 2021-04-18 21:31:02 +02:00
Jeroen Peelaerts
b400223c57 Fix discount parsing (#3114) 2021-04-18 21:31:02 +02:00
Aril Apria Susanto
adb17c9865 Translated using Weblate (Indonesian)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2021-04-18 04:31:59 +02:00
Aril Apria Susanto
793bd7b093 Translated using Weblate (Indonesian)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/id/
2021-04-17 19:01:35 +02:00
Aril Apria Susanto
a84c734c75 Translated using Weblate (Indonesian)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/id/
2021-04-17 19:01:35 +02:00
Aril Apria Susanto
c2cee3c603 Translated using Weblate (Indonesian)
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/id/
2021-04-17 19:01:35 +02:00
Aril Apria Susanto
954d2bdb37 Translated using Weblate (Indonesian)
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/messages
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/messages/id/
2021-04-17 19:01:35 +02:00
Aril Apria Susanto
8b03b98b57 Translated using Weblate (Indonesian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/id/
2021-04-17 19:01:35 +02:00
Jeroen Peelaerts
0fb93d6d14 Add sales total to daily overview (#3138) 2021-04-07 08:51:29 +02:00
Jeroen Peelaerts
a3a06fdb07 Fix cash totals in payment summary (#3138) 2021-04-07 08:51:29 +02:00
Jeroen Peelaerts
85b9e3bf65 Show sale count in tax summary (#3134) 2021-04-02 09:12:02 +02:00
Trần Ngọc Quân
990daef2c2 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (72 of 72 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/vi/
2021-03-31 05:05:08 +02:00
Trần Ngọc Quân
1a26f096fe Translated using Weblate (Vietnamese)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/vi/
2021-03-30 02:37:26 +02:00
Trần Ngọc Quân
8c15742f56 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/vi/
2021-03-30 02:37:15 +02:00
Trần Ngọc Quân
51ec09d527 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (21 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/vi/
2021-03-30 02:37:04 +02:00
Trần Ngọc Quân
d29bab6974 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (7 of 7 strings)

Translation: opensourcepos/enum
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/enum/vi/
2021-03-30 02:36:53 +02:00
Trần Ngọc Quân
f06f020df2 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/vi/
2021-03-30 02:36:42 +02:00
Trần Ngọc Quân
d0dd8667b5 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/vi/
2021-03-30 02:36:31 +02:00
Trần Ngọc Quân
0fde542bec Translated using Weblate (Vietnamese)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/vi/
2021-03-30 02:36:19 +02:00
Trần Ngọc Quân
4d447167c2 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/vi/
2021-03-30 02:06:05 +02:00
Trần Ngọc Quân
e52c17efd4 Translated using Weblate (Vietnamese)
Currently translated at 99.4% (179 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/vi/
2021-03-30 02:05:48 +02:00
Trần Ngọc Quân
3f372c2f9d Translated using Weblate (Vietnamese)
Currently translated at 100.0% (39 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/vi/
2021-03-30 02:05:35 +02:00
Trần Ngọc Quân
5b715a7e65 Translated using Weblate (Vietnamese)
Currently translated at 98.0% (51 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/vi/
2021-03-30 02:05:15 +02:00
Trần Ngọc Quân
7ab6ef758e Translated using Weblate (Vietnamese)
Currently translated at 5.5% (2 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/vi/
2021-03-28 12:20:13 +02:00
Jeroen Peelaerts
d701f770cb Revert back to jsPDF 1.3.4 (#3132) 2021-03-25 23:21:35 +01:00
jekkos
3f5e0b91da Bump jsPdf to 1.4.2 (#3132) 2021-03-25 11:48:43 +01:00
Jeroen Peelaerts
26083171be Remove unneeded directives (#3133) 2021-03-24 23:12:24 +01:00
jekkos
6df9ac6a99 Correct mapping for Bosnian (#3105) 2021-03-17 14:34:22 +01:00
Steve Ireland
3b1f4590ca This is a quick fix to a failure in the Sale.get_info method. (#3130) 2021-03-14 18:06:08 -04:00
Steve Ireland
da17356e89 Fix discount round plus some other minor tweaks. (#3125) 2021-03-13 19:05:29 -05:00
maktu
34f72d8b6a Translated using Weblate (Spanish (Mexico))
Currently translated at 96.9% (32 of 33 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/es_MX/
2021-03-12 13:16:39 +01:00
Jeroen Peelaerts
05942fe2f3 Add hook to validate save HTTP method (#3100) 2021-03-12 13:12:44 +01:00
Jeroen Peelaerts
162ca73ec2 Fix greyed out submit button after validation (#3122) 2021-03-10 22:18:12 +01:00
objecttothis
23f720ba40 Correct bug
- Corrected problem where clicking New caused future submit clicks to not submit.
2021-02-25 00:02:35 +01:00
objecttothis
ec587cc8a8 Correct formatting errors 2021-02-25 00:02:35 +01:00
objecttothis
d4f273e306 Grey out/disable Submit button after validation to prevent double submissions.
Change to a centralized method of greying out the submit button.
Rollback previous decentralized changes.
2021-02-25 00:02:35 +01:00
objecttothis
b0ed2bd34f Grey out/disable Submit button after validation to prevent double submissions. 2021-02-25 00:02:35 +01:00
Jeroen Peelaerts
3babfd2473 Refer to nginx docker in init_selfcert.sh (#3106) 2021-02-22 22:16:07 +01:00
Jeroen Peelaerts
e92a929ae3 Add bosnian translations (#3105) 2021-02-22 22:15:16 +01:00
Jeroen Peelaerts
21722f0749 Add Ukrainian translations
Signed-off-by: admin@buchach.org.ua
2021-02-21 22:20:51 +01:00
Jeroen Peelaerts
ca730c8f9c Login to docker hub before pulling images (#2995) 2021-02-20 21:35:22 +01:00
FrancescoUK
ea70956229 Merge pull request #3113 from opensourcepos/fix_disc_sales_rounding_2
Fix the discount calculation on reports.
2021-02-20 07:13:31 +00:00
Steve Ireland
4b65aa628a Fix the discount calculation on reports. The rounding was in the wrong place. 2021-02-19 22:00:31 -05:00
jekkos
4d03915612 Build docker container using travis.ci
Docker container was not built anymore the default compose file now downloads the image from docker hub.
This means we need to call docker daemon directly and build the Dockerfile ourselves.
2021-02-18 00:52:56 +01:00
Jeroen Peelaerts
6e546a098e Add mysql volumes + resolve CI_ENV (#3106) 2021-02-15 22:50:23 +01:00
FrancescoUK
a87faf8b1d Merge pull request #3106 from opensourcepos/fix-compose-file
Cleanup docker compose files
2021-02-14 21:02:13 +00:00
Jeroen Peelaerts
030ddea814 Make MySQL volume persistent in docker compose 2021-02-14 10:52:23 +01:00
Jeroen Peelaerts
a6cc04f49f Move ssl setup to separate compose file 2021-02-14 10:44:22 +01:00
FrancescoUK
da17d536ee Merge pull request #3107 from opensourcepos/fix_discounted_sales_rounding
Fix discounted price rounding issues in reports reported in  #2995
2021-02-14 06:41:19 +00:00
Steve Ireland
7a4cf1e2bd Fix discounted price rounding issues in reports 2021-02-13 20:44:56 -05:00
Jeroen Peelaerts
ddcfc0c3f0 Use stable docker hub image in compose.yml 2021-02-13 12:03:40 +01:00
FrancescoUK
4edc44a816 Merge pull request #3102 from albjeremias/revert-3098-fix-vendor-docker
Revert "add vendor folder to docker container"
2021-02-12 19:59:22 +00:00
FrancescoUK
03863f3737 Merge pull request #3099 from albjeremias/persistent-db
make db persistent..
2021-02-12 19:58:55 +00:00
FrancescoUK
7981d5ae77 Merge pull request #3101 from albjeremias/fix-docker-compose-build
Fix docker compose build
2021-02-12 19:58:06 +00:00
Albatroz Jeremias
8e3d90b62e Revert "add vendor folder to docker container" 2021-02-12 19:05:01 +00:00
Albatroz Jeremias
98363eec4c add assets building to server install 2021-02-12 18:57:39 +00:00
Albatroz Jeremias
ca98ca89b9 add assets building to local install 2021-02-12 18:57:18 +00:00
Albatroz Jeremias
9e339385a3 adding file for building assets 2021-02-12 18:55:22 +00:00
FrancescoUK
858246b335 Merge pull request #3098 from albjeremias/fix-vendor-docker
add vendor folder to docker container
2021-02-12 17:39:44 +00:00
Albatroz Jeremias
51bf757ffc make db persistent..
so it wont be destroyed with every start of docker-compose
2021-02-12 14:38:30 +00:00
Albatroz Jeremias
71f339028a add vendor folder to docker container 2021-02-12 14:35:29 +00:00
Aril Apria Susanto
b4fc061629 Translated using Weblate (Indonesian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/id/
2021-02-10 10:44:52 +01:00
Aril Apria Susanto
e2a8c4a615 Translated using Weblate (Indonesian)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/id/
2021-02-10 10:44:52 +01:00
Jeroen Peelaerts
df45d8baf6 Item kit barcode review fixes (#3090) 2021-02-10 10:27:17 +01:00
Jeroen Peelaerts
6705e5f259 Add item_number to item kits module 2021-02-10 10:27:17 +01:00
Steve Ireland
68a2292d49 Merge pull request #3026 from opensourcepos/cash-rounding-register
Correct issues with cash rounding.
2021-02-08 08:26:47 -05:00
Steve Ireland
c5b22a0300 Improved support for cash rounding transactions. 2021-02-07 13:39:51 -05:00
Jeroen Peelaerts
be7d14c295 Change email address 2021-01-20 20:35:01 +01:00
Jeroen Peelaerts
485c24a123 Fix cookie secure flag (#3082) 2021-01-20 20:35:01 +01:00
Jeroen Peelaerts
6f2ac77a6e Remove unused migration (#3006) 2021-01-19 21:47:06 +01:00
jekkos
6e790aeea1 Update README.md 2021-01-19 21:43:39 +01:00
printgeek
2cb65bc2cb Update Specific_supplier.php 2021-01-19 21:39:20 +01:00
Jeroen Peelaerts
83ab188c8d Remove duplicate migration (#3006) 2021-01-17 11:52:45 +01:00
Jeroen Peelaerts
e20bf34a74 Use longblob for session data storage (#3006) 2021-01-17 11:36:06 +01:00
FrancescoUK
0daf08bf94 Merge pull request #3068 from opensourcepos/session-storage-fix
Use mediumblob for session data storage (#3006)
2021-01-04 21:58:31 +00:00
FrancescoUK
9297db9272 Merge pull request #3069 from opensourcepos/License-update
Contribution dates rearranged
2021-01-04 17:22:24 +00:00
WShells
d9dbb3d642 Dates fixing 2021-01-03 21:40:23 +02:00
Jeroen Peelaerts
5583a97772 Use mediumblob for session data storage (#3006) 2021-01-03 12:05:48 +01:00
WShells
630e38054a Contribution dates rearranged
Updated & Contribution dates rearranged.
2021-01-03 02:25:03 +02:00
hunsly
685033807a Translated using Weblate (Hungarian)
Currently translated at 83.3% (30 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/hu/
2021-01-01 23:04:58 +01:00
hunsly
c38801d8c0 Translated using Weblate (Hungarian)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/hu/
2021-01-01 23:04:58 +01:00
FrancescoUK
41f218806b Update README.md badge 2021-01-01 12:03:10 +00:00
3241 changed files with 146445 additions and 105585 deletions

View File

@@ -1,7 +0,0 @@
{
"directory": "public/bower_components",
"scripts": {
"postinstall": "grunt default genlicense",
"postuninstall": "grunt default genlicense"
}
}

View File

@@ -1,6 +1,6 @@
node_modules
tmp
application/config/email.php
app/Config/Email.php
*.patch
patches/
.idea/
@@ -10,10 +10,14 @@ git-svn-diff.py
.buildpath
.project
.settings/*
.git
dist/
node_modules/
*.swp
*.rej
*.orig
*~
*.~
*.log
application/sessions/*
app/writable/session/*
!app/writable/session/index.html

15
.editorconfig Normal file
View File

@@ -0,0 +1,15 @@
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120
[*.md]
trim_trailing_whitespace = false

63
.env.example Normal file
View File

@@ -0,0 +1,63 @@
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
database.default.hostname = 'localhost'
database.default.database = 'ospos'
database.default.username = 'admin'
database.default.password = 'pointofsale'
database.default.DBDriver = 'MySQLi'
database.default.DBPrefix = 'ospos_'
database.development.hostname = 'localhost'
database.development.database = 'ospos'
database.development.username = 'admin'
database.development.password = 'pointofsale'
database.development.DBDriver = 'MySQLi'
database.development.DBPrefix = 'ospos_'
database.tests.hostname = 'localhost'
database.tests.database = 'ospos'
database.tests.username = 'admin'
database.tests.password = 'pointofsale'
database.tests.DBDriver = 'MySQLi'
database.tests.DBPrefix = 'ospos_'
#--------------------------------------------------------------------
# ENCRYPTION
#--------------------------------------------------------------------
encryption.key = ''
#--------------------------------------------------------------------
# LOGGER
# - 0 = Disables logging, Error logging TURNED OFF
# - 1 = Emergency Messages - System is unusable
# - 2 = Alert Messages - Action Must Be Taken Immediately
# - 3 = Critical Messages - Application component unavailable, unexpected exception.
# - 4 = Runtime Errors - Don't need immediate action, but should be monitored.
# - 5 = Warnings - Exceptional occurrences that are not errors.
# - 6 = Notices - Normal but significant events.
# - 7 = Info - Interesting events, like user logging in, etc.
# - 8 = Debug - Detailed debug information.
# - 9 = All Messages
#--------------------------------------------------------------------
logger.threshold = 0
app.db_log_enabled = false
#--------------------------------------------------------------------
# HONEYPOT
#--------------------------------------------------------------------
honeypot.hidden = true
honeypot.label = 'Fill This Field'
honeypot.name = 'honeypot'
honeypot.template = '<label>{label}</label><input type="text" name="{name}" value="">'
honeypot.container = '<div style="display:none">{template}</div>'

4
.gitattributes vendored
View File

@@ -1,3 +1,3 @@
dist/ merge=ours
application/language/**/*.php merge=ours
text=auto
app/Language/**/*.php merge=ours
text=auto eol=lf

View File

View File

@@ -10,7 +10,7 @@ Please make sure you tick (add an x between the square brackets with no spaces)
- [] Read the [FAQ](https://github.com/opensourcepos/opensourcepos#faq) for any known install and/or upgrade gotchas (in specific PHP extensions installed)
- [] Read the [wiki](https://github.com/opensourcepos/opensourcepos/wiki)
- [] Executed any database upgrade scripts if an upgrade pre 3.0.0 (e.g. database/2.4_to_3.0.sql)
- [] Aware the installation code is in [bintray](https://bintray.com/jekkos/opensourcepos/opensourcepos/view/files?sort=updated&order=asc#files) (see README), and [GitHub master](https://github.com/opensourcepos/opensourcepos/tree/master) is for [developers only](https://github.com/opensourcepos/opensourcepos/wiki/Development-setup) and therefore not complete nor stable
- [] Aware the installation code that [GitHub master](https://github.com/opensourcepos/opensourcepos/tree/master) is for [developers only](https://github.com/opensourcepos/opensourcepos/wiki/Development-setup) and therefore not complete nor stable.
### Installation information

121
.github/ISSUE_TEMPLATE/bug report.yml vendored Normal file
View File

@@ -0,0 +1,121 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "triage"]
projects: ["ospos/3", "ospos/4"]
assignees:
- none
body:
- type: markdown
attributes:
value: |
Bug reports indicate that something is not working as intended.
Please include as much detail as possible and submit a separate bug report for each problem.
Do not include personal identifying information such as email addresses or encryption keys.
- type: textarea
id: bug-description
attributes:
label: Bug Description?
description: Describe the problem that you are seeing
placeholder: "Describe the problem that you are seeing"
validations:
required: true
- type: textarea
id: steps-reproduce
attributes:
label: Steps to Reproduce?
description: List the steps to reproduce this issue
placeholder: "Steps to Reproduce"
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior?
description: Tell us what did you expect to happen?
placeholder: "Expected Behavior"
validations:
required: true
- type: dropdown
id: ospos-version
attributes:
label: OpensourcePOS Version
description: What version of our software are you running?
options:
- development (unreleased)
- opensourcepos 3.4.1
- opensourcepos 3.4.0
- opensourcepos 3.3.9
- opensourcepos 3.3.8
- opensourcepos 3.3.7
default: 0
validations:
required: true
- type: dropdown
id: php-version
attributes:
label: Php version
description: What version of Php?
options:
- Php 7.2
- Php 7.3
- Php 7.4
- Php 8.1
- Php 8.2
- Php 8.3
- Php 8.4
default: 0
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Other
- type: input
id: server
attributes:
label: Server Operating System and version
description: "Server Operating System "
placeholder: "Server Operating System "
validations:
required: true
- type: input
id: database
attributes:
label: Database Management System and version
description: "Database Management System"
placeholder: "Database Management"
validations:
required: true
- type: input
id: webserver
attributes:
label: Web Server and version
description: "Web Server and version "
placeholder: "Web Server and version "
validations:
required: true
- type: textarea
id: servers
attributes:
label: System Information Report (optional)
description: Copy and paste from OSPOS > Configuration > Setup & Conf > Setup & Conf?
placeholder: System Information Report
value: "System Information Report"
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Unmodified copy of OpensourcePOS
description: By submitting this issue you agree this copy has not been modified
options:
- label: I agree this copy has not been modified
required: true

View File

@@ -0,0 +1,63 @@
name: ✨ Feature Request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement"]
assignees: ["none"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request! 🤗
Please make sure this feature request hasn't been already submitted by someone by looking through other open/closed issues. 😃
- type: dropdown
attributes:
multiple: false
label: Type of Feature
description: Select the type of feature request.
options:
- "✨ New Feature"
- "📝 Documentation"
- "🎨 Style and UI"
- "🔨 Code Refactor"
- "⚡ Performance Improvements"
- "✅ New Test"
validations:
required: true
- type: dropdown
id: ospos-version
attributes:
label: OpensourcePOS Version
description: What version of our software are you running?
options:
- opensourcepos 3.3.9
- opensourcepos 3.3.8
- opensourcepos 3.3.7
default: 0
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Give us a brief description of the feature or enhancement you would like
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: Additional Information
description: Give us some additional information on the feature request like proposed solutions, links, screenshots, etc.
- type: checkboxes
id: terms
attributes:
label: Verify you searched open requests in OpensourcePOS
description: By submitting this request you agree that you have searched Open Requests in the Tracker
options:
- label: I agree I have searched Open Requests
required: true

71
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '21 12 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -0,0 +1,22 @@
name: "Delete Unstable Release"
on:
push:
branches:
- master
jobs:
delete_unstable_release:
runs-on: ubuntu-latest
steps:
- name: "Delete last unstable release"
uses: sgpublic/delete-release-action@v1.2
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
release-drop: false
release-drop-tag: false
pre-release-drop: true
pre-release-keep-count: -1
pre-release-drop-tag: true

63
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Coding Standards
on:
push:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'
pull_request:
paths:
- '**.php'
- 'spark'
- '.github/workflows/test-coding-standards.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: tokenizer
coverage: none
- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
${{ runner.os }}-
- name: Install dependencies
run: composer update --ansi --no-interaction
- name: Run lint on `app/`, `public/`
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --config=.php-cs-fixer.no-header.php --using-cache=no --diff

33
.github/workflows/opencode.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: opencode
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
jobs:
opencode:
if: |
contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: read
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
with:
model: anthropic/claude-3-haiku-20240307

34
.github/workflows/php-linter.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: PHP Linting
on: push
jobs:
phplint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: PHP Lint 8.0
uses: dbfx/github-phplint/8.0@master
with:
folder-to-exclude: "! -path \"./vendor/*\" ! -path \"./folder/excluded/*\""
- name: PHP Lint 8.1
uses: dbfx/github-phplint/8.1@master
with:
folder-to-exclude: "! -path \"./vendor/*\" ! -path \"./folder/excluded/*\""
- name: PHP Lint 8.2
uses: dbfx/github-phplint/8.2@master
with:
folder-to-exclude: "! -path \"./vendor/*\" ! -path \"./folder/excluded/*\""
- name: PHP Lint 8.3
uses: dbfx/github-phplint/8.3@master
with:
folder-to-exclude: "! -path \"./vendor/*\" ! -path \"./folder/excluded/*\""
- name: PHP Lint 8.4
uses: dbfx/github-phplint/8.4@master
with:
folder-to-exclude: "! -path \"./vendor/*\" ! -path \"./folder/excluded/*\""

118
.github/workflows/phpunit.yml vendored Normal file
View File

@@ -0,0 +1,118 @@
name: PHPUnit Tests
on:
push:
paths:
- '**.php'
- 'spark'
- 'tests/**'
- '.github/workflows/phpunit.yml'
- 'gulpfile.js'
- 'app/Database/**'
pull_request:
paths:
- '**.php'
- 'spark'
- 'tests/**'
- '.github/workflows/phpunit.yml'
- 'gulpfile.js'
- 'app/Database/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: PHP ${{ matrix.php-version }} Tests
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: intl, mbstring, mysqli
coverage: none
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Get npm cache directory
run: echo "NPM_CACHE_DIR=$(npm config get cache)" >> $GITHUB_ENV
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ${{ env.NPM_CACHE_DIR }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm install
- name: Build database.sql
run: npm run gulp build-database
- name: Start MariaDB
run: |
docker run -d --name mysql \
-e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_DATABASE=ospos \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=pointofsale \
-v $PWD/app/Database/database.sql:/docker-entrypoint-initdb.d/database.sql \
-p 3306:3306 \
mariadb:10.5
# Wait for MariaDB to be ready
until docker exec mysql mysqladmin ping -h 127.0.0.1 -u root -proot --silent; do
echo "Waiting for MariaDB..."
sleep 2
done
echo "MariaDB is ready!"
- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-
${{ runner.os }}-
- name: Install dependencies
run: composer update --ansi --no-interaction
- name: Create .env file
run: cp .env.example .env
- name: Run PHPUnit tests
env:
CI_ENVIRONMENT: testing
MYSQL_HOST_NAME: 127.0.0.1
run: composer test
- name: Stop MariaDB
if: always()
run: docker stop mysql && docker rm mysql

104
.gitignore vendored
View File

@@ -1,39 +1,89 @@
# Dependency directories
node_modules
tmp
database/database.sql
database/migrate_phppos_dist.sql
application/config/email.php
application/sessions/*
application/logs/*
application/uploads/*
public/license/.licenses
public/license/bower.LICENSES
public/dist
generate_langauges.php
dist/
docs/
public/bower_components
vendor
public/resources
public/images/menubar/*
!public/images/menubar/.gitkeep
public/license/*
!public/license/.gitkeep
app/Config/email.php
npm-debug.log*
.vscode
# Docker
!docker/.env
docker/data/database/db/*
docker/data/certbot/conf/*
docker/data/ospos/app/*
# Editors
## SublimeText
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
## VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
## Vim
*.sw[a-p]
## WebStorm/IntelliJ
/.idea
modules.xml
*.ipr
*.iml
# System files
*.DS_Store
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
Desktop.ini
$RECYCLE.BIN/
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Other
generate_languages.php
dist
docs
/patches
translations
/.buildpath
/.project
/.settings/*
*.patch
patches/
translations/
.idea/
git-svn-diff.py
*.bash
.swp
.buildpath
.project
.settings/*
vendor/
system/
*.swp
*.rej
*.orig
*~
*.~
*.log
.env
package-lock.json
auth.json
!/docker/.env
/docker/data/database/db/*
/docker/data/certbot/conf/*
/docker/data/ospos/app/*
*.png
*.jpg
*.jpeg
*.webp
*copy*
/writable/logs/*.log
/writable/debugbar/*.json
/app/Database/database.sql
/writable/cache/settings
/.env.bak

View File

@@ -1,19 +1,28 @@
# redirect to public page
<IfModule mod_rewrite.c>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public$
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteRule "^(.*)$" "/public/" [R=301,L]
</IfModule>
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need. Uncomment
# the line below and comment the line above.
#RewriteRule "^(.*)$" "/[SUBDIRECTORY]/public/" [R=301,L]
</IfModule>
# disable directory browsing
# For security reasons, Option all cannot be overridden.
Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes
Options +SymLinksIfOwnerMatch -Indexes
# prevent folder listing
IndexIgnore *
# Apache 2.4
<IfModule mod_headers.c>
Header always set X-Frame-Options "SAMEORIGIN"
</Ifmodule>
<IfModule authz_core_module>
# secure htaccess file
<Files .htaccess>
@@ -31,38 +40,7 @@ IndexIgnore *
</Files>
# prevent access to csv, txt and md files
<FilesMatch "\.(csv|txt|md|yml|json|lock)$">
<FilesMatch "\.(csv|txt|md|yml|json|lock|env)$">
Require all denied
</FilesMatch>
</IfModule>
# Apache 2.2
<IfModule !authz_core_module>
# secure htaccess file
<Files .htaccess>
Order allow,deny
Deny from all
Satisfy all
</Files>
# prevent access to PHP error log
<Files error_log>
Order allow,deny
Deny from all
Satisfy all
</Files>
# prevent access to LICENSE
<Files LICENSE>
Order allow,deny
Deny from all
Satisfy all
</Files>
# prevent access to csv, txt and md files
<FilesMatch "\.(csv|txt|md|yml|json|lock)$">
Order allow,deny
Deny from all
Satisfy all
</FilesMatch>
</IfModule>

View File

@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use CodeIgniter\CodingStandard\CodeIgniter4;
use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Fixer\Comment\NoCodeSeparatorCommentFixer;
use Nexus\CsConfig\FixerGenerator;
use PhpCsFixer\Finder;
$finder = Finder::create()
->files()
->in([
__DIR__ . '/app',
__DIR__ . '/public',
])
->exclude(['Views/errors/html'])
->append([
__DIR__ . '/admin/starter/builds',
]);
$overrides = [
// For updating to coding-standard
'modernize_strpos' => true,
];
$options = [
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',
'finder' => $finder,
'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'),
'customRules' => [
NoCodeSeparatorCommentFixer::name() => true,
],
];
return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects();

View File

@@ -2,34 +2,53 @@ sudo: required
branches:
except:
- unstable
- weblate
services:
- docker
before_install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6
HEAD` && sed -i "s/\$1/\$1.$date.$branch.$rev/g" deployment.json
dist: jammy
language: node_js
node_js:
- 20
script:
- docker run --rm -v $(pwd):/app jekkos/composer composer install
- docker run --rm -v $(pwd):/app jekkos/composer php bin/install.php translations develop
- sed -i "s/'\(dev\)'/'$rev'/g" application/config/config.php
- docker run --rm -it -v $(pwd):/app -w /app digitallyseamless/nodejs-bower-grunt
sh -c "npm install && bower install && grunt package"
- docker-compose build
- docker-compose -f docker-compose.test.yml up --abort-on-container-exit
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker run --rm -u $(id -u) -v $(pwd):/app opensourcepos/composer:ci4 composer install
- version=$(grep application_version app/Config/App.php | sed "s/.*=\s'\(.*\)';/\1/g")
- cp .env.example .env && sed -i 's/production/development/g' .env
- sed -i "s/commit_sha1 = 'dev'/commit_sha1 = '$rev'/g" app/Config/OSPOS.php
- echo "$version-$branch-$rev"
- npm version "$version-$branch-$rev" --force || true
- sed -i 's/opensourcepos.tar.gz/opensourcepos.$version.tgz/g' package.json
- npm ci && npm install -g gulp && npm run build
- docker build . --target ospos -t ospos
- docker build . --target ospos_test -t ospos_test
- docker run --rm ospos_test /app/vendor/bin/phpunit --testdox
- docker build app/Database/ -t "jekkos/opensourcepos:sql-$TAG"
env:
global:
- DOCKER_COMPOSE_VERSION=1.21.1
- TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///)
after_success:
- 'docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "opensourcepos_ospos:latest" "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG"'
- BRANCH=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///)
- TAG=$(echo "${TRAVIS_TAG:-$BRANCH}" | tr '/' '-')
- date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6 HEAD`
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "ospos:latest"
"jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:sql-$TAG"
- gulp compress
- mv dist/opensourcepos.tar.gz "dist/opensourcepos.$version.$rev.tgz"
- mv dist/opensourcepos.zip "dist/opensourcepos.$version.$rev.zip"
deploy:
file: deployment.json
provider: bintray
skip_cleanup: true
key: ${BINTRAY_API_KEY}
user: jekkos
on:
all_branches: true
- provider: releases
edge: true
file: dist/opensourcepos.$version.$rev.zip
name: "Unstable OpensourcePos"
overwrite: true
release_notes: "This is a build of the latest master which might contain bugs. Use at your own risk. Check releases section for the latest official release"
prerelease: true
tag_name: unstable
user: jekkos
api_key:
secure: "KOukL8IFf/uL/BjMyCSKjf2vylydjcWqgEx0eMqFCg3nZ4ybMaOwPORRthIfyT72/FvGX/aoxxEn0uR/AEtb+hYQXHmNS+kZdX72JCe8LpGuZ7FJ5X+Eo9mhJcsmS+smd1sC95DySSc/GolKPo+0WtJYONY/xGCLxm+9Ay4HREg="
on:
branch: master

295
API.md Normal file
View File

@@ -0,0 +1,295 @@
# OSPOS REST API Design
This document describes the proposed REST API for Open Source Point of Sale (OSPOS).
## Overview
The OSPOS REST API provides programmatic access to:
- **Customers** - Full CRUD operations
- **Suppliers** - Full CRUD operations
- **Items** - Full CRUD operations
- **Inventory** - Stock adjustments (update only)
- **Sales** - Read-only queries
- **Receivings** - Read-only queries
## Authentication
All API endpoints require authentication via an API Key passed in the `X-API-Key` header.
```
X-API-Key: your-api-key-here
```
> **Note:** API Key authentication implementation will be added in a subsequent phase. The spec documents the intended authentication mechanism.
## Base URL
All API endpoints are relative to `/api/v1`.
```
https://your-domain.com/api/v1/customers
```
## Pagination
List endpoints support pagination using `offset` and `limit` query parameters:
| Parameter | Type | Default | Maximum | Description |
|-----------|---------|---------|---------|------------------------------|
| `offset` | integer | 0 | - | Number of records to skip |
| `limit` | integer | 25 | 100 | Number of records to return |
**Example Request:**
```
GET /api/v1/customers?offset=0&limit=25
```
**Example Response:**
```json
{
"total": 150,
"offset": 0,
"limit": 25,
"rows": [
{ "person_id": 1, "first_name": "John", ... },
{ "person_id": 2, "first_name": "Jane", ... }
]
}
```
## Response Format
### Success Response
```json
{
"success": true,
"message": "Customer created successfully",
"id": 42
}
```
### Error Response
```json
{
"success": false,
"message": "Error description here"
}
```
### HTTP Status Codes
| Status Code | Description |
|-------------|--------------------------------------------------|
| 200 | Success |
| 201 | Resource created successfully |
| 400 | Bad request / Invalid input |
| 401 | Unauthorized / Invalid API key |
| 404 | Resource not found |
| 409 | Conflict (e.g., duplicate unique field) |
| 500 | Internal server error |
## Endpoints Summary
### Customers
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/customers` | List customers | Read |
| POST | `/customers` | Create customer | Write |
| GET | `/customers/{id}` | Get customer by ID | Read |
| PUT | `/customers/{id}` | Update customer | Write |
| DELETE | `/customers/{id}` | Delete customer (soft delete) | Write |
| POST | `/customers/batch-delete` | Delete multiple customers | Write |
| GET | `/customers/suggest` | Autocomplete suggestions | Read |
### Suppliers
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/suppliers` | List suppliers | Read |
| POST | `/suppliers` | Create supplier | Write |
| GET | `/suppliers/{id}` | Get supplier by ID | Read |
| PUT | `/suppliers/{id}` | Update supplier | Write |
| DELETE | `/suppliers/{id}` | Delete supplier (soft delete) | Write |
| POST | `/suppliers/batch-delete` | Delete multiple suppliers | Write |
| GET | `/suppliers/suggest` | Autocomplete suggestions | Read |
### Items
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/items` | List items | Read |
| POST | `/items` | Create item | Write |
| GET | `/items/{id}` | Get item by ID | Read |
| PUT | `/items/{id}` | Update item | Write |
| DELETE | `/items/{id}` | Delete item (soft delete) | Write |
| POST | `/items/batch-delete` | Delete multiple items | Write |
| POST | `/items/batch-update` | Update multiple items | Write |
| GET | `/items/suggest` | Autocomplete suggestions | Read |
| GET | `/items/{id}/quantities` | Get stock quantities | Read |
### Inventory
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/inventory` | List inventory transactions | Read |
| POST | `/inventory` | Create inventory adjustment | Write |
| POST | `/inventory/bulk` | Bulk inventory adjustments | Write |
### Sales (Read-Only)
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/sales` | List sales | Read |
| GET | `/sales/{id}` | Get sale details | Read |
| GET | `/sales/{id}/items` | Get sale items | Read |
| GET | `/sales/{id}/payments` | Get sale payments | Read |
### Receivings (Read-Only)
| Method | Endpoint | Description | Access |
|--------|-------------------------------|--------------------------------|---------|
| GET | `/receivings` | List receivings | Read |
| GET | `/receivings/{id}` | Get receiving details | Read |
| GET | `/receivings/{id}/items` | Get receiving items | Read |
## Schema Reference
### Common Fields
#### Person Fields (base for Customer, Supplier)
| Field | Type | Description |
|---------------|-----------|------------------------------|
| `first_name` | string | First name (required) |
| `last_name` | string | Last name (required) |
| `gender` | integer | Gender (0=male, 1=female) |
| `phone_number`| string | Phone number |
| `email` | string | Email address |
| `address_1` | string | Address line 1 |
| `address_2` | string | Address line 2 |
| `city` | string | City |
| `state` | string | State/Province |
| `zip` | string | Postal/ZIP code |
| `country` | string | Country |
| `comments` | string | Additional notes |
### Customer Fields
Extends Person fields with:
| Field | Type | Description |
|--------------------|-----------|------------------------------------|
| `person_id` | integer | Unique identifier (read-only) |
| `account_number` | string | Customer account number |
| `taxable` | integer | Taxable status (0/1) |
| `tax_id` | string | Tax identification number |
| `sales_tax_code_id`| integer | Sales tax code ID |
| `discount` | decimal | Discount percentage/amount |
| `discount_type` | integer | Discount type (0=percent, 1=fixed) |
| `company_name` | string | Company name |
| `package_id` | integer | Rewards package ID |
| `points` | integer | Rewards points balance |
| `consent` | integer | Consent status (0/1) |
### Supplier Fields
Extends Person fields with:
| Field | Type | Description |
|-----------------|-----------|-------------------------------------|
| `person_id` | integer | Unique identifier (read-only) |
| `company_name` | string | Company name |
| `account_number`| string | Supplier account number |
| `tax_id` | string | Tax identification number |
| `agency_name` | string | Agency name |
| `category` | integer | Category (0=goods, 1=cost) |
### Item Fields
| Field | Type | Required | Description |
|----------------------|-----------|----------|--------------------------------------|
| `item_id` | integer | auto | Unique identifier (read-only) |
| `name` | string | yes | Item name |
| `category` | string | yes | Item category |
| `supplier_id` | integer | no | Supplier ID |
| `item_number` | string | no | Barcode/SKU |
| `description` | string | no | Item description |
| `cost_price` | decimal | no | Cost price |
| `unit_price` | decimal | yes | Selling price |
| `reorder_level` | decimal | no | Reorder threshold |
| `receiving_quantity` | decimal | no | Receiving quantity (default 1) |
| `allow_alt_description`| integer | no | Allow alt description (0/1) |
| `is_serialized` | integer | no | Has serial number (0/1) |
| `stock_type` | integer | no | Stock type (0=stocked, 1=non-stocked)|
| `item_type` | integer | no | Item type (0=standard, 1=kit, 2=temp)|
| `tax_category_id` | integer | no | Tax category ID |
| `qty_per_pack` | decimal | no | Quantity per pack |
| `pack_name` | string | no | Pack name |
| `hsn_code` | string | no | HSN code |
### Inventory Adjustment
| Field | Type | Required | Description |
|------------------|-----------|----------|--------------------------------------|
| `item_id` | integer | yes | Item ID to adjust |
| `trans_inventory`| decimal | yes | Quantity change (+ add, - remove) |
| `trans_location` | integer | no | Stock location ID |
| `trans_comment` | string | no | Reason for adjustment |
## OpenAPI Specification
The complete OpenAPI 3.1.0 specification is available at:
- **YAML format:** `/public/api/openapi.yaml`
This specification can be used with:
- [Swagger UI](https://swagger.io/tools/swagger-ui/) for interactive documentation
- [Swagger Codegen](https://swagger.io/tools/swagger-codegen/) to generate client SDKs
- [OpenAPI Generator](https://openapi-generator.tech/) for code generation
- API testing tools like Postman or Insomnia
## Implementation Notes
### Phase 1: Core Endpoints (Proposed)
1. Customers API (full CRUD)
2. Suppliers API (full CRUD)
3. Items API (full CRUD)
4. Inventory adjustments API (create only)
### Phase 2: Read-Only Endpoints (Proposed)
1. Sales API (read-only)
2. Receivings API (read-only)
### Phase 3: Extended Features (Future)
1. Batch operations for all endpoints
2. Search/filter capabilities
3. Authorization/permissions integration
4. Rate limiting
5. API key management interface
## Discussion Topics
The following aspects of the API design are open for discussion:
1. **Field naming conventions**: Currently following existing database column names. Should we use camelCase for JSON?
2. **Batch operations**: Current design separates batch-delete and batch-update. Should we consolidate?
3. **Date formats**: Using ISO 8601 (date-time). Is timezone handling needed?
4. **Error response structure**: Current format uses `{success, message}`. Should we include error codes?
5. **Relationship representations**: Should nested resources (e.g., sale items) always be included?
6. **Inventory adjustments**: Should we support setting absolute quantities vs. relative changes?
7. **Authorization integration**: How should API access integrate with existing employee permissions?
8. **Stock locations**: Multiple locations per item - do we need location-specific endpoints?

67
BUILD.md Normal file
View File

@@ -0,0 +1,67 @@
# Building OSPOS
## For Developers and Hobbyists Only
If you are a developer and need to add unique features to OSPOS, you can download the raw code from the github repository and make changes. If it's a really cool change that might benefit others, we ask that you consider contributing it to the project.
After you've made your changes, you will need to do a "BUILD" on it to add all necessary components that OSPOS needs to be a fully functional application.
This documents the "How to Build" process.
The goal here is to set up and configure the build process so that the actual build is as simple as possible.
The build process uses the build tools "npm" and "gulp" to piece everything together.
## Prerequisites
- Install the latest version of NPM (tested using version 9.4.2)
- Install the latest version of Composer (tested using composer 2.5.1)
## The Workflow
1. Download the code from the master branch found at https://github.com/opensourcepos/opensourcepos/tree/master.
2. Unzip it and copy the contents into the working folder.
3. Start a terminal session from the root of your working folder. For example, I normally open up the working folder in PHPStorm and run the commands from the Terminal provided by the IDE.
4. Enter the following three commands in sequence:
- `composer install`
- `npm install`
- `npm run build`
That's all there is to it.
Note: If you receive messages similar to 'codeigniter4/framework v4.3.1 requires ext-intl', this is an indicator that you do not have intl enabled in php.ini
After the build tasks are complete, if you have the database set up and a preconfigured copy of .env, just drop the .env file into the root of the working folder. You should be ready to go.
If you do not have an existing (and upgraded) database, then you will need to continue from this point forward with the standard installation instructions, but at this point you have a runnable version of OSPOS.
### Windows Platform
Using an `.env` file is a convenient approach to store OSPOS configuration.
I've added the following Powershell scripts to make my life a bit easier, which I share with you.
* `build.ps1` - Which runs the build but also restores the .env from a backup I make of it in a specifically placed folder. I place a copy of the configured .env file in a folder that has the following path from the working folder: `../env/<working-folder-name>/.env`
### Containerized setup
Development using docker has the advantage that all the application's dependencies are contained within the docker environment. During development we want to have a live version of the code in the container when we edit it. This is accomplished by mounting the application folder within the /app of the docker container.
The file permissions for the repository in the container should be the same as on the host. That's why we have to startthe PHP process in docker with the host current uid.
```
export USERID=$(id -u)
export GROUPID=$(id -g)
docker-compose -f docker-compose.dev.yml up
```
## The Result
The build creates a developer version of a runnable instance of OSPOS. It contains a ton of developer stuff that **should not be deployed to a production environment**.
Again, the results of this build is NOT something that should be used for production.
However, the zip and tar files, found in the root `dist` folder, are created as part of the build process and can be used for deploying a ***trial production*** instance of OSPOS.
Only official releases should be used for real production. There is significant risk of failure should you chose to deploy a development branch or even a master branch that the development team hasn't signed off on.
Good luck with your build. Please report any issues you encounter.

401
CHANGELOG.md Normal file
View File

@@ -0,0 +1,401 @@
[unreleased]: https://github.com/opensourcepos/opensourcepos/compare/3.4.0...HEAD
[3.4.2]: https://github.com/opensourcepos/opensourcepos/compare/3.4.1...3.4.2
[3.4.1]: https://github.com/opensourcepos/opensourcepos/compare/3.4.0...3.4.1
[3.4.0]: https://github.com/opensourcepos/opensourcepos/compare/3.3.9...3.4.0
[3.3.9]: https://github.com/opensourcepos/opensourcepos/compare/3.3.8...3.3.9
[3.3.8]: https://github.com/opensourcepos/opensourcepos/compare/3.3.7...3.3.8
[3.3.7]: https://github.com/opensourcepos/opensourcepos/compare/3.3.6...3.3.7
[3.3.6]: https://github.com/opensourcepos/opensourcepos/compare/3.3.5...3.3.6
[3.3.5]: https://github.com/opensourcepos/opensourcepos/compare/3.3.4...3.3.5
[3.3.4]: https://github.com/opensourcepos/opensourcepos/compare/3.3.3...3.3.4
[3.3.3]: https://github.com/opensourcepos/opensourcepos/compare/3.3.2...3.3.3
[3.3.2]: https://github.com/opensourcepos/opensourcepos/compare/3.3.1...3.3.2
[3.3.1]: https://github.com/opensourcepos/opensourcepos/compare/3.3.0...3.3.1
[3.3.0]: https://github.com/opensourcepos/opensourcepos/compare/3.2.3...3.3.0
[3.2.3]: https://github.com/opensourcepos/opensourcepos/compare/3.2.2...3.2.3
[3.2.2]: https://github.com/opensourcepos/opensourcepos/compare/3.2.1...3.2.2
[3.2.1]: https://github.com/opensourcepos/opensourcepos/compare/3.2.0...3.2.1
[3.2.0]: https://github.com/opensourcepos/opensourcepos/compare/3.1.1...3.2.0
[3.1.1]: https://github.com/opensourcepos/opensourcepos/compare/3.1.0...3.1.1
[3.1.0]: https://github.com/opensourcepos/opensourcepos/compare/3.0.2...3.1.0
[3.0.2]: https://github.com/opensourcepos/opensourcepos/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/opensourcepos/opensourcepos/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/opensourcepos/opensourcepos/compare/2.4.0...3.0.0
[2.4.0]: https://github.com/opensourcepos/opensourcepos/compare/2.3.4...2.4.0
[2.3.4]: https://github.com/opensourcepos/opensourcepos/compare/2.3.3...2.3.4
[2.3.3]: https://github.com/opensourcepos/opensourcepos/compare/2.3.2...2.3.3
[2.3.2]: https://github.com/opensourcepos/opensourcepos/compare/2.3.1...2.3.2
[2.3.1]: https://github.com/opensourcepos/opensourcepos/compare/2.3...2.3.1
[2.3.0]: https://github.com/opensourcepos/opensourcepos/compare/2.2.2...2.3
# Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
## [3.4.0] - 2025-02-06
- Translation updates (Spanish, Indonesian, Swedish, Urdu, Chinese, Thai, French, Dutch)
- PHP 8.x support
- Security fixes (XSS, SQLi)
- Migration to Gulp as buildsystem
- Decimal validation fix
- Sticky header fix
- Receipt sent as attachment
- Barcode generation library upgrade
- Bump framework to CodeIgniter `4.x.x`
- Improve security performance against bots
## [3.3.9] - 2023-11-06
- Translation updates (Arabic, Central Khmer, Croatian, Czech, Danish, English, French, Indonesian, Lao, Russian, Spanish, Thai)
- Fix logout race condition issue ([#3578](https://github.com/opensourcepos/opensourcepos/issues/3578))
- Fix docker compose file ([#3754](https://github.com/opensourcepos/opensourcepos/issues/3754))
- Minor report fixes
## [3.3.8] - 2022-08-03
- Translation updates (Azerbaijani, Flemish, French, Spanish, Thai, Vietnamese)
- Fix logo removal issue (CSRF regression) ([#3533](https://github.com/opensourcepos/opensourcepos/issues/3533))
- Substract refunds from total rewards as payment method ([#3536](https://github.com/opensourcepos/opensourcepos/issues/3536))
## [3.3.7] - 2022-03-29
- Translation updates (Chinese, French, Indonesian, Italian, Polish, Swedish, Thai)
- XSS fixes in bootstrap datatables
- Invoice numbering fixes
- Docker compose database scripts are now mounted from a container volume
## [3.3.6] - 2021-10-31
- Translation updates (Bosnian, Dutch, Indonesian, Polish, Russian, Spanish)
- Make footer revision clickable (ref to github)
- Minor reporting adjustments
- Introduced new global keyboard shortcuts (see overview below)
### Fixes
- reCaptcha issue fix
- Username verification bugfix
- Clickjacking security mitigations
- Fixes for the payment summary after refresh
- Hardening against XSS by introducing a CSP header in the HTTP headers
- Several CSRF and XSS fixes
- Type juggling password fix for old logins
## [3.3.5] - 2021-08-26 [YANKED]
- Translation updates (Arabic, Azerbaijani, Bulgarian, Chinese, Dutch, French, Indonesian, Polish, Portuguese, Romanian, Spanish, Swedish, Tamil, Thai, Turkish, Ukrainian, Vietnamese)
- New responsive login page based on Bootstrap `5`
- Translation fallback to English when a string is untranslated for the selected language
- Database and performance optimizations
- Grunt/CI updates
- CSV item import improvements
### Fixes
- Username verification fix on employee insert/update
- Minor report fixes
- Attribute encoding fix
- Decimal render fix
- Fixes for Docker to make it run on Windows
- Blind SQL injection fix
## [3.3.4] - 2021-04-20
- Translation updates (Hungarian, Indonesian, Bosnian, Ukrainian, Vietnamese, Spanish)
- Prevent data wipeout when calling GET directly on the save endpoint
- Cleanup `.htaccess`
- Docker compose usability improvements
- Cookie secure flag fix for Chrome (you can enable CSRF protection again now)
- Use LONGBLOB for session storage. This should fix issues preventing a user from adding a large number of items to register
- Cash rounding bugfixes
- Fix daily overview cash sale totals
- Show sale count in the transaction report
- Button disable to prevent double submission
- Add barcode field to item kits
- Fix discount register parsing in some specific locales
## [3.3.3] - 2021-01-01
- PHP `7.4` support
- Set PHP `7.2` to be the minimum level due to older version deprecations
- Added email CC and BCC (see `config/email.php`)
- Cash rounding to nearest 5 cents
- Updated composer packages and JS plugins
- Improved security (CSRF protection)
- Various small improvements and bug fixes
## [3.3.2] - 2020-09-03
- Fixed `only_full_group_by` issue with MySQL/MariaDB
- Fixed POS transaction return failure if items were deleted
- Various bug fixes
## [3.3.1] - 2019-12-14
- Various bug fixes (please disable `only_full_group_by` option from MySQL/MariaDB to avoid issues)
## [3.3.0] - 2019-09-29
- New logo
- Upgrade CodeIgniter to version `3.1.11`
- PHP `7.3` support
- Attributes feature (allows extensibility of items replacing old custom fields)
- India GST tax support + various tax support improvements
- Cash up feature
- Temporary items feature
- Fixed sales discount
- Supplier category feature
- Improved items import and CSV file generation (to contain additional attributes)
- Improved Docker installation with NGINX reverse proxy using Let's Encrypt TLS certificate
- Database performance improvements
- Added and udated translations
- Fixed various reports issues
- Fixed rounding issues
- Fixed CSRF issues
- Fixed database upgrade script issues
- Various bug fixes
## [3.2.3] - 2018-06-13
- Upgrade CodeIgniter to version `3.1.9`
- Further revert of CSRF change causing regression
## [3.2.2] - 2018-06-06
- Revert CSRF change causing regression
## [3.2.1] - 2018-06-04
- Support for GDPR
- CSRF simplifications
- Translation upgrades
- Various bug fixes
## [3.2.0] - 2018-04-14
- Upgrade CodeIgniter to version `3.1.8`
- PHP `7.2` support (use OpenSSL and not MCrypt)
- Automatic database upgrades from `3.0.0` at first login (no more SQL scripts)
- Home and (back)office menu switch (top menu can be organized in two views)
- Expenses feature
- Quote and work order features
- Improved invoice support
- Sale suspend, soft delete, complete as the state not as different tables or hard delete
- Restore deleted sales
- Improved item kits
- Export tables all records and export to PDF
- Table sticky header (headers visible during scrolling)
- Allow duplicate barcodes (config option)
- Search suggestion formatting (config option)
- Define print and email checkboxes behavior (config option)
- Edit customer from sales register
- Added and updated translations
- Various jQuery plugins upgrade
- Fixed permission issues (e.g. password change)
- Fixed various reports issues and renamed Sales to Transactions
- Various bug fixes (e.g. tax, rounding, library circular dependency)
## [3.1.1] - 2017-09-09
- Updated en-US and en-GB translations, better grammar, and consistency
- Fixed database migration issue with VAT tax included
- Fixed database backup bug
- Fixed gift card error
- Fixed database `upgrade to 3.1.x` script (now it's to `3.1.1` and there is no `3.1.0` anymore)
- Fixed old database upgrade scripts for people upgrading from `2.x` versions
- Fixed `.htaccess` file in OSPOS root dir (it was not forwarding to `public` subdir)
- Fixed few jQuery `2.0` upgrade issues
## [3.1.0] - 2017-09-02
- MySQL `5.7` and PHP `7.x` support
- Advanced tax support with customer tax categories and more
- Better horeca use case support with dinner table sale tagging
- Customer rewards support
- Added quote support and better invoice support
- Added integration with Mailchimp to connect customer list with Mailchimp list
- Prevent inserting two customers with the same email address
- Customer total spending and stats
- Added Google reCAPTCHA option for the login page to increase protection from brute force attacks
- Added due payment for credit sale support
- Gift card numbering with two options: series and random
- Extended item kits functionality
- Employees are allowed to change their own password by clicking their name in the top bar
- Cash rounding support, extended decimals
- Reworked item pictures, file names, and storing
- Financial year start date and selection from date range pickers
- Date time range filters can be date and time or date only
- Added two new Bootswatch themes
- Receipts font size support
- Fix automatically people's name first capital letter, emails in lower case only
- Fixes to Receiving
- Various amendments to database script updates from older versions
- Added dotenv support
- Updates to language translations (split English to American English and British English)
- Various Dockers support improvements
- Minor bugfixes
## [3.0.2] - 2016-12-31
- Fixed error when performing scans multiple times in a row
- Fixed summary reports
- Protect employee privacy by printing just the first letter of the family name
- Updates to language translations
- Various Dockers support improvements
- Minor bugfixes
## [3.0.1] - 2016-11-27
- Upgrade CodeIgniter to version `3.1.2`
- Substantial database performance improvements
- Improved security: email and SMS passwords encryption, removed `phpinfo.php`
- Set code to be production and not development in `index.php`
- Reports improvements, fixed table sorting, tax calculation and made profit to be net profit
- Better Apache `2.4` support in `.htaccess`
- Updates to language translations
- Fixed excel template download links
- Fixed employee name in sale receipt and invoice reprinting
- Fixed `2.3.2_to_2.3.3.sql` database upgrade script mistake
- Fixed `phppos to ospos` database migration script
- Minor bug fixes and some general code clean up
## [3.0.0] 2016-10-22
- Upgrade CodeIgniter to version `3.1.0`
- Major UI overhaul based on Bootstrap `3.0` and Bootswatch Themes
- New tabular views with advanced filtering using Bootstrap Tables
- New graphical reports with no more Adobe Flash dependency
- Redesign of all modal dialogs
- Updated Sales register with simplified payment flow
- Improved security: MySQL injection, XSS, CSFR, BCrypt password encryption, safer project layout
- Support for text messaging (interfacing to specific support required)
- Email configuration
- Improved Localisation support
- Improved Store Config page
- Docker container ready for cloud installation
- Composer PHP support
- More languages and integration with Weblate for continuous translation
- About 280 closed issues under `3.0.0` release label, too many to produce a meaningful list
- Various code cleanup, refactoring, optimization and etc.
## [2.4.0] - 2016-10-03
- Upgrade CodeIgniter to version `3.0.5`
- Fix for spurious logouts
- Apache `.htaccess` `mod_expiry` caching and security optimizations
- Bulk item edit fixes (category, tax, and supplier fields)
- Remove f-key shortcuts used for module navigation
- Allow using custom invoice numbers when suspending a sale
- PHP `7` fixes
- Specific warnings to distinguish between reorder level and out of stock situation in sales
- Fix malware detection issues due to usage of `base64` encoding for storing session variables
- Improve language generation scripts (use PHP builtin functionality)
- Add extra buttons for navigation and printing to receipt and invoice
- Improve print layout for invoices
- Make layout consistent for items between receipt and invoice templates
- Minor bugfixes
## [2.3.4] - 2016-02-08
- Migration script fixes
- Improved continuous integration setup
- More integration tests
- Virtualized container setup (`docker install`)
- Live clock functionality and favicon
- Improved PHP `7` compatibility
- Added de_CH (German) as language
- Minor code cleanup
- Removal of annoying backup prompt on logout
## [2.3.3] - 2016-01-06
- Item kit fixes (search, list, ...)
- Add date picker widgets in sale/receiving edit forms
- Add date filter in items module
- Add barcode generation logic for EAN8, EAN13
- Add barcode validation and fallback logic for EAN8, EAN13
- New config option to generate barcodes if `item_number` is empty
- Add cost and count to inventory reports
- Gift card fixes
- Refactor sales overview (added date filtering + search options)
- Better locale config support
- Improve PHP compatibility
- Fix invoice numbering bug on suspending a sale
- Add configurable locale-dependent date format
- Add grunt-cache-breaker plugin
- Suspend button appears before adding a payment
- Searching of deleted items, filtering part is removed
- Remove infamous `0` after leaving sale or receiving comments empty
- Add SQL script to clean zeroes in sales/receivings comments
- Numerous other bug fixes
## [2.3.2] - 2016-01-25
- Nominatim (OpenStreetMap) customer address autocompletion
- Sale invoice templating
- Configurable barcode generation for items
- Stock location filtering in detailed sales and receivings reports
- Gift cards fixes
- Proper pagination support for most modules
- Language updates
- Fix for decimal tax rates
- Add gender and company name attributes to customer
- Stock location config screen refactor
- Basic Travis CI and PhantomJS setup
- Database backup on admin logout
- Modifiable item thumbnails
- Email invoice PDF generation using DomPDF
- Modifiable company logo
- jQuery upgrade (`1.2` -> `1.8.3`)
- JavaScript minification (using Grunt)
- Numerous bugfixes
## [2.3.1] - 2015-02-11
- Extra report permissions (this includes a refactoring of the database model - new grants table)
- Tax inclusive/exclusive pricing
- Receivings amount multiplication (can be configured in items section)
- Customizable sale and receiving numbering
- Gift card improvements
- Fix item import through CSV
- Bug fixes for reports
## [2.3.0] - 2014-08-20
- Support for multiple stock locations
## 2.2.2 - 2014-08-19
- French language added
- Thai language added
- Upgrade CodeIgniter to version `2.2.0`
- Database types for amounts all changed to decimal types (this will fix rounding errors in the sales and receivings reports)
- Fix duplicated session cookies in HTTP headers (this broke the application when running on Nginx)
## 2.1.1
- Barcodes on the order receipt were not generated correctly
- Sales edit screen for detailed sales reports is now available with ThickBox as in the rest of the application
- Indonesian language files updated (Oktafianus)
- Default language set to `en` in `config.php`
- Fixed some CSS bugs in the suspended sales section
- Default cookie `sess_time_expire` set to `86400` (24h)
## 2.1.0
- Various upgrades, too numerous to list here
- Removed dependency on ofc upload library due to vulnerability found
## 2.0.2
- Fixed multiple gift cards issue per Bug #4 reported on Sourceforge where a second gift card added would have its balance set to `0` even if the sale did not require the total of the second gift card to pay the remaining amount due
- Small code cleanup
## 2.1.0
- Upgrade CodeIgniter to version `2.1.0`
- Various small improvements

98
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,98 @@
Contributor Covenant Code of Conduct
Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
1. Correction
Community Impact: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
Consequence: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
2. Warning
Community Impact: A violation through a single incident or series of
actions.
Consequence: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
3. Temporary Ban
Community Impact: A serious violation of community standards, including
sustained inappropriate behavior.
Consequence: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
4. Permanent Ban
Community Impact: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
Consequence: A permanent ban from any sort of public interaction within the
community.
Attribution
This Code of Conduct is adapted from the Contributor Covenant,
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
Community Impact Guidelines were inspired by
Mozillas code of conduct enforcement ladder.
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -1,42 +1,38 @@
FROM php:7.4-apache AS ospos
MAINTAINER jekkos
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libicu-dev \
libgd-dev \
openssl
FROM php:8.2-apache AS ospos
LABEL maintainer="jekkos"
RUN apt update && apt-get install -y libicu-dev libgd-dev
RUN a2enmod rewrite
RUN docker-php-ext-install mysqli bcmath intl gd
RUN echo "date.timezone = \"\${PHP_TIMEZONE}\"" > /usr/local/etc/php/conf.d/timezone.ini
RUN echo -e “$(hostname -i)\t$(hostname) $(hostname).localhost” >> /etc/hosts
WORKDIR /app
COPY . /app
RUN ln -s /app/*[^public] /var/www && rm -rf /var/www/html && ln -nsf /app/public /var/www/html
RUN chmod -R 750 /app/public/uploads /app/application/logs && chown -R www-data:www-data /app/public /app/application
RUN chmod -R 770 /app/writable/uploads /app/writable/logs /app/writable/cache && chown -R www-data:www-data /app
FROM ospos AS ospos_test
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt-get install -y libzip-dev wget git
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /bin/wait-for-it.sh && chmod +x /bin/wait-for-it.sh
RUN docker-php-ext-install zip
RUN composer install -d/app
RUN php /app/vendor/kenjis/ci-phpunit-test/install.php -a /app/application -p /app/vendor/codeigniter/framework
RUN sed -i 's/backupGlobals="true"/backupGlobals="false"/g' /app/application/tests/phpunit.xml
RUN sed -i '13,17d' /app/application/tests/controllers/Welcome_test.php
WORKDIR /app/application/tests
CMD ["/app/vendor/phpunit/phpunit/phpunit"]
RUN composer install -d/app
#RUN sed -i 's/backupGlobals="true"/backupGlobals="false"/g' /app/tests/phpunit.xml
WORKDIR /app/tests
CMD ["/app/vendor/phpunit/phpunit/phpunit", "/app/test/helpers"]
FROM ospos AS ospos_dev
RUN mkdir -p /app/bower_components && ln -s /app/bower_components /var/www/html/bower_components
ARG USERID
ARG GROUPID
RUN echo "Adding user uid $USERID with gid $GROUPID"
RUN ( addgroup --gid $GROUPID ospos || true ) && ( adduser --uid $USERID --gid $GROUPID ospos )
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini

View File

@@ -1,272 +0,0 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
wiredep: {
task: {
ignorePath: '../../../public/',
src: ['application/views/partial/header.php']
}
},
bower_concat: {
all: {
mainFiles: {
'bootstrap-table': [ "dist/bootstrap-table.min.js", "dist/bootstrap-table.css", "dist/extensions/export/bootstrap-table-export.min.js", "dist/extensions/mobile/bootstrap-table-mobile.min.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.min.js", "dist/extensions/sticky-header/bootstrap-table-sticky-header.css"],
'chartist-plugin-axistitle': [ "./dist/chartist-plugin-axistitle.min.js"]
},
dest: {
'js': 'tmp/opensourcepos_bower.js',
'css': 'tmp/opensourcepos_bower.css'
}
}
},
bowercopy: {
options: {
report: false
},
targetdistjqueryui: {
options: {
srcPrefix: 'public/bower_components/jquery-ui',
destPrefix: 'public/dist'
},
files: {
'jquery-ui': 'themes/base/jquery-ui.min.css'
}
},
targetdistbootswatch: {
options: {
srcPrefix: 'public/bower_components/bootswatch',
destPrefix: 'public/dist'
},
files: {
bootswatch: '*/'
}
},
targetlicense: {
options: {
srcPrefix: './'
},
files: {
'public/license': 'LICENSE'
}
}
},
cssmin: {
target: {
files: {
'public/dist/<%= pkg.name %>.min.css': ['tmp/opensourcepos_bower.css', 'public/css/*.css', '!public/css/login.css', '!public/css/invoice_email.css', '!public/css/barcode_font.css', '!public/css/darkly.css']
}
}
},
concat: {
js: {
options: {
separator: ';'
},
files: {
'tmp/<%= pkg.name %>.js': ['tmp/opensourcepos_bower.js', 'public/js/jquery*', 'public/js/*.js']
}
},
sql: {
options: {
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --'
},
files: {
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'],
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql']
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'public/dist/<%= pkg.name %>.min.js': ['tmp/<%= pkg.name %>.js']
}
}
},
jshint: {
files: ['Gruntfile.js', 'public/js/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
tags: {
css_header: {
options: {
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
openTag: '<!-- start css template tags -->',
closeTag: '<!-- end css template tags -->',
ignorePath: '../../../public/'
},
src: ['public/css/*.css', '!public/css/login.css', '!public/css/invoice_email.css', '!public/css/barcode_font.css', '!public/css/darkly.css'],
dest: 'application/views/partial/header.php',
},
mincss_header: {
options: {
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
openTag: '<!-- start mincss template tags -->',
closeTag: '<!-- end mincss template tags -->',
ignorePath: '../../../public/'
},
// jquery-ui must be first or at least before opensourcepos.min.css
src: ['public/dist/jquery-ui/*.css', 'public/dist/*.css'],
dest: 'application/views/partial/header.php',
},
css_login: {
options: {
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>',
openTag: '<!-- start css template tags -->',
closeTag: '<!-- end css template tags -->',
ignorePath: '../../public/'
},
src: ['public/css/login.css'],
dest: 'application/views/login.php'
},
js: {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}"></script>',
openTag: '<!-- start js template tags -->',
closeTag: '<!-- end js template tags -->',
ignorePath: '../../../public/'
},
src: ['public/js/jquery*', 'public/js/*.js'],
dest: 'application/views/partial/header.php'
},
minjs: {
options: {
scriptTemplate: '<script type="text/javascript" src="{{ path }}"></script>',
openTag: '<!-- start minjs template tags -->',
closeTag: '<!-- end minjs template tags -->',
ignorePath: '../../../public/'
},
src: ['public/dist/*min.js'],
dest: 'application/views/partial/header.php'
}
},
mochaWebdriver: {
options: {
timeout: 1000 * 60 * 3
},
test : {
options: {
usePhantom: true,
usePromises: true
},
src: ['test/**/*.js']
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
},
cachebreaker: {
dev: {
options: {
match: [ {
'opensourcepos.min.js': 'public/dist/opensourcepos.min.js',
'opensourcepos.min.css': 'public/dist/opensourcepos.min.css'
} ],
replacement: 'md5'
},
files: {
src: ['application/views/partial/header.php', 'application/views/login.php']
}
}
},
clean: {
license: ['public/bower_components/**/bower.json']
},
license: {
all: {
// Target-specific file lists and/or options go here.
options: {
// Target-specific options go here.
directory: 'public/bower_components',
output: 'public/license/bower.LICENSES'
}
}
},
'bower-licensechecker': {
options: {
/*directory: 'path/to/bower',*/
acceptable: [ 'MIT', 'BSD', 'LICENSE.md' ],
printTotal: true,
warn: {
nonBower: true,
noLicense: true,
allGood: true,
noGood: true
},
log: {
outFile: 'public/license/.licenses',
nonBower: true,
noLicense: true,
allGood: true,
noGood: true,
}
}
},
apigen: {
generate:{
options: {
apigenPath: 'vendor/bin/',
source: 'application',
destination: 'docs'
}
}
},
compress: {
main: {
options: {
mode: 'zip',
archive: 'dist/opensourcepos.zip'
},
files: [
{
src: [
'public/**',
'vendor/**',
'application/**',
'!/application/tests',
'!/public/images/menubar/png/',
'!/public/dist/bootswatch/',
'/public/dist/bootswatch/*/*.css',
'database/**',
'*.txt',
'*.md',
'LICENSE',
'docker*',
'docker/**',
'Dockerfile',
'**/.htaccess',
'*.csv'
]
}
]
}
}
});
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-mocha-webdriver');
grunt.loadNpmTasks('grunt-composer');
grunt.loadNpmTasks('grunt-apigen');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', ['wiredep', 'bower_concat', 'bowercopy', 'concat', 'uglify', 'cssmin', 'tags', 'cachebreaker']);
grunt.registerTask('update', ['composer:update', 'bower:update']);
grunt.registerTask('genlicense', ['clean:license', 'license', 'bower-licensechecker']);
grunt.registerTask('package', ['default', 'compress']);
grunt.registerTask('packages', ['composer:update']);
grunt.registerTask('gendocs', ['apigen:generate']);
};

View File

@@ -1,136 +1,65 @@
Server Requirements
-------------------
## Server Requirements
* PHP version 7.2 to 7.4 are supported, PHP version 5.6 and 8.0 are NOT supported. Please note that PHP needs to have `php-gd`, `php-bcmath`, `php-intl`, `php-openssl`, `php-mbstring` and `php-curl` installed and enabled.
- PHP version `8.1` to `8.4` are supported, PHP version `≤7.4` is NOT supported. Please note that PHP needs to have the extensions `php-json`, `php-gd`, `php-bcmath`, `php-intl`, `php-openssl`, `php-mbstring`, `php-curl` and `php-xml` installed and enabled. An unstable master build can be downloaded in the releases section.
- MySQL `5.7` is supported, also MariaDB replacement `10.x` is supported and might offer better performance.
- Apache `2.4` is supported. Nginx should work fine too, see [wiki page here](https://github.com/opensourcepos/opensourcepos/wiki/Local-Deployment-using-LEMP).
- Raspberry PI based installations proved to work, see [wiki page here](<https://github.com/opensourcepos/opensourcepos/wiki/Installing-on-Raspberry-PI---Orange-PI-(Headless-OSPOS)>).
- For Windows based installations please read [the wiki](https://github.com/opensourcepos/opensourcepos/wiki). There are closed issues about this subject, as this topic has been covered a lot.
* MySQL 5.5, 5.6 and 5.7 are supported, also MariaDB replacement 10.x is supported and apparently offering better performance.
## Local install
* Apache 2.2 and 2.4 are supported. Also Nginx has been proven to work fine, see [wiki page here](https://github.com/opensourcepos/opensourcepos/wiki/Local-Deployment-using-LEMP).
First of all, if you're seeing the message `system folder missing` after launching your browser, or cannot find `database.sql`, that most likely means you have cloned the repository and have not built the project. To build the project from a source commit point instead of from an official release check out [Building OSPOS](BUILD.md). Otherwise, continue with the following steps.
* Raspberry PI based installations proved to work, see [wiki page here](https://github.com/opensourcepos/opensourcepos/wiki/Installing-on-Raspberry-PI---Orange-PI-(Headless-OSPOS)).
1. Download the a [pre-release for a specific branch](https://github.com/opensourcepos/opensourcepos/releases) or the latest stable [from GitHub here](https://github.com/opensourcepos/opensourcepos/releases). A repository clone will not work unless know how to build the project.
2. Create/locate a new MySQL database to install Open Source Point of Sale into.
3. Execute the file `app/Database/database.sql` to create the tables needed.
4. Unzip and upload Open Source Point of Sale files to the web-server.
5. Open `.env` file and modify credentials to connect to your database if needed. (First copy .env.example to .env and update)
7. Go to your install `public` dir via the browser.
8. Log in using
- Username: admin
- Password: pointofsale
9. If everything works, then set the `CI_ENVIRONMENT` variable to `production` in the .env file
9. Enjoy!
10. Oops, an issue? Please make sure you read the FAQ, wiki page, and you checked open and closed issues on GitHub. PHP `display_errors` is disabled by default. Create an` app/Config/.env` file from the `.env.example` to enable it in a development environment.
* For Windows based installations please read [the wiki](https://github.com/opensourcepos/opensourcepos/wiki) and also existing closed issues as this topic has been covered well in all the variants and issues.
## Local install using Docker
Local install
-------------
First of all, if you're seeing the message **'system folder missing'** after launching your browser, then that means you have cloned the repository and have not built the project properly.
1. Dowload the latest [stable release](https://github.com/opensourcepos/opensourcepos/releases) from github or [unstable build](https://bintray.com/jekkos/opensourcepos/opensourcepos/view/files?sort=updated&order=asc#files) from bintray. A regular repository clone will not work unless you are brave enough to build the whole project!
2. Create/locate a new mysql database to install open source point of sale into
3. Execute the file database/database.sql to create the tables needed
4. unzip and upload Open Source Point of Sale files to web server
5. Modify application/config/database.php and modify credentials if needed to connect to your database
6. Modify application/config/config.php encryption key with your own
7. Go to your point of sale install public dir via the browser
8. LOGIN using
* username: admin
* password: pointofsale
9. Enjoy
10. Oops an issue? Please make sure you read the FAQ, wiki page and you checked open and closed issue on GitHub. PHP display_errors is disabled by default. Create an application/config/.env file from the .env.example to enable it in a development environment.
Local install using Docker
--------------------------
From now onwards OSPOS can be deployed using Docker on Linux and Mac, locally or on a host (server).
OSPOS can be deployed using Docker on Linux, Mac, and Windows. Locally or on a host (server).
This setup dramatically reduces the number of possible issues as all setup is now done in a Dockerfile.
Docker runs natively on Mac and Linux. Please refer to the docker documentation for instructions on how to set it up on your platform.
Docker runs natively on Mac and Linux. Windows requires WSL2 to be installed. Please refer to the Docker documentation for instructions on how to set it up on your platform.
Since OSPOS version 3.3.0 the docker installation offers a reverse proxy based on nginx with a (if local) Self signed certificate termination (aka HTTPS connection).
Behind the reverse proxy you can access OSPOS using https (port 443) and myPhpAdmin using port 8000.
Port 80 (standard http) is not available for OSPOS, it's only available for a cert manager service in case of server installation.
**Be aware that this setup is not suited for production usage! Change the default passwords in the compose file before exposing the containers publicly.**
* To build and run the image, download the latest build from bintray.
* Install envsubst from https://github.com/a8m/envsubst on your machine
* Issue the following commands in a terminal with docker installed:
Start the containers using the following command
```
docker/install-local.sh
docker-compose up
```
* When required to renew a certificate say (y)es.
* When the script has terminated to run, wait about a minute before connecting to https://127.0.0.1.
* The web browser will warn you of a self certificate exception, accept and continue
* If you do https://127.0.0.1:8000 (port 8000) instead, you would be able to access a phpMyAdmin service connected to OSPOS MariaDB
## Nginx install using Docker
* To stop the docker issue the following command:
Since OSPOS version `3.3.0` the Docker installation offers a reverse proxy based on Nginx with a Let's Encrypt TLS certificate termination (aka HTTPS connection).
Let's Encrypt is a free certificate issuer, requiring a special installation that this Docker installation would take care of for you.
Any Let's Encrypt TLS certificate renewal will be managed automatically, therefore there is no need to worry about those details.
Before starting your installation, you should edit the `docker/.env` file and configure it to contain the correct MySQL/MariaDB and phpMyAdmin passwords (don't use the defaults!).
You will also need to register to Let's Encrypt. Configure your host domain name and Let's Encrypt email address in the `docker/.env` file.
The variable `STAGING` needs to be set to `0` when you are confident your configuration is correct so that Let's Encrypt will issue a final proper TLS certificate.
Follow local install steps, but instead use
```
docker/install-nginx.sh
```
Do **not** use below command on live deployments unless you want to tear everything down. All your disk content will be wiped!
```
docker/uninstall.sh
```
## Cloud install
Host install using Docker
-------------------------
Since OSPOS version 3.3.0 the docker installation offers a reverse proxy based on nginx with a Letsencrypt TLS certificate termination (aka HTTPS connection).
Letsencrypt is a free certificate issuer, requiring a special installation that this docker installation would take care for you.
Any Letsencrypt TLS certificate renewal will be managed automatically for you, therefore there is no need to worry about those details.
Before starting your installation, you would need to edit docker/.env file and configure it to contain the correct MySQL/MariaDB and phpMyAdmin passwords (don't use the defaults!).
You will also need to register to Letsencrypt and configure your host domain name, Letsencrypt email address in docker/.env file.
The variable STAGING needs to be set to 0 when you are confident your configuration is correct so that Letsencrypt will issue a final proper TLS certificate.
Follow local install steps, but instead of
```
docker/install-local.sh
```
use
```
docker/install-server.sh
```
Do not use
```
docker/uninstall.sh
```
on live deployments unless you want to tear down everything because all your disk content will be wiped out!
Cloud install
-------------
If you choose *DigitalOcean*:
[Through this link](https://m.do.co/c/ac38c262507b), you will get a *$100 credit* for a first month. [Check the wiki](https://github.com/opensourcepos/opensourcepos/wiki/Getting-Started-installations) for further instructions on how to install the necessary components.
cPanel & SSH Install
--------------------
If you own on a **VPS**, **Dedicated Server**, or **Shared Hosting** running on **cPanel** with **SSH** access:
You can run our Stand-alone [WS-OSPOS-Installer](https://github.com/WebShells/WS-OSPOS-Installer.git), it will handle:
. Database.php config files generation.
. Creation of db User & Password depending on user's input of Dbname, Username, Password, & Hostname ( No need for phpmyadmin )
. Imports default Db SQL files in order to run the project.
Usage in **(SSH)**:
git clone https://github.com/WebShells/WS-OSPOS-Installer.git
chmod +x WS-OSPOS-Installer/Get-POS
./WS-OSPOS-Installer/Get-POS
or
wget https://github.com/WebShells/WS-OSPOS-Installer/archive/master.zip
unzip -qq master.zip
chmod +x WS-OSPOS-Installer-master/Get-POS
./WS-OSPOS-Installer-master/Get-POS
Answer **DB required questions** and you are ready to run the project on http://localhost/OSPOS/public (localhost to be replaced by the hostname provided during setup).
If you choose DigitalOcean:
[Through this link](https://m.do.co/c/ac38c262507b), you will get a [**free $100, 60-day credit**](https://m.do.co/c/ac38c262507b). [Check the wiki](https://github.com/opensourcepos/opensourcepos/wiki/Getting-Started-installations) for further instructions on how to install the necessary components.

104
LICENSE
View File

@@ -1,69 +1,55 @@
The MIT License (MIT)
MIT License
Copyright (c) 2012-2014 pappastech
Copyright (c) 2012 Alain
Copyright (c) 2013 Rob Garrison
Copyright (c) 2013 Parq
Copyright (c) 2013 Ramel
Copyright (c) 2013-2021 jekkos
Copyright (c) 2015-2021 FrancescoUK (aka daN4cat)
Copyright (c) 2015 Aamir Shahzad (aka asakpke), RoshanTech.com
Copyright (c) 2015 Toni Haryanto (aka yllumi)
Copyright (c) 2013-2025 jekkos
Copyright (c) 2017-2025 objecttothis
Copyright (c) 2017-2025 odiea
Copyright (c) 2021-2025 BudsieBuds
Copyright (c) 2017-2024 Steve Ireland
Copyright (c) 2018-2024 WebShells
Copyright (c) 2015-2023 FrancescoUK (aka daN4cat)
Copyright (c) 2015-2022 Aamir Shahzad (aka asakpke), RoshanTech, eSite.pk
Copyright (c) 2019-2020 Andriux1990
Copyright (c) 2018-2019 Erasto Marroquin (aka Erastus)
Copyright (c) 2019 Loyd Jayme (aka loydjayme25)
Copyright (c) 2018 Nathan Sas (aka nathanzky)
Copyright (c) 2018 Emilio Silva (aka emi-silva)
Copyright (c) 2016-2017 Ramkrishna Mondal (aka RamkrishnaMondal)
Copyright (c) 2016 Rinaldy@dbarber (aka rnld26)
Copyright (c) 2016-2017 Jorge Colmenarez (aka jlctmaster), frontuari.com
Copyright (c) 2017-2021 Steve Ireland
Copyright (c) 2017-2021 objecttothis
Copyright (c) 2017-2021 odiea
Copyright (c) 2017-2021 WebShells / Shady Sh
Copyright (c) 2017 Jesus Guerrero Botella (aka i92guboj)
Copyright (c) 2016-2017 Jesus Guerrero Botella (aka i92guboj)
Copyright (c) 2017 Deep Shah (aka deepshah)
Copyright (c) 2017 Joshua Fernandez (aka joshua1234511)
Copyright (c) 2017 asadjaved63
Copyright (c) 2018 Erasto Marroquin (aka Erastus)
Copyright (c) 2018 Nathan Sas (aka nathanzky)
Copyright (c) 2018 Emilio Silva (aka emi-silva)
Copyright (c) 2019 Loyd Jayme (aka loydjayme25)
Copyright (c) 2020 Andriux1990
Copyright (c) 2016 Rinaldy@dbarber (aka rnld26)
Copyright (c) 2015 Toni Haryanto (aka yllumi)
Copyright (c) 2012-2014 pappastech
Copyright (c) 2013 Rob Garrison
Copyright (c) 2013 Parq
Copyright (c) 2013 Ramel
Copyright (c) 2012 Alain
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
You cannot claim copyright or ownership of the Software.
Versions ≥ 3.3.2:
Footer signatures "© 2010 - 2021 · opensourcepos.org · 3.3.3 - 6909c8"
In the format of: "© 2010 - Current Year · opensourcepos.org · Version - Commit"
and/or
"· opensourcepos.org ·"
with version, hash and URL link to the official website of the project MUST BE RETAINED,
MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED.
Versions < 3.3.2:
Footer signatures "You are using Open Source Point Of Sale"
and/or
"Open Source Point Of Sale"
with version, hash and URL link to the original distribution of the code MUST BE RETAINED,
MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Additionally, you cannot claim copyright or ownership of the Software.
The footer signatures with version, hash and URL link to the official website
of the project MUST BE RETAINED, MUST BE VISIBLE IN EVERY PAGE and CANNOT BE
MODIFIED.
Footer signatures are in the format
"© 2010 - current year · opensourcepos.org · version - commit"
or "Open Source Point of Sale".

247
README.md
View File

@@ -1,166 +1,143 @@
[![Download](https://api.bintray.com/packages/jekkos/opensourcepos/opensourcepos/images/download.svg?version=3.3.2) ](https://bintray.com/jekkos/opensourcepos/opensourcepos/3.3.2/link)
[![Build Status](https://travis-ci.org/opensourcepos/opensourcepos.svg?branch=master)](https://travis-ci.org/opensourcepos/opensourcepos)
[![Join the chat at https://gitter.im/opensourcepos](https://badges.gitter.im/jekkos/opensourcepos.svg)](https://gitter.im/opensourcepos?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![GitHub version](https://badge.fury.io/gh/jekkos%2Fopensourcepos.svg)](https://badge.fury.io/gh/jekkos%2Fopensourcepos)
[![Translation status](http://translate.opensourcepos.org/widgets/opensourcepos/-/svg-badge.svg)](http://weblate.jpeelaer.net/engage/ospos/?utm_source=widget)
<p align="center"><img src="https://raw.githubusercontent.com/opensourcepos/opensourcepos/master/branding/emblem.svg" alt="Open Source Point of Sale Logo" width="auto" height="200"></p>
<h3 align="center">Open Source Point of Sale</h3>
<p align="center">
<a href="#-introduction">Introduction</a> · <a href="#-live-demo">Demo</a> · <a href="#-installation">Installation</a> ·
<a href="#-contributing">Contributing</a> · <a href="#-reporting-bugs">Bugs</a> · <a href="#-faq">FAQ</a> ·
<a href="#-keep-the-machine-running">Donate</a> · <a href="#-license">License</a> · <a href="#-credits">Credits</a>
</p>
Introduction
------------
<p align="center">
<a href="https://app.travis-ci.com/opensourcepos/opensourcepos" target="_blank"><img src="https://api.travis-ci.com/opensourcepos/opensourcepos.svg?branch=master" alt="Build Status"></a>
<a href="https://app.gitter.im/#/room/#opensourcepos_Lobby:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" target="_blank"><img src="https://badges.gitter.im/jekkos/opensourcepos.svg" alt="Join the chat at https://app.gitter.im"></a>
<a href="https://badge.fury.io/gh/opensourcepos%2Fopensourcepos" target="_blank"><img src="https://badge.fury.io/gh/opensourcepos%2Fopensourcepos.svg" alt="Project Version"></a>
<a href="https://translate.opensourcepos.org/engage/opensourcepos/?utm_source=widget" target="_blank"><img src="https://translate.opensourcepos.org/widgets/opensourcepos/-/svg-badge.svg" alt="Translation Status"></a>
</p>
Open Source Point of Sale is a web based point of sale system.
The main features are:
* Stock management (Items and Kits with extensible list of Attributes)
* VAT, GST, customer and multi tiers taxation
* Sale register with transactions logging
* Quotation and invoicing
* Expenses logging
* Cashup
* Receipt and invoice printing and/or emailing
* Barcode generation and printing
* Suppliers and Customers database
* Multiuser with permission control
* Reporting on sales, orders, expenses, inventory status
* Receivings
* Giftcard
* Rewards
* Restaurant tables
* Messaging (SMS)
* Multilanguage
* Selectable Boostrap (Bootswatch) based UI theme
* Mailchimp integration
* reCAPTCHA to protect login page from brute force attacks
* GDPR ready
## 👋 Introduction
The software is written in PHP language, it uses MySQL (or MariaDB) as data storage back-end and has a simple but intuitive user interface.
Open Source Point of Sale is a web-based point of sale system. The application is written in PHP, uses MySQL (or MariaDB) as the data storage back-end, and has a simple but intuitive user interface.
The latest 3.x version is a complete overhaul of the original software.
It is now based on Bootstrap 3 using Bootswatch themes, and uses CodeIgniter version 3 as framework.
It also has improved functionality and security.
The latest `3.4` version is a complete overhaul of the original software. It uses CodeIgniter 4 as a framework and is based on Bootstrap 3 using Bootswatch themes. Along with improved functionality and security.
DEMO / DEV
----------
The features include:
A demo version of the latest master version can be found on our [Demo server](https://demo.opensourcepos.org). This is a containerized install which will be reinitialized when new functionality is added to the code repository.
- Stock management (items and kits with an extensible list of attributes)
- VAT, GST, customer, and multi tiers taxation
- Sale register with transactions logging
- Quotation and invoicing
- Expenses logging
- Cash up function
- Printing and emailing of receipts, invoices and quotations
- Barcode generation and printing
- Database of customers and suppliers
- Multiuser with permission control
- Reporting on sales, orders, expenses, inventory status and more
- Receivings
- Gift cards
- Rewards
- Restaurant tables
- Messaging (SMS)
- Multilanguage
- Selectable Bootstrap based UI theme with Bootswatch
- MailChimp integration
- Optional Google reCAPTCHA to protect the login page from brute force attacks
- GDPR ready
LOGIN using
* username: admin
* password: pointofsale
## 🧪 Live Demo
Beside this we also have a [Dev server](https://dev.opensourcepos.org) that runs the build that was triggered with the last repository's commit.
We've got a live version of our latest master running for you to play around with and test everything out. It's a containerized install that will reinitialize when new functionality is merged into our code repository.
In case of any issues, check our status page at [https://status.opensourcepos.org](https://status.opensourcepos.org) to confirm whether there is a sever outage.
You can [find the demo here](https://demo.opensourcepos.org/) and log in with these credentials.
👤 Username `admin`
🔒 Password `pointofsale`
Installation
------------
If you bump into an issue, please check [the status page here](https://status.opensourcepos.org/) to confirm if the server is up and running.
Please **refrain from creating issues** about installation problems **before having read the FAQ and went through existing github issues**. We have a build pipeline that checks the sanity of our latest repository commit and in case the application itself is broken then our build will be as well.
## 🖥️ Development Demo
This application **can be setup in many different ways** and we only **support the ones described in the INSTALL file linked below**.
Besides the demo of the latest master, we also have a development server that builds when there's a new commit to our repository. It's mainly used for testing out new code before merging it into the master. [It can be found here](https://dev.opensourcepos.org/).
Read the [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md) in our repository.
The log in credentials are the same as the regular live demo.
[Check our wiki](https://github.com/opensourcepos/opensourcepos/wiki/Supported-hardware-datasheet) for info and recommendations on supported receipt printers and barcode scanners.
## 💾 Installation
License
-------
Please **refrain from creating issues** about installation problems before having read the FAQ and going through existing GitHub issues. We have a build pipeline that checks the sanity of our latest repository commit, and in case the application itself is broken then our build will be as well.
This application can be set up in _many_ different ways and we only support the ones described in [the INSTALL.md file](INSTALL.md).
For more information and recommendations on support hardware, like receipt printers and barcode scanners, read [this page](https://github.com/opensourcepos/opensourcepos/wiki/Supported-hardware-datasheet) on our wiki.
## ✨ Contributing
Everyone is more than welcome to help us improve this project. If you think you've got something to help us go forward, feel free to open a [pull request]() or join the conversation on [Element](https://app.gitter.im/#/room/#opensourcepos_Lobby:gitter.im).
Want to help translate Open Source Point of Sale in your language? You can find [our Weblate here](https://translate.opensourcepos.org), sign up, and start translating. You can subscribe to different languages to receive a notification once a new string is added or needs updating. Have a look at our [guidelines](https://github.com/opensourcepos/opensourcepos/wiki/Adding-translations) below to help you get started.
Only with the help of the community, we can keep language translations up to date. Thanks!
## 🐛 Reporting Bugs
Before creating a new issue, you'll need copy and include the info under the `System Info` tab in the configuration section in most cases. If that information is not provided in full, your issue might be tagged as pending.
If you're reporting a potential security issue, please refer to our security policy found in the [SECURITY.md](SECURITY.md) file.
NOTE: If you're running non-release code, please make sure you always run the latest database upgrade script and download the latest master code.
## 📖 FAQ
- If you get the message `system folder missing`, then you have cloned the source using git and you need to run a build first. Check [INSTALL.md](INSTALL.md) for instructions or download latest zip file from [GitHub releases](https://github.com/opensourcepos/opensourcepos/releases) instead.
- If at login time you read `The installation is not correct, check your php.ini file.`, please check the error_log in `public` folder to understand what's wrong and make sure you read the [INSTALL.md](INSTALL.md). To know how to enable `error_log`, please read the comment in [issue #1770](https://github.com/opensourcepos/opensourcepos/issues/1770#issuecomment-355177943).
- If you installed your OSPOS under a web server subdir, please edit `public/.htaccess` and go to the lines with the comments `if in web root` or `if in subdir`, uncomment one and replace `<OSPOS path>` with your path, and follow the instruction on the second comment line. If you face more issues, please read [issue #920](https://github.com/opensourcepos/opensourcepos/issues/920) for more information.
- Apache server configurations are SysAdmin issues and not strictly related to OSPOS. Please make sure you can show a "Hello world" HTML page before pointing to OSPOS public directory. Make sure `.htaccess` is correctly configured.
- If the avatar pictures are not shown in items or at item save you get an error, please make sure your `writable` and subdirs are assigned to the correct owner and the access permission is set to `750`.
- If you install OSPOS in Docker behind a proxy that performs `ssloffloading`, you can enable the URL generated to be HTTPS instead of HTTP, by activating the environment variable `FORCE_HTTPS = 1`.
- If you install OSPOS behind a proxy and OSPOS constantly drops your session, consider whitelisting the proxy IP address by setting `public array $proxyIPs = [];` in the [main PHP config file](https://github.com/opensourcepos/opensourcepos/blob/master/app/Config/App.php).
- If you have suhosin installed and face an issue with CSRF, please make sure you read [issue #1492](https://github.com/opensourcepos/opensourcepos/issues/1492).
- PHP `≥ 8.1` is required to run this app.
## 🏃 Keep the Machine Running
If you like our project, please consider buying us a coffee through the button below so we can keep adding features.
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MUN6AEG7NY6H8)\
Or refer to the [FUNDING.yml](.github/FUNDING.yml) file.
If you choose to deploy OSPOS in the cloud, you can contribute to the project by using DigitalOcean and signing up through our referral link. You'll receive a [free $200, 60-day credit](https://m.do.co/c/ac38c262507b) if you run OSPOS in a DigitalOcean droplet through [our referral link](https://m.do.co/c/ac38c262507b).
## 📄 License
Open Source Point of Sale is licensed under MIT terms with an important addition:
_The footer signature "You are using Open Source Point Of Sale" with version,
hash and link to the original distribution of the code MUST BE RETAINED,
MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED._
The footer signature "© 2010 - _current year_ · opensourcepos.org · 3.x.x - _hash_" including the version, hash and link to our website MUST BE RETAINED, MUST BE VISIBLE IN EVERY PAGE and CANNOT BE MODIFIED.
Also worth noting:
_The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software._
_The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software._
For more details please read the file [LICENSE](https://github.com/opensourcepos/opensourcepos/blob/master/LICENSE).
For more details please read the [LICENSE](LICENSE) file.
It's important to understand that althought you are free to use the software the copyright stays and the license agreement applies in all cases.
Therefore any actions like:
It's important to understand that although you are free to use the application, the copyright has to stay and the license agreement applies in all cases. Therefore, any actions like:
- Removing LICENSE and any license files is prohibited
- Removing LICENSE and/or any license files is prohibited
- Authoring the footer notice replacing it with your own or even worse claiming the copyright is absolutely prohibited
- Claiming full ownership of the code is prohibited
In short you are free to use the software but you cannot claim any property on it.
In short, you are free to use the application, but you cannot claim any property on it.
Any person or company found breaching the license agreement will have a bunch of monkeys at the door ready to destroy their servers.
Any person or company found breaching the license agreement might find a bunch of monkeys at the door ready to destroy their servers.
## 🙏 Credits
Keep the Machine Running
------------------------
If you like the project, and you are making money out of it in some form, then consider buying us a coffee so we can keep adding features.
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MUN6AEG7NY6H8)
If you choose to deploy OSPOS in the cloud, you can contribute to the project by using our referral link. [You will get an initial $100 credits](https://m.do.co/c/ac38c262507b) for running OSPOS on a cloud instance with DigitalOcean.
Language Translations
---------------------
To help us with OSPOS translations please use [Weblate website here](http://translate.opensourcepos.org) and sign up. After registering you can subscribe to different languages and you will be notified once a new translation is added.
Please also read the [wiki page here](https://github.com/opensourcepos/opensourcepos/wiki/Adding-translations) to find our Translations Guideline.
Only with the help of the community we can keep language translations up to date.
Reporting Bugs
--------------
If you are taking a release candidate code please make sure you always run the latest database upgrade script and you took the latest code from master.
Please DO NOT post issues if you have not completed this step.
- Versions **≥ 3.3.0**:
Please **Copy** the info under **System Info tab in configuration section** in order to give us the required details.
- Versions **< 3.2.3**:
Bug reports must follow the below schema:
1. Ospos **version string with git commit hash** (see ospos footer)
2. OS name and version running your Web Server (e.g. CentOS 6.9, Ubuntu 20, Windows 10)
3. Web Server name and version (e.g. Apache 2.4, Nginx 1.12, Nginx 1.13)
4. Database name and version (e.g. MySQL 5.6, MySQL 5.7, MariaDB 10.2, MariaDB 10.3)
5. PHP version (e.g. 7.2, 7.3, 7.4)
6. Language selected in OSPOS (e.g. English, Spanish)
7. Any configuration of OSPOS that you changed
8. Exact steps to reproduce the issue (test case)
9. Optionally some screenshots to illustrate each step
If above information is not provided in full, your issue will be tagged as pending.
If missing information is not provided within a week we will close your issue.
FAQ
---
* If you are seeing the message **system folder missing**, then you have cloned the source using git and you need to run a build *first*. Check [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md) for instructions or download latest zip file from [bintray](https://bintray.com/jekkos/opensourcepos/opensourcepos/view/files?sort=updated&order=desc#files) instead.
* If at login time you read "The installation is not correct, check your php.ini file.", please check the error_log in public folder to understand what's wrong and make sure you read the [INSTALL.md](https://github.com/opensourcepos/opensourcepos/blob/master/INSTALL.md). To know how to enable error_log, please read the comment in [issue 1770](https://github.com/opensourcepos/opensourcepos/issues/1770#issuecomment-355177943).
* If you installed your OSPOS under a web server subdir, please edit public/.htaccess and go to the lines with comment `if in web root` and `if in subdir comment above line, uncomment below one and replace <OSPOS path> with your path` and follow the instruction on the second comment line. If you face more issues please read [issue #920](https://github.com/opensourcepos/opensourcepos/issues/920) for more help.
* Apache server configurations are SysAdmin issues and not strictly related to OSPOS. Please make sure you first can show a "hello world" html page before pointing to OSPOS public directory. Make sure .htaccess is correctly configured.
* If the avatar pictures are not shown in Items or at Item save time you get an error, please make sure your public and subdirs are assigned to the correct owner and the access permission is set to 750.
* If you install ospos in docker behind a proxy that performs ssloffloading, you can enable the url generated to be https instead of http, by activating the environment variable FORCE_HTTPS = 1.
* If you have suhosin installed and face an issue with CSRF, please make sure you read [issue #1492](https://github.com/opensourcepos/opensourcepos/issues/1492).
* PHP 8.0 is not currently supported, see [issue #3051](https://github.com/opensourcepos/opensourcepos/issues/3051).
* PHP 5.5 and 5.6 are no longer supported due to the fact that they have been deprecated and not safe to use from security point of view.
Credits
-------
|JetBrains|Travis CI|
|:-:|:-:|
|![IntelliJ IDEA](https://raw.githubusercontent.com/wiki/j-easy/easy-batch/images/logo/intellijidea-logo.png)|[Travis CI](https://travis-ci.com/images/logos/TravisCI-Full-Color.png)|
|Many thanks to [JetBrains](https://www.jetbrains.com/) for providing a free license of [IntelliJ IDEA](https://www.jetbrains.com/idea/) to kindly support the development of OSPOS|Many thanks to [Travis CI](https://travis-ci.org) for providing a free continuous integration service for open source projects.|
| <div align="center">DigitalOcean</div> | <div align="center">JetBrains</div> | <div align="center">Travis CI</div> |
| --- | --- | --- |
| <div align="center"><a href="https://www.digitalocean.com?utm_medium=opensource&utm_source=opensourcepos" target="_blank"><img src="https://github.com/user-attachments/assets/fbbf7433-ed35-407d-8946-fd03d236d350" alt="DigitalOcean Logo" height="50"></a></div> | <div align="center"><a href="https://www.jetbrains.com/idea/" target="_blank"><img src="https://github.com/opensourcepos/opensourcepos/assets/12870258/187f9bbe-4484-475c-9b58-5e5d5f931f09" alt="IntelliJ IDEA Logo" height="50"></a></div> | <div align="center"><a href="https://www.travis-ci.com/" target="_blank"><img src="https://github.com/opensourcepos/opensourcepos/assets/12870258/71cc2b44-83af-4510-a543-6358285f43c6" alt="Travis CI Logo" height="50"></a></div> |
| Many thanks to [DigitalOcean](https://www.digitalocean.com) for providing the project with hosting credits. | Many thanks to [JetBrains](https://www.jetbrains.com/) for providing a free license of [IntelliJ IDEA](https://www.jetbrains.com/idea/) to kindly support the development of OSPOS. | Many thanks to [Travis CI](https://www.travis-ci.com/) for providing a free continuous integration service for open source projects. |

25
SECURITY.md Normal file
View File

@@ -0,0 +1,25 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Security Policy](#security-policy)
- [Supported Versions](#supported-versions)
- [Reporting a Vulnerability](#reporting-a-vulnerability)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Security Policy
## Supported Versions
We release patches for security vulnerabilities. Which versions are eligible to receive such patches depend on the CVSS v3.0 Rating:
| CVSS v3.0 | Supported Versions |
| --------- | -------------------------------------------------- |
| 7.3 | 3.3.5 |
| 9.8 | 3.3.6 |
| 6.8 | 3.4.2 |
## Reporting a Vulnerability
Please report (suspected) security vulnerabilities to **[jeroen@steganos.dev](mailto:jeroen@steganos.dev)**. You will receive a response from us within 48 hours. If the issue is confirmed, we will release a patch as soon as possible depending on complexity but historically within a few days.

20
UPGRADE.md Normal file
View File

@@ -0,0 +1,20 @@
## How to Upgrade
> [!WARNING]
> Not updated for upcoming CodeIgniter4 release (3.4.0 and subsequent versions).
1. Back up all your current database and OSPOS code.
2. Make sure you have a copy of `application/config/config.php` and `application/config/database.php`.
3. Remove all directories.
4. Install the new OSPOS.
5. (Only applicable if upgrading from pre `3.0.0`) Run the database upgrade scripts from `database` dir (check which ones you need according to the version you are upgrading from).
6. Take the saved old `config.php` and upgrade the new `config.php` with any additional changes you made in the old.
Take time to understand if new config rules require some changes (e.g. encryption keys).
7. Take the saved old `database.php` and change the new `database.php` to contain all the configurations you had in the old setup.
Please try not to use the old layout, use the new one and copy the content of the config variables.
8. Restore the content of the old `uploads` folder into `public/uploads` one.
9. Once the new code is in place, the database is manually updated, and the config files are in place, you're good to go.
10. The first login will take longer because OSPOS post `3.0.0` will upgrade automatically to the latest version.
11. If everything went according to plan, you'll be able to use your upgraded version of OSPOS.
12. Still have issues? Please check the [README](README.md) and [GitHub issues](https://github.com/opensourcepos/opensourcepos/issues).
Maybe a similar issue has already been reported, and you can find your answer there.

View File

@@ -1,16 +0,0 @@
How to Upgrade
-------------------------
1. Backup all your current database and OSPOS code
2. Make sure you have a copy of application/config/config.php and application/config/database.php
3. Remove all directories
4. Install the new OSPOS
5. (Only applicable if upgrading from pre 3.0.0) Run the database upgrade scripts from database/ dir (check which ones you need according to the version you are upgrading from)
6. Take the saved old config.php and upgrade the new config.php with any additional changes you made in the old.
Take time to understand if new config rules require some changes (e.g. encryption keys)
7. Take the saved old database.php and change the new database.php to contain all the configuration you had in the old setup.
Please try not to use the old layout, use the new one and just copy the content of the config variables
8. Restore the content of the old uploads/ folder into public/uploads/ one
9. Once the new code is in place, database is manually updated and config files are sorted you are good to start the new OSPOS
10. The first login will take longer because OSPOS post 3.0.0 will upgrade automatically to the latest version
11. Now you can use OSPOS
12. If any issue please check README, FAQ and GitHub issues as somebody else might have had your problem already before creating a new issue

View File

@@ -1,283 +0,0 @@
Version 3.3.3
-------------
+ PHP 7.4 support
+ Set PHP 7.2 to be the minimum level due to older version deprecations
+ Added email CC and BCC (see config/email.php)
+ Cash rounding to nearest 5 cents
+ Updated composer packages and js plugins
+ Improved security (CSRF protection)
+ Various small improvements and bug fixes
Version 3.3.2
-------------
+ Fixed `only_full_group_by` issue with MySQL/MariaDB
+ Fixed POS transaction return failure if items are deleted
+ Various bug fixes
Version 3.3.1
-------------
+ Various bug fixes (please disable `only_full_group_by` option from MySQL/MariaDB to avoid issues)
Version 3.3.0
-------------
+ New logo
+ Code Igniter 3.1.11 upgrade
+ PHP 7.3 support
+ Attributes feature (allows extensibility of Items replacing old custom fields)
+ India GST Tax support + various Tax support improvements
+ Cashup feature
+ Temporary items feature
+ Fixed Sales Discount
+ Supplier category feature
+ Improved Items import and csv file generation (to contain additional attributes)
+ Improved Docker installation with nginx reverse proxy using Let's encrypt TLS certificate
+ Database performance improvements
+ Added and Updated translations
+ Fixed various reports issues
+ Fixed rounding issues
+ Fixed CSRF issues
+ Fixed database upgrade script issues
+ Various bug fixes
Version 3.2.3
-------------
+ Further revert of CSRF change causing regression
+ Code Igniter 3.1.9 upgrade
Version 3.2.2
-------------
+ Revert CSRF change causing regression
Version 3.2.1
-------------
+ Support for GDPR
+ CSRF simplifications
+ Translation upgrades
+ Various bug fixes
Version 3.2.0
-------------
+ Code Igniter 3.1.8 upgrade
+ PHP 7.2 support (use OpenSSL and not MCrypt)
+ Automatic database upgrades from vs 3.0.0 at first login (no more sql scripts)
+ Home and (back) Office menu switch (top menu can be organised in two views)
+ Expenses feature
+ Quote, Work Order features
+ Improved Invoice support
+ Sale suspend, soft delete, complete as state not as different tables or hard delete
+ Restore deleted Sales
+ Improved Items Kits
+ Export tables all records and export to pdf
+ Table sticky header (headers visible during scrolling)
+ Allow duplicate barcodes (Config option)
+ Search suggestion formatting (Config option)
+ Define print and email checkboxes behaviour (Config option)
+ Edit customer from sale register
+ Added and Updated translations
+ Various Jquery plugins upgrade
+ Fixed permission issues (e.g. password change)
+ Fixed various reports issues and renamed Sales to Transactions
+ Various bug fixes (e.g. Tax, Rounding, Library circular dependency)
Version 3.1.1
-------------
+ Updated en-US and en-GB translations, better grammar and consistency
+ Fixed database migration issue with VAT tax included
+ Fixed database backup bug
+ Fixed Gift card error
+ Fixed database upgrade to 3.1.x script (now it's to 3.1.1 and there is no 3.1.0 anymore)
+ Fixed old database upgrade scripts for people upgrading from 2.x versions
+ Fixed .htaccess file in opensourcepos root dir (it was not forwarding to public subdir)
+ Fixed few jQuery 2.0 upgrade issues
Version 3.1.0
-------------
+ MySQL 5.7 and PHP 7.x support
+ Advanced Tax support with customer tax categories and etc,
+ Better HORECA use case support with Dinner Table sale tagging
+ Customer Rewards support
+ Added quote support and better invoice support
+ Added integration with Mailchimp to connect Customer list with Mailchimp list
+ Prevent inserting two customers with same email address
+ Customer total spending and stats
+ Added reCAPTCHA to Login page to increase protection from Brute Force attacks
+ Added due payment for credit sale support
+ Gifcard numbering with two options: Series and Random
+ Extended Item Kits functionality
+ Employee allowed to change their own password clicking their name on top bar
+ Cash rounding support, extended decimals
+ Reworked Item Pictures and file name and storing
+ Financial year start date and selection from date range pickers
+ Date time range filters can be date & time or date only
+ Added two new Bootswatch themes
+ Receipts font size support
+ Fix automatically people's name first capital letter, emails in lower case only
+ Fixes to Receiving
+ Various amendments to database script updates from older versions
+ Added dotenv support
+ Updates to language translations (split English to American English and British English)
+ Various Dockers support improvements
+ Minor bugfixes
Version 3.0.2
-------------
+ Fixed error when performing scans multiple times in a row
+ Fixed summary reports
+ Protect Employee privacy printing just the first letter of the family name
+ Updates to language translations
+ Various Dockers support improvements
+ Minor bugfixes
Version 3.0.1
-------------
+ *CodeIgniter 3.1.2 Upgrade*
+ *Substantial database performance improvements*
+ *Improved security: email and sms passwords encryption, removed phpinfo.php*
+ *Set code to be production and not development in index.php*
+ *Reports improvements, fixed table sorting, tax calculation and made profit to be net profit*
+ Better Apache 2.4 support in .htaccess
+ Updates to language translations
+ Fixed excel template download links
+ Fixed employee name in Sale receipt and invoice reprinting
+ Fixed 2.3.2_to_2.3.3.sql database upgrade script mistake
+ Fixed phppos to ospos database migration script
+ Minor bugfixes and some general code clean up
Version 3.0.0
-------------
+ *CodeIgniter 3.1 Upgrade*
+ Major UI overhaul based on *Boostrap 3.0 and Bootswatch Themes*
+ New tabular views with advanced filtering using *Bootstrap Tables*
+ New graphical reports with no more Adobe flash dependency
+ Redesign of all modal dialogs
+ Updated Sales register with simplified payment flow
+ *Improved security: MySQL injection, XSS, CSFR, BCrypt password encryption, safer project layout*
+ Support for TXT messaging (interfacing to specific support required)
+ Email configuration
+ Improved Localisation support
+ Improved Store Config page
+ Docker container ready for Cloud installation
+ Composer PHP support
+ More languages and integration with Weblate for continuous translation
+ About 280 closed issues under 3.0.0 release label, too many to produce a meaningful list
+ Various code cleanup, refactoring, optimisation and etc.
Version 2.4.0
-------------
+ *CodeIgniter 3.0.5* Upgrade (please read UPGRADE.txt)
+ Fix for spurious logouts
+ Apache .htaccess mod_expiry caching and security optimizations
+ Bulk item edit fixes (category, tax and supplier fields)
+ Remove f-key shortcuts used for module navigation
+ Allow to use custom invoice numbers when suspending sale
+ PHP7 fixes
+ Specific warnings to distinguish between reorder level and out of stock situation in sales
+ Fix malware detection issues due to usage of base64 encoding for storing session variables
+ Improve language generation scripts (use PHP builtin functionality)
+ Add extra buttons for navigation and printing to receipt and invoice
+ Improve print layout for invoices
+ Make layout consistent for items between receipt and invoice templates
+ Minor bugfixes
Version 2.3.4
-------------
+ Migration script fixes
+ Improved continuous integration setup
+ More integration tests
+ Virtualized container setup (docker install)
+ Live clock functionality + favicon
+ Improved PHP 7 compatbility
+ Added de_CH (German) as language
+ Minor code cleanup
+ Removal of annoying backup prompt on logout
Version 2.3.3
-------------
+ Item kit fixes (search, list, ..)
+ Add datepicker widgets in sale/receiving edit forms
+ Add date filter in items module
+ Add barcode generation logic for EAN8, EAN13
+ Add barcode validation + fallback logic for EAN8, EAN13
+ New config option to generate barcodes if item_number empty
+ Add cost + count to inventory reports
+ Giftcard fixes
+ Refactor sales overview (added date filtering + search options)
+ Better locale config support
+ Improve php compatibility
+ Fix invoice numbering bug on suspend
+ Add configurable locale-dependent dateformat
+ Add grunt-cache-breaker plugin
+ Suspend button appeaers before adding a payment
+ Searching of deleted items, filtering part is removed
+ Remove infamous "0" after leaving sale or receiving comments empty
+ Add SQL script to clean zeroes in sales/receivings comments
+ Numerous other bug fixes
Version 2.3.2
-------------
+ Nominatim (OpenStreetMap) customer address autocompletion
+ Sale invoice templating
+ Configurable barcode generation for items
+ Stock location filtering in detailed sales and receivings reports
+ Giftcards bugfixes
+ Proper pagination support for most modules
+ Language updates
+ Bugfix for decimal taxrates
+ Add gender + company name attributes to customer
+ Stock location config screen refactor
+ Basic travis-ci + phantomJs setup
+ Database backup on admin logout
+ Modifiable item thumbnails
+ Email invoice PDF generation using DomPDF
+ Modifiable company logo
+ jQuery upgrade (1.2 -> 1.8.3)
+ Javascript minification (using grunt)
+ Numerous bugfixes
Version 2.3.1
-------------
+ Extra report permissions (this includes a refactoring of the database model - new grants table)
+ Tax inclusive/exclusive pricing
+ Receivings amount multiplication (can be configured in items section)
+ Customizable sale and receiving numbering
+ Giftcard improvements
+ Fix item import through csv
+ Bug fixes for reports
Version 2.3.0
-------------
+ Support for multiple stock locations
Version 2.2.2
-------------
+ French language added
+ Thai language added
+ Upgrade to CodeIgniter 2.2 (contains several security fixes)
+ Database types for amounts all changed to decimal types (this will fix rounding errors in the sales and receivings reports) the rest of the application
+ Fix duplicated session cookies in http headers (this broke the application when running on nginx)
Version 2.1.1
---------------
+ Barcodes on the order receipt weren't generated correctly
+ Sales edit screen for detailed sales reports is now available with thickbox as in the rest of the application
+ Indonesian language files updated (Oktafianus)
+ Default language set to 'en' in config.php
+ Fix some css bugs in suspended sales section
+ Default cookie sess_time_expire set to 86400 (24h)
Version 2.1.0
-------------
+ Various upgrades, too numerous to list here.
+ Removed dependancy on ofc upload library due to vulnerability found.
Version 2.0.2
-------------
+ Fixed multiple giftcards issue per Bug #4 reported on Sourceforge where a
second giftcard added would have its balance set to $0 even if the sale did
not require the total of the second giftcard to pay the remaining amount due.
+ Small code cleanup
Version 2.1.0
-------------
* Upgrade to CodeIgniter 2.1.0
* Various small improvements

6
app/.htaccess Normal file
View File

@@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>

15
app/Common.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
/**
* The goal of this file is to allow developers a location
* where they can overwrite core procedural functions and
* replace them with their own. This file is loaded during
* the bootstrap process and is called during the framework's
* execution.
*
* This can be looked at as a `master helper` file that is
* loaded early on, and may also contain additional functions
* that you'd like to use throughout your entire application
*
* @see: https://codeigniter.com/user_guide/extending/common.html
*/

291
app/Config/App.php Normal file
View File

@@ -0,0 +1,291 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Session\Handlers\DatabaseHandler;
class App extends BaseConfig
{
/**
* This is the code version of the Open Source Point of Sale you're running.
*
* @var string
*/
public string $application_version = '3.4.2';
/**
* This is the commit hash for the version you are currently using.
*
* @var string
*/
public string $commit_sha1 = 'dev';
/**
* Logs are stored in writable/logs
*
* @var bool
*/
public bool $db_log_enabled = false;
/**
* DB Query Log only long-running queries
*
* @var bool
*/
public bool $db_log_only_long = false;
/**
* Defines whether to require/reroute to HTTPS
*
* @var bool
*/
public bool $https_on; // Set in the constructor
/**
* --------------------------------------------------------------------------
* Base Site URL
* --------------------------------------------------------------------------
*
* URL to your CodeIgniter root. Typically, this will be your base URL,
* WITH a trailing slash:
*
* E.g., http://example.com/
*/
public string $baseURL; // Defined in the constructor
/**
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
* If you want to accept multiple Hostnames, set this.
*
* E.g.,
* When your site URL ($baseURL) is 'http://example.com/', and your site
* also accepts 'http://media.example.com/' and 'http://accounts.example.com/':
* ['media.example.com', 'accounts.example.com']
*
* @var list<string>
*/
public array $allowedHostnames = [];
/**
* --------------------------------------------------------------------------
* Index File
* --------------------------------------------------------------------------
*
* Typically, this will be your `index.php` file, unless you've renamed it to
* something else. If you have configured your web server to remove this file
* from your site URIs, set this variable to an empty string.
*/
public string $indexPage = '';
/**
* --------------------------------------------------------------------------
* URI PROTOCOL
* --------------------------------------------------------------------------
*
* This item determines which server global should be used to retrieve the
* URI string. The default setting of 'REQUEST_URI' works for most servers.
* If your links do not seem to work, try one of the other delicious flavors:
*
* 'REQUEST_URI': Uses $_SERVER['REQUEST_URI']
* 'QUERY_STRING': Uses $_SERVER['QUERY_STRING']
* 'PATH_INFO': Uses $_SERVER['PATH_INFO']
*
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
public string $uriProtocol = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible.
|
| By default, only these are allowed: `a-z 0-9~%.:_-`
|
| Set an empty string to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be used as: '/\A[<permittedURIChars>]+\z/iu'
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
public string $permittedURIChars = 'a-z 0-9~%.:_\-=';
/**
* --------------------------------------------------------------------------
* Default Locale
* --------------------------------------------------------------------------
*
* The Locale roughly represents the language and location that your visitor
* is viewing the site from. It affects the language strings and other
* strings (like currency markers, numbers, etc), that your program
* should run under for this request.
*/
public string $defaultLocale = 'en';
/**
* --------------------------------------------------------------------------
* Negotiate Locale
* --------------------------------------------------------------------------
*
* If true, the current Request object will automatically determine the
* language to use based on the value of the Accept-Language header.
*
* If false, no automatic detection will be performed.
*/
public bool $negotiateLocale = true;
/**
* --------------------------------------------------------------------------
* Supported Locales
* --------------------------------------------------------------------------
*
* If $negotiateLocale is true, this array lists the locales supported
* by the application in descending order of priority. If no match is
* found, the first locale will be used.
*
* IncomingRequest::setLocale() also uses this list.
*
* @var list<string>
*/
public array $supportedLocales = [
'ar-EG',
'ar-LB',
'az',
'bg',
'bs',
'ckb',
'cs',
'da',
'de-CH',
'de-DE',
'el',
'en',
'en-GB',
'es-ES',
'es-MX',
'fa',
'fr',
'he',
'hr-HR',
'hu',
'hy',
'id',
'it',
'km',
'lo',
'ml',
'nb',
'nl-BE',
'nl-NL',
'pl',
'pt-BR',
'ro',
'ru',
'sv',
'ta',
'th',
'tl',
'tr',
'uk',
'ur',
'vi',
'zh-Hans',
'zh-Hant',
];
/**
* --------------------------------------------------------------------------
* Application Timezone
* --------------------------------------------------------------------------
*
* The default timezone that will be used in your application to display
* dates with the date helper, and can be retrieved through app_timezone()
*
* @see https://www.php.net/manual/en/timezones.php for list of timezones
* supported by PHP.
*/
public string $appTimezone = 'UTC';
/**
* --------------------------------------------------------------------------
* Default Character Set
* --------------------------------------------------------------------------
*
* This determines which character set is used by default in various methods
* that require a character set to be provided.
*
* @see http://php.net/htmlspecialchars for a list of supported charsets.
*/
public string $charset = 'UTF-8';
/**
* --------------------------------------------------------------------------
* Force Global Secure Requests
* --------------------------------------------------------------------------
*
* If true, this will force every request made to this application to be
* made via a secure connection (HTTPS). If the incoming request is not
* secure, the user will be redirected to a secure version of the page
* and the HTTP Strict Transport Security (HSTS) header will be set.
*/
public bool $forceGlobalSecureRequests = false;
/**
* --------------------------------------------------------------------------
* Reverse Proxy IPs
* --------------------------------------------------------------------------
*
* If your server is behind a reverse proxy, you must whitelist the proxy
* IP addresses from which CodeIgniter should trust headers such as
* X-Forwarded-For or Client-IP in order to properly identify
* the visitor's IP address.
*
* You need to set a proxy IP address or IP address with subnets and
* the HTTP header for the client IP address.
*
* Here are some examples:
* [
* '10.0.1.200' => 'X-Forwarded-For',
* '192.168.5.0/24' => 'X-Real-IP',
* ]
*
* @var array<string, string>
*/
public array $proxyIPs = [];
/**
* --------------------------------------------------------------------------
* Content Security Policy
* --------------------------------------------------------------------------
*
* Enables the Response's Content Secure Policy to restrict the sources that
* can be used for images, scripts, CSS files, audio, video, etc. If enabled,
* the Response object will populate default values for the policy from the
* `ContentSecurityPolicy.php` file. Controllers can always add to those
* restrictions at run time.
*
* For a better understanding of CSP, see these documents:
*
* @see http://www.html5rocks.com/en/tutorials/security/content-security-policy/
* @see http://www.w3.org/TR/CSP/
*/
public bool $CSPEnabled = false; // TODO: Currently CSP3 tags are not supported so enabling this causes problems with script-src-elem, style-src-attr and style-src-elem
public function __construct()
{
parent::__construct();
$this->https_on = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_ENV['FORCE_HTTPS']) && $_ENV['FORCE_HTTPS'] == 'true');
$this->baseURL = $this->https_on ? 'https' : 'http';
$this->baseURL .= '://' . ((isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : 'localhost') . '/';
$this->baseURL .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
}
}

210
app/Config/Autoload.php Normal file
View File

@@ -0,0 +1,210 @@
<?php
namespace Config;
use CodeIgniter\Config\AutoloadConfig;
/**
* -------------------------------------------------------------------
* AUTOLOADER CONFIGURATION
* -------------------------------------------------------------------
*
* This file defines the namespaces and class maps so the Autoloader
* can find the files as needed.
*
* NOTE: If you use an identical key in $psr4 or $classmap, then
* the values in this file will overwrite the framework's values.
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Autoload extends AutoloadConfig
{
/**
* -------------------------------------------------------------------
* Namespaces
* -------------------------------------------------------------------
* This maps the locations of any namespaces in your application to
* their location on the file system. These are used by the autoloader
* to locate files the first time they have been instantiated.
*
* The 'Config' (APPPATH . 'Config') and 'CodeIgniter' (SYSTEMPATH) are
* already mapped for you.
*
* You may change the name of the 'App' namespace if you wish,
* but this should be done prior to creating any namespaced classes,
* else you will need to modify all of those classes for this to work.
*
* @var array<string, list<string>|string>
*/
public $psr4 = [
APP_NAMESPACE => APPPATH,
'Config' => APPPATH . 'Config',
'dompdf' => APPPATH . 'ThirdParty/dompdf/src'
];
/**
* -------------------------------------------------------------------
* Class Map
* -------------------------------------------------------------------
* The class map provides a map of class names and their exact
* location on the drive. Classes loaded in this manner will have
* slightly faster performance because they will not have to be
* searched for within one or more directories as they would if they
* were being autoloaded through a namespace.
*
* Prototype:
* $classmap = [
* 'MyClass' => '/path/to/class/file.php'
* ];
*
* @var array<string, string>
*/
public $classmap = [
// Controllers
'Attributes' => '/App/Controllers/Attributes.php',
'Cashups' => '/App/Controllers/Cashups.php',
'Config' => '/App/Controllers/Config.php',
'Customers' => '/App/Controllers/Customers.php',
'Employees' => '/App/Controllers/Employees.php',
'Expenses' => '/App/Controllers/Expenses.php',
'Expenses_categories' => '/App/Controllers/Expenses_categories.php',
'Giftcards' => '/App/Controllers/Giftcards.php',
'Home' => '/App/Controllers/Home.php',
'Item_kits' => '/App/Controllers/Item_kits.php',
'Items' => '/App/Controllers/Items.php',
'Login' => '/App/Controllers/Login.php',
'Messages' => '/App/Controllers/Messages.php',
'No_access' => '/App/Controllers/No_access.php',
'Office' => '/App/Controllers/Office.php',
'Persons' => '/App/Controllers/Persons.php',
'Receivings' => '/App/Controllers/Receivings.php',
'Reports' => '/App/Controllers/Reports.php',
'Sales' => '/App/Controllers/Sales.php',
'Secure_Controller' => '/App/Controllers/Secure_Controller.php',
'Suppliers' => '/App/Controllers/Suppliers.php',
'Tax_categories' => '/App/Controllers/Tax_categories.php',
'Tax_codes' => '/App/Controllers/Tax_codes.php',
'Tax_jurisdictions' => '/App/Controllers/Tax_jurisdictions.php',
'Taxes' => '/App/Controllers/Taxes.php',
// Models
'Appconfig' => '/App/Models/Appconfig.php',
'Attribute' => '/App/Models/Attribute.php',
'Cashup' => '/App/Models/Cashup.php',
'Customer' => '/App/Models/Customer.php',
'Customer_rewards' => '/App/Models/Customer_rewards.php',
'Dinner_table' => '/App/Models/Dinner_table.php',
'Employee' => '/App/Models/Employee.php',
'Expense' => '/App/Models/Expense.php',
'Expense_category' => '/App/Models/Expense_category.php',
'Giftcard' => '/App/Models/Giftcard.php',
'Inventory' => '/App/Models/Inventory.php',
'Item_kit' => '/App/Models/Item_kit.php',
'Item_kit_items' => '/App/Models/Item_kit_items.php',
'Item_quantity' => '/App/Models/Item_quantity.php',
'Item_taxes' => '/App/Models/Item_taxes.php',
'Module' => '/App/Models/Module.php',
'Person' => '/App/Models/Person.php',
'Receiving' => '/App/Models/Receiving.php',
'Rewards' => '/App/Models/Rewards.php',
'Sale' => '/App/Models/Sale.php',
'Stock_location' => '/App/Models/Stock_location.php',
'Supplier' => '/App/Models/Supplier.php',
'Tax' => '/App/Models/Tax.php',
'Tax_category' => '/App/Models/Tax_category.php',
'Tax_code' => '/App/Models/Tax_code.php',
'Tax_jurisdiction' => '/App/Models/Tax_jurisdiction.php',
// Reports
'Report' => '/App/Models/Reports/Report.php',
'Detailed_receiving' => '/App/Models/Reports/Detailed_receiving.php',
'Detailed_sales' => '/App/Models/Reports/Detailed_sales.php',
'Inventory_low' => '/App/Models/Reports/Inventory_low.php',
'Inventory_summary' => '/App/Models/Reports/Inventory_summary.php',
'Specific_customer' => '/App/Models/Reports/Specific_customer.php',
'Specific_discount' => '/App/Models/Reports/Specific_discount.php',
'Specific_employee' => '/App/Models/Reports/Specific_employee.php',
'Specific_supplier' => '/App/Models/Reports/Specific_supplier.php',
'Summary_categories' => '/App/Models/Reports/Summary_categories.php',
'Summary_customers' => '/App/Models/Reports/Summary_customers.php',
'Summary_discounts' => '/App/Models/Reports/Summary_discounts.php',
'Summary_employees' => '/App/Models/Reports/Summary_employees.php',
'Summary_expenses_categories' => '/App/Models/Reports/Summary_expenses_categories.php',
'Summary_items' => '/App/Models/Reports/Summary_items.php',
'Summary_payments' => '/App/Models/Reports/Summary_payments.php',
'Summary_report' => '/App/Models/Reports/Summary_report.php',
'Summary_sales' => '/App/Models/Reports/Summary_sales.php',
'Summary_sales_taxes' => '/App/Models/Reports/Summary_sales_taxes.php',
'Summary_suppliers' => '/App/Models/Reports/Summary_suppliers.php',
'Summary_taxes' => '/App/Models/Reports/Summary_taxes.php',
// Tokens
'Token' => '/App/Models/Tokens/Token.php',
'Token_barcode_ean' => '/App/Models/Tokens/Token_barcode_ean.php',
'Token_barcode_price' => '/App/Models/Tokens/Token_barcode_price.php',
'Token_barcode_weight' => '/App/Models/Tokens/Token_barcode_weight.php',
'Token_customer' => '/App/Models/Tokens/Token_customer.php',
'Token_invoice_count' => '/App/Models/Tokens/Token_invoice_count.php',
'Token_invoice_sequence' => '/App/Models/Tokens/Token_invoice_sequence.php',
'Token_quote_sequence' => '/App/Models/Tokens/Token_quote_sequence.php',
'Token_suspended_invoice_count' => '/App/Models/Tokens/Token_suspended_invoice_count.php',
'Token_work_order_sequence' => '/App/Models/Tokens/Token_work_order_sequence.php',
'Token_year_invoice_count' => '/App/Models/Tokens/Token_year_invoice_count.php',
'Token_year_quote_count' => '/App/Models/Tokens/Token_year_quote_count.php',
// Libraries
'Barcode_lib' => '/App/Libraries/Barcode_lib.php',
'Email_lib' => '/App/Libraries/Email_lib.php',
'Item_lib' => '/App/Libraries/Item_lib.php',
'Mailchimp_lib' => '/App/Libraries/Mailchimp_lib.php',
'MY_Email' => '/App/Libraries/MY_Email.php',
'MY_Migration' => '/App/Libraries/MY_Migration.php',
'Receving_lib' => '/App/Libraries/Receiving_lib.php',
'Sale_lib' => '/App/Libraries/Sale_lib.php',
'Sms_lib' => '/App/Libraries/Sms_lib.php',
'Tax_lib' => '/App/Libraries/Tax_lib.php',
'Token_lib' => '/App/Libraries/Token_lib.php',
// Miscellaneous
'Rounding_mode' => '/App/Models/Enums/Rounding_mode.php'
];
/**
* -------------------------------------------------------------------
* Files
* -------------------------------------------------------------------
* The files array provides a list of paths to __non-class__ files
* that will be autoloaded. This can be useful for bootstrap operations
* or for loading functions.
*
* Prototype:
* $files = [
* '/path/to/my/file.php',
* ];
*
* @var list<string>
*/
public $files = [];
/**
* -------------------------------------------------------------------
* Helpers
* -------------------------------------------------------------------
* Prototype:
* $helpers = [
* 'form',
* ];
*
* @var list<string>
*/
public $helpers = [
'form',
'cookie',
'tabular',
'locale',
'security'
];
}

View File

@@ -0,0 +1,34 @@
<?php
/*
|--------------------------------------------------------------------------
| ERROR DISPLAY
|--------------------------------------------------------------------------
| In development, we want to show as many errors as possible to help
| make sure they don't make it to production. And save us hours of
| painful debugging.
|
| If you set 'display_errors' to '1', CI4's detailed error report will show.
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
/*
|--------------------------------------------------------------------------
| DEBUG BACKTRACES
|--------------------------------------------------------------------------
| If true, this constant will tell the error screens to display debug
| backtraces along with the other error information. If you would
| prefer to not see this, set this value to false.
*/
defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
/*
|--------------------------------------------------------------------------
| DEBUG MODE
|--------------------------------------------------------------------------
| Debug mode is an experimental flag that can allow changes throughout
| the system. This will control whether Kint is loaded, and a few other
| items. It can always be used within your own application too.
*/
defined('CI_DEBUG') || define('CI_DEBUG', true);

View File

@@ -0,0 +1,25 @@
<?php
/*
|--------------------------------------------------------------------------
| ERROR DISPLAY
|--------------------------------------------------------------------------
| Don't show ANY in production environments. Instead, let the system catch
| it and display a generic error message.
|
| If you set 'display_errors' to '1', CI4's detailed error report will show.
*/
error_reporting(E_ALL & ~E_DEPRECATED);
// If you want to suppress more types of errors.
// error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
ini_set('display_errors', '0');
/*
|--------------------------------------------------------------------------
| DEBUG MODE
|--------------------------------------------------------------------------
| Debug mode is an experimental flag that can allow changes throughout
| the system. It's not widely used currently, and may not survive
| release of the framework.
*/
defined('CI_DEBUG') || define('CI_DEBUG', false);

View File

@@ -0,0 +1,23 @@
<?php
/*
|--------------------------------------------------------------------------
| ERROR DISPLAY
|--------------------------------------------------------------------------
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
/*
|--------------------------------------------------------------------------
| DEBUG BACKTRACES
|--------------------------------------------------------------------------
*/
defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true);
/*
|--------------------------------------------------------------------------
| DEBUG MODE
|--------------------------------------------------------------------------
*/
defined('CI_DEBUG') || define('CI_DEBUG', true);

View File

@@ -0,0 +1,20 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class CURLRequest extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* CURLRequest Share Options
* --------------------------------------------------------------------------
*
* Whether share options between requests or not.
*
* If true, all the options won't be reset between requests.
* It may cause an error request with unnecessary headers.
*/
public bool $shareOptions = false;
}

161
app/Config/Cache.php Normal file
View File

@@ -0,0 +1,161 @@
<?php
namespace Config;
use CodeIgniter\Cache\CacheInterface;
use CodeIgniter\Cache\Handlers\DummyHandler;
use CodeIgniter\Cache\Handlers\FileHandler;
use CodeIgniter\Cache\Handlers\MemcachedHandler;
use CodeIgniter\Cache\Handlers\PredisHandler;
use CodeIgniter\Cache\Handlers\RedisHandler;
use CodeIgniter\Cache\Handlers\WincacheHandler;
use CodeIgniter\Config\BaseConfig;
class Cache extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Primary Handler
* --------------------------------------------------------------------------
*
* The name of the preferred handler that should be used. If for some reason
* it is not available, the $backupHandler will be used in its place.
*/
public string $handler = 'file';
/**
* --------------------------------------------------------------------------
* Backup Handler
* --------------------------------------------------------------------------
*
* The name of the handler that will be used in case the first one is
* unreachable. Often, 'file' is used here since the filesystem is
* always available, though that's not always practical for the app.
*/
public string $backupHandler = 'dummy';
/**
* --------------------------------------------------------------------------
* Key Prefix
* --------------------------------------------------------------------------
*
* This string is added to all cache item names to help avoid collisions
* if you run multiple applications with the same cache engine.
*/
public string $prefix = '';
/**
* --------------------------------------------------------------------------
* Default TTL
* --------------------------------------------------------------------------
*
* The default number of seconds to save items when none is specified.
*
* WARNING: This is not used by framework handlers where 60 seconds is
* hard-coded, but may be useful to projects and modules. This will replace
* the hard-coded value in a future release.
*/
public int $ttl = 300;
/**
* --------------------------------------------------------------------------
* Reserved Characters
* --------------------------------------------------------------------------
*
* A string of reserved characters that will not be allowed in keys or tags.
* Strings that violate this restriction will cause handlers to throw.
* Default: {}()/\@:
*
* NOTE: The default set is required for PSR-6 compliance.
*/
public string $reservedCharacters = '{}()/\@:';
/**
* --------------------------------------------------------------------------
* File settings
* --------------------------------------------------------------------------
*
* Your file storage preferences can be specified below, if you are using
* the File driver.
*
* @var array<string, int|string|null>
*/
public array $file = [
'storePath' => WRITEPATH . 'cache/',
'mode' => 0640,
];
/**
* -------------------------------------------------------------------------
* Memcached settings
* -------------------------------------------------------------------------
*
* Your Memcached servers can be specified below, if you are using
* the Memcached drivers.
*
* @see https://codeigniter.com/user_guide/libraries/caching.html#memcached
*
* @var array<string, bool|int|string>
*/
public array $memcached = [
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 1,
'raw' => false,
];
/**
* -------------------------------------------------------------------------
* Redis settings
* -------------------------------------------------------------------------
* Your Redis server can be specified below, if you are using
* the Redis or Predis drivers.
*
* @var array<string, int|string|null>
*/
public array $redis = [
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
'timeout' => 0,
'database' => 0,
];
/**
* --------------------------------------------------------------------------
* Available Cache Handlers
* --------------------------------------------------------------------------
*
* This is an array of cache engine alias' and class names. Only engines
* that are listed here are allowed to be used.
*
* @var array<string, class-string<CacheInterface>>
*/
public array $validHandlers = [
'dummy' => DummyHandler::class,
'file' => FileHandler::class,
'memcached' => MemcachedHandler::class,
'predis' => PredisHandler::class,
'redis' => RedisHandler::class,
'wincache' => WincacheHandler::class,
];
/**
* --------------------------------------------------------------------------
* Web Page Caching: Cache Include Query String
* --------------------------------------------------------------------------
*
* Whether to take the URL query string into consideration when generating
* output cache files. Valid options are:
*
* false = Disabled
* true = Enabled, take all query parameters into account.
* Please be aware that this may result in numerous cache
* files generated for the same page over and over again.
* ['q'] = Enabled, but only take into account the specified list
* of query parameters.
*
* @var bool|list<string>
*/
public $cacheQueryString = false;
}

171
app/Config/Constants.php Normal file
View File

@@ -0,0 +1,171 @@
<?php
/*
| --------------------------------------------------------------------
| App Namespace
| --------------------------------------------------------------------
|
| This defines the default Namespace that is used throughout
| CodeIgniter to refer to the Application directory. Change
| this constant to change the namespace that all application
| classes should use.
|
| NOTE: changing this will require manually modifying the
| existing namespaces of App\* namespaced-classes.
*/
defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
/*
| --------------------------------------------------------------------------
| Composer Path
| --------------------------------------------------------------------------
|
| The path that Composer's autoload file is expected to live. By default,
| the vendor folder is in the Root directory, but you can customize that here.
*/
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
/*
|--------------------------------------------------------------------------
| Timing Constants
|--------------------------------------------------------------------------
|
| Provide simple ways to work with the myriad of PHP functions that
| require information to be in seconds.
*/
defined('SECOND') || define('SECOND', 1);
defined('MINUTE') || define('MINUTE', 60);
defined('HOUR') || define('HOUR', 3600);
defined('DAY') || define('DAY', 86400);
defined('WEEK') || define('WEEK', 604800);
defined('MONTH') || define('MONTH', 2_592_000);
defined('YEAR') || define('YEAR', 31_536_000);
defined('DECADE') || define('DECADE', 315_360_000);
defined('DEFAULT_DATE') || define('DEFAULT_DATE', mktime(0, 0, 0, 1, 1, 2010));
defined('DEFAULT_DATETIME') || define('DEFAULT_DATETIME', mktime(0, 0, 0, 1, 1, 2010));
defined('NOW') || define('NOW', time());
/*
| --------------------------------------------------------------------------
| Exit Status Codes
| --------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') || define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') || define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') || define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') || define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') || define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') || define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') || define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') || define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') || define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') || define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
/**
* Global Constants.
*/
const NEW_ENTRY = -1;
const ACTIVE = 0;
const DELETED = 1;
/**
* Attribute Related Constants.
*/
const GROUP = 'GROUP';
const DROPDOWN = 'DROPDOWN';
const DECIMAL = 'DECIMAL';
const DATE = 'DATE';
const TEXT = 'TEXT';
const CHECKBOX = 'CHECKBOX';
const NO_DEFINITION_ID = 0;
const CATEGORY_DEFINITION_ID = -1;
const DEFINITION_TYPES = [GROUP, DROPDOWN, DECIMAL, TEXT, DATE, CHECKBOX];
/**
* Item Related Constants.
*/
const HAS_STOCK = 0;
const HAS_NO_STOCK = 1;
const ITEM = 0;
const ITEM_KIT = 1;
const ITEM_AMOUNT_ENTRY = 2;
const ITEM_TEMP = 3;
const NEW_ITEM = -1;
const PRINT_ALL = 0;
const PRINT_PRICED = 1;
const PRINT_KIT = 2;
const PRINT_YES = 0;
const PRINT_NO = 1;
const PRICE_ALL = 0;
const PRICE_KIT = 1;
const PRICE_KIT_ITEMS = 2;
const PRICE_OPTION_ALL = 0;
const PRICE_OPTION_KIT = 1;
const PRICE_OPTION_KIT_STOCK = 2;
const NAME_SEPARATOR = ' | ';
/**
* Sale Related Constants.
*/
const COMPLETED = 0;
const SUSPENDED = 1;
const CANCELED = 2;
const SALE_TYPE_POS = 0;
const SALE_TYPE_INVOICE = 1;
const SALE_TYPE_WORK_ORDER = 2;
const SALE_TYPE_QUOTE = 3;
const SALE_TYPE_RETURN = 4;
const PERCENT = 0;
const FIXED = 1;
const PRICE_MODE_STANDARD = 0;
const PRICE_MODE_KIT = 1;
const PAYMENT_TYPE_UNASSIGNED = '--';
const CASH_ADJUSTMENT_TRUE = 1;
const CASH_ADJUSTMENT_FALSE = 0;
const CASH_MODE_TRUE = 1;
const CASH_MODE_FALSE = 0;
/**
* Supplier Related Constants
*/
const GOODS_SUPPLIER = 0;
const COST_SUPPLIER = 1;
/**
* Locale Related Constants
*/
const MAX_PRECISION = 1e14;
const DEFAULT_PRECISION = 2;
const DEFAULT_LANGUAGE = 'english';
const DEFAULT_LANGUAGE_CODE = 'en';

View File

@@ -0,0 +1,200 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* Stores the default settings for the ContentSecurityPolicy, if you
* choose to use it. The values here will be read in and set as defaults
* for the site. If needed, they can be overridden on a page-by-page basis.
*
* Suggested reference for explanations:
*
* @see https://www.html5rocks.com/en/tutorials/security/content-security-policy/
*/
class ContentSecurityPolicy extends BaseConfig
{
// -------------------------------------------------------------------------
// Broadbrush CSP management
// -------------------------------------------------------------------------
/**
* Default CSP report context
*/
public bool $reportOnly = false;
/**
* Specifies a URL where a browser will send reports
* when a content security policy is violated.
*/
public ?string $reportURI = null;
/**
* Instructs user agents to rewrite URL schemes, changing
* HTTP to HTTPS. This directive is for websites with
* large numbers of old URLs that need to be rewritten.
*/
public bool $upgradeInsecureRequests = false;
// -------------------------------------------------------------------------
// Sources allowed
// NOTE: once you set a policy to 'none', it cannot be further restricted
// -------------------------------------------------------------------------
/**
* Will default to self if not overridden
*
* @var list<string>|string|null
*/
public $defaultSrc = [
'self',
'www.google.com',
];
/**
* Lists allowed scripts' URLs.
*
* @var list<string>|string
*/
public $scriptSrc = [
'self',
'unsafe-inline',
'unsafe-eval',
'www.google.com www.gstatic.com'
];
/**
* Lists allowed stylesheets' URLs.
*
* @var list<string>|string
*/
public $styleSrc = [
'self',
'unsafe-inline',
'nonce-{csp-style-nonce}',
'https://fonts.googleapis.com',
];
/**
* Defines the origins from which images can be loaded.
*
* @var list<string>|string
*/
public $imageSrc = [
'self',
'data:',
'blob:',
];
/**
* Restricts the URLs that can appear in a page's `<base>` element.
*
* Will default to self if not overridden
*
* @var list<string>|string|null
*/
public $baseURI;
/**
* Lists the URLs for workers and embedded frame contents
*
* @var list<string>|string
*/
public $childSrc = 'self';
/**
* Limits the origins that you can connect to (via XHR,
* WebSockets, and EventSource).
*
* @var list<string>|string
*/
public $connectSrc = [
'self',
'nominatim.openstreetmap.org',
];
/**
* Specifies the origins that can serve web fonts.
*
* @var list<string>|string
*/
public $fontSrc = [
'self',
'fonts.googleapis.com',
'fonts.gstatic.com',
];
/**
* Lists valid endpoints for submission from `<form>` tags.
*
* @var list<string>|string
*/
public $formAction = 'self';
/**
* Specifies the sources that can embed the current page.
* This directive applies to `<frame>`, `<iframe>`, `<embed>`,
* and `<applet>` tags. This directive can't be used in
* `<meta>` tags and applies only to non-HTML resources.
*
* @var list<string>|string|null
*/
public $frameAncestors;
/**
* The frame-src directive restricts the URLs which may
* be loaded into nested browsing contexts.
*
* @var list<string>|string|null
*/
public $frameSrc;
/**
* Restricts the origins allowed to deliver video and audio.
*
* @var list<string>|string|null
*/
public $mediaSrc;
/**
* Allows control over Flash and other plugins.
*
* @var list<string>|string
*/
public $objectSrc = 'none';
/**
* @var list<string>|string|null
*/
public $manifestSrc;
/**
* Limits the kinds of plugins a page may invoke.
*
* @var list<string>|string|null
*/
public $pluginTypes;
/**
* List of actions allowed.
*
* @var list<string>|string|null
*/
public $sandbox;
/**
* Nonce tag for style
*/
public string $styleNonceTag = '{csp-style-nonce}';
/**
* Nonce tag for script
*/
public string $scriptNonceTag = '{csp-script-nonce}';
/**
* Replace nonce tag automatically
*/
public bool $autoNonce = true;
}

107
app/Config/Cookie.php Normal file
View File

@@ -0,0 +1,107 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use DateTimeInterface;
class Cookie extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Cookie Prefix
* --------------------------------------------------------------------------
*
* Set a cookie name prefix if you need to avoid collisions.
*/
public string $prefix = '';
/**
* --------------------------------------------------------------------------
* Cookie Expires Timestamp
* --------------------------------------------------------------------------
*
* Default expires timestamp for cookies. Setting this to `0` will mean the
* cookie will not have the `Expires` attribute and will behave as a session
* cookie.
*
* @var DateTimeInterface|int|string
*/
public $expires = 0;
/**
* --------------------------------------------------------------------------
* Cookie Path
* --------------------------------------------------------------------------
*
* Typically will be a forward slash.
*/
public string $path = '/';
/**
* --------------------------------------------------------------------------
* Cookie Domain
* --------------------------------------------------------------------------
*
* Set to `.your-domain.com` for site-wide cookies.
*/
public string $domain = '';
/**
* --------------------------------------------------------------------------
* Cookie Secure
* --------------------------------------------------------------------------
*
* Cookie will only be set if a secure HTTPS connection exists.
*/
public bool $secure = false;
/**
* --------------------------------------------------------------------------
* Cookie HTTPOnly
* --------------------------------------------------------------------------
*
* Cookie will only be accessible via HTTP(S) (no JavaScript).
*/
public bool $httponly = true;
/**
* --------------------------------------------------------------------------
* Cookie SameSite
* --------------------------------------------------------------------------
*
* Configure cookie SameSite setting. Allowed values are:
* - None
* - Lax
* - Strict
* - ''
*
* Alternatively, you can use the constant names:
* - `Cookie::SAMESITE_NONE`
* - `Cookie::SAMESITE_LAX`
* - `Cookie::SAMESITE_STRICT`
*
* Defaults to `Lax` for compatibility with modern browsers. Setting `''`
* (empty string) means default SameSite attribute set by browsers (`Lax`)
* will be set on cookies. If set to `None`, `$secure` must also be set.
*
* @phpstan-var 'None'|'Lax'|'Strict'|''
*/
public string $samesite = 'Lax';
/**
* --------------------------------------------------------------------------
* Cookie Raw
* --------------------------------------------------------------------------
*
* This flag allows setting a "raw" cookie, i.e., its name and value are
* not URL encoded using `rawurlencode()`.
*
* If this is set to `true`, cookie names should be compliant of RFC 2616's
* list of allowed characters.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
* @see https://tools.ietf.org/html/rfc2616#section-2.2
*/
public bool $raw = false;
}

105
app/Config/Cors.php Normal file
View File

@@ -0,0 +1,105 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* Cross-Origin Resource Sharing (CORS) Configuration
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
*/
class Cors extends BaseConfig
{
/**
* The default CORS configuration.
*
* @var array{
* allowedOrigins: list<string>,
* allowedOriginsPatterns: list<string>,
* supportsCredentials: bool,
* allowedHeaders: list<string>,
* exposedHeaders: list<string>,
* allowedMethods: list<string>,
* maxAge: int,
* }
*/
public array $default = [
/**
* Origins for the `Access-Control-Allow-Origin` header.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
*
* E.g.:
* - ['http://localhost:8080']
* - ['https://www.example.com']
*/
'allowedOrigins' => [],
/**
* Origin regex patterns for the `Access-Control-Allow-Origin` header.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
*
* NOTE: A pattern specified here is part of a regular expression. It will
* be actually `#\A<pattern>\z#`.
*
* E.g.:
* - ['https://\w+\.example\.com']
*/
'allowedOriginsPatterns' => [],
/**
* Weather to send the `Access-Control-Allow-Credentials` header.
*
* The Access-Control-Allow-Credentials response header tells browsers whether
* the server allows cross-origin HTTP requests to include credentials.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
*/
'supportsCredentials' => false,
/**
* Set headers to allow.
*
* The Access-Control-Allow-Headers response header is used in response to
* a preflight request which includes the Access-Control-Request-Headers to
* indicate which HTTP headers can be used during the actual request.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
*/
'allowedHeaders' => [],
/**
* Set headers to expose.
*
* The Access-Control-Expose-Headers response header allows a server to
* indicate which response headers should be made available to scripts running
* in the browser, in response to a cross-origin request.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
*/
'exposedHeaders' => [],
/**
* Set methods to allow.
*
* The Access-Control-Allow-Methods response header specifies one or more
* methods allowed when accessing a resource in response to a preflight
* request.
*
* E.g.:
* - ['GET', 'POST', 'PUT', 'DELETE']
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
*/
'allowedMethods' => [],
/**
* Set how many seconds the results of a preflight request can be cached.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age
*/
'maxAge' => 7200,
];
}

139
app/Config/Database.php Normal file
View File

@@ -0,0 +1,139 @@
<?php
namespace Config;
use CodeIgniter\Database\Config;
/**
* Database Configuration
*/
class Database extends Config
{
/**
* The directory that holds the Migrations and Seeds directories.
*/
public string $filesPath = APPPATH . 'Database' . DIRECTORY_SEPARATOR;
/**
* Lets you choose which connection group to use if no other is specified.
*/
public string $defaultGroup = 'default';
/**
* The default database connection.
*
* @var array<string, mixed>
*/
public array $default = [
'DSN' => '',
'hostname' => 'localhost',
'username' => 'admin',
'password' => 'pointofsale',
'database' => 'ospos',
'DBDriver' => 'MySQLi',
'DBPrefix' => 'ospos_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8mb4',
'DBCollat' => 'utf8mb4_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'dateFormat' => [
'date' => 'Y-m-d',
'datetime' => 'Y-m-d H:i:s',
'time' => 'H:i:s',
],
];
/**
* This database connection is used when running PHPUnit database tests.
*
* @var array<string, mixed>
*/
public array $tests = [
'DSN' => '',
'hostname' => 'localhost',
'username' => 'admin',
'password' => 'pointofsale',
'database' => 'ospos',
'DBDriver' => 'MySQLi',
'DBPrefix' => 'ospos_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8mb4',
'DBCollat' => 'utf8mb4_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'foreignKeys' => true,
'busyTimeout' => 1000,
'dateFormat' => [
'date' => 'Y-m-d',
'datetime' => 'Y-m-d H:i:s',
'time' => 'H:i:s',
],
];
/**
* This database connection is used when developing against non-production data.
*
* @var array
*/
public $development = [
'DSN' => '',
'hostname' => 'localhost',
'username' => 'admin',
'password' => 'pointofsale',
'database' => 'ospos',
'DBDriver' => 'MySQLi',
'DBPrefix' => 'ospos_',
'pConnect' => false,
'DBDebug' => (ENVIRONMENT !== 'production'),
'charset' => 'utf8mb4',
'DBCollat' => 'utf8mb4_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
'foreignKeys' => true,
'busyTimeout' => 1000,
'dateFormat' => [
'date' => 'Y-m-d',
'datetime' => 'Y-m-d H:i:s',
'time' => 'H:i:s',
],
];
public function __construct()
{
parent::__construct();
// Ensure that we always set the database group to 'tests' if
// we are currently running an automated test suite, so that
// we don't overwrite live data on accident.
switch (ENVIRONMENT) {
case 'testing':
$this->defaultGroup = 'tests';
break;
case 'development';
$this->defaultGroup = 'development';
break;
}
foreach ([&$this->development, &$this->tests, &$this->default] as &$config) {
$config['hostname'] = !getenv('MYSQL_HOST_NAME') ? $config['hostname'] : getenv('MYSQL_HOST_NAME');
$config['username'] = !getenv('MYSQL_USERNAME') ? $config['username'] : getenv('MYSQL_USERNAME');
$config['password'] = !getenv('MYSQL_PASSWORD') ? $config['password'] : getenv('MYSQL_PASSWORD');
$config['database'] = !getenv('MYSQL_DB_NAME') ? $config['database'] : getenv('MYSQL_DB_NAME');
}
}
}

46
app/Config/DocTypes.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
namespace Config;
/**
* @immutable
*/
class DocTypes
{
/**
* List of valid document types.
*
* @var array<string, string>
*/
public array $list = [
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
];
/**
* Whether to remove the solidus (`/`) character for void HTML elements (e.g. `<input>`)
* for HTML5 compatibility.
*
* Set to:
* `true` - to be HTML5 compatible
* `false` - to be XHTML compatible
*/
public bool $html5 = true;
}

121
app/Config/Email.php Normal file
View File

@@ -0,0 +1,121 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig
{
public string $fromEmail = 'noreply@opensourcepos.org';
public string $fromName = 'Opensource Point of Sale';
public string $recipients = 'blackhole@none.com';
/**
* The "user agent"
*/
public string $userAgent = 'CodeIgniter';
/**
* The mail sending protocol: mail, sendmail, smtp
*/
public string $protocol = 'mail';
/**
* The server path to Sendmail.
*/
public string $mailPath = '/usr/sbin/sendmail';
/**
* SMTP Server Hostname
*/
public string $SMTPHost = 'mail.mxserver.com';
/**
* SMTP Username
*/
public string $SMTPUser = 'user';
/**
* SMTP Password
*/
public string $SMTPPass = 'pass';
/**
* SMTP Port
*/
public int $SMTPPort = 25;
/**
* SMTP Timeout (in seconds)
*/
public int $SMTPTimeout = 5;
/**
* Enable persistent SMTP connections
*/
public bool $SMTPKeepAlive = false;
/**
* SMTP Encryption.
*
* @var string '', 'tls' or 'ssl'. 'tls' will issue a STARTTLS command
* to the server. 'ssl' means implicit SSL. Connection on port
* 465 should set this to ''.
*/
public string $SMTPCrypto = 'tls';
/**
* Enable word-wrap
*/
public bool $wordWrap = true;
/**
* Character count to wrap at
*/
public int $wrapChars = 76;
/**
* Type of mail, either 'text' or 'html'
*/
public string $mailType = 'html';
/**
* Character set (utf-8, iso-8859-1, etc.)
*/
public string $charset = 'UTF-8';
/**
* Whether to validate the email address
*/
public bool $validate = false;
/**
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
*/
public int $priority = 3;
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*/
public string $CRLF = "\r\n";
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*/
public string $newline = "\r\n";
/**
* Enable BCC Batch Mode.
*/
public bool $BCCBatchMode = false;
/**
* Number of emails in each BCC batch
*/
public int $BCCBatchSize = 200;
/**
* Enable notify message from server
*/
public bool $DSN = false;
}

92
app/Config/Encryption.php Normal file
View File

@@ -0,0 +1,92 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* Encryption configuration.
*
* These are the settings used for encryption, if you don't pass a parameter
* array to the encrypter for creation/initialization.
*/
class Encryption extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Encryption Key Starter
* --------------------------------------------------------------------------
*
* If you use the Encryption class you must set an encryption key (seed).
* You need to ensure it is long enough for the cipher and mode you plan to use.
* See the user guide for more info.
*/
public string $key = '';
/**
* --------------------------------------------------------------------------
* Encryption Driver to Use
* --------------------------------------------------------------------------
*
* One of the supported encryption drivers.
*
* Available drivers:
* - OpenSSL
* - Sodium
*/
public string $driver = 'OpenSSL';
/**
* --------------------------------------------------------------------------
* SodiumHandler's Padding Length in Bytes
* --------------------------------------------------------------------------
*
* This is the number of bytes that will be padded to the plaintext message
* before it is encrypted. This value should be greater than zero.
*
* See the user guide for more information on padding.
*/
public int $blockSize = 16;
/**
* --------------------------------------------------------------------------
* Encryption digest
* --------------------------------------------------------------------------
*
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
*/
public string $digest = 'SHA512';
/**
* Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
* This setting is only used by OpenSSLHandler.
*
* Set to false for CI3 Encryption compatibility.
*/
public bool $rawData = false;
/**
* Encryption key info.
* This setting is only used by OpenSSLHandler.
*
* Set to 'encryption' for CI3 Encryption compatibility.
*/
public string $encryptKeyInfo = '';
/**
* Authentication key info.
* This setting is only used by OpenSSLHandler.
*
* Set to 'authentication' for CI3 Encryption compatibility.
*/
public string $authKeyInfo = '';
/**
* Cipher to use.
* This setting is only used by OpenSSLHandler.
*
* Set to 'AES-128-CBC' to decrypt encrypted data that encrypted
* by CI3 Encryption default configuration.
*/
public string $cipher = 'AES-256-CTR';
}

67
app/Config/Events.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
namespace Config;
use CodeIgniter\Events\Events;
use CodeIgniter\Exceptions\FrameworkException;
use CodeIgniter\HotReloader\HotReloader;
use App\Events\Db_log;
use App\Events\Load_config;
use App\Events\Method;
/*
* --------------------------------------------------------------------
* Application Events
* --------------------------------------------------------------------
* Events allow you to tap into the execution of the program without
* modifying or extending core files. This file provides a central
* location to define your events, though they can always be added
* at run-time, also, if needed.
*
* You create code that can execute by subscribing to events with
* the 'on()' method. This accepts any form of callable, including
* Closures, that will be executed when the event is triggered.
*
* Example:
* Events::on('create', [$myInstance, 'myMethod']);
*/
Events::on('pre_system', static function (): void {
if (ENVIRONMENT !== 'testing') {
if (ini_get('zlib.output_compression')) {
throw FrameworkException::forEnabledZlibOutputCompression();
}
while (ob_get_level() > 0) {
ob_end_flush();
}
ob_start(static fn ($buffer) => $buffer);
}
/*
* --------------------------------------------------------------------
* Debug Toolbar Listeners.
* --------------------------------------------------------------------
* If you delete, they will no longer be collected.
*/
if (CI_DEBUG && ! is_cli()) {
Events::on('DBQuery', 'CodeIgniter\Debug\Toolbar\Collectors\Database::collect');
service('toolbar')->respond();
// Hot Reload route - for framework use on the hot reloader.
if (ENVIRONMENT === 'development') {
service('routes')->get('__hot-reload', static function (): void {
(new HotReloader())->run();
});
}
}
});
$config = new Load_config();
Events::on('post_controller_constructor', [$config, 'load_config']);
$db_log = new Db_log();
Events::on('DBQuery', [$db_log, 'db_log_queries']);
$method = new Method();
Events::on('pre_controller', [$method, 'validate_method']);

106
app/Config/Exceptions.php Normal file
View File

@@ -0,0 +1,106 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Debug\ExceptionHandler;
use CodeIgniter\Debug\ExceptionHandlerInterface;
use Psr\Log\LogLevel;
use Throwable;
/**
* Setup how the exception handler works.
*/
class Exceptions extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* LOG EXCEPTIONS?
* --------------------------------------------------------------------------
* If true, then exceptions will be logged
* through Services::Log.
*
* Default: true
*/
public bool $log = true;
/**
* --------------------------------------------------------------------------
* DO NOT LOG STATUS CODES
* --------------------------------------------------------------------------
* Any status codes here will NOT be logged if logging is turned on.
* By default, only 404 (Page Not Found) exceptions are ignored.
*
* @var list<int>
*/
public array $ignoreCodes = [404];
/**
* --------------------------------------------------------------------------
* Error Views Path
* --------------------------------------------------------------------------
* This is the path to the directory that contains the 'cli' and 'html'
* directories that hold the views used to generate errors.
*
* Default: APPPATH.'Views/errors'
*/
public string $errorViewPath = APPPATH . 'Views/errors';
/**
* --------------------------------------------------------------------------
* HIDE FROM DEBUG TRACE
* --------------------------------------------------------------------------
* Any data that you would like to hide from the debug trace.
* In order to specify 2 levels, use "/" to separate.
* ex. ['server', 'setup/password', 'secret_token']
*
* @var list<string>
*/
public array $sensitiveDataInTrace = [];
/**
* --------------------------------------------------------------------------
* WHETHER TO THROW AN EXCEPTION ON DEPRECATED ERRORS
* --------------------------------------------------------------------------
* If set to `true`, DEPRECATED errors are only logged and no exceptions are
* thrown. This option also works for user deprecations.
*/
public bool $logDeprecations = true;
/**
* --------------------------------------------------------------------------
* LOG LEVEL THRESHOLD FOR DEPRECATIONS
* --------------------------------------------------------------------------
* If `$logDeprecations` is set to `true`, this sets the log level
* to which the deprecation will be logged. This should be one of the log
* levels recognized by PSR-3.
*
* The related `Config\Logger::$threshold` should be adjusted, if needed,
* to capture logging the deprecations.
*/
public string $deprecationLogLevel = LogLevel::WARNING;
/*
* DEFINE THE HANDLERS USED
* --------------------------------------------------------------------------
* Given the HTTP status code, returns exception handler that
* should be used to deal with this error. By default, it will run CodeIgniter's
* default handler and display the error information in the expected format
* for CLI, HTTP, or AJAX requests, as determined by is_cli() and the expected
* response format.
*
* Custom handlers can be returned if you want to handle one or more specific
* error codes yourself like:
*
* if (in_array($statusCode, [400, 404, 500])) {
* return new \App\Libraries\MyExceptionHandler();
* }
* if ($exception instanceOf PageNotFoundException) {
* return new \App\Libraries\MyExceptionHandler();
* }
*/
public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface
{
return new ExceptionHandler($this);
}
}

37
app/Config/Feature.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* Enable/disable backward compatibility breaking features.
*/
class Feature extends BaseConfig
{
/**
* Use improved new auto routing instead of the legacy version.
*/
public bool $autoRoutesImproved = true;
/**
* Use filter execution order in 4.4 or before.
*/
public bool $oldFilterOrder = false;
/**
* The behavior of `limit(0)` in Query Builder.
*
* If true, `limit(0)` returns all records. (the behavior of 4.4.x or before in version 4.x.)
* If false, `limit(0)` returns no records. (the behavior of 3.1.9 or later in version 3.x.)
*/
public bool $limitZeroAsAll = true;
/**
* Use strict location negotiation.
*
* By default, the locale is selected based on a loose comparison of the language code (ISO 639-1)
* Enabling strict comparison will also consider the region code (ISO 3166-1 alpha-2).
*/
public bool $strictLocaleNegotiation = false;
}

124
app/Config/Filters.php Normal file
View File

@@ -0,0 +1,124 @@
<?php
namespace Config;
use CodeIgniter\Config\Filters as BaseFilters;
use CodeIgniter\Filters\Cors;
use CodeIgniter\Filters\CSRF;
use CodeIgniter\Filters\DebugToolbar;
use CodeIgniter\Filters\ForceHTTPS;
use CodeIgniter\Filters\Honeypot;
use CodeIgniter\Filters\InvalidChars;
use CodeIgniter\Filters\PageCache;
use CodeIgniter\Filters\PerformanceMetrics;
use CodeIgniter\Filters\SecureHeaders;
class Filters extends BaseFilters
{
/**
* Configures aliases for Filter classes to
* make reading things nicer and simpler.
*
* @var array<string, class-string|list<class-string>>
*
* [filter_name => classname]
* or [filter_name => [classname1, classname2, ...]]
*/
public array $aliases = [
'csrf' => CSRF::class,
'toolbar' => DebugToolbar::class,
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'cors' => Cors::class,
'forcehttps' => ForceHTTPS::class,
'pagecache' => PageCache::class,
'performance' => PerformanceMetrics::class,
];
/**
* List of special required filters.
*
* The filters listed here are special. They are applied before and after
* other kinds of filters, and always applied even if a route does not exist.
*
* Filters set by default provide framework functionality. If removed,
* those functions will no longer work.
*
* @see https://codeigniter.com/user_guide/incoming/filters.html#provided-filters
*
* @var array{before: list<string>, after: list<string>}
*/
public array $required = [
'before' => [
'forcehttps', // Force Global Secure Requests
'pagecache', // Web Page Caching
],
'after' => [
'pagecache', // Web Page Caching
'performance', // Performance Metrics
'toolbar', // Debug Toolbar
],
];
/**
* List of filter aliases that are always
* applied before and after every request.
*
* @var array<string, array<string, array<string, string>>>|array<string, list<string>>
*/
public array $globals = [
'before' => [
'honeypot',
'csrf' => ['except' => 'login'],
'invalidchars',
],
'after' => [
'toolbar',
'honeypot',
'secureheaders',
],
];
/**
* List of filter aliases that works on a
* particular HTTP method (GET, POST, etc.).
*
* Example:
* 'POST' => ['foo', 'bar']
*
* If you use this, you should disable auto-routing because auto-routing
* permits any HTTP method to access a controller. Accessing the controller
* with a method you don't expect could bypass the filter.
*
* @var array<string, list<string>>
*/
public array $methods = [];
/**
* List of filter aliases that should run on any
* before or after URI patterns.
*
* Example:
* isLoggedIn' => ['before' => ['account/*', 'profiles/*']]
*
* @var array<string, array<string, list<string>>>
*/
public array $filters = [];
/**
* Constructor to conditionally disable CSRF filter in testing environment
*/
public function __construct()
{
// Check for testing environment via env variable or constant
$isTesting = ($_ENV['CI_ENVIRONMENT'] ?? $_SERVER['CI_ENVIRONMENT'] ?? getenv('CI_ENVIRONMENT')) === 'testing'
|| (defined('ENVIRONMENT') && ENVIRONMENT === 'testing');
// Remove CSRF filter from globals in testing environment
if ($isTesting) {
// Remove the 'csrf' key from $globals['before'] while preserving array structure
$this->globals['before'] = array_filter($this->globals['before'], static fn($key) => $key !== 'csrf', ARRAY_FILTER_USE_KEY);
}
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace Config;
use CodeIgniter\Config\ForeignCharacters as BaseForeignCharacters;
/**
* @immutable
*/
class ForeignCharacters extends BaseForeignCharacters
{
}

64
app/Config/Format.php Normal file
View File

@@ -0,0 +1,64 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Format\JSONFormatter;
use CodeIgniter\Format\XMLFormatter;
class Format extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Available Response Formats
* --------------------------------------------------------------------------
*
* When you perform content negotiation with the request, these are the
* available formats that your application supports. This is currently
* only used with the API\ResponseTrait. A valid Formatter must exist
* for the specified format.
*
* These formats are only checked when the data passed to the respond()
* method is an array.
*
* @var list<string>
*/
public array $supportedResponseFormats = [
'application/json',
'application/xml', // machine-readable XML
'text/xml', // human-readable XML
];
/**
* --------------------------------------------------------------------------
* Formatters
* --------------------------------------------------------------------------
*
* Lists the class to use to format responses with of a particular type.
* For each mime type, list the class that should be used. Formatters
* can be retrieved through the getFormatter() method.
*
* @var array<string, string>
*/
public array $formatters = [
'application/json' => JSONFormatter::class,
'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class,
];
/**
* --------------------------------------------------------------------------
* Formatters Options
* --------------------------------------------------------------------------
*
* Additional Options to adjust default formatters behaviour.
* For each mime type, list the additional options that should be used.
*
* @var array<string, int>
*/
public array $formatterOptions = [
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
'application/xml' => 0,
'text/xml' => 0,
];
}

44
app/Config/Generators.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Generators extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Generator Commands' Views
* --------------------------------------------------------------------------
*
* This array defines the mapping of generator commands to the view files
* they are using. If you need to customize them for your own, copy these
* view files in your own folder and indicate the location here.
*
* You will notice that the views have special placeholders enclosed in
* curly braces `{...}`. These placeholders are used internally by the
* generator commands in processing replacements, thus you are warned
* not to delete them or modify the names. If you will do so, you may
* end up disrupting the scaffolding process and throw errors.
*
* YOU HAVE BEEN WARNED!
*
* @var array<string, array<string, string>|string>
*/
public array $views = [
'make:cell' => [
'class' => 'CodeIgniter\Commands\Generators\Views\cell.tpl.php',
'view' => 'CodeIgniter\Commands\Generators\Views\cell_view.tpl.php',
],
'make:command' => 'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'make:config' => 'CodeIgniter\Commands\Generators\Views\config.tpl.php',
'make:controller' => 'CodeIgniter\Commands\Generators\Views\controller.tpl.php',
'make:entity' => 'CodeIgniter\Commands\Generators\Views\entity.tpl.php',
'make:filter' => 'CodeIgniter\Commands\Generators\Views\filter.tpl.php',
'make:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
'make:model' => 'CodeIgniter\Commands\Generators\Views\model.tpl.php',
'make:seeder' => 'CodeIgniter\Commands\Generators\Views\seeder.tpl.php',
'make:validation' => 'CodeIgniter\Commands\Generators\Views\validation.tpl.php',
'session:migration' => 'CodeIgniter\Commands\Generators\Views\migration.tpl.php',
];
}

42
app/Config/Honeypot.php Normal file
View File

@@ -0,0 +1,42 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Honeypot extends BaseConfig
{
/**
* Makes Honeypot visible or not to human
*/
public bool $hidden = true;
/**
* Honeypot Label Content
*/
public string $label = 'Fill This Field';
/**
* Honeypot Field Name
*/
public string $name = 'honeypot';
/**
* Honeypot HTML Template
*/
public string $template = '<label>{label}</label><input type="text" name="{name}" value="">';
/**
* Honeypot container
*
* If you enabled CSP, you can remove `style="display:none"`.
*/
public string $container = '<div style="display:none">{template}</div>';
/**
* The id attribute for Honeypot container tag
*
* Used when CSP is enabled.
*/
public string $containerId = 'hpc';
}

31
app/Config/Images.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Images\Handlers\GDHandler;
use CodeIgniter\Images\Handlers\ImageMagickHandler;
class Images extends BaseConfig
{
/**
* Default handler used if no other handler is specified.
*/
public string $defaultHandler = 'gd';
/**
* The path to the image library.
* Required for ImageMagick, GraphicsMagick, or NetPBM.
*/
public string $libraryPath = '/usr/local/bin/convert';
/**
* The available handler classes.
*
* @var array<string, string>
*/
public array $handlers = [
'gd' => GDHandler::class,
'imagick' => ImageMagickHandler::class,
];
}

63
app/Config/Kint.php Normal file
View File

@@ -0,0 +1,63 @@
<?php
namespace Config;
use Kint\Parser\ConstructablePluginInterface;
use Kint\Renderer\Rich\TabPluginInterface;
use Kint\Renderer\Rich\ValuePluginInterface;
/**
* --------------------------------------------------------------------------
* Kint
* --------------------------------------------------------------------------
*
* We use Kint's `RichRenderer` and `CLIRenderer`. This area contains options
* that you can set to customize how Kint works for you.
*
* @see https://kint-php.github.io/kint/ for details on these settings.
*/
class Kint
{
/*
|--------------------------------------------------------------------------
| Global Settings
|--------------------------------------------------------------------------
*/
/**
* @var list<class-string<ConstructablePluginInterface>|ConstructablePluginInterface>|null
*/
public $plugins;
public int $maxDepth = 6;
public bool $displayCalledFrom = true;
public bool $expanded = false;
/*
|--------------------------------------------------------------------------
| RichRenderer Settings
|--------------------------------------------------------------------------
*/
public string $richTheme = 'aante-light.css';
public bool $richFolder = false;
/**
* @var array<string, class-string<ValuePluginInterface>>|null
*/
public $richObjectPlugins;
/**
* @var array<string, class-string<TabPluginInterface>>|null
*/
public $richTabPlugins;
/*
|--------------------------------------------------------------------------
| CLI Settings
|--------------------------------------------------------------------------
*/
public bool $cliColors = true;
public bool $cliForceUTF8 = false;
public bool $cliDetectWidth = true;
public int $cliMinWidth = 40;
}

150
app/Config/Logger.php Normal file
View File

@@ -0,0 +1,150 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Log\Handlers\FileHandler;
class Logger extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Error Logging Threshold
* --------------------------------------------------------------------------
*
* You can enable error logging by setting a threshold over zero. The
* threshold determines what gets logged. Any values below or equal to the
* threshold will be logged.
*
* Threshold options are:
*
* - 0 = Disables logging, Error logging TURNED OFF
* - 1 = Emergency Messages - System is unusable
* - 2 = Alert Messages - Action Must Be Taken Immediately
* - 3 = Critical Messages - Application component unavailable, unexpected exception.
* - 4 = Runtime Errors - Don't need immediate action, but should be monitored.
* - 5 = Warnings - Exceptional occurrences that are not errors.
* - 6 = Notices - Normal but significant events.
* - 7 = Info - Interesting events, like user logging in, etc.
* - 8 = Debug - Detailed debug information.
* - 9 = All Messages
*
* You can also pass an array with threshold levels to show individual error types
*
* array(1, 2, 3, 8) = Emergency, Alert, Critical, and Debug messages
*
* For a live site you'll usually enable Critical or higher (3) to be logged otherwise
* your log files will fill up very fast.
*
* @var int|list<int>
*/
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
/**
* --------------------------------------------------------------------------
* Date Format for Logs
* --------------------------------------------------------------------------
*
* Each item that is logged has an associated date. You can use PHP date
* codes to set your own date formatting
*/
public string $dateFormat = 'Y-m-d H:i:s';
/**
* --------------------------------------------------------------------------
* Log Handlers
* --------------------------------------------------------------------------
*
* The logging system supports multiple actions to be taken when something
* is logged. This is done by allowing for multiple Handlers, special classes
* designed to write the log to their chosen destinations, whether that is
* a file on the getServer, a cloud-based service, or even taking actions such
* as emailing the dev team.
*
* Each handler is defined by the class name used for that handler, and it
* MUST implement the `CodeIgniter\Log\Handlers\HandlerInterface` interface.
*
* The value of each key is an array of configuration items that are sent
* to the constructor of each handler. The only required configuration item
* is the 'handles' element, which must be an array of integer log levels.
* This is most easily handled by using the constants defined in the
* `Psr\Log\LogLevel` class.
*
* Handlers are executed in the order defined in this array, starting with
* the handler on top and continuing down.
*
* @var array<class-string, array<string, int|list<string>|string>>
*/
public array $handlers = [
/*
* --------------------------------------------------------------------
* File Handler
* --------------------------------------------------------------------
*/
FileHandler::class => [
// The log levels that this handler will handle.
'handles' => [
'critical',
'alert',
'emergency',
'debug',
'error',
'info',
'notice',
'warning',
],
/*
* The default filename extension for log files.
* An extension of 'php' allows for protecting the log files via basic
* scripting, when they are to be stored under a publicly accessible directory.
*
* NOTE: Leaving it blank will default to 'log'.
*/
'fileExtension' => '',
/*
* The file system permissions to be applied on newly created log files.
*
* IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
* integer notation (i.e. 0700, 0644, etc.)
*/
'filePermissions' => 0660,
/*
* Logging Directory Path
*
* By default, logs are written to WRITEPATH . 'logs/'
* Specify a different destination here, if desired.
*/
'path' => '',
],
/*
* The ChromeLoggerHandler requires the use of the Chrome web browser
* and the ChromeLogger extension. Uncomment this block to use it.
*/
// 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
// /*
// * The log levels that this handler will handle.
// */
// 'handles' => ['critical', 'alert', 'emergency', 'debug',
// 'error', 'info', 'notice', 'warning'],
// ],
/*
* The ErrorlogHandler writes the logs to PHP's native `error_log()` function.
* Uncomment this block to use it.
*/
// 'CodeIgniter\Log\Handlers\ErrorlogHandler' => [
// /* The log levels this handler can handle. */
// 'handles' => ['critical', 'alert', 'emergency', 'debug', 'error', 'info', 'notice', 'warning'],
//
// /*
// * The message type where the error should go. Can be 0 or 4, or use the
// * class constants: `ErrorlogHandler::TYPE_OS` (0) or `ErrorlogHandler::TYPE_SAPI` (4)
// */
// 'messageType' => 0,
// ],
];
}

50
app/Config/Migrations.php Normal file
View File

@@ -0,0 +1,50 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Migrations extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Enable/Disable Migrations
* --------------------------------------------------------------------------
*
* Migrations are enabled by default.
*
* You should enable migrations whenever you intend to do a schema migration
* and disable it back when you're done.
*/
public bool $enabled = true;
/**
* --------------------------------------------------------------------------
* Migrations Table
* --------------------------------------------------------------------------
*
* This is the name of the table that will store the current migrations state.
* When migrations runs it will store in a database table which migration
* files have already been run.
*/
public string $table = 'migrations';
/**
* --------------------------------------------------------------------------
* Timestamp Format
* --------------------------------------------------------------------------
*
* This is the format that will be used when creating new migrations
* using the CLI command:
* > php spark make:migration
*
* NOTE: if you set an unsupported format, migration runner will not find
* your migration files.
*
* Supported formats:
* - YmdHis_
* - Y-m-d-His_
* - Y_m_d_His_
*/
public string $timestampFormat = 'YmdHis_';
}

536
app/Config/Mimes.php Normal file
View File

@@ -0,0 +1,536 @@
<?php
namespace Config;
/**
* Mimes
*
* This file contains an array of mime types. It is used by the
* Upload class to help identify allowed file types.
*
* When more than one variation for an extension exist (like jpg, jpeg, etc)
* the most common one should be first in the array to aid the guess*
* methods. The same applies when more than one mime-type exists for a
* single extension.
*
* When working with mime types, please make sure you have the ´fileinfo´
* extension enabled to reliably detect the media types.
*
* @immutable
*/
class Mimes
{
/**
* Map of extensions to mime types.
*
* @var array<string, list<string>|string>
*/
public static array $mimes = [
'hqx' => [
'application/mac-binhex40',
'application/mac-binhex',
'application/x-binhex40',
'application/x-mac-binhex40',
],
'cpt' => 'application/mac-compactpro',
'csv' => [
'text/csv',
'text/x-comma-separated-values',
'text/comma-separated-values',
'application/vnd.ms-excel',
'application/x-csv',
'text/x-csv',
'application/csv',
'application/excel',
'application/vnd.msexcel',
'text/plain',
],
'bin' => [
'application/macbinary',
'application/mac-binary',
'application/octet-stream',
'application/x-binary',
'application/x-macbinary',
],
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => [
'application/octet-stream',
'application/vnd.microsoft.portable-executable',
'application/x-dosexec',
'application/x-msdownload',
],
'class' => 'application/octet-stream',
'psd' => [
'application/x-photoshop',
'image/vnd.adobe.photoshop',
],
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => [
'application/pdf',
'application/force-download',
'application/x-download',
],
'ai' => [
'application/pdf',
'application/postscript',
],
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => [
'application/vnd.ms-excel',
'application/msexcel',
'application/x-msexcel',
'application/x-ms-excel',
'application/x-excel',
'application/x-dos_ms_excel',
'application/xls',
'application/x-xls',
'application/excel',
'application/download',
'application/vnd.ms-office',
'application/msword',
],
'ppt' => [
'application/vnd.ms-powerpoint',
'application/powerpoint',
'application/vnd.ms-office',
'application/msword',
],
'pptx' => [
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
],
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => [
'application/x-php',
'application/x-httpd-php',
'application/php',
'text/php',
'text/x-php',
'application/x-httpd-php-source',
],
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => [
'application/x-javascript',
'text/plain',
],
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => [
'application/x-tar',
'application/x-gzip-compressed',
],
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => [
'application/x-zip',
'application/zip',
'application/x-zip-compressed',
'application/s-compressed',
'multipart/x-zip',
],
'rar' => [
'application/vnd.rar',
'application/x-rar',
'application/rar',
'application/x-rar-compressed',
],
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => [
'audio/mpeg',
'audio/mpg',
'audio/mpeg3',
'audio/mp3',
],
'aif' => [
'audio/x-aiff',
'audio/aiff',
],
'aiff' => [
'audio/x-aiff',
'audio/aiff',
],
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => [
'audio/x-wav',
'audio/wave',
'audio/wav',
],
'bmp' => [
'image/bmp',
'image/x-bmp',
'image/x-bitmap',
'image/x-xbitmap',
'image/x-win-bitmap',
'image/x-windows-bmp',
'image/ms-bmp',
'image/x-ms-bmp',
'application/bmp',
'application/x-bmp',
'application/x-win-bitmap',
],
'gif' => 'image/gif',
'jpg' => [
'image/jpeg',
'image/pjpeg',
],
'jpeg' => [
'image/jpeg',
'image/pjpeg',
],
'jpe' => [
'image/jpeg',
'image/pjpeg',
],
'jp2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'j2k' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpf' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpg2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpx' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'jpm' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'mj2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'mjp2' => [
'image/jp2',
'video/mj2',
'image/jpx',
'image/jpm',
],
'png' => [
'image/png',
'image/x-png',
],
'webp' => 'image/webp',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'css' => [
'text/css',
'text/plain',
],
'html' => [
'text/html',
'text/plain',
],
'htm' => [
'text/html',
'text/plain',
],
'shtml' => [
'text/html',
'text/plain',
],
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => [
'text/plain',
'text/x-log',
],
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => [
'application/xml',
'text/xml',
'text/plain',
],
'xsl' => [
'application/xml',
'text/xsl',
'text/xml',
],
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => [
'video/x-msvideo',
'video/msvideo',
'video/avi',
'application/x-troff-msvideo',
],
'movie' => 'video/x-sgi-movie',
'doc' => [
'application/msword',
'application/vnd.ms-office',
],
'docx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
'application/msword',
'application/x-zip',
],
'dot' => [
'application/msword',
'application/vnd.ms-office',
],
'dotx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
'application/msword',
],
'xlsx' => [
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/zip',
'application/vnd.ms-excel',
'application/msword',
'application/x-zip',
],
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
'word' => [
'application/msword',
'application/octet-stream',
],
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => [
'application/json',
'text/json',
],
'pem' => [
'application/x-x509-user-cert',
'application/x-pem-file',
'application/octet-stream',
],
'p10' => [
'application/x-pkcs10',
'application/pkcs10',
],
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => [
'application/pkcs7-mime',
'application/x-pkcs7-mime',
],
'p7m' => [
'application/pkcs7-mime',
'application/x-pkcs7-mime',
],
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => [
'application/x-x509-ca-cert',
'application/x-x509-user-cert',
'application/pkix-cert',
],
'crl' => [
'application/pkix-crl',
'application/pkcs-crl',
],
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => [
'application/pkix-cert',
'application/x-x509-ca-cert',
],
'3g2' => 'video/3gpp2',
'3gp' => [
'video/3gp',
'video/3gpp',
],
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => [
'video/mp4',
'video/x-f4v',
],
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => [
'video/x-ms-wmv',
'video/x-ms-asf',
],
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => [
'audio/ogg',
'video/ogg',
'application/ogg',
],
'kmz' => [
'application/vnd.google-earth.kmz',
'application/zip',
'application/x-zip',
],
'kml' => [
'application/vnd.google-earth.kml+xml',
'application/xml',
'text/xml',
],
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7zip' => [
'application/x-compressed',
'application/x-zip-compressed',
'application/zip',
'multipart/x-zip',
],
'cdr' => [
'application/cdr',
'application/coreldraw',
'application/x-cdr',
'application/x-coreldraw',
'image/cdr',
'image/x-cdr',
'zz-application/zz-winassoc-cdr',
],
'wma' => [
'audio/x-ms-wma',
'video/x-ms-asf',
],
'jar' => [
'application/java-archive',
'application/x-java-application',
'application/x-jar',
'application/x-compressed',
],
'svg' => [
'image/svg+xml',
'image/svg',
'application/xml',
'text/xml',
],
'vcf' => 'text/x-vcard',
'srt' => [
'text/srt',
'text/plain',
],
'vtt' => [
'text/vtt',
'text/plain',
],
'ico' => [
'image/x-icon',
'image/x-ico',
'image/vnd.microsoft.icon',
],
'stl' => [
'application/sla',
'application/vnd.ms-pki.stl',
'application/x-navistyle',
],
];
/**
* Attempts to determine the best mime type for the given file extension.
*
* @return string|null The mime type found, or none if unable to determine.
*/
public static function guessTypeFromExtension(string $extension): array|string|null
{
$extension = trim(strtolower($extension), '. ');
if (! array_key_exists($extension, static::$mimes)) {
return null;
}
return is_array(static::$mimes[$extension]) ? static::$mimes[$extension][0] : static::$mimes[$extension];
}
/**
* Attempts to determine the best file extension for a given mime type.
*
* @param string|null $proposedExtension - default extension (in case there is more than one with the same mime type)
*
* @return string|null The extension determined, or null if unable to match.
*/
public static function guessExtensionFromType(string $type, ?string $proposedExtension = null): ?string
{
$type = trim(strtolower($type), '. ');
$proposedExtension = trim(strtolower($proposedExtension ?? ''));
if (
$proposedExtension !== ''
&& array_key_exists($proposedExtension, static::$mimes)
&& in_array($type, (array) static::$mimes[$proposedExtension], true)
) {
// The detected mime type matches with the proposed extension.
return $proposedExtension;
}
// Reverse check the mime type list if no extension was proposed.
// This search is order sensitive!
foreach (static::$mimes as $ext => $types) {
if (in_array($type, (array) $types, true)) {
return $ext;
}
}
return null;
}
}

84
app/Config/Modules.php Normal file
View File

@@ -0,0 +1,84 @@
<?php
namespace Config;
use CodeIgniter\Modules\Modules as BaseModules;
/**
* Modules Configuration.
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Modules extends BaseModules
{
/**
* --------------------------------------------------------------------------
* Enable Auto-Discovery?
* --------------------------------------------------------------------------
*
* If true, then auto-discovery will happen across all elements listed in
* $aliases below. If false, no auto-discovery will happen at all,
* giving a slight performance boost.
*
* @var bool
*/
public $enabled = true;
/**
* --------------------------------------------------------------------------
* Enable Auto-Discovery Within Composer Packages?
* --------------------------------------------------------------------------
*
* If true, then auto-discovery will happen across all namespaces loaded
* by Composer, as well as the namespaces configured locally.
*
* @var bool
*/
public $discoverInComposer = true;
/**
* The Composer package list for Auto-Discovery
* This setting is optional.
*
* E.g.:
* [
* 'only' => [
* // List up all packages to auto-discover
* 'codeigniter4/shield',
* ],
* ]
* or
* [
* 'exclude' => [
* // List up packages to exclude.
* 'pestphp/pest',
* ],
* ]
*
* @var array{only?: list<string>, exclude?: list<string>}
*/
public $composerPackages = [];
/**
* --------------------------------------------------------------------------
* Auto-Discovery Rules
* --------------------------------------------------------------------------
*
* Aliases list of all discovery classes that will be active and used during
* the current application request.
*
* If it is not listed, only the base application elements will be used.
*
* @var list<string>
*/
public $aliases = [
'events',
'filters',
'registrars',
'routes',
'services',
];
}

53
app/Config/OSPOS.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
namespace Config;
use App\Models\Appconfig;
use CodeIgniter\Cache\CacheInterface;
use CodeIgniter\Config\BaseConfig;
/**
* This class holds the configuration options stored from the database so that on launch those settings can be cached
* once in memory. The settings are referenced frequently, so there is a significant performance hit to not storing
* them.
*/
class OSPOS extends BaseConfig
{
public array $settings;
public string $commit_sha1 = 'dev'; // TODO: Travis scripts need to be updated to replace this with the commit hash on build
private CacheInterface $cache;
public function __construct()
{
parent::__construct();
$this->cache = Services::cache();
$this->set_settings();
}
/**
* @return void
*/
public function set_settings(): void
{
$cache = $this->cache->get('settings');
if ($cache) {
$this->settings = decode_array($cache);
} else {
$appconfig = model(Appconfig::class);
foreach ($appconfig->get_all()->getResult() as $app_config) {
$this->settings[$app_config->key] = $app_config->value;
}
$this->cache->save('settings', encode_array($this->settings));
}
}
/**
* @return void
*/
public function update_settings(): void
{
$this->cache->delete('settings');
$this->set_settings();
}
}

32
app/Config/Optimize.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
namespace Config;
/**
* Optimization Configuration.
*
* NOTE: This class does not extend BaseConfig for performance reasons.
* So you cannot replace the property values with Environment Variables.
*
* @immutable
*/
class Optimize
{
/**
* --------------------------------------------------------------------------
* Config Caching
* --------------------------------------------------------------------------
*
* @see https://codeigniter.com/user_guide/concepts/factories.html#config-caching
*/
public bool $configCacheEnabled = false;
/**
* --------------------------------------------------------------------------
* Config Caching
* --------------------------------------------------------------------------
*
* @see https://codeigniter.com/user_guide/concepts/autoloader.html#file-locator-caching
*/
public bool $locatorCacheEnabled = false;
}

61
app/Config/Pager.php Normal file
View File

@@ -0,0 +1,61 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Pager extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Templates
* --------------------------------------------------------------------------
*
* Pagination links are rendered out using views to configure their
* appearance. This array contains aliases and the view names to
* use when rendering the links.
*
* Within each view, the Pager object will be available as $pager,
* and the desired group as $pagerGroup;
*
* @var array<string, string>
*/
public array $templates = [
'default_full' => 'CodeIgniter\Pager\Views\default_full',
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
'default_head' => 'CodeIgniter\Pager\Views\default_head',
];
/**
* --------------------------------------------------------------------------
* Items Per Page
* --------------------------------------------------------------------------
*
* The default number of results shown in a single page.
*/
public int $perPage = 20;
/**
* --------------------------------------------------------------------------
* Bootstrap 3 pagination links styling
* --------------------------------------------------------------------------
*
* Source code from http://stackoverflow.com/questions/20088779/bootstrap-3-pagination-with-codeigniter
*/
public $config = [
'full_tag_open' => '<ul class="pagination pagination-sm">',
'full_tag_close' => '</ul>',
'num_tag_open' => '<li>',
'num_tag_close' => '</li>',
'cur_tag_open' => '<li class="disabled"><li class="active"><a href="#">',
'cur_tag_close' => '<span class="sr-only"></span></a></li>',
'next_tag_open' => '<li>',
'next_tagl_close' => '</li>',
'prev_tag_open' => '<li>',
'prev_tagl_close' => '</li>',
'first_tag_open' => '<li>',
'first_tagl_close' => '</li>',
'last_tag_open' => '<li>',
'last_tagl_close' => '</li>'
];
}

80
app/Config/Paths.php Normal file
View File

@@ -0,0 +1,80 @@
<?php
namespace Config;
/**
* Paths
*
* Holds the paths that are used by the system to
* locate the main directories, app, system, etc.
*
* Modifying these allows you to restructure your application,
* share a system folder between multiple applications, and more.
*
* All paths are relative to the project's root folder.
*
* NOTE: This class is required prior to Autoloader instantiation,
* and does not extend BaseConfig.
*
* @immutable
*/
class Paths
{
/**
* ---------------------------------------------------------------
* SYSTEM FOLDER NAME
* ---------------------------------------------------------------
*
* This must contain the name of your "system" folder. Include
* the path if the folder is not in the same directory as this file.
*/
public string $systemDirectory = __DIR__ . '/../../vendor/codeigniter4/framework/system';
/**
* ---------------------------------------------------------------
* APPLICATION FOLDER NAME
* ---------------------------------------------------------------
*
* If you want this front controller to use a different "app"
* folder than the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your server. If
* you do, use a full server path.
*
* @see http://codeigniter.com/user_guide/general/managing_apps.html
*/
public string $appDirectory = __DIR__ . '/..';
/**
* ---------------------------------------------------------------
* WRITABLE DIRECTORY NAME
* ---------------------------------------------------------------
*
* This variable must contain the name of your "writable" directory.
* The writable directory allows you to group all directories that
* need write permission to a single place that can be tucked away
* for maximum security, keeping it out of the app and/or
* system directories.
*/
public string $writableDirectory = __DIR__ . '/../../writable';
/**
* ---------------------------------------------------------------
* TESTS DIRECTORY NAME
* ---------------------------------------------------------------
*
* This variable must contain the name of your "tests" directory.
*/
public string $testsDirectory = __DIR__ . '/../../tests';
/**
* ---------------------------------------------------------------
* VIEW DIRECTORY NAME
* ---------------------------------------------------------------
*
* This variable must contain the name of the directory that
* contains the view files used by your application. By
* default this is in `app/Views`. This value
* is used when no value is provided to `Services::renderer()`.
*/
public string $viewDirectory = __DIR__ . '/../Views';
}

28
app/Config/Publisher.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
namespace Config;
use CodeIgniter\Config\Publisher as BasePublisher;
/**
* Publisher Configuration
*
* Defines basic security restrictions for the Publisher class
* to prevent abuse by injecting malicious files into a project.
*/
class Publisher extends BasePublisher
{
/**
* A list of allowed destinations with a (pseudo-)regex
* of allowed files for each destination.
* Attempts to publish to directories not in this list will
* result in a PublisherException. Files that do no fit the
* pattern will cause copy/merge to fail.
*
* @var array<string, string>
*/
public $restrictions = [
ROOTPATH => '*',
FCPATH => '#\.(s?css|js|map|html?|xml|json|webmanifest|ttf|eot|woff2?|gif|jpe?g|tiff?|png|webp|bmp|ico|svg)$#i',
];
}

41
app/Config/Routes.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->setDefaultController('Login');
$routes->get('/', 'Login::index');
$routes->get('login', 'Login::index');
$routes->post('login', 'Login::index');
$routes->add('no_access/index/(:segment)', 'No_access::index/$1');
$routes->add('no_access/index/(:segment)/(:segment)', 'No_access::index/$1/$2');
$routes->add('reports/summary_(:any)/(:any)/(:any)', 'Reports::Summary_$1/$2/$3/$4');
$routes->add('reports/summary_expenses_categories', 'Reports::date_input_only');
$routes->add('reports/summary_payments', 'Reports::date_input_only');
$routes->add('reports/summary_discounts', 'Reports::summary_discounts_input');
$routes->add('reports/summary_(:any)', 'Reports::date_input');
$routes->add('reports/graphical_(:any)/(:any)/(:any)', 'Reports::Graphical_$1/$2/$3/$4');
$routes->add('reports/graphical_summary_expenses_categories', 'Reports::date_input_only');
$routes->add('reports/graphical_summary_discounts', 'Reports::summary_discounts_input');
$routes->add('reports/graphical_(:any)', 'Reports::date_input');
$routes->add('reports/inventory_(:any)/(:any)', 'Reports::Inventory_$1/$2');
$routes->add('reports/inventory_low', 'Reports::inventory_low');
$routes->add('reports/inventory_summary', 'Reports::inventory_summary_input');
$routes->add('reports/inventory_summary/(:any)/(:any)/(:any)', 'Reports::inventory_summary/$1/$2/$3');
$routes->add('reports/detailed_(:any)/(:any)/(:any)/(:any)', 'Reports::Detailed_$1/$2/$3/$4');
$routes->add('reports/detailed_sales', 'Reports::date_input_sales');
$routes->add('reports/detailed_receivings', 'Reports::date_input_recv');
$routes->add('reports/specific_(:any)/(:any)/(:any)/(:any)', 'Reports::Specific_$1/$2/$3/$4');
$routes->add('reports/specific_customers', 'Reports::specific_customer_input');
$routes->add('reports/specific_employees', 'Reports::specific_employee_input');
$routes->add('reports/specific_discounts', 'Reports::specific_discount_input');
$routes->add('reports/specific_suppliers', 'Reports::specific_supplier_input');

140
app/Config/Routing.php Normal file
View File

@@ -0,0 +1,140 @@
<?php
/**
* This file is part of CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Config;
use CodeIgniter\Config\Routing as BaseRouting;
/**
* Routing configuration
*/
class Routing extends BaseRouting
{
/**
* For Defined Routes.
* An array of files that contain route definitions.
* Route files are read in order, with the first match
* found taking precedence.
*
* Default: APPPATH . 'Config/Routes.php'
*
* @var list<string>
*/
public array $routeFiles = [
APPPATH . 'Config/Routes.php',
];
/**
* For Defined Routes and Auto Routing.
* The default namespace to use for Controllers when no other
* namespace has been specified.
*
* Default: 'App\Controllers'
*/
public string $defaultNamespace = 'App\Controllers';
/**
* For Auto Routing.
* The default controller to use when no other controller has been
* specified.
*
* Default: 'Home'
*/
public string $defaultController = 'Login';
/**
* For Defined Routes and Auto Routing.
* The default method to call on the controller when no other
* method has been set in the route.
*
* Default: 'index'
*/
public string $defaultMethod = 'index';
/**
* For Auto Routing.
* Whether to translate dashes in URIs for controller/method to underscores.
* Primarily useful when using the auto-routing.
*
* Default: false
*/
public bool $translateURIDashes = false;
/**
* Sets the class/method that should be called if routing doesn't
* find a match. It can be the controller/method name like: Users::index
*
* This setting is passed to the Router class and handled there.
*
* If you want to use a closure, you will have to set it in the
* routes file by calling:
*
* $routes->set404Override(function() {
* // Do something here
* });
*
* Example:
* public $override404 = 'App\Errors::show404';
*/
public ?string $override404 = null;
/**
* If TRUE, the system will attempt to match the URI against
* Controllers by matching each segment against folders/files
* in APPPATH/Controllers, when a match wasn't found against
* defined routes.
*
* If FALSE, will stop searching and do NO automatic routing.
*/
public bool $autoRoute = true;
/**
* For Defined Routes.
* If TRUE, will enable the use of the 'prioritize' option
* when defining routes.
*
* Default: false
*/
public bool $prioritize = false;
/**
* For Defined Routes.
* If TRUE, matched multiple URI segments will be passed as one parameter.
*
* Default: false
*/
public bool $multipleSegmentsOneParam = false;
/**
* For Auto Routing (Improved).
* Map of URI segments and namespaces.
*
* The key is the first URI segment. The value is the controller namespace.
* E.g.,
* [
* 'blog' => 'Acme\Blog\Controllers',
* ]
*
* @var array<string, string>
*/
public array $moduleRoutes = [];
/**
* For Auto Routing (Improved).
* Whether to translate dashes in URIs for controller/method to CamelCase.
* E.g., blog-controller -> BlogController
*
* If you enable this, $translateURIDashes is ignored.
*
* Default: false
*/
public bool $translateUriToCamelCase = false;
}

86
app/Config/Security.php Normal file
View File

@@ -0,0 +1,86 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Security extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* CSRF Protection Method
* --------------------------------------------------------------------------
*
* Protection Method for Cross Site Request Forgery protection.
*
* @var string|false 'cookie', 'session', or false
*/
public string|false $csrfProtection = 'session';
/**
* --------------------------------------------------------------------------
* CSRF Token Randomization
* --------------------------------------------------------------------------
*
* Randomize the CSRF Token for added security.
*/
public bool $tokenRandomize = false;
/**
* --------------------------------------------------------------------------
* CSRF Token Name
* --------------------------------------------------------------------------
*
* Token name for Cross Site Request Forgery protection.
*/
public string $tokenName = 'csrf_ospos_v4';
/**
* --------------------------------------------------------------------------
* CSRF Header Name
* --------------------------------------------------------------------------
*
* Header name for Cross Site Request Forgery protection.
*/
public string $headerName = 'X-CSRF-TOKEN';
/**
* --------------------------------------------------------------------------
* CSRF Cookie Name
* --------------------------------------------------------------------------
*
* Cookie name for Cross Site Request Forgery protection.
*/
public string $cookieName = 'csrf_cookie_ospos_v4';
/**
* --------------------------------------------------------------------------
* CSRF Expires
* --------------------------------------------------------------------------
*
* Expiration time for Cross Site Request Forgery protection cookie.
*
* Defaults to two hours (in seconds).
*/
public int $expires = 7200;
/**
* --------------------------------------------------------------------------
* CSRF Regenerate
* --------------------------------------------------------------------------
*
* Regenerate CSRF Token on every submission.
*/
public bool $regenerate = false;
/**
* --------------------------------------------------------------------------
* CSRF Redirect
* --------------------------------------------------------------------------
*
* Redirect to previous page with error on failure.
*
* @see https://codeigniter4.github.io/userguide/libraries/security.html#redirection-on-failure
*/
public bool $redirect = (ENVIRONMENT === 'production');
}

76
app/Config/Services.php Normal file
View File

@@ -0,0 +1,76 @@
<?php
namespace Config;
use Locale;
use HTMLPurifier;
use HTMLPurifier_Config;
use CodeIgniter\Config\BaseService;
use Config\Services as AppServices;
use CodeIgniter\HTTP\IncomingRequest;
/**
* Services Configuration file.
*
* Services are simply other classes/libraries that the system uses
* to do its job. This is used by CodeIgniter to allow the core of the
* framework to be swapped out easily without affecting the usage within
* the rest of your application.
*
* This file holds any application-specific services, or service overrides
* that you might need. An example has been included with the general
* method format you should use for your service methods. For more examples,
* see the core Services file at system/Config/Services.php.
*/
class Services extends BaseService
{
/*
* public static function example($getShared = true)
* {
* if ($getShared) {
* return static::getSharedInstance('example');
* }
*
* return new \CodeIgniter\Example();
* }
*/
/**
* Responsible for loading the language string translations.
*
* @return MY_Language
*/
public static function language(?string $locale = null, bool $getShared = true)
{
if ($getShared) {
return static::getSharedInstance('language', $locale)->setLocale($locale);
}
if (AppServices::get('request') instanceof IncomingRequest) {
$requestLocale = AppServices::get('request')->getLocale();
} else {
$requestLocale = Locale::getDefault();
}
// Use '?:' for empty string check
$locale = $locale ?: $requestLocale;
return new \App\Libraries\MY_Language($locale);
}
private static $htmlPurifier;
public static function htmlPurifier($getShared = true)
{
if ($getShared) {
return static::getSharedInstance('htmlPurifier');
}
if (!isset(static::$htmlPurifier)) {
$config = HTMLPurifier_Config::createDefault();
static::$htmlPurifier = new HTMLPurifier($config);
}
return static::$htmlPurifier;
}
}

127
app/Config/Session.php Normal file
View File

@@ -0,0 +1,127 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Session\Handlers\BaseHandler;
use CodeIgniter\Session\Handlers\DatabaseHandler;
class Session extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Session Driver
* --------------------------------------------------------------------------
*
* The session storage driver to use:
* - `CodeIgniter\Session\Handlers\FileHandler`
* - `CodeIgniter\Session\Handlers\DatabaseHandler`
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
* - `CodeIgniter\Session\Handlers\RedisHandler`
*
* @var class-string<BaseHandler>
*/
public string $driver = DatabaseHandler::class;
/**
* --------------------------------------------------------------------------
* Session Cookie Name
* --------------------------------------------------------------------------
*
* The session cookie name, must contain only [0-9a-z_-] characters
*/
public string $cookieName = 'ospos_session';
/**
* --------------------------------------------------------------------------
* Session Expiration
* --------------------------------------------------------------------------
*
* The number of SECONDS you want the session to last.
* Setting to 0 (zero) means expire when the browser is closed.
*/
public int $expiration = 7200;
/**
* --------------------------------------------------------------------------
* Session Save Path
* --------------------------------------------------------------------------
*
* The location to save sessions to and is driver dependent.
*
* For the 'files' driver, it's a path to a writable directory.
* WARNING: Only absolute paths are supported!
*
* For the 'database' driver, it's a table name.
* Please read up the manual for the format with other session drivers.
*
* IMPORTANT: You are REQUIRED to set a valid save path!
*/
public string $savePath = 'sessions';
/**
* --------------------------------------------------------------------------
* Session Match IP
* --------------------------------------------------------------------------
*
* Whether to match the user's IP address when reading the session data.
*
* WARNING: If you're using the database driver, don't forget to update
* your session table's PRIMARY KEY when changing this setting.
*/
public bool $matchIP = true;
/**
* --------------------------------------------------------------------------
* Session Time to Update
* --------------------------------------------------------------------------
*
* How many seconds between CI regenerating the session ID.
*/
public int $timeToUpdate = 300;
/**
* --------------------------------------------------------------------------
* Session Regenerate Destroy
* --------------------------------------------------------------------------
*
* Whether to destroy session data associated with the old session ID
* when auto-regenerating the session ID. When set to FALSE, the data
* will be later deleted by the garbage collector.
*/
public bool $regenerateDestroy = true;
/**
* --------------------------------------------------------------------------
* Session Database Group
* --------------------------------------------------------------------------
*
* DB Group for the database session.
*/
public ?string $DBGroup = null;
/**
* --------------------------------------------------------------------------
* Lock Retry Interval (microseconds)
* --------------------------------------------------------------------------
*
* This is used for RedisHandler.
*
* Time (microseconds) to wait if lock cannot be acquired.
* The default is 100,000 microseconds (= 0.1 seconds).
*/
public int $lockRetryInterval = 100_000;
/**
* --------------------------------------------------------------------------
* Lock Max Retries
* --------------------------------------------------------------------------
*
* This is used for RedisHandler.
*
* Maximum number of lock acquisition attempts.
* The default is 300 times. That is lock timeout is about 30 (0.1 * 300)
* seconds.
*/
public int $lockMaxRetries = 300;
}

122
app/Config/Toolbar.php Normal file
View File

@@ -0,0 +1,122 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Debug\Toolbar\Collectors\Database;
use CodeIgniter\Debug\Toolbar\Collectors\Events;
use CodeIgniter\Debug\Toolbar\Collectors\Files;
use CodeIgniter\Debug\Toolbar\Collectors\Logs;
use CodeIgniter\Debug\Toolbar\Collectors\Routes;
use CodeIgniter\Debug\Toolbar\Collectors\Timers;
use CodeIgniter\Debug\Toolbar\Collectors\Views;
/**
* --------------------------------------------------------------------------
* Debug Toolbar
* --------------------------------------------------------------------------
*
* The Debug Toolbar provides a way to see information about the performance
* and state of your application during that page display. By default it will
* NOT be displayed under production environments, and will only display if
* `CI_DEBUG` is true, since if it's not, there's not much to display anyway.
*/
class Toolbar extends BaseConfig
{
/**
* --------------------------------------------------------------------------
* Toolbar Collectors
* --------------------------------------------------------------------------
*
* List of toolbar collectors that will be called when Debug Toolbar
* fires up and collects data from.
*
* @var list<class-string>
*/
public array $collectors = [
Timers::class,
Database::class,
Logs::class,
Views::class,
// \CodeIgniter\Debug\Toolbar\Collectors\Cache::class,
Files::class,
Routes::class,
Events::class,
];
/**
* --------------------------------------------------------------------------
* Collect Var Data
* --------------------------------------------------------------------------
*
* If set to false var data from the views will not be collected. Useful to
* avoid high memory usage when there are lots of data passed to the view.
*/
public bool $collectVarData = true;
/**
* --------------------------------------------------------------------------
* Max History
* --------------------------------------------------------------------------
*
* `$maxHistory` sets a limit on the number of past requests that are stored,
* helping to conserve file space used to store them. You can set it to
* 0 (zero) to not have any history stored, or -1 for unlimited history.
*/
public int $maxHistory = 20;
/**
* --------------------------------------------------------------------------
* Toolbar Views Path
* --------------------------------------------------------------------------
*
* The full path to the the views that are used by the toolbar.
* This MUST have a trailing slash.
*/
public string $viewsPath = SYSTEMPATH . 'Debug/Toolbar/Views/';
/**
* --------------------------------------------------------------------------
* Max Queries
* --------------------------------------------------------------------------
*
* If the Database Collector is enabled, it will log every query that the
* the system generates so they can be displayed on the toolbar's timeline
* and in the query log. This can lead to memory issues in some instances
* with hundreds of queries.
*
* `$maxQueries` defines the maximum amount of queries that will be stored.
*/
public int $maxQueries = 100;
/**
* --------------------------------------------------------------------------
* Watched Directories
* --------------------------------------------------------------------------
*
* Contains an array of directories that will be watched for changes and
* used to determine if the hot-reload feature should reload the page or not.
* We restrict the values to keep performance as high as possible.
*
* NOTE: The ROOTPATH will be prepended to all values.
*
* @var list<string>
*/
public array $watchedDirectories = [
'app',
];
/**
* --------------------------------------------------------------------------
* Watched File Extensions
* --------------------------------------------------------------------------
*
* Contains an array of file extensions that will be watched for changes and
* used to determine if the hot-reload feature should reload the page or not.
*
* @var list<string>
*/
public array $watchedExtensions = [
'php', 'css', 'js', 'html', 'svg', 'json', 'env',
];
}

252
app/Config/UserAgents.php Normal file
View File

@@ -0,0 +1,252 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
/**
* -------------------------------------------------------------------
* User Agents
* -------------------------------------------------------------------
*
* This file contains four arrays of user agent data. It is used by the
* User Agent Class to help identify browser, platform, robot, and
* mobile device data. The array keys are used to identify the device
* and the array values are used to set the actual name of the item.
*/
class UserAgents extends BaseConfig
{
/**
* -------------------------------------------------------------------
* OS Platforms
* -------------------------------------------------------------------
*
* @var array<string, string>
*/
public array $platforms = [
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS',
];
/**
* -------------------------------------------------------------------
* Browsers
* -------------------------------------------------------------------
*
* The order of this array should NOT be changed. Many browsers return
* multiple browser types so we want to identify the subtype first.
*
* @var array<string, string>
*/
public array $browsers = [
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
'Edg' => 'Edge',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser',
'Vivaldi' => 'Vivaldi',
];
/**
* -------------------------------------------------------------------
* Mobiles
* -------------------------------------------------------------------
*
* @var array<string, string>
*/
public array $mobiles = [
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile',
];
/**
* -------------------------------------------------------------------
* Robots
* -------------------------------------------------------------------
*
* There are hundred of bots but these are the most common.
*
* @var array<string, string>
*/
public array $robots = [
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot',
];
}

46
app/Config/Validation.php Normal file
View File

@@ -0,0 +1,46 @@
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
use CodeIgniter\Validation\StrictRules\CreditCardRules;
use CodeIgniter\Validation\StrictRules\FileRules;
use CodeIgniter\Validation\StrictRules\FormatRules;
use CodeIgniter\Validation\StrictRules\Rules;
use App\Config\Validation\OSPOSRules;
class Validation extends BaseConfig
{
// --------------------------------------------------------------------
// Setup
// --------------------------------------------------------------------
/**
* Stores the classes that contain the
* rules that are available.
*
* @var list<string>
*/
public array $ruleSets = [
Rules::class,
FormatRules::class,
FileRules::class,
CreditCardRules::class,
OSPOSRules::class,
];
/**
* Specifies the views that are used to display the
* errors.
*
* @var array<string, string>
*/
public array $templates = [
'list' => 'CodeIgniter\Validation\Views\list',
'single' => 'CodeIgniter\Validation\Views\single',
];
// --------------------------------------------------------------------
// Rules
// --------------------------------------------------------------------
}

View File

@@ -0,0 +1,138 @@
<?php
namespace App\Config\Validation;
use App\Models\Employee;
use CodeIgniter\HTTP\IncomingRequest;
use Config\OSPOS;
use Config\Services;
/**
* @property Employee employee
* @property IncomingRequest request
*/
class OSPOSRules
{
private IncomingRequest $request;
private array $config;
/**
* Validates the username and password sent to the login view. User is logged in on successful validation.
*
* @param string $username Username to check against.
* @param string $fields Comma separated string of the fields for validation.
* @param array $data Data sent to the view.
* @param string|null $error The error sent back to the validation handler on failure.
* @return bool True if validation passes or false if there are errors.
* @noinspection PhpUnused
*/
public function login_check(string $username, string $fields, array $data, ?string &$error = null): bool
{
$employee = model(Employee::class);
$this->request = Services::request();
$this->config = config(OSPOS::class)->settings;
// Installation Check
if (!$this->installation_check()) {
$error = lang('Login.invalid_installation');
return false;
}
$password = $data['password'];
if (!$employee->login($username, $password)) {
$error = lang('Login.invalid_username_and_password');
return false;
}
$gcaptcha_enabled = array_key_exists('gcaptcha_enable', $this->config) && $this->config['gcaptcha_enable'];
if ($gcaptcha_enabled) {
$g_recaptcha_response = $this->request->getPost('g-recaptcha-response');
if (!$this->gcaptcha_check($g_recaptcha_response)) {
$error = lang('Login.invalid_gcaptcha');
return false;
}
}
return true;
}
/**
* Checks to see if GCaptcha verification was successful.
*
* @param $response
* @return bool true on successful GCaptcha verification or false if GCaptcha failed.
*/
private function gcaptcha_check($response): bool
{
if (!empty($response)) {
$check = [
'secret' => $this->config['gcaptcha_secret_key'],
'response' => $response,
'remoteip' => $this->request->getIPAddress()
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($check));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$status = json_decode($result, true);
if (!empty($status['success'])) {
return true;
}
}
return false;
}
/**
* Checks to make sure dependency PHP extensions are installed
*
* @return bool
*/
private function installation_check(): bool
{
$installed_extensions = implode(', ', get_loaded_extensions());
$required_extensions = ['bcmath', 'intl', 'gd', 'openssl', 'mbstring', 'curl', 'xml', 'json'];
$pattern = '/';
foreach ($required_extensions as $extension) {
$pattern .= '(?=.*\b' . preg_quote($extension, '/') . '\b)';
}
$pattern .= '/i';
$is_installed = preg_match($pattern, $installed_extensions);
if (!$is_installed) {
log_message('error', '[ERROR] Check your php.ini.');
log_message('error', "PHP installed extensions: $installed_extensions");
log_message('error', 'PHP required extensions: ' . implode(', ', $required_extensions));
}
return $is_installed;
}
/**
* Validates the candidate as a decimal number. Takes the locale into account. Used in validation rule calls.
*
* @param string $candidate
* @param string|null $error
* @return bool
* @noinspection PhpUnused
*/
public function decimal_locale(string $candidate, ?string &$error = null): bool
{
return parse_decimals($candidate) !== false;
}
}

62
app/Config/View.php Normal file
View File

@@ -0,0 +1,62 @@
<?php
namespace Config;
use CodeIgniter\Config\View as BaseView;
use CodeIgniter\View\ViewDecoratorInterface;
/**
* @phpstan-type parser_callable (callable(mixed): mixed)
* @phpstan-type parser_callable_string (callable(mixed): mixed)&string
*/
class View extends BaseView
{
/**
* When false, the view method will clear the data between each
* call. This keeps your data safe and ensures there is no accidental
* leaking between calls, so you would need to explicitly pass the data
* to each view. You might prefer to have the data stick around between
* calls so that it is available to all views. If that is the case,
* set $saveData to true.
*
* @var bool
*/
public $saveData = true;
/**
* Parser Filters map a filter name with any PHP callable. When the
* Parser prepares a variable for display, it will chain it
* through the filters in the order defined, inserting any parameters.
* To prevent potential abuse, all filters MUST be defined here
* in order for them to be available for use within the Parser.
*
* Examples:
* { title|esc(js) }
* { created_on|date(Y-m-d)|esc(attr) }
*
* @var array<string, string>
* @phpstan-var array<string, parser_callable_string>
*/
public $filters = [];
/**
* Parser Plugins provide a way to extend the functionality provided
* by the core Parser by creating aliases that will be replaced with
* any callable. Can be single or tag pair.
*
* @var array<string, callable|list<string>|string>
* @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
*/
public $plugins = [];
/**
* View Decorators are class methods that will be run in sequence to
* have a chance to alter the generated output just prior to caching
* the results.
*
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
*
* @var list<class-string<ViewDecoratorInterface>>
*/
public array $decorators = [];
}

View File

@@ -0,0 +1,234 @@
<?php
namespace App\Controllers;
use App\Models\Attribute;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
require_once('Secure_Controller.php');
/**
* Attributes controls the custom attributes assigned to items
**/
class Attributes extends Secure_Controller
{
private Attribute $attribute;
public function __construct()
{
parent::__construct('attributes');
$this->attribute = model(Attribute::class);
}
/**
* Gets and sends the main view for Attributes to the browser.
*
* @return string
**/
public function getIndex(): string
{
$data['table_headers'] = get_attribute_definition_manage_table_headers();
return view('attributes/manage', $data);
}
/**
* Returns attribute table data rows. This will be called with AJAX.
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(attribute_definition_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'definition_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$attributes = $this->attribute->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->attribute->get_found_rows($search);
$data_rows = [];
foreach ($attributes->getResult() as $attribute_row) {
$attribute_row->definition_flags = $this->get_attributes($attribute_row->definition_flags);
$data_rows[] = get_attribute_definition_data_row($attribute_row);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* AJAX called function which saves the attribute value sent via POST by using the model save function.
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveAttributeValue(): ResponseInterface
{
$success = $this->attribute->saveAttributeValue(
html_entity_decode($this->request->getPost('attribute_value')),
$this->request->getPost('definition_id', FILTER_SANITIZE_NUMBER_INT),
$this->request->getPost('item_id', FILTER_SANITIZE_NUMBER_INT) ?? false,
$this->request->getPost('attribute_id', FILTER_SANITIZE_NUMBER_INT) ?? false
);
return $this->response->setJSON(['success' => $success != 0]);
}
/**
* AJAX called function deleting an attribute value using the model delete function.
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postDeleteDropdownAttributeValue(): ResponseInterface
{
$success = $this->attribute->deleteDropdownAttributeValue(
html_entity_decode($this->request->getPost('attribute_value')),
$this->request->getPost('definition_id', FILTER_SANITIZE_NUMBER_INT)
);
return $this->response->setJSON(['success' => $success]);
}
/**
* AJAX called function which saves the attribute definition.
*
* @param int $definition_id
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveDefinition(int $definition_id = NO_DEFINITION_ID): ResponseInterface
{
$definition_flags = 0;
$flags = (empty($this->request->getPost('definition_flags'))) ? [] : $this->request->getPost('definition_flags', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
foreach ($flags as $flag) {
$definition_flags |= $flag;
}
// Save definition data
$definition_data = [
'definition_name' => $this->request->getPost('definition_name'),
'definition_unit' => $this->request->getPost('definition_unit') != '' ? $this->request->getPost('definition_unit') : null,
'definition_flags' => $definition_flags,
'definition_fk' => $this->request->getPost('definition_group') != '' ? $this->request->getPost('definition_group') : null
];
if ($this->request->getPost('definition_type') != null) {
$definition_data['definition_type'] = DEFINITION_TYPES[$this->request->getPost('definition_type')];
}
$definition_name = $definition_data['definition_name'];
if ($this->attribute->save_definition($definition_data, $definition_id)) {
// New definition
if ($definition_id == NO_DEFINITION_ID) {
$definition_values = json_decode(html_entity_decode($this->request->getPost('definition_values')));
foreach ($definition_values as $definition_value) {
$this->attribute->saveAttributeValue($definition_value, $definition_data['definition_id']);
}
return $this->response->setJSON([
'success' => true,
'message' => lang('Attributes.definition_successful_adding') . ' ' . $definition_name,
'id' => $definition_data['definition_id']
]);
} else { // Existing definition
return $this->response->setJSON([
'success' => true,
'message' => lang('Attributes.definition_successful_updating') . ' ' . $definition_name,
'id' => $definition_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Attributes.definition_error_adding_updating', [$definition_name]),
'id' => NEW_ENTRY
]);
}
}
/**
*
* @param int $definition_id
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getSuggestAttribute(int $definition_id): ResponseInterface
{
$suggestions = $this->attribute->get_suggestions($definition_id, html_entity_decode($this->request->getGet('term')));
return $this->response->setJSON($suggestions);
}
/**
* @param int $row_id
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$attribute_definition_info = $this->attribute->getAttributeInfo($row_id);
$attribute_definition_info->definition_flags = $this->get_attributes($attribute_definition_info->definition_flags);
$data_row = get_attribute_definition_data_row($attribute_definition_info);
return $this->response->setJSON($data_row);
}
/**
* @param int $definition_flags
* @return array
*/
private function get_attributes(int $definition_flags = 0): array
{
$definition_flag_names = [];
foreach (Attribute::get_definition_flags() as $id => $term) {
if ($id & $definition_flags) {
$definition_flag_names[$id] = lang('Attributes.' . strtolower($term) . '_visibility');
}
}
return $definition_flag_names;
}
/**
* @param int $definition_id
* @return string
*/
public function getView(int $definition_id = NO_DEFINITION_ID): string
{
$info = $this->attribute->getAttributeInfo($definition_id);
foreach (get_object_vars($info) as $property => $value) {
$info->$property = $value;
}
$data['definition_id'] = $definition_id;
$data['definition_values'] = $this->attribute->get_definition_values($definition_id);
$data['definition_group'] = $this->attribute->get_definitions_by_type(GROUP, $definition_id);
$data['definition_group'][''] = lang('Common.none_selected_text');
$data['definition_info'] = $info;
$show_all = Attribute::SHOW_IN_ITEMS | Attribute::SHOW_IN_RECEIVINGS | Attribute::SHOW_IN_SALES;
$data['definition_flags'] = $this->get_attributes($show_all);
$selected_flags = $info->definition_flags === '' ? $show_all : $info->definition_flags;
$data['selected_definition_flags'] = $this->get_attributes($selected_flags);
return view('attributes/form', $data);
}
/**
* Deletes an attribute definition
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$attributes_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if($this->attribute->deleteDefinitionList($attributes_to_delete)) {
$message = lang('Attributes.definition_successful_deleted') . ' ' . count($attributes_to_delete) . ' ' . lang('Attributes.definition_one_or_multiple');
return $this->response->setJSON(['success' => true, 'message' => $message]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Attributes.definition_cannot_be_deleted')]);
}
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Controllers;
use CodeIgniter\Controller;
use CodeIgniter\HTTP\CLIRequest;
use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
/**
* Class BaseController
*
* BaseController provides a convenient place for loading components
* and performing functions that are needed by all your controllers.
* Extend this class in any new controllers:
* class Home extends BaseController
*
* For security be sure to declare any new methods as protected or private.
*/
abstract class BaseController extends Controller
{
/**
* Instance of the main Request object.
*
* @var CLIRequest|IncomingRequest
*/
protected $request;
/**
* An array of helpers to be loaded automatically upon
* class instantiation. These helpers will be available
* to all other controllers that extend BaseController.
*
* @var list<string>
*/
protected $helpers = [];
/**
* Be sure to declare properties for any property fetch you initialized.
* The creation of dynamic property is deprecated in PHP 8.2.
*/
// protected $session;
/**
* @return void
*/
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
// Do Not Edit This Line
parent::initController($request, $response, $logger);
// Preload any models, libraries, etc, here.
// E.g.: $this->session = service('session');
}
}

281
app/Controllers/Cashups.php Normal file
View File

@@ -0,0 +1,281 @@
<?php
namespace App\Controllers;
use App\Models\Cashup;
use App\Models\Expense;
use App\Models\Reports\Summary_payments;
use CodeIgniter\HTTP\ResponseInterface;
use Config\OSPOS;
use Config\Services;
class Cashups extends Secure_Controller
{
private Cashup $cashup;
private Expense $expense;
private Summary_payments $summary_payments;
private array $config;
public function __construct()
{
parent::__construct('cashups');
$this->cashup = model(Cashup::class);
$this->expense = model(Expense::class);
$this->summary_payments = model(Summary_payments::class);
$this->config = config(OSPOS::class)->settings;
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_cashups_manage_table_headers();
// filters that will be loaded in the multiselect dropdown
$data['filters'] = ['is_deleted' => lang('Cashups.is_deleted')];
return view('cashups/manage', $data);
}
/**
* @return void
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(cashup_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'cashup_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$filters = [
'start_date' => $this->request->getGet('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS), // TODO: Is this the best way to filter dates
'end_date' => $this->request->getGet('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'is_deleted' => false
];
// Check if any filter is set in the multiselect dropdown
$request_filters = array_fill_keys($this->request->getGet('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? [], true);
$filters = array_merge($filters, $request_filters);
$cash_ups = $this->cashup->search($search, $filters, $limit, $offset, $sort, $order);
$total_rows = $this->cashup->get_found_rows($search, $filters);
$data_rows = [];
foreach ($cash_ups->getResult() as $cash_up) {
$data_rows[] = get_cash_up_data_row($cash_up);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* @param int $cashup_id
* @return string
*/
public function getView(int $cashup_id = NEW_ENTRY): string
{
$data = [];
$data['employees'] = [];
foreach ($this->employee->get_all()->getResult() as $employee) {
foreach (get_object_vars($employee) as $property => $value) {
$employee->$property = $value;
}
$data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name;
}
$cash_ups_info = $this->cashup->get_info($cashup_id);
foreach (get_object_vars($cash_ups_info) as $property => $value) {
$cash_ups_info->$property = $value;
}
// Open cashup
if ($cash_ups_info->cashup_id == NEW_ENTRY) {
$cash_ups_info->open_date = date('Y-m-d H:i:s');
$cash_ups_info->close_date = $cash_ups_info->open_date;
$cash_ups_info->open_employee_id = $this->employee->get_logged_in_employee_info()->person_id;
$cash_ups_info->close_employee_id = $this->employee->get_logged_in_employee_info()->person_id;
}
// If all the amounts are null or 0 that means it's a close cashup
elseif (
floatval($cash_ups_info->closed_amount_cash) == 0
&& floatval($cash_ups_info->closed_amount_due) == 0
&& floatval($cash_ups_info->closed_amount_card) == 0
&& floatval($cash_ups_info->closed_amount_check) == 0
) {
// Set the close date and time to the actual as this is a close session
$cash_ups_info->close_date = date('Y-m-d H:i:s');
// The closed amount starts with the open amount -/+ any trasferred amount
$cash_ups_info->closed_amount_cash = $cash_ups_info->open_amount_cash + $cash_ups_info->transfer_amount_cash;
// If it's date mode only and not date & time truncate the open and end date to date only
if (empty($this->config['date_or_time_format'])) {
if ($cash_ups_info->open_date != null) {
$start_date = substr($cash_ups_info->open_date, 0, 10);
} else {
$start_date = null;
}
if ($cash_ups_info->close_date != null) {
$end_date = substr($cash_ups_info->close_date, 0, 10);
} else {
$end_date = null;
}
// Search for all the payments given the time range
$inputs = [
'start_date' => $start_date,
'end_date' => $end_date,
'sale_type' => 'complete',
'location_id' => 'all'
];
} else {
// Search for all the payments given the time range
$inputs = [
'start_date' => $cash_ups_info->open_date,
'end_date' => $cash_ups_info->close_date,
'sale_type' => 'complete',
'location_id' => 'all'
];
}
// Get all the transactions payment summaries
$reports_data = $this->summary_payments->getData($inputs);
foreach ($reports_data as $row) {
if ($row['trans_group'] == lang('Reports.trans_payments')) {
if ($row['trans_type'] == lang('Sales.cash')) {
$cash_ups_info->closed_amount_cash += $row['trans_amount'];
} elseif ($row['trans_type'] == lang('Sales.due')) {
$cash_ups_info->closed_amount_due += $row['trans_amount'];
} elseif (
$row['trans_type'] == lang('Sales.debit') ||
$row['trans_type'] == lang('Sales.credit')
) {
$cash_ups_info->closed_amount_card += $row['trans_amount'];
} elseif ($row['trans_type'] == lang('Sales.check')) {
$cash_ups_info->closed_amount_check += $row['trans_amount'];
}
}
}
// Lookup expenses paid in cash
$filters = [
'only_cash' => true,
'only_due' => false,
'only_check' => false,
'only_credit' => false,
'only_debit' => false,
'is_deleted' => false
];
$payments = $this->expense->get_payments_summary('', array_merge($inputs, $filters));
foreach ($payments as $row) {
$cash_ups_info->closed_amount_cash -= $row['amount'];
}
$cash_ups_info->closed_amount_total = $this->_calculate_total($cash_ups_info->open_amount_cash, $cash_ups_info->transfer_amount_cash, $cash_ups_info->closed_amount_cash, $cash_ups_info->closed_amount_due, $cash_ups_info->closed_amount_card, $cash_ups_info->closed_amount_check);
}
$data['cash_ups_info'] = $cash_ups_info;
return view("cashups/form", $data);
}
/**
* @param int $row_id
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$cash_ups_info = $this->cashup->get_info($row_id);
$data_row = get_cash_up_data_row($cash_ups_info);
return $this->response->setJSON($data_row);
}
/**
* @param int $cashup_id
* @return ResponseInterface
*/
public function postSave(int $cashup_id = NEW_ENTRY): ResponseInterface
{
$open_date = $this->request->getPost('open_date');
$open_date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $open_date);
$close_date = $this->request->getPost('close_date');
$close_date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $close_date);
$cash_up_data = [
'open_date' => $open_date_formatter->format('Y-m-d H:i:s'),
'close_date' => $close_date_formatter->format('Y-m-d H:i:s'),
'open_amount_cash' => parse_decimals($this->request->getPost('open_amount_cash')),
'transfer_amount_cash' => parse_decimals($this->request->getPost('transfer_amount_cash')),
'closed_amount_cash' => parse_decimals($this->request->getPost('closed_amount_cash')),
'closed_amount_due' => parse_decimals($this->request->getPost('closed_amount_due')),
'closed_amount_card' => parse_decimals($this->request->getPost('closed_amount_card')),
'closed_amount_check' => parse_decimals($this->request->getPost('closed_amount_check')),
'closed_amount_total' => parse_decimals($this->request->getPost('closed_amount_total')),
'note' => $this->request->getPost('note') != null,
'description' => $this->request->getPost('description', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'open_employee_id' => $this->request->getPost('open_employee_id', FILTER_SANITIZE_NUMBER_INT),
'close_employee_id' => $this->request->getPost('close_employee_id', FILTER_SANITIZE_NUMBER_INT),
'deleted' => $this->request->getPost('deleted') != null
];
if ($this->cashup->save_value($cash_up_data, $cashup_id)) {
// New cashup_id
if ($cashup_id == NEW_ENTRY) {
return $this->response->setJSON(['success' => true, 'message' => lang('Cashups.successful_adding'), 'id' => $cash_up_data['cashup_id']]);
} else { // Existing Cashup
return $this->response->setJSON(['success' => true, 'message' => lang('Cashups.successful_updating'), 'id' => $cashup_id]);
}
} else { // Failure
return $this->response->setJSON(['success' => false, 'message' => lang('Cashups.error_adding_updating'), 'id' => NEW_ENTRY]);
}
}
/**
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$cash_ups_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($this->cashup->delete_list($cash_ups_to_delete)) {
return $this->response->setJSON(['success' => true, 'message' => lang('Cashups.successful_deleted') . ' ' . count($cash_ups_to_delete) . ' ' . lang('Cashups.one_or_multiple'), 'ids' => $cash_ups_to_delete]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Cashups.cannot_be_deleted'), 'ids' => $cash_ups_to_delete]);
}
}
/**
* Calculate the total for cashups. Used in app\Views\cashups\form.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postAjax_cashup_total(): ResponseInterface
{
$open_amount_cash = parse_decimals($this->request->getPost('open_amount_cash'));
$transfer_amount_cash = parse_decimals($this->request->getPost('transfer_amount_cash'));
$closed_amount_cash = parse_decimals($this->request->getPost('closed_amount_cash'));
$closed_amount_due = parse_decimals($this->request->getPost('closed_amount_due'));
$closed_amount_card = parse_decimals($this->request->getPost('closed_amount_card'));
$closed_amount_check = parse_decimals($this->request->getPost('closed_amount_check'));
$total = $this->_calculate_total($open_amount_cash, $transfer_amount_cash, $closed_amount_due, $closed_amount_cash, $closed_amount_card, $closed_amount_check); // TODO: hungarian notation
return $this->response->setJSON(['total' => to_currency_no_money($total)]);
}
/**
* Calculate total
*/
private function _calculate_total(float $open_amount_cash, float $transfer_amount_cash, float $closed_amount_due, float $closed_amount_cash, float $closed_amount_card, $closed_amount_check): float // TODO: need to get rid of hungarian notation here. Also, the signature is pretty long. Perhaps they need to go into an object or array?
{
return ($closed_amount_cash - $open_amount_cash - $transfer_amount_cash + $closed_amount_due + $closed_amount_card + $closed_amount_check);
}
}

976
app/Controllers/Config.php Normal file
View File

@@ -0,0 +1,976 @@
<?php
namespace App\Controllers;
use App\Libraries\Barcode_lib;
use App\Libraries\Mailchimp_lib;
use App\Libraries\Receiving_lib;
use App\Libraries\Sale_lib;
use App\Libraries\Tax_lib;
use App\Models\Appconfig;
use App\Models\Attribute;
use App\Models\Customer_rewards;
use App\Models\Dinner_table;
use App\Models\Module;
use App\Models\Enums\Rounding_mode;
use App\Models\Stock_location;
use App\Models\Tax;
use CodeIgniter\Database\BaseConnection;
use CodeIgniter\Encryption\EncrypterInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Database;
use Config\OSPOS;
use Config\Services;
use DirectoryIterator;
use NumberFormatter;
use ReflectionException;
class Config extends Secure_Controller
{
protected $helpers = ['security'];
private BaseConnection $db;
private EncrypterInterface $encrypter;
private Barcode_lib $barcode_lib;
private Sale_lib $sale_lib;
private Receiving_lib $receiving_lib;
private Tax_lib $tax_lib;
private Appconfig $appconfig;
private Attribute $attribute;
private Customer_rewards $customer_rewards;
private Dinner_table $dinner_table;
protected Module $module;
private Stock_location $stock_location;
private Tax $tax;
private array $config;
public function __construct()
{
parent::__construct('config');
$this->barcode_lib = new Barcode_lib();
$this->sale_lib = new Sale_lib();
$this->receiving_lib = new receiving_lib();
$this->tax_lib = new Tax_lib();
$this->appconfig = model(Appconfig::class);
$this->attribute = model(Attribute::class);
$this->customer_rewards = model(Customer_rewards::class);
$this->dinner_table = model(Dinner_table::class);
$this->module = model(Module::class);
$this->stock_location = model(Stock_location::class);
$this->tax = model(Tax::class);
$this->config = config(OSPOS::class)->settings;
$this->db = Database::connect();
helper('security');
if (check_encryption()) {
$this->encrypter = Services::encrypter();
} else {
log_message('alert', 'Error preparing encryption key');
}
}
/**
* This function loads all the licenses starting with the first one being OSPOS one
*/
private function _licenses(): array // TODO: remove hungarian notation. Super long function. Perhaps we need to refactor out functions?
{
$i = 0;
$composer = false;
$npmProd = false;
$npmDev = false;
$license = [];
$license[$i]['title'] = 'Open Source Point Of Sale ' . config('App')->application_version;
if (file_exists('license/LICENSE')) {
$license[$i]['text'] = file_get_contents('license/LICENSE', false, null, 0, 3000);
} else {
$license[$i]['text'] = 'LICENSE file must be in OSPOS license directory. You are not allowed to use OSPOS application until the distribution copy of LICENSE file is present.';
}
$dir = new DirectoryIterator('license'); // Read all the files in the dir license
foreach ($dir as $fileinfo) { // TODO: $fileinfo doesn't match our variable naming convention
// License files must be in couples: .version (name & version) & .license (license text)
if ($fileinfo->isFile()) {
if ($fileinfo->getExtension() == 'version') {
++$i;
$basename = 'license/' . $fileinfo->getBasename('.version');
$license[$i]['title'] = file_get_contents($basename . '.version', false, null, 0, 100);
$license_text_file = $basename . '.license';
if (file_exists($license_text_file)) {
$license[$i]['text'] = file_get_contents($license_text_file, false, null, 0, 2000);
} else {
$license[$i]['text'] = $license_text_file . ' file is missing';
}
} elseif ($fileinfo->getBasename() == 'composer.LICENSES') {
// Set a flag to indicate that the composer.LICENSES file is available and needs to be attached at the end
$composer = true;
} elseif ($fileinfo->getBasename() == 'npm-prod.LICENSES') {
// Set a flag to indicate that the npm-prod.LICENSES file is available and needs to be attached at the end
$npmProd = true;
} elseif ($fileinfo->getBasename() == 'npm-dev.LICENSES') {
// Set a flag to indicate that the npm-dev.LICENSES file is available and needs to be attached at the end
$npmDev = true;
}
}
}
// Attach the licenses from the LICENSES file generated by Composer
if ($composer) {
++$i;
$license[$i]['title'] = 'Composer Libraries';
$license[$i]['text'] = '';
$file = file_get_contents('license/composer.LICENSES');
$array = json_decode($file, true);
if (isset($array['dependencies'])) {
foreach ($array['dependencies'] as $dependency => $details) {
$license[$i]['text'] .= "library: $dependency\n";
foreach ($details as $key => $value) {
if (is_array($value)) {
$license[$i]['text'] .= "$key: " . implode(' ', $value) . "\n";
} else {
$license[$i]['text'] .= "$key: $value\n";
}
}
$license[$i]['text'] .= "\n";
}
$license[$i]['text'] = rtrim($license[$i]['text'], "\n");
}
}
// Attach the licenses from the LICENSES file generated by license-report
if ($npmProd) {
++$i;
$license[$i]['title'] = 'NPM Production Libraries';
$license[$i]['text'] = '';
$file = file_get_contents('license/npm-prod.LICENSES');
$array = json_decode($file, true);
foreach ($array as $dependency) {
$license[$i]['text'] .= "library: {$dependency['name']}\n";
$license[$i]['text'] .= "authors: {$dependency['author']}\n";
$license[$i]['text'] .= "website: {$dependency['homepage']}\n";
$license[$i]['text'] .= "version: {$dependency['installedVersion']}\n";
$license[$i]['text'] .= "license: {$dependency['licenseType']}\n";
$license[$i]['text'] .= "\n";
}
$license[$i]['text'] = rtrim($license[$i]['text'], "\n");
}
if ($npmDev) {
++$i;
$license[$i]['title'] = 'NPM Development Libraries';
$license[$i]['text'] = '';
$file = file_get_contents('license/npm-dev.LICENSES');
$array = json_decode($file, true);
foreach ($array as $dependency) {
$license[$i]['text'] .= "library: {$dependency['name']}\n";
$license[$i]['text'] .= "authors: {$dependency['author']}\n";
$license[$i]['text'] .= "website: {$dependency['homepage']}\n";
$license[$i]['text'] .= "version: {$dependency['installedVersion']}\n";
$license[$i]['text'] .= "license: {$dependency['licenseType']}\n";
$license[$i]['text'] .= "\n";
}
$license[$i]['text'] = rtrim($license[$i]['text'], "\n");
}
return $license;
}
/**
* This function loads all the available themes in the dist/bootswatch directory
* @return array
*/
private function _themes(): array // TODO: Hungarian notation
{
$themes = [];
// Read all themes in the dist folder
$dir = new DirectoryIterator('resources/bootswatch');
foreach ($dir as $dirinfo) { // TODO: $dirinfo doesn't follow naming convention
if ($dirinfo->isDir() && !$dirinfo->isDot() && $dirinfo->getFileName() != 'fonts') {
$file = $dirinfo->getFileName();
$themes[$file] = ucfirst($file);
}
}
asort($themes);
return $themes;
}
/**
* @return string
*/
public function getIndex(): string
{
$data['stock_locations'] = $this->stock_location->get_all()->getResultArray();
$data['dinner_tables'] = $this->dinner_table->get_all()->getResultArray();
$data['customer_rewards'] = $this->customer_rewards->get_all()->getResultArray();
$data['support_barcode'] = $this->barcode_lib->get_list_barcodes();
$data['barcode_fonts'] = $this->barcode_lib->listfonts('fonts');
$data['logo_exists'] = $this->config['company_logo'] != '';
$data['logo_src'] = !empty($this->config['company_logo']) ? base_url('uploads/' . $this->config['company_logo']) : '';
$data['line_sequence_options'] = $this->sale_lib->get_line_sequence_options();
$data['register_mode_options'] = $this->sale_lib->get_register_mode_options();
$data['invoice_type_options'] = $this->sale_lib->get_invoice_type_options();
$data['rounding_options'] = rounding_mode::get_rounding_options();
$data['tax_code_options'] = $this->tax_lib->get_tax_code_options();
$data['tax_category_options'] = $this->tax_lib->get_tax_category_options();
$data['tax_jurisdiction_options'] = $this->tax_lib->get_tax_jurisdiction_options();
$data['show_office_group'] = $this->module->get_show_office_group();
$data['currency_code'] = $this->config['currency_code'] ?? '';
$data['dbVersion'] = mysqli_get_server_info($this->db->getConnection());
// Load all the license statements, they are already XSS cleaned in the private function
$data['licenses'] = $this->_licenses();
// Load all the themes, already XSS cleaned in the private function
$data['themes'] = $this->_themes();
// General related fields
$image_allowed_types = ['jpg', 'jpeg', 'gif', 'svg', 'webp', 'bmp', 'png', 'tif', 'tiff'];
$data['image_allowed_types'] = array_combine($image_allowed_types, $image_allowed_types);
$data['selected_image_allowed_types'] = explode(',', $this->config['image_allowed_types']);
// Integrations Related fields
$data['mailchimp'] = [];
if (check_encryption()) { // TODO: Hungarian notation
if (!isset($this->encrypter)) {
helper('security');
$this->encrypter = Services::encrypter();
}
$data['mailchimp']['api_key'] = (isset($this->config['mailchimp_api_key']) && !empty($this->config['mailchimp_api_key']))
? $this->encrypter->decrypt($this->config['mailchimp_api_key'])
: '';
$data['mailchimp']['list_id'] = (isset($this->config['mailchimp_list_id']) && !empty($this->config['mailchimp_list_id']))
? $this->encrypter->decrypt($this->config['mailchimp_list_id'])
: '';
// Remove any backup of .env created by check_encryption()
remove_backup();
} else {
$data['mailchimp']['api_key'] = '';
$data['mailchimp']['list_id'] = '';
}
$data['mailchimp']['lists'] = $this->_mailchimp();
return view('configs/manage', $data);
}
/**
* Saves company information. Used in app/Views/configs/info_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveInfo(): ResponseInterface
{
$upload_data = $this->upload_logo();
$upload_success = empty($upload_data['error']);
$batch_save_data = [
'company' => $this->request->getPost('company'),
'address' => $this->request->getPost('address'),
'phone' => $this->request->getPost('phone'),
'email' => strtolower($this->request->getPost('email', FILTER_SANITIZE_EMAIL)),
'fax' => $this->request->getPost('fax'),
'website' => $this->request->getPost('website', FILTER_SANITIZE_URL),
'return_policy' => $this->request->getPost('return_policy')
];
if (!empty($upload_data['orig_name']) && $upload_data['raw_name']) {
$batch_save_data['company_logo'] = $upload_data['raw_name'] . '.' . $upload_data['file_ext'];
}
$result = $this->appconfig->batch_save($batch_save_data);
$success = $upload_success && $result;
$message = lang('Config.saved_' . ($success ? '' : 'un') . 'successfully');
$message = $upload_success ? $message : strip_tags($upload_data['error']);
return $this->response->setJSON(['success' => $success, 'message' => $message]);
}
/**
* @return array
*/
private function upload_logo(): array
{
$file = $this->request->getFile('company_logo');
if (!$file) {
return [];
}
helper(['form']);
$validation_rule = [
'company_logo' => [
'label' => 'Company logo',
'rules' => [
'uploaded[company_logo]',
'is_image[company_logo]',
'max_size[company_logo,1024]',
'mime_in[company_logo,image/png,image/jpg,image/jpeg,image/gif]',
'ext_in[company_logo,png,jpg,gif]',
'max_dims[company_logo,800,680]',
]
]
];
if (!$this->validate($validation_rule)) {
return (['error' => $this->validator->getError('company_logo')]);
}
$filename = $file->getClientName();
$info = pathinfo($filename);
$file_info = [
'orig_name' => $filename,
'raw_name' => $info['filename'],
'file_ext' => $file->guessExtension()
];
$file->move(FCPATH . 'uploads/', $file_info['raw_name'] . '.' . $file_info['file_ext'], true);
return ($file_info);
}
/**
* Saves general configuration. Used in app/Views/configs/general_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveGeneral(): ResponseInterface
{
$batch_save_data = [
'theme' => $this->request->getPost('theme'),
'login_form' => $this->request->getPost('login_form'),
'default_sales_discount_type' => $this->request->getPost('default_sales_discount_type') != null,
'default_sales_discount' => parse_decimals($this->request->getPost('default_sales_discount')),
'default_receivings_discount_type' => $this->request->getPost('default_receivings_discount_type') != null,
'default_receivings_discount' => parse_decimals($this->request->getPost('default_receivings_discount')),
'enforce_privacy' => $this->request->getPost('enforce_privacy') != null,
'receiving_calculate_average_price' => $this->request->getPost('receiving_calculate_average_price') != null,
'lines_per_page' => $this->request->getPost('lines_per_page', FILTER_SANITIZE_NUMBER_INT),
'notify_horizontal_position' => $this->request->getPost('notify_horizontal_position'),
'notify_vertical_position' => $this->request->getPost('notify_vertical_position'),
'image_max_width' => $this->request->getPost('image_max_width', FILTER_SANITIZE_NUMBER_INT),
'image_max_height' => $this->request->getPost('image_max_height', FILTER_SANITIZE_NUMBER_INT),
'image_max_size' => $this->request->getPost('image_max_size', FILTER_SANITIZE_NUMBER_INT),
'image_allowed_types' => implode(',', $this->request->getPost('image_allowed_types')),
'gcaptcha_enable' => $this->request->getPost('gcaptcha_enable') != null,
'gcaptcha_secret_key' => $this->request->getPost('gcaptcha_secret_key'),
'gcaptcha_site_key' => $this->request->getPost('gcaptcha_site_key'),
'suggestions_first_column' => $this->request->getPost('suggestions_first_column'),
'suggestions_second_column' => $this->request->getPost('suggestions_second_column'),
'suggestions_third_column' => $this->request->getPost('suggestions_third_column'),
'giftcard_number' => $this->request->getPost('giftcard_number'),
'derive_sale_quantity' => $this->request->getPost('derive_sale_quantity') != null,
'multi_pack_enabled' => $this->request->getPost('multi_pack_enabled') != null,
'include_hsn' => $this->request->getPost('include_hsn') != null,
'category_dropdown' => $this->request->getPost('category_dropdown') != null
];
$this->module->set_show_office_group($this->request->getPost('show_office_group') != null);
if ($batch_save_data['category_dropdown'] == 1) {
$definition_data['definition_name'] = 'ospos_category';
$definition_data['definition_flags'] = 0;
$definition_data['definition_type'] = 'DROPDOWN';
$definition_data['definition_id'] = CATEGORY_DEFINITION_ID;
$definition_data['deleted'] = 0;
$this->attribute->save_definition($definition_data, CATEGORY_DEFINITION_ID);
} elseif ($batch_save_data['category_dropdown'] == NO_DEFINITION_ID) {
$this->attribute->deleteDefinition(CATEGORY_DEFINITION_ID);
}
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Checks a number against the currently selected locale. Used in app/Views/configs/locale_config.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postCheckNumberLocale(): ResponseInterface
{
$number_locale = $this->request->getPost('number_locale');
$save_number_locale = $this->request->getPost('save_number_locale');
$fmt = new NumberFormatter($number_locale, NumberFormatter::CURRENCY);
if ($number_locale != $save_number_locale) {
$currency_symbol = $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL);
$currency_code = $fmt->getTextAttribute(NumberFormatter::CURRENCY_CODE);
$save_number_locale = $number_locale;
} else {
$currency_symbol = empty($this->request->getPost('currency_symbol')) ? $fmt->getSymbol(NumberFormatter::CURRENCY_SYMBOL) : $this->request->getPost('currency_symbol');
$currency_code = empty($this->request->getPost('currency_code')) ? $fmt->getTextAttribute(NumberFormatter::CURRENCY_CODE) : $this->request->getPost('currency_code');
}
if ($this->request->getPost('thousands_separator') == 'false') {
$fmt->setTextAttribute(NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '');
}
$fmt->setSymbol(NumberFormatter::CURRENCY_SYMBOL, $currency_symbol);
$number_local_example = $fmt->format(1234567890.12300);
return $this->response->setJSON([
'success' => $number_local_example != false,
'save_number_locale' => $save_number_locale,
'number_locale_example' => $number_local_example,
'currency_symbol' => $currency_symbol,
'currency_code' => $currency_code,
]);
}
/**
* Saves locale configuration. Used in app/Views/configs/locale_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveLocale(): ResponseInterface
{
$exploded = explode(":", $this->request->getPost('language'));
$batch_save_data = [
'currency_symbol' => $this->request->getPost('currency_symbol'),
'currency_code' => $this->request->getPost('currency_code'),
'language_code' => $exploded[0],
'language' => $exploded[1],
'timezone' => $this->request->getPost('timezone'),
'dateformat' => $this->request->getPost('dateformat'),
'timeformat' => $this->request->getPost('timeformat'),
'thousands_separator' => $this->request->getPost('thousands_separator') != null,
'number_locale' => $this->request->getPost('number_locale'),
'currency_decimals' => $this->request->getPost('currency_decimals', FILTER_SANITIZE_NUMBER_INT),
'tax_decimals' => $this->request->getPost('tax_decimals', FILTER_SANITIZE_NUMBER_INT),
'quantity_decimals' => $this->request->getPost('quantity_decimals', FILTER_SANITIZE_NUMBER_INT),
'country_codes' => htmlspecialchars($this->request->getPost('country_codes')),
'payment_options_order' => $this->request->getPost('payment_options_order'),
'date_or_time_format' => $this->request->getPost('date_or_time_format') != null,
'cash_decimals' => $this->request->getPost('cash_decimals', FILTER_SANITIZE_NUMBER_INT),
'cash_rounding_code' => $this->request->getPost('cash_rounding_code'),
'financial_year' => $this->request->getPost('financial_year', FILTER_SANITIZE_NUMBER_INT)
];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves email configuration. Used in app/Views/configs/email_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveEmail(): ResponseInterface
{
$password = '';
if (check_encryption() && !empty($this->request->getPost('smtp_pass'))) {
$password = $this->encrypter->encrypt($this->request->getPost('smtp_pass'));
}
$batch_save_data = [
'protocol' => $this->request->getPost('protocol'),
'mailpath' => $this->request->getPost('mailpath'),
'smtp_host' => $this->request->getPost('smtp_host'),
'smtp_user' => $this->request->getPost('smtp_user'),
'smtp_pass' => $password,
'smtp_port' => $this->request->getPost('smtp_port', FILTER_SANITIZE_NUMBER_INT),
'smtp_timeout' => $this->request->getPost('smtp_timeout', FILTER_SANITIZE_NUMBER_INT),
'smtp_crypto' => $this->request->getPost('smtp_crypto')
];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves SMS message configuration. Used in app/Views/configs/message_config.php.
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveMessage(): ResponseInterface
{
$password = '';
if (check_encryption() && !empty($this->request->getPost('msg_pwd'))) {
$password = $this->encrypter->encrypt($this->request->getPost('msg_pwd'));
}
$batch_save_data = [
'msg_msg' => $this->request->getPost('msg_msg'),
'msg_uid' => $this->request->getPost('msg_uid'),
'msg_pwd' => $password,
'msg_src' => $this->request->getPost('msg_src')
];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* This function fetches all the available lists from Mailchimp for the given API key
*/
private function _mailchimp(string $api_key = ''): array // TODO: Hungarian notation
{
$mailchimp_lib = new Mailchimp_lib(['api_key' => $api_key]);
$result = [];
$lists = $mailchimp_lib->getLists();
if ($lists !== false) {
if (is_array($lists) && !empty($lists['lists']) && is_array($lists['lists'])) {
foreach ($lists['lists'] as $list) {
$result[$list['id']] = $list['name'] . ' [' . $list['stats']['member_count'] . ']';
}
}
}
return $result;
}
/**
* Gets Mailchimp lists when a valid API key is inserted. Used in app/Views/configs/integrations_config.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postCheckMailchimpApiKey(): ResponseInterface
{
$lists = $this->_mailchimp($this->request->getPost('mailchimp_api_key'));
$success = count($lists) > 0;
return $this->response->setJSON([
'success' => $success,
'message' => lang('Config.mailchimp_key_' . ($success ? '' : 'un') . 'successfully'),
'mailchimp_lists' => $lists
]);
}
/**
* Saves Mailchimp configuration. Used in app/Views/configs/integrations_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveMailchimp(): ResponseInterface
{
$api_key = '';
$list_id = '';
if (check_encryption()) {
$api_key_unencrypted = $this->request->getPost('mailchimp_api_key');
if (!empty($api_key_unencrypted)) {
$api_key = $this->encrypter->encrypt($api_key_unencrypted);
}
$list_id_unencrypted = $this->request->getPost('mailchimp_list_id');
if (!empty($list_id_unencrypted)) {
$list_id = $this->encrypter->encrypt($list_id_unencrypted);
}
}
$batch_save_data = ['mailchimp_api_key' => $api_key, 'mailchimp_list_id' => $list_id];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Gets all stock locations. Used in app/Views/configs/stock_config.php
*
* @return string
* @noinspection PhpUnused
*/
public function getStockLocations(): string
{
$stock_locations = $this->stock_location->get_all()->getResultArray();
return view('partial/stock_locations', ['stock_locations' => $stock_locations]);
}
/**
* @return string
*/
public function getDinnerTables(): string
{
$dinner_tables = $this->dinner_table->get_all()->getResultArray();
return view('partial/dinner_tables', ['dinner_tables' => $dinner_tables]);
}
/**
* Gets all tax categories.
*
* @return string
*/
public function ajax_tax_categories(): string // TODO: Is this function called anywhere in the code?
{
$tax_categories = $this->tax->get_all_tax_categories()->getResultArray();
return view('partial/tax_categories', ['tax_categories' => $tax_categories]);
}
/**
* Gets all customer rewards. Used in app/Views/configs/reward_config.php
*
* @return string
* @noinspection PhpUnused
*/
public function getCustomerRewards(): string
{
$customer_rewards = $this->customer_rewards->get_all()->getResultArray();
return view('partial/customer_rewards', ['customer_rewards' => $customer_rewards]);
}
/**
* @return void
*/
private function _clear_session_state(): void // TODO: Hungarian notation
{
$this->sale_lib->clear_sale_location();
$this->sale_lib->clear_table();
$this->sale_lib->clear_all();
$this->receiving_lib = new Receiving_lib();
$this->receiving_lib->clear_stock_source();
$this->receiving_lib->clear_stock_destination();
$this->receiving_lib->clear_all();
}
/**
* Saves stock locations. Used in app/Views/configs/stock_config.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveLocations(): ResponseInterface
{
$this->db->transStart();
$not_to_delete = [];
foreach ($this->request->getPost() as $key => $value) {
if (str_contains($key, 'stock_location')) {
// Save or update
foreach ($value as $location_id => $location_name) {
$location_data = ['location_name' => $location_name];
if ($this->stock_location->save_value($location_data, $location_id)) {
$location_id = $this->stock_location->get_location_id($location_name);
$not_to_delete[] = $location_id;
$this->_clear_session_state();
}
}
}
}
// All locations not available in post will be deleted now
$deleted_locations = $this->stock_location->get_all()->getResultArray();
foreach ($deleted_locations as $location => $location_data) {
if (!in_array($location_data['location_id'], $not_to_delete)) {
$this->stock_location->delete($location_data['location_id']);
}
}
$this->db->transComplete();
$success = $this->db->transStatus();
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves all dinner tables. Used in app/Views/configs/table_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveTables(): ResponseInterface
{
$this->db->transStart();
$dinner_table_enable = $this->request->getPost('dinner_table_enable') != null;
$this->appconfig->save(['dinner_table_enable' => $dinner_table_enable]);
if ($dinner_table_enable) {
$not_to_delete = [];
foreach ($this->request->getPost() as $key => $value) { // TODO: Not sure if this is the best way to filter the array
if (strstr($key, 'dinner_table') && $key != 'dinner_table_enable') {
$dinner_table_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
$not_to_delete[] = $dinner_table_id;
// Save or update
$table_data = ['name' => $value];
if ($this->dinner_table->save_value($table_data, $dinner_table_id)) {
$this->_clear_session_state(); // TODO: Remove hungarian notation.
}
}
}
// All tables not available in post will be deleted now
$deleted_tables = $this->dinner_table->get_all()->getResultArray();
foreach ($deleted_tables as $dinner_tables => $table) {
if (!in_array($table['dinner_table_id'], $not_to_delete)) {
$this->dinner_table->delete($table['dinner_table_id']);
}
}
}
$this->db->transComplete();
$success = $this->db->transStatus();
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves tax configuration. Used in app/Views/configs/tax_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveTax(): ResponseInterface
{
$default_tax_1_rate = $this->request->getPost('default_tax_1_rate');
$default_tax_2_rate = $this->request->getPost('default_tax_2_rate');
$batch_save_data = [
'default_tax_1_rate' => parse_tax(filter_var($default_tax_1_rate, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)),
'default_tax_1_name' => $this->request->getPost('default_tax_1_name'),
'default_tax_2_rate' => parse_tax(filter_var($default_tax_2_rate, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION)),
'default_tax_2_name' => $this->request->getPost('default_tax_2_name'),
'tax_included' => $this->request->getPost('tax_included') != null,
'use_destination_based_tax' => $this->request->getPost('use_destination_based_tax') != null,
'default_tax_code' => $this->request->getPost('default_tax_code'),
'default_tax_category' => $this->request->getPost('default_tax_category'),
'default_tax_jurisdiction' => $this->request->getPost('default_tax_jurisdiction'),
'tax_id' => $this->request->getPost('tax_id', FILTER_SANITIZE_NUMBER_INT)
];
$success = $this->appconfig->batch_save($batch_save_data);
$message = lang('Config.saved_' . ($success ? '' : 'un') . 'successfully');
return $this->response->setJSON(['success' => $success, 'message' => $message]);
}
/**
* Saves customer rewards configuration. Used in app/Views/configs/reward_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveRewards(): ResponseInterface
{
$this->db->transStart();
$customer_reward_enable = $this->request->getPost('customer_reward_enable') != null;
$this->appconfig->save(['customer_reward_enable' => $customer_reward_enable]);
if ($customer_reward_enable) {
$not_to_delete = [];
$array_save = [];
foreach ($this->request->getPost() as $key => $value) {
if (strstr($key, 'customer_reward') && $key != 'customer_reward_enable') {
$customer_reward_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
$not_to_delete[] = $customer_reward_id;
$array_save[$customer_reward_id]['package_name'] = $value;
} elseif (str_contains($key, 'reward_points')) {
$customer_reward_id = preg_replace("/.*?_(\d+)$/", "$1", $key);
$array_save[$customer_reward_id]['points_percent'] = $value;
}
}
if (!empty($array_save)) {
foreach ($array_save as $key => $value) {
// Save or update
$package_data = ['package_name' => $value['package_name'], 'points_percent' => $value['points_percent']];
$this->customer_rewards->save_value($package_data, $key); // TODO: reflection exception
}
}
// All packages not available in post will be deleted now
$deleted_packages = $this->customer_rewards->get_all()->getResultArray();
foreach ($deleted_packages as $customer_rewards => $reward_category) {
if (!in_array($reward_category['package_id'], $not_to_delete)) {
$this->customer_rewards->delete($reward_category['package_id']);
}
}
}
$this->db->transComplete();
$success = $this->db->transStatus();
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves barcode configuration. Used in app/Views/configs/barcode_config.php
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveBarcode(): ResponseInterface
{
$batch_save_data = [
'barcode_type' => $this->request->getPost('barcode_type'),
'barcode_width' => $this->request->getPost('barcode_width', FILTER_SANITIZE_NUMBER_INT),
'barcode_height' => $this->request->getPost('barcode_height', FILTER_SANITIZE_NUMBER_INT),
'barcode_font' => $this->request->getPost('barcode_font'),
'barcode_font_size' => $this->request->getPost('barcode_font_size', FILTER_SANITIZE_NUMBER_INT),
'barcode_first_row' => $this->request->getPost('barcode_first_row'),
'barcode_second_row' => $this->request->getPost('barcode_second_row'),
'barcode_third_row' => $this->request->getPost('barcode_third_row'),
'barcode_num_in_row' => $this->request->getPost('barcode_num_in_row', FILTER_SANITIZE_NUMBER_INT),
'barcode_page_width' => $this->request->getPost('barcode_page_width', FILTER_SANITIZE_NUMBER_INT),
'barcode_page_cellspacing' => $this->request->getPost('barcode_page_cellspacing', FILTER_SANITIZE_NUMBER_INT),
'barcode_generate_if_empty' => $this->request->getPost('barcode_generate_if_empty') != null,
'allow_duplicate_barcodes' => $this->request->getPost('allow_duplicate_barcodes') != null,
'barcode_content' => $this->request->getPost('barcode_content'),
'barcode_formats' => json_encode($this->request->getPost('barcode_formats'))
];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves receipt configuration. Used in app/Views/configs/receipt_config.php.
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveReceipt(): ResponseInterface
{
$batch_save_data = [
'receipt_template' => $this->request->getPost('receipt_template'),
'receipt_font_size' => $this->request->getPost('receipt_font_size', FILTER_SANITIZE_NUMBER_INT),
'print_delay_autoreturn' => $this->request->getPost('print_delay_autoreturn', FILTER_SANITIZE_NUMBER_INT),
'email_receipt_check_behaviour' => $this->request->getPost('email_receipt_check_behaviour'),
'print_receipt_check_behaviour' => $this->request->getPost('print_receipt_check_behaviour'),
'receipt_show_company_name' => $this->request->getPost('receipt_show_company_name') != null,
'receipt_show_taxes' => $this->request->getPost('receipt_show_taxes') != null,
'receipt_show_tax_ind' => $this->request->getPost('receipt_show_tax_ind') != null,
'receipt_show_total_discount' => $this->request->getPost('receipt_show_total_discount') != null,
'receipt_show_description' => $this->request->getPost('receipt_show_description') != null,
'receipt_show_serialnumber' => $this->request->getPost('receipt_show_serialnumber') != null,
'print_silently' => $this->request->getPost('print_silently') != null,
'print_header' => $this->request->getPost('print_header') != null,
'print_footer' => $this->request->getPost('print_footer') != null,
'print_top_margin' => $this->request->getPost('print_top_margin', FILTER_SANITIZE_NUMBER_INT),
'print_left_margin' => $this->request->getPost('print_left_margin', FILTER_SANITIZE_NUMBER_INT),
'print_bottom_margin' => $this->request->getPost('print_bottom_margin', FILTER_SANITIZE_NUMBER_INT),
'print_right_margin' => $this->request->getPost('print_right_margin', FILTER_SANITIZE_NUMBER_INT)
];
$success = $this->appconfig->batch_save($batch_save_data);
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Saves invoice configuration. Used in app/Views/configs/invoice_config.php.
*
* @throws ReflectionException
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSaveInvoice(): ResponseInterface
{
$batch_save_data = [
'invoice_enable' => $this->request->getPost('invoice_enable') != null,
'sales_invoice_format' => $this->request->getPost('sales_invoice_format'),
'sales_quote_format' => $this->request->getPost('sales_quote_format'),
'recv_invoice_format' => $this->request->getPost('recv_invoice_format'),
'invoice_default_comments' => $this->request->getPost('invoice_default_comments'),
'invoice_email_message' => $this->request->getPost('invoice_email_message'),
'line_sequence' => $this->request->getPost('line_sequence'),
'last_used_invoice_number' => $this->request->getPost('last_used_invoice_number', FILTER_SANITIZE_NUMBER_INT),
'last_used_quote_number' => $this->request->getPost('last_used_quote_number', FILTER_SANITIZE_NUMBER_INT),
'quote_default_comments' => $this->request->getPost('quote_default_comments'),
'work_order_enable' => $this->request->getPost('work_order_enable') != null,
'work_order_format' => $this->request->getPost('work_order_format'),
'last_used_work_order_number' => $this->request->getPost('last_used_work_order_number', FILTER_SANITIZE_NUMBER_INT),
'invoice_type' => $this->request->getPost('invoice_type')
];
$success = $this->appconfig->batch_save($batch_save_data);
// Update the register mode with the latest change so that if the user
// switches immediately back to the register the mode reflects the change
if ($success) {
if ($this->config['invoice_enable']) {
$this->sale_lib->set_mode($this->config['default_register_mode']);
} else {
$this->sale_lib->set_mode('sale');
}
}
return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]);
}
/**
* Removes the company logo from the database. Used in app/Views/configs/info_config.php.
*
* @return ResponseInterface
* @throws ReflectionException
* @noinspection PhpUnused
*/
public function postRemoveLogo(): ResponseInterface
{
$success = $this->appconfig->save(['company_logo' => '']);
return $this->response->setJSON(['success' => $success]);
}
}

View File

@@ -0,0 +1,485 @@
<?php
namespace App\Controllers;
use App\Libraries\Mailchimp_lib;
use App\Models\Customer;
use App\Models\Customer_rewards;
use App\Models\Tax_code;
use CodeIgniter\HTTP\DownloadResponse;
use CodeIgniter\HTTP\ResponseInterface;
use Config\OSPOS;
use Config\Services;
use stdClass;
class Customers extends Persons
{
private string $_list_id;
private Mailchimp_lib $mailchimp_lib;
private Customer_rewards $customer_rewards;
private Customer $customer;
private Tax_code $tax_code;
private array $config;
public function __construct()
{
parent::__construct('customers');
$this->mailchimp_lib = new Mailchimp_lib();
$this->customer_rewards = model(Customer_rewards::class);
$this->customer = model(Customer::class);
$this->tax_code = model(Tax_code::class);
$this->config = config(OSPOS::class)->settings;
$encrypter = Services::encrypter();
if (!empty($this->config['mailchimp_list_id'])) {
$this->_list_id = $encrypter->decrypt($this->config['mailchimp_list_id']);
} else {
$this->_list_id = '';
}
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_customer_manage_table_headers();
return view('people/manage', $data);
}
/**
* Gets one row for a customer manage table. This is called using AJAX to update one row.
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$person = $this->customer->get_info($row_id);
// Retrieve the total amount the customer spent so far together with min, max and average values
$stats = $this->customer->get_stats($person->person_id); // TODO: This and the next 11 lines are duplicated in search(). Extract a method.
if (empty($stats)) {
// Create object with empty properties.
$stats = new stdClass();
$stats->total = 0;
$stats->min = 0;
$stats->max = 0;
$stats->average = 0;
$stats->avg_discount = 0;
$stats->quantity = 0;
}
$data_row = get_customer_data_row($person, $stats);
return $this->response->setJSON($data_row);
}
/**
* Returns customer table data rows. This will be called with AJAX.
*
* @return void
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(customer_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$customers = $this->customer->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->customer->get_found_rows($search);
$data_rows = [];
foreach ($customers->getResult() as $person) {
// Retrieve the total amount the customer spent so far together with min, max and average values
$stats = $this->customer->get_stats($person->person_id); // TODO: duplicated... see above
if (empty($stats)) {
// Create object with empty properties.
$stats = new stdClass();
$stats->total = 0;
$stats->min = 0;
$stats->max = 0;
$stats->average = 0;
$stats->avg_discount = 0;
$stats->quantity = 0;
}
$data_rows[] = get_customer_data_row($person, $stats);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* Gives search suggestions based on what is being searched for
* @return ResponseInterface
*/
public function getSuggest(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->customer->get_search_suggestions($search);
return $this->response->setJSON($suggestions);
}
/**
* @return ResponseInterface
*/
public function suggest_search(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->customer->get_search_suggestions($search, 25, false);
return $this->response->setJSON($suggestions);
}
/**
* Loads the customer edit form
* @return string
*/
public function getView(int $customer_id = NEW_ENTRY): string
{
// Set default values
if ($customer_id == null) $customer_id = NEW_ENTRY;
$info = $this->customer->get_info($customer_id);
foreach (get_object_vars($info) as $property => $value) {
$info->$property = $value;
}
$data['person_info'] = $info;
if (empty($info->person_id) || empty($info->date) || empty($info->employee_id)) {
$data['person_info']->date = date('Y-m-d H:i:s');
$data['person_info']->employee_id = $this->employee->get_logged_in_employee_info()->person_id;
}
$employee_info = $this->employee->get_info($info->employee_id);
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
$tax_code_info = $this->tax_code->get_info($info->sales_tax_code_id);
if ($tax_code_info->tax_code != null) {
$data['sales_tax_code_label'] = $tax_code_info->tax_code . ' ' . $tax_code_info->tax_code_name;
} else {
$data['sales_tax_code_label'] = '';
}
$packages = ['' => lang('Items.none')];
foreach ($this->customer_rewards->get_all()->getResultArray() as $row) {
$packages[$row['package_id']] = $row['package_name'];
}
$data['packages'] = $packages;
$data['selected_package'] = $info->package_id;
$data['use_destination_based_tax'] = $this->config['use_destination_based_tax'];
// Retrieve the total amount the customer spent so far together with min, max and average values
$stats = $this->customer->get_stats($customer_id);
if (!empty($stats)) {
foreach (get_object_vars($stats) as $property => $value) {
$info->$property = $value;
}
$data['stats'] = $stats;
}
// Retrieve the info from Mailchimp only if there is an email address assigned
if (!empty($info->email)) {
// Collect Mailchimp customer info
if (($mailchimp_info = $this->mailchimp_lib->getMemberInfo($this->_list_id, $info->email)) !== false) {
$data['mailchimp_info'] = $mailchimp_info;
// Collect customer Mailchimp emails activities (stats)
if (($activities = $this->mailchimp_lib->getMemberActivity($this->_list_id, $info->email)) !== false) {
if (array_key_exists('activity', $activities)) {
$open = 0;
$unopen = 0;
$click = 0;
$total = 0;
$lastopen = '';
foreach ($activities['activity'] as $activity) {
if ($activity['action'] == 'sent') {
++$unopen;
} elseif ($activity['action'] == 'open') {
if (empty($lastopen)) {
$lastopen = substr($activity['timestamp'], 0, 10);
}
++$open;
} elseif ($activity['action'] == 'click') {
if (empty($lastopen)) {
$lastopen = substr($activity['timestamp'], 0, 10);
}
++$click;
}
++$total;
}
$data['mailchimp_activity']['total'] = $total;
$data['mailchimp_activity']['open'] = $open;
$data['mailchimp_activity']['unopen'] = $unopen;
$data['mailchimp_activity']['click'] = $click;
$data['mailchimp_activity']['lastopen'] = $lastopen;
}
}
}
}
return view("customers/form", $data);
}
/**
* Inserts/updates a customer
* @return ResponseInterface
*/
public function postSave(int $customer_id = NEW_ENTRY): ResponseInterface
{
$first_name = $this->request->getPost('first_name');
$last_name = $this->request->getPost('last_name');
$email = strtolower($this->request->getPost('email', FILTER_SANITIZE_EMAIL));
// Format first and last name properly
$first_name = $this->nameize($first_name);
$last_name = $this->nameize($last_name);
$person_data = [
'first_name' => $first_name,
'last_name' => $last_name,
'gender' => $this->request->getPost('gender', FILTER_SANITIZE_NUMBER_INT),
'email' => $email,
'phone_number' => $this->request->getPost('phone_number'),
'address_1' => $this->request->getPost('address_1'),
'address_2' => $this->request->getPost('address_2'),
'city' => $this->request->getPost('city'),
'state' => $this->request->getPost('state'),
'zip' => $this->request->getPost('zip'),
'country' => $this->request->getPost('country'),
'comments' => $this->request->getPost('comments')
];
$date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $this->request->getPost('date'));
$customer_data = [
'consent' => $this->request->getPost('consent') != null,
'account_number' => $this->request->getPost('account_number') == '' ? null : $this->request->getPost('account_number'),
'tax_id' => $this->request->getPost('tax_id'),
'company_name' => $this->request->getPost('company_name') == '' ? null : $this->request->getPost('company_name'),
'discount' => $this->request->getPost('discount') == '' ? 0.00 : parse_decimals($this->request->getPost('discount')),
'discount_type' => $this->request->getPost('discount_type') == null ? PERCENT : $this->request->getPost('discount_type', FILTER_SANITIZE_NUMBER_INT),
'package_id' => $this->request->getPost('package_id') == '' ? null : $this->request->getPost('package_id'),
'taxable' => $this->request->getPost('taxable') != null,
'date' => $date_formatter->format('Y-m-d H:i:s'),
'employee_id' => $this->request->getPost('employee_id', FILTER_SANITIZE_NUMBER_INT),
'sales_tax_code_id' => $this->request->getPost('sales_tax_code_id') == '' ? null : $this->request->getPost('sales_tax_code_id', FILTER_SANITIZE_NUMBER_INT)
];
if ($this->customer->save_customer($person_data, $customer_data, $customer_id)) {
// Save customer to Mailchimp selected list // TODO: addOrUpdateMember should be refactored. Potentially pass an array or object instead of 6 parameters.
$mailchimp_status = $this->request->getPost('mailchimp_status');
$this->mailchimp_lib->addOrUpdateMember(
$this->_list_id,
$email,
$first_name,
$last_name,
$mailchimp_status == null ? "" : $mailchimp_status,
['vip' => $this->request->getPost('mailchimp_vip') != null]
);
// New customer
if ($customer_id == NEW_ENTRY) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Customers.successful_adding') . ' ' . $first_name . ' ' . $last_name,
'id' => $customer_data['person_id']
]);
} else { // Existing customer
return $this->response->setJSON([
'success' => true,
'message' => lang('Customers.successful_updating') . ' ' . $first_name . ' ' . $last_name,
'id' => $customer_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Customers.error_adding_updating') . ' ' . $first_name . ' ' . $last_name,
'id' => NEW_ENTRY
]);
}
}
/**
* Verifies if an email address already exists. Used in app/Views/customers/form.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postCheckEmail(): ResponseInterface
{
$email = strtolower($this->request->getPost('email', FILTER_SANITIZE_EMAIL));
$person_id = $this->request->getPost('person_id', FILTER_SANITIZE_NUMBER_INT);
$exists = $this->customer->check_email_exists($email, $person_id);
return $this->response->setJSON(!$exists ? 'true' : 'false');
}
/**
* Verifies if an account number already exists. Used in app/Views/customers/form.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postCheckAccountNumber(): ResponseInterface
{
$exists = $this->customer->check_account_number_exists($this->request->getPost('account_number'), $this->request->getPost('person_id', FILTER_SANITIZE_NUMBER_INT));
return $this->response->setJSON(!$exists ? 'true' : 'false');
}
/**
* This deletes customers from the customers table
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$customers_to_delete = $this->request->getPost('ids');
$customers_info = $this->customer->get_multiple_info($customers_to_delete);
$count = 0;
foreach ($customers_info->getResult() as $info) {
if ($this->customer->delete($info->person_id)) {
// remove customer from Mailchimp selected list
$this->mailchimp_lib->removeMember($this->_list_id, $info->email);
$count++;
}
}
if ($count == count($customers_to_delete)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Customers.successful_deleted') . ' ' . $count . ' ' . lang('Customers.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Customers.cannot_be_deleted')]);
}
}
/**
* Customers import from csv spreadsheet
*
* @return DownloadResponse The template for Customer CSV imports is returned and download forced.
* @noinspection PhpUnused
*/
public function getCsv(): DownloadResponse
{
$name = 'importCustomers.csv';
$data = file_get_contents(WRITEPATH . "uploads/$name");
return $this->response->download($name, $data);
}
/**
* Displays the customer CSV import modal. Used in app/Views/people/manage.php
*
* @return string
* @noinspection PhpUnused
*/
public function getCsvImport(): string
{
return view('customers/form_csv_import');
}
/**
* Imports a CSV file containing customers. Used in app/Views/customers/form_csv_import.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postImportCsvFile(): ResponseInterface
{
if ($_FILES['file_path']['error'] != UPLOAD_ERR_OK) {
return $this->response->setJSON(['success' => false, 'message' => lang('Customers.csv_import_failed')]);
} else {
if (($handle = fopen($_FILES['file_path']['tmp_name'], 'r')) !== false) {
// Skip the first row as it's the table description
fgetcsv($handle);
$i = 1;
$failCodes = [];
while (($data = fgetcsv($handle)) !== false) {
$consent = $data[3] == '' ? 0 : 1;
if (sizeof($data) >= 16 && $consent) {
$email = strtolower($data[4]);
$person_data = [
'first_name' => $data[0],
'last_name' => $data[1],
'gender' => $data[2],
'email' => $email,
'phone_number' => $data[5],
'address_1' => $data[6],
'address_2' => $data[7],
'city' => $data[8],
'state' => $data[9],
'zip' => $data[10],
'country' => $data[11],
'comments' => $data[12]
];
$customer_data = [
'consent' => $consent,
'company_name' => $data[13],
'discount' => $data[15],
'discount_type' => $data[16],
'taxable' => $data[17] == '' ? 0 : 1,
'date' => date('Y-m-d H:i:s'),
'employee_id' => $this->employee->get_logged_in_employee_info()->person_id
];
$account_number = $data[14];
// Don't duplicate people with same email
$invalidated = $this->customer->check_email_exists($email);
if ($account_number != '') {
$customer_data['account_number'] = $account_number;
$invalidated &= $this->customer->check_account_number_exists($account_number);
}
} else {
$invalidated = true;
}
if ($invalidated) {
$failCodes[] = $i;
log_message('error', "Row $i was not imported: Either email or account number already exist or data was invalid.");
} elseif ($this->customer->save_customer($person_data, $customer_data)) {
// Save customer to Mailchimp selected list
$this->mailchimp_lib->addOrUpdateMember($this->_list_id, $person_data['email'], $person_data['first_name'], '', $person_data['last_name']);
} else {
$failCodes[] = $i;
}
++$i;
}
if (count($failCodes) > 0) {
$message = lang('Customers.csv_import_partially_failed', [count($failCodes), implode(', ', $failCodes)]);
return $this->response->setJSON(['success' => false, 'message' => $message]);
} else {
return $this->response->setJSON(['success' => true, 'message' => lang('Customers.csv_import_success')]);
}
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Customers.csv_import_nodata_wrongformat')]);
}
}
}
}

View File

@@ -0,0 +1,259 @@
<?php
namespace App\Controllers;
use App\Models\Module;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
/**
*
*
* @property module module
*
*/
class Employees extends Persons
{
public function __construct()
{
parent::__construct('employees');
$this->module = model('Module');
}
/**
* Returns employee table data rows. This will be called with AJAX.
*
* @return void
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(person_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$employees = $this->employee->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->employee->get_found_rows($search);
$data_rows = [];
foreach ($employees->getResult() as $person) {
$data_rows[] = get_person_data_row($person);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* AJAX called function gives search suggestions based on what is being searched for.
*
* @return ResponseInterface
*/
public function getSuggest(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->employee->get_search_suggestions($search, 25, true);
return $this->response->setJSON($suggestions);
}
/**
* @return ResponseInterface
*/
public function suggest_search(): ResponseInterface
{
$search = $this->request->getPost('term');
$suggestions = $this->employee->get_search_suggestions($search);
return $this->response->setJSON($suggestions);
}
/**
* Loads the employee edit form
* @return string
*/
public function getView(int $employee_id = NEW_ENTRY): string
{
$person_info = $this->employee->get_info($employee_id);
$current_user = $this->employee->get_logged_in_employee_info();
if ($employee_id != NEW_ENTRY && !$this->employee->can_modify_employee($person_info->person_id, $current_user->person_id)) {
header('Location: ' . base_url('no_access/employees/employees'));
exit();
}
foreach (get_object_vars($person_info) as $property => $value) {
$person_info->$property = $value;
}
$data['person_info'] = $person_info;
$data['employee_id'] = $employee_id;
$modules = [];
foreach ($this->module->get_all_modules()->getResult() as $module) {
$module->grant = $this->employee->has_grant($module->module_id, $person_info->person_id);
$module->menu_group = $this->employee->get_menu_group($module->module_id, $person_info->person_id);
$modules[] = $module;
}
$data['all_modules'] = $modules;
$permissions = [];
foreach ($this->module->get_all_subpermissions()->getResult() as $permission) { // TODO: subpermissions does not follow naming standards.
$permission->permission_id = str_replace(' ', '_', $permission->permission_id);
$permission->grant = $this->employee->has_grant($permission->permission_id, $person_info->person_id);
$permissions[] = $permission;
}
$data['all_subpermissions'] = $permissions;
return view('employees/form', $data);
}
/**
* Inserts/updates an employee
* @return ResponseInterface
*/
public function postSave(int $employee_id = NEW_ENTRY): ResponseInterface
{
$current_user = $this->employee->get_logged_in_employee_info();
if ($employee_id != NEW_ENTRY) {
$target_employee = $this->employee->get_info($employee_id);
if (!$this->employee->can_modify_employee($target_employee->person_id, $current_user->person_id)) {
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.error_updating_admin'),
'id' => NEW_ENTRY
]);
}
}
$first_name = $this->request->getPost('first_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // TODO: duplicated code
$last_name = $this->request->getPost('last_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$email = strtolower($this->request->getPost('email', FILTER_SANITIZE_EMAIL));
// format first and last name properly
$first_name = $this->nameize($first_name);
$last_name = $this->nameize($last_name);
$person_data = [
'first_name' => $first_name,
'last_name' => $last_name,
'gender' => $this->request->getPost('gender', FILTER_SANITIZE_NUMBER_INT),
'email' => $email,
'phone_number' => $this->request->getPost('phone_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'address_1' => $this->request->getPost('address_1', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'address_2' => $this->request->getPost('address_2', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'city' => $this->request->getPost('city', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'state' => $this->request->getPost('state', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'zip' => $this->request->getPost('zip', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'country' => $this->request->getPost('country', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'comments' => $this->request->getPost('comments', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
];
$grants_array = [];
$is_admin = $this->employee->is_admin($current_user->person_id);
foreach ($this->module->get_all_permissions()->getResult() as $permission) {
$grants = [];
$grant = $this->request->getPost('grant_' . $permission->permission_id) != null ? $this->request->getPost('grant_' . $permission->permission_id, FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '';
if ($grant == $permission->permission_id) {
if (!$is_admin && !$this->employee->has_grant($permission->permission_id, $current_user->person_id)) {
continue;
}
$grants['permission_id'] = $permission->permission_id;
$grants['menu_group'] = $this->request->getPost('menu_group_' . $permission->permission_id) != null ? $this->request->getPost('menu_group_' . $permission->permission_id, FILTER_SANITIZE_FULL_SPECIAL_CHARS) : '--';
$grants_array[] = $grants;
}
}
// Password has been changed OR first time password set
if (!empty($this->request->getPost('password')) && ENVIRONMENT != 'testing') {
$exploded = explode(":", $this->request->getPost('language', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
$employee_data = [
'username' => $this->request->getPost('username', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'password' => password_hash($this->request->getPost('password'), PASSWORD_DEFAULT),
'hash_version' => 2,
'language_code' => $exploded[0],
'language' => $exploded[1]
];
} else { // Password not changed
$exploded = explode(":", $this->request->getPost('language', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
$employee_data = [
'username' => $this->request->getPost('username', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'language_code' => $exploded[0],
'language' => $exploded[1]
];
}
if ($this->employee->save_employee($person_data, $employee_data, $grants_array, $employee_id)) {
// New employee
if ($employee_id == NEW_ENTRY) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Employees.successful_adding') . ' ' . $first_name . ' ' . $last_name,
'id' => $employee_data['person_id']
]);
} else { // Existing employee
$logged_in_employee_id = session()->get('person_id');
if ($employee_id == $logged_in_employee_id) {
session()->set('language_code', $employee_data['language_code']);
session()->set('language', $employee_data['language']);
}
return $this->response->setJSON([
'success' => true,
'message' => lang('Employees.successful_updating') . ' ' . $first_name . ' ' . $last_name,
'id' => $employee_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.error_adding_updating') . ' ' . $first_name . ' ' . $last_name,
'id' => NEW_ENTRY
]);
}
}
/**
* This deletes employees from the employees table
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$employees_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$current_user = $this->employee->get_logged_in_employee_info();
if (!$this->employee->is_admin($current_user->person_id)) {
foreach ($employees_to_delete as $emp_id) {
if ($this->employee->is_admin((int)$emp_id)) {
return $this->response->setJSON(['success' => false, 'message' => lang('Employees.error_deleting_admin')]);
}
}
}
if ($this->employee->delete_list($employees_to_delete)) { // TODO: this is passing a string, but delete_list expects an array
return $this->response->setJSON([
'success' => true,
'message' => lang('Employees.successful_deleted') . ' ' . count($employees_to_delete) . ' ' . lang('Employees.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Employees.cannot_be_deleted')]);
}
}
/**
* Checks an employee username against the database. Used in app\Views\employees\form.php
*
* @param $employee_id
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getCheckUsername($employee_id): ResponseInterface
{
$exists = $this->employee->username_exists($employee_id, $this->request->getGet('username'));
return $this->response->setJSON(!$exists ? 'true' : 'false');
}
}

View File

@@ -0,0 +1,193 @@
<?php
namespace App\Controllers;
use App\Models\Expense;
use App\Models\Expense_category;
use CodeIgniter\HTTP\ResponseInterface;
use Config\OSPOS;
use Config\Services;
class Expenses extends Secure_Controller
{
private Expense $expense;
private Expense_category $expense_category;
public function __construct()
{
parent::__construct('expenses');
$this->expense = model(Expense::class);
$this->expense_category = model(Expense_category::class);
}
/**
* @return void
*/
public function getIndex(): string
{
$data['table_headers'] = get_expenses_manage_table_headers();
// filters that will be loaded in the multiselect dropdown
$data['filters'] = [
'only_cash' => lang('Expenses.cash_filter'),
'only_due' => lang('Expenses.due_filter'),
'only_check' => lang('Expenses.check_filter'),
'only_credit' => lang('Expenses.credit_filter'),
'only_debit' => lang('Expenses.debit_filter'),
'is_deleted' => lang('Expenses.is_deleted')
];
return view('expenses/manage', $data);
}
/**
* @return void
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(expense_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'expense_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$filters = [
'start_date' => $this->request->getGet('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'end_date' => $this->request->getGet('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'only_cash' => false,
'only_due' => false,
'only_check' => false,
'only_credit' => false,
'only_debit' => false,
'is_deleted' => false
];
// Check if any filter is set in the multiselect dropdown
$request_filters = array_fill_keys($this->request->getGet('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? [], true);
$filters = array_merge($filters, $request_filters);
$expenses = $this->expense->search($search, $filters, $limit, $offset, $sort, $order);
$total_rows = $this->expense->get_found_rows($search, $filters);
$payments = $this->expense->get_payments_summary($search, $filters);
$payment_summary = get_expenses_manage_payments_summary($payments, $expenses);
$data_rows = [];
foreach ($expenses->getResult() as $expense) {
$data_rows[] = get_expenses_data_row($expense);
}
if ($total_rows > 0) {
$data_rows[] = get_expenses_data_last_row($expenses);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows, 'payment_summary' => $payment_summary]);
}
/**
* @param int $expense_id
* @return void
*/
public function getView(int $expense_id = NEW_ENTRY): string
{
$data = []; // TODO: Duplicated code
$data['employees'] = [];
foreach ($this->employee->get_all()->getResult() as $employee) {
foreach (get_object_vars($employee) as $property => $value) {
$employee->$property = $value;
}
$data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name;
}
$data['expenses_info'] = $this->expense->get_info($expense_id);
$expense_categories = [];
foreach ($this->expense_category->get_all(0, 0, true)->getResultArray() as $row) {
$expense_categories[$row['expense_category_id']] = $row['category_name'];
}
$data['expense_categories'] = $expense_categories;
$expense_id = $data['expenses_info']->expense_id;
if ($expense_id == NEW_ENTRY) {
$data['expenses_info']->date = date('Y-m-d H:i:s');
$data['expenses_info']->employee_id = $this->employee->get_logged_in_employee_info()->person_id;
}
$data['payments'] = [];
foreach ($this->expense->get_expense_payment($expense_id)->getResult() as $payment) {
foreach (get_object_vars($payment) as $property => $value) {
$payment->$property = $value;
}
$data['payments'][] = $payment;
}
// Don't allow gift card to be a payment option in a sale transaction edit because it's a complex change
$data['payment_options'] = $this->expense->get_payment_options();
return view("expenses/form", $data);
}
/**
* @param int $row_id
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$expense_info = $this->expense->get_info($row_id);
$data_row = get_expenses_data_row($expense_info);
return $this->response->setJSON($data_row);
}
/**
* @param int $expense_id
* @return ResponseInterface
*/
public function postSave(int $expense_id = NEW_ENTRY): ResponseInterface
{
$config = config(OSPOS::class)->settings;
$newdate = $this->request->getPost('date', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$date_formatter = date_create_from_format($config['dateformat'] . ' ' . $config['timeformat'], $newdate);
$expense_data = [
'date' => $date_formatter->format('Y-m-d H:i:s'),
'supplier_id' => $this->request->getPost('supplier_id') == '' ? null : $this->request->getPost('supplier_id', FILTER_SANITIZE_NUMBER_INT),
'supplier_tax_code' => $this->request->getPost('supplier_tax_code', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'amount' => parse_decimals($this->request->getPost('amount')),
'tax_amount' => parse_decimals($this->request->getPost('tax_amount')),
'payment_type' => $this->request->getPost('payment_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'expense_category_id' => $this->request->getPost('expense_category_id', FILTER_SANITIZE_NUMBER_INT),
'description' => $this->request->getPost('description', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'employee_id' => $this->request->getPost('employee_id', FILTER_SANITIZE_NUMBER_INT),
'deleted' => $this->request->getPost('deleted') != null
];
if ($this->expense->save_value($expense_data, $expense_id)) {
// New Expense
if ($expense_id == NEW_ENTRY) {
return $this->response->setJSON(['success' => true, 'message' => lang('Expenses.successful_adding'), 'id' => $expense_data['expense_id']]);
} else { // Existing Expense
return $this->response->setJSON(['success' => true, 'message' => lang('Expenses.successful_updating'), 'id' => $expense_id]);
}
} else { // Failure
return $this->response->setJSON(['success' => false, 'message' => lang('Expenses.error_adding_updating'), 'id' => NEW_ENTRY]);
}
}
/**
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$expenses_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($this->expense->delete_list($expenses_to_delete)) {
return $this->response->setJSON(['success' => true, 'message' => lang('Expenses.successful_deleted') . ' ' . count($expenses_to_delete) . ' ' . lang('Expenses.one_or_multiple'), 'ids' => $expenses_to_delete]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Expenses.cannot_be_deleted'), 'ids' => $expenses_to_delete]);
}
}
}

View File

@@ -0,0 +1,125 @@
<?php
namespace App\Controllers;
use App\Models\Expense_category;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
class Expenses_categories extends Secure_Controller // TODO: Is this class ever used?
{
private Expense_category $expense_category;
public function __construct()
{
parent::__construct('expenses_categories');
$this->expense_category = model(Expense_category::class);
}
/**
* @return void
*/
public function getIndex(): string
{
$data['table_headers'] = get_expense_category_manage_table_headers();
return view('expenses_categories/manage', $data);
}
/**
* Returns expense_category_manage table data rows. This will be called with AJAX.
**/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(expense_category_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'expense_category_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$expense_categories = $this->expense_category->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->expense_category->get_found_rows($search);
$data_rows = [];
foreach ($expense_categories->getResult() as $expense_category) {
$data_rows[] = get_expense_category_data_row($expense_category);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* @param int $row_id
* @return void
*/
public function getRow(int $row_id): ResponseInterface
{
$data_row = get_expense_category_data_row($this->expense_category->get_info($row_id));
return $this->response->setJSON($data_row);
}
/**
* @param int $expense_category_id
* @return void
*/
public function getView(int $expense_category_id = NEW_ENTRY): string
{
$data['category_info'] = $this->expense_category->get_info($expense_category_id);
return view("expenses_categories/form", $data);
}
/**
* @param int $expense_category_id
* @return void
*/
public function postSave(int $expense_category_id = NEW_ENTRY): ResponseInterface
{
$expense_category_data = [
'category_name' => $this->request->getPost('category_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'category_description' => $this->request->getPost('category_description', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
];
if ($this->expense_category->save_value($expense_category_data, $expense_category_id)) {
// New expense_category
if ($expense_category_id == NEW_ENTRY) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Expenses_categories.successful_adding'),
'id' => $expense_category_data['expense_category_id']
]);
} else { // Existing Expense Category
return $this->response->setJSON([
'success' => true,
'message' => lang('Expenses_categories.successful_updating'),
'id' => $expense_category_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => true,
'message' => lang('Expenses_categories.error_adding_updating') . ' ' . $expense_category_data['category_name'],
'id' => NEW_ENTRY
]);
}
}
/**
* @return void
*/
public function postDelete(): ResponseInterface
{
$expense_category_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($this->expense_category->delete_list($expense_category_to_delete)) { // TODO: Convert to ternary notation.
return $this->response->setJSON([
'success' => true,
'message' => lang('Expenses_categories.successful_deleted') . ' ' . count($expense_category_to_delete) . ' ' . lang('Expenses_categories.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Expenses_categories.cannot_be_deleted')]);
}
}
}

View File

@@ -0,0 +1,188 @@
<?php
namespace App\Controllers;
use App\Models\Giftcard;
use CodeIgniter\HTTP\ResponseInterface;
use Config\OSPOS;
use Config\Services;
class Giftcards extends Secure_Controller
{
private Giftcard $giftcard;
public function __construct()
{
parent::__construct('giftcards');
$this->giftcard = model(Giftcard::class);
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_giftcards_manage_table_headers();
return view('giftcards/manage', $data);
}
/**
* Returns Giftcards table data rows. This will be called with AJAX.
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(giftcard_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'giftcard_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$giftcards = $this->giftcard->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->giftcard->get_found_rows($search);
$data_rows = [];
foreach ($giftcards->getResult() as $giftcard) {
$data_rows[] = get_giftcard_data_row($giftcard);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* Gets search suggestions for giftcards. Used in app\Views\sales\register.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getSuggest(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->giftcard->get_search_suggestions($search, true);
return $this->response->setJSON($suggestions);
}
/**
* @return ResponseInterface
*/
public function suggest_search(): ResponseInterface
{
$search = $this->request->getPost('term');
$suggestions = $this->giftcard->get_search_suggestions($search);
return $this->response->setJSON($suggestions);
}
/**
* @param int $row_id
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$data_row = get_giftcard_data_row($this->giftcard->get_info($row_id));
return $this->response->setJSON($data_row);
}
/**
* @param int $giftcard_id
* @return string
*/
public function getView(int $giftcard_id = NEW_ENTRY): string
{
$config = config(OSPOS::class)->settings;
$giftcard_info = $this->giftcard->get_info($giftcard_id);
$data['selected_person_name'] = ($giftcard_id > 0 && isset($giftcard_info->person_id)) ? $giftcard_info->first_name . ' ' . $giftcard_info->last_name : '';
$data['selected_person_id'] = $giftcard_info->person_id;
if ($config['giftcard_number'] == 'random') {
$data['giftcard_number'] = $giftcard_id > 0 ? $giftcard_info->giftcard_number : '';
} else {
$max_number_obj = $this->giftcard->get_max_number();
$max_giftnumber = isset($max_number_obj) ? $this->giftcard->get_max_number()->giftcard_number : 0; // TODO: variable does not follow naming standard.
$data['giftcard_number'] = $giftcard_id > 0 ? $giftcard_info->giftcard_number : $max_giftnumber + 1;
}
$data['giftcard_id'] = $giftcard_id;
$data['giftcard_value'] = $giftcard_info->value;
return view("giftcards/form", $data);
}
/**
* @param int $giftcard_id
* @return ResponseInterface
*/
public function postSave(int $giftcard_id = NEW_ENTRY): ResponseInterface
{
$giftcard_number = $this->request->getPost('giftcard_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($giftcard_id == NEW_ENTRY && trim($giftcard_number) == '') {
$giftcard_number = $this->giftcard->generate_unique_giftcard_name($giftcard_number);
}
$giftcard_data = [
'record_time' => date('Y-m-d H:i:s'),
'giftcard_number' => $giftcard_number,
'value' => parse_decimals($this->request->getPost('giftcard_amount')),
'person_id' => empty($this->request->getPost('person_id')) ? null : $this->request->getPost('person_id', FILTER_SANITIZE_NUMBER_INT)
];
if ($this->giftcard->save_value($giftcard_data, $giftcard_id)) {
// New giftcard
if ($giftcard_id == NEW_ENTRY) { // TODO: Constant needed
return $this->response->setJSON([
'success' => true,
'message' => lang('Giftcards.successful_adding') . ' ' . $giftcard_data['giftcard_number'],
'id' => $giftcard_data['giftcard_id']
]);
} else { // Existing giftcard
return $this->response->setJSON([
'success' => true,
'message' => lang('Giftcards.successful_updating') . ' ' . $giftcard_data['giftcard_number'],
'id' => $giftcard_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Giftcards.error_adding_updating') . ' ' . $giftcard_data['giftcard_number'],
'id' => NEW_ENTRY
]);
}
}
/**
* Checks the giftcard number validity. Used in app\Views\giftcards\form.php
*
* @return void
* @noinspection PhpUnused
*/
public function postCheckNumberGiftcard(): ResponseInterface
{
$existing_id = $this->request->getPost('giftcard_id', FILTER_SANITIZE_NUMBER_INT);
$giftcard_number = $this->request->getPost('giftcard_number', FILTER_SANITIZE_NUMBER_INT);
$giftcard_id = $this->giftcard->get_giftcard_id($giftcard_number);
$success = ($giftcard_id == (int) $existing_id || !$giftcard_id );
return $this->response->setJSON($success ? 'true' : 'false');
}
/**
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$giftcards_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($this->giftcard->delete_list($giftcards_to_delete)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Giftcards.successful_deleted') . ' ' . count($giftcards_to_delete) . ' ' . lang('Giftcards.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Giftcards.cannot_be_deleted')]);
}
}
}

107
app/Controllers/Home.php Normal file
View File

@@ -0,0 +1,107 @@
<?php
namespace App\Controllers;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\ResponseInterface;
class Home extends Secure_Controller
{
public function __construct()
{
parent::__construct('home', null, 'home');
}
/**
* @return string
*/
public function getIndex(): string
{
$logged_in = $this->employee->is_logged_in();
return view('home/home');
}
/**
* Logs the currently logged in employee out of the system. Used in app/Views/partial/header.php
*
* @return RedirectResponse
* @noinspection PhpUnused
*/
public function getLogout(): RedirectResponse
{
$this->employee->logout();
return redirect()->to('login');
}
/**
* Load "change employee password" form
*
* @return string
* @noinspection PhpUnused
*/
public function getChangePassword(int $employee_id = -1): string // TODO: Replace -1 with a constant
{
$person_info = $this->employee->get_info($employee_id);
foreach (get_object_vars($person_info) as $property => $value) {
$person_info->$property = $value;
}
$data['person_info'] = $person_info;
return view('home/form_change_password', $data);
}
/**
* Change employee password
*
* @return ResponseInterface
*/
public function postSave(int $employee_id = -1): ResponseInterface // TODO: Replace -1 with a constant
{
if (!empty($this->request->getPost('current_password')) && $employee_id != -1) {
if ($this->employee->check_password($this->request->getPost('username', FILTER_SANITIZE_FULL_SPECIAL_CHARS), $this->request->getPost('current_password'))) {
// Validate password length BEFORE hashing
$new_password = $this->request->getPost('password');
if (strlen($new_password) < 8) {
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.password_minlength'),
'id' => -1
]);
}
$employee_data = [
'username' => $this->request->getPost('username', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'password' => password_hash($new_password, PASSWORD_DEFAULT),
'hash_version' => 2
];
if ($this->employee->change_password($employee_data, $employee_id)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Employees.successful_change_password'),
'id' => $employee_id
]);
} else { // Failure // TODO: Replace -1 with constant
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.unsuccessful_change_password'),
'id' => -1
]);
}
} else { // TODO: Replace -1 with constant
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.current_password_invalid'),
'id' => -1
]);
}
} else { // TODO: Replace -1 with constant
return $this->response->setJSON([
'success' => false,
'message' => lang('Employees.current_password_invalid'),
'id' => -1
]);
}
}
}

View File

@@ -0,0 +1,295 @@
<?php
namespace App\Controllers;
use App\Libraries\Barcode_lib;
use App\Models\Item;
use App\Models\Item_kit;
use App\Models\Item_kit_items;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
class Item_kits extends Secure_Controller
{
private Item $item;
private Item_kit $item_kit;
private Item_kit_items $item_kit_items;
public function __construct()
{
parent::__construct('item_kits');
$this->item = model(Item::class);
$this->item_kit = model(Item_kit::class);
$this->item_kit_items = model(Item_kit_items::class);
}
/**
* Add the total cost and retail price to a passed item_kit retrieving the data from each singular item part of the kit
*/
private function _add_totals_to_item_kit(object $item_kit): object // TODO: Hungarian notation
{
$kit_item_info = $this->item->get_info($item_kit->kit_item_id ?? $item_kit->item_id);
$item_kit->total_cost_price = 0;
$item_kit->total_unit_price = $kit_item_info->unit_price;
$total_quantity = 0;
foreach ($this->item_kit_items->get_info($item_kit->item_kit_id) as $item_kit_item) {
$item_info = $this->item->get_info($item_kit_item['item_id']);
foreach (get_object_vars($item_info) as $property => $value) {
$item_info->$property = $value;
}
$item_kit->total_cost_price += $item_info->cost_price * $item_kit_item['quantity'];
if ($item_kit->price_option == PRICE_OPTION_ALL || ($item_kit->price_option == PRICE_OPTION_KIT_STOCK && $item_info->stock_type == HAS_STOCK)) {
$item_kit->total_unit_price += $item_info->unit_price * $item_kit_item['quantity'];
$total_quantity += $item_kit_item['quantity'];
}
}
$discount_fraction = bcdiv($item_kit->kit_discount, '100');
$item_kit->total_unit_price = $item_kit->total_unit_price - round(($item_kit->kit_discount_type == PERCENT)
? bcmul($item_kit->total_unit_price, $discount_fraction)
: $item_kit->kit_discount, totals_decimals(), PHP_ROUND_HALF_UP);
return $item_kit;
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_item_kits_manage_table_headers();
return view('item_kits/manage', $data);
}
/**
* Returns Item_kit table data rows. This will be called with AJAX.
*/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search') ?? '';
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(item_kit_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'item_kit_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$item_kits = $this->item_kit->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->item_kit->get_found_rows($search);
$data_rows = [];
foreach ($item_kits->getResult() as $item_kit) {
// Calculate the total cost and retail price of the Kit, so it can be printed out in the manage table
$item_kit = $this->_add_totals_to_item_kit($item_kit);
$data_rows[] = get_item_kit_data_row($item_kit);
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* @return ResponseInterface
*/
public function suggest_search(): ResponseInterface
{
$search = $this->request->getPost('term');
$suggestions = $this->item_kit->get_search_suggestions($search);
return $this->response->setJSON($suggestions);
}
/**
* @param int $row_id
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
// Calculate the total cost and retail price of the Kit, so it can be added to the table refresh
$item_kit = $this->_add_totals_to_item_kit($this->item_kit->get_info($row_id));
return $this->response->setJSON(get_item_kit_data_row($item_kit));
}
/**
* @param int $item_kit_id
* @return string
*/
public function getView(int $item_kit_id = NEW_ENTRY): string
{
$info = $this->item_kit->get_info($item_kit_id);
if ($item_kit_id == NEW_ENTRY) {
$info->price_option = '0';
$info->print_option = PRINT_ALL;
$info->kit_item_id = 0;
$info->item_number = '';
$info->kit_discount = 0;
}
foreach (get_object_vars($info) as $property => $value) {
$info->$property = $value;
}
$data['item_kit_info'] = $info;
$items = [];
foreach ($this->item_kit_items->get_info($item_kit_id) as $item_kit_item) {
$item['kit_sequence'] = $item_kit_item['kit_sequence'];
$item['name'] = $this->item->get_info($item_kit_item['item_id'])->name;
$item['item_id'] = $item_kit_item['item_id'];
$item['quantity'] = $item_kit_item['quantity'];
$items[] = $item;
}
$data['item_kit_items'] = $items;
$data['selected_kit_item_id'] = $info->kit_item_id;
$data['selected_kit_item'] = ($item_kit_id > 0 && isset($info->kit_item_id)) ? $info->item_name : '';
return view("item_kits/form", $data);
}
/**
* @param int $item_kit_id
* @return ResponseInterface
*/
public function postSave(int $item_kit_id = NEW_ENTRY): ResponseInterface
{
$item_kit_data = [
'name' => $this->request->getPost('name'),
'item_kit_number' => $this->request->getPost('item_kit_number'),
'item_id' => $this->request->getPost('kit_item_id'),
'kit_discount' => parse_decimals($this->request->getPost('kit_discount')),
'kit_discount_type' => $this->request->getPost('kit_discount_type') === null ? PERCENT : intval($this->request->getPost('kit_discount_type')),
'price_option' => $this->request->getPost('price_option') === null ? PRICE_ALL : intval($this->request->getPost('price_option')),
'print_option' => $this->request->getPost('print_option') === null ? PRINT_ALL : intval($this->request->getPost('print_option')),
'description' => $this->request->getPost('description')
];
if ($this->item_kit->save_value($item_kit_data, $item_kit_id)) {
$new_item = false;
// New item kit
if ($item_kit_id == NEW_ENTRY) {
$item_kit_id = $item_kit_data['item_kit_id'];
$new_item = true;
}
$item_kit_items_array = $this->request->getPost('item_kit_qty') === null ? null : $this->request->getPost('item_kit_qty');
if ($item_kit_items_array != null) {
$item_kit_items = [];
foreach ($item_kit_items_array as $item_id => $item_kit_qty) {
$item_kit_items[] = [
'item_id' => $item_id,
'quantity' => $item_kit_qty === null ? 0 : parse_quantity($item_kit_qty),
'kit_sequence' => $this->request->getPost("item_kit_seq[$item_id]") === null ? 0 : intval($this->request->getPost("item_kit_seq[$item_id]"))
];
}
}
if (!empty($item_kit_items)) {
$success = $this->item_kit_items->save_value($item_kit_items, $item_kit_id);
} else {
$success = true;
}
if ($new_item) {
return $this->response->setJSON([
'success' => $success,
'message' => lang('Item_kits.successful_adding') . ' ' . $item_kit_data['name'],
'id' => $item_kit_id
]);
} else {
return $this->response->setJSON([
'success' => $success,
'message' => lang('Item_kits.successful_updating') . ' ' . $item_kit_data['name'],
'id' => $item_kit_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Item_kits.error_adding_updating') . ' ' . $item_kit_data['name'],
'id' => NEW_ENTRY
]);
}
}
/**
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$item_kits_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($this->item_kit->delete_list($item_kits_to_delete)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Item_kits.successful_deleted') . ' ' . count($item_kits_to_delete) . ' ' . lang('Item_kits.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Item_kits.cannot_be_deleted')]);
}
}
/**
* Checks the validity of the item kit number. Used in app/Views/item_kits/form.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postCheckItemNumber(): ResponseInterface
{
$exists = $this->item_kit->item_number_exists($this->request->getPost('item_kit_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS), $this->request->getPost('item_kit_id', FILTER_SANITIZE_NUMBER_INT));
return $this->response->setJSON(!$exists ? 'true' : 'false');
}
/**
* AJAX called function that generates barcodes for selected item_kits.
*
* @param string $item_kit_ids Colon separated list of item_kit_id values to generate barcodes for.
* @return string
* @noinspection PhpUnused
*/
public function getGenerateBarcodes(string $item_kit_ids): string
{
$barcode_lib = new Barcode_lib();
$result = [];
$item_kit_ids = explode(':', $item_kit_ids);
foreach ($item_kit_ids as $item_kid_id) {
// Calculate the total cost and retail price of the Kit, so it can be added to the barcode text at the bottom
$item_kit = $this->_add_totals_to_item_kit($this->item_kit->get_info($item_kid_id));
$item_kid_id = 'KIT ' . urldecode($item_kid_id);
$result[] = [
'name' => $item_kit->name,
'item_id' => $item_kid_id,
'item_number' => $item_kid_id,
'cost_price' => $item_kit->total_cost_price,
'unit_price' => $item_kit->total_unit_price
];
}
$data['items'] = $result;
$barcode_config = $barcode_lib->get_barcode_config();
// In case the selected barcode type is not Code39 or Code128 we set by default Code128
// The rationale for this is that EAN codes cannot have strings as seed, so 'KIT ' is not allowed
if ($barcode_config['barcode_type'] != 'C39' && $barcode_config['barcode_type'] != 'C128') {
$barcode_config['barcode_type'] = 'C128';
}
$data['barcode_config'] = $barcode_config;
// Display barcodes
return view("barcodes/barcode_sheet", $data);
}
}

1334
app/Controllers/Items.php Normal file
View File

File diff suppressed because it is too large Load Diff

74
app/Controllers/Login.php Normal file
View File

@@ -0,0 +1,74 @@
<?php
namespace App\Controllers;
use App\Libraries\MY_Migration;
use App\Models\Employee;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\Model;
use Config\OSPOS;
use Config\Services;
/**
* @property employee employee
*/
class Login extends BaseController
{
public Model $employee;
/**
* @return RedirectResponse|string
*/
public function index(): string|RedirectResponse
{
$this->employee = model(Employee::class);
if (!$this->employee->is_logged_in()) {
$migration = new MY_Migration(config('Migrations'));
$config = config(OSPOS::class)->settings;
$gcaptcha_enabled = array_key_exists('gcaptcha_enable', $config)
? $config['gcaptcha_enable']
: false;
$migration->migrate_to_ci4();
$validation = Services::validation();
$data = [
'has_errors' => false,
'is_latest' => $migration->is_latest(),
'latest_version' => $migration->get_latest_migration(),
'gcaptcha_enabled' => $gcaptcha_enabled,
'config' => $config,
'validation' => $validation
];
if ($this->request->getMethod() !== 'POST') {
return view('login', $data);
}
$rules = ['username' => 'required|login_check[data]'];
$messages = [
'username' => [
'required' => lang('Login.required_username'),
'login_check' => lang('Login.invalid_username_and_password'),
]
];
if (!$this->validate($rules, $messages)) {
$data['has_errors'] = !empty($validation->getErrors());
return view('login', $data);
}
if (!$data['is_latest']) {
set_time_limit(3600);
$migration->setNamespace('App')->latest();
return redirect()->to('login');
}
}
return redirect()->to('home');
}
}

View File

@@ -0,0 +1,91 @@
<?php
namespace App\Controllers;
use App\Libraries\Sms_lib;
use App\Models\Person;
use CodeIgniter\HTTP\ResponseInterface;
class Messages extends Secure_Controller
{
private Sms_lib $sms_lib;
public function __construct()
{
parent::__construct('messages');
$this->sms_lib = new Sms_lib();
}
/**
* @return string
*/
public function getIndex(): string
{
return view('messages/sms');
}
/**
* @param int $person_id
* @return string
*/
public function getView(int $person_id = NEW_ENTRY): string
{
$person = model(Person::class);
$info = $person->get_info($person_id);
foreach (get_object_vars($info) as $property => $value) {
$info->$property = $value;
}
$data['person_info'] = $info;
return view('messages/form_sms', $data);
}
/**
* @return ResponseInterface
*/
public function send(): ResponseInterface
{
$phone = $this->request->getPost('phone', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$message = $this->request->getPost('message', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$response = $this->sms_lib->sendSMS($phone, $message);
if ($response) {
return $this->response->setJSON(['success' => true, 'message' => lang('Messages.successfully_sent') . ' ' . esc($phone)]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Messages.unsuccessfully_sent') . ' ' . esc($phone)]);
}
}
/**
* Sends an SMS message to a user. Used in app/Views/messages/form_sms.php.
*
* @param int $person_id
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function send_form(int $person_id = NEW_ENTRY): ResponseInterface
{
$phone = $this->request->getPost('phone', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$message = $this->request->getPost('message', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$response = $this->sms_lib->sendSMS($phone, $message);
if ($response) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Messages.successfully_sent') . ' ' . esc($phone),
'person_id' => $person_id
]);
} else {
return $this->response->setJSON([
'success' => false,
'message' => lang('Messages.unsuccessfully_sent') . ' ' . esc($phone),
'person_id' => NEW_ENTRY
]);
}
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Controllers;
use App\Models\Module;
use CodeIgniter\HTTP\ResponseInterface;
/**
* Part of the grants mechanism to restrict access to modules that the user doesn't have permission for.
* Instantiated in the views.
*
* @property module module
*/
class No_access extends BaseController
{
private Module $module;
public function __construct()
{
$this->module = model(Module::class);
}
/**
* @param string $module_id
* @param string $permission_id
* @return string
*/
public function getIndex(string $module_id = '', string $permission_id = ''): string
{
$data['module_name'] = $this->module->get_module_name($module_id);
$data['permission_id'] = $permission_id;
return view('no_access', $data);
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Controllers;
use App\Models\Employee;
use CodeIgniter\HTTP\ResponseInterface;
/**
* @property Employee employee
*/
class Office extends Secure_Controller
{
protected Employee $employee;
public function __construct()
{
parent::__construct('office', null, 'office');
}
/**
* @return string
*/
public function getIndex(): string
{
return view('home/office');
}
/**
* @return void
*/
public function logout(): void
{
$this->employee = model(Employee::class);
$this->employee->logout();
}
}

View File

@@ -0,0 +1,76 @@
<?php
namespace App\Controllers;
use App\Models\Person;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
use function Tamtamchik\NameCase\str_name_case;
abstract class Persons extends Secure_Controller
{
protected Person $person;
/**
* @param string|null $module_id
*/
public function __construct(?string $module_id = null)
{
parent::__construct($module_id);
$this->person = model(Person::class);
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_people_manage_table_headers();
return view('people/manage', $data);
}
/**
* Gives search suggestions based on what is being searched for
* @return ResponseInterface
*/
public function getSuggest(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->person->get_search_suggestions($search);
return $this->response->setJSON($suggestions);
}
/**
* Gets one row for a person manage table. This is called using AJAX to update one row.
* @return ResponseInterface
*/
public function getRow(int $row_id): ResponseInterface
{
$data_row = get_person_data_row($this->person->get_info($row_id));
return $this->response->setJSON($data_row);
}
/**
* Capitalize segments of a name, and put the rest into lower case.
* You can pass the characters you want to use as delimiters as exceptions.
* The function supports UTF-8 strings
*
* Example:
* i.e. <?php echo nameize("john o'grady-smith"); ?>
*
* returns John O'Grady-Smith
*/
protected function nameize(string $input): string
{
$adjusted_name = str_name_case($input);
// TODO: Use preg_replace to match HTML entities and convert them to lowercase. This is a workaround for https://github.com/tamtamchik/namecase/issues/20
return preg_replace_callback('/&[a-zA-Z0-9#]+;/', function ($matches) {
return strtolower($matches[0]);
}, $adjusted_name);
}
}

View File

@@ -0,0 +1,530 @@
<?php
namespace App\Controllers;
use App\Libraries\Receiving_lib;
use App\Libraries\Token_lib;
use App\Libraries\Barcode_lib;
use App\Models\Inventory;
use App\Models\Item;
use App\Models\Item_kit;
use App\Models\Receiving;
use App\Models\Stock_location;
use App\Models\Supplier;
use CodeIgniter\HTTP\ResponseInterface;
use Config\OSPOS;
use Config\Services;
use ReflectionException;
class Receivings extends Secure_Controller
{
private Receiving_lib $receiving_lib;
private Token_lib $token_lib;
private Barcode_lib $barcode_lib;
private Inventory $inventory;
private Item $item;
private Item_kit $item_kit;
private Receiving $receiving;
private Stock_location $stock_location;
private Supplier $supplier;
private array $config;
public function __construct()
{
parent::__construct('receivings');
$this->receiving_lib = new Receiving_lib();
$this->token_lib = new Token_lib();
$this->barcode_lib = new Barcode_lib();
$this->inventory = model(Inventory::class);
$this->item_kit = model(Item_kit::class);
$this->item = model(Item::class);
$this->receiving = model(Receiving::class);
$this->stock_location = model(Stock_location::class);
$this->supplier = model(Supplier::class);
$this->config = config(OSPOS::class)->settings;
}
/**
* @return string
*/
public function getIndex(): string
{
return $this->_reload();
}
/**
* Returns search suggestions for an item. Used in app/Views/sales/register.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getItemSearch(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->item->get_search_suggestions($search, ['search_custom' => false, 'is_deleted' => false], true);
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($search));
return $this->response->setJSON($suggestions);
}
/**
* Gets search suggestions for a stock item. Used in app/Views/receivings/receiving.php
*
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getStockItemSearch(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->item->get_stock_search_suggestions($search, ['search_custom' => false, 'is_deleted' => false], true);
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($search));
return $this->response->setJSON($suggestions);
}
/**
* Set supplier if it exists in the database. Used in app/Views/receivings/receiving.php
*
* @return string
* @noinspection PhpUnused
*/
public function postSelectSupplier(): string
{
$supplier_id = $this->request->getPost('supplier', FILTER_SANITIZE_NUMBER_INT);
if ($this->supplier->exists($supplier_id)) {
$this->receiving_lib->set_supplier($supplier_id);
}
return $this->_reload(); // TODO: Hungarian notation
}
/**
* Change receiving mode for current receiving. Used in app/Views/receivings/receiving.php
*
* @return string
* @noinspection PhpUnused
*/
public function postChangeMode(): string
{
$stock_destination = $this->request->getPost('stock_destination', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$stock_source = $this->request->getPost('stock_source', FILTER_SANITIZE_NUMBER_INT);
if ((!$stock_source || $stock_source == $this->receiving_lib->get_stock_source()) &&
(!$stock_destination || $stock_destination == $this->receiving_lib->get_stock_destination())
) {
$this->receiving_lib->clear_reference();
$mode = $this->request->getPost('mode', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$this->receiving_lib->set_mode($mode);
} elseif ($this->stock_location->is_allowed_location($stock_source, 'receivings')) {
$this->receiving_lib->set_stock_source($stock_source);
$this->receiving_lib->set_stock_destination($stock_destination);
}
return $this->_reload(); // TODO: Hungarian notation
}
/**
* Sets receiving comment. Used in app/Views/receivings/receiving.php
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSetComment(): ResponseInterface
{
$this->receiving_lib->set_comment($this->request->getPost('comment', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
return $this->response->setJSON(['success' => true]);
}
/**
* Sets the print after sale flag for the receiving. Used in app/Views/receivings/receiving.php
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSetPrintAfterSale(): ResponseInterface
{
$this->receiving_lib->set_print_after_sale($this->request->getPost('recv_print_after_sale') != null);
return $this->response->setJSON(['success' => true]);
}
/**
* Sets the reference number for the receiving. Used in app/Views/receivings/receiving.php
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function postSetReference(): ResponseInterface
{
$this->receiving_lib->set_reference($this->request->getPost('recv_reference', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
return $this->response->setJSON(['success' => true]);
}
/**
* Add an item to the receiving. Used in app/Views/receivings/receiving.php
*
* @return string
* @noinspection PhpUnused
*/
public function postAdd(): string
{
$data = [];
$mode = $this->receiving_lib->get_mode();
$item_id_or_number_or_item_kit_or_receipt = $this->request->getPost('item', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$this->token_lib->parse_barcode($quantity, $price, $item_id_or_number_or_item_kit_or_receipt);
$quantity = ($mode == 'receive' || $mode == 'requisition') ? $quantity : -$quantity;
$item_location = $this->receiving_lib->get_stock_source();
$discount = $this->config['default_receivings_discount'];
$discount_type = $this->config['default_receivings_discount_type'];
if ($mode == 'return' && $this->receiving->is_valid_receipt($item_id_or_number_or_item_kit_or_receipt)) {
$this->receiving_lib->return_entire_receiving($item_id_or_number_or_item_kit_or_receipt);
} elseif ($this->item_kit->is_valid_item_kit($item_id_or_number_or_item_kit_or_receipt)) {
$this->receiving_lib->add_item_kit($item_id_or_number_or_item_kit_or_receipt, $item_location, $discount, $discount_type);
} elseif (!$this->receiving_lib->add_item($item_id_or_number_or_item_kit_or_receipt, $quantity, $item_location, $discount, $discount_type)) {
$data['error'] = lang('Receivings.unable_to_add_item');
}
return $this->_reload($data); // TODO: Hungarian notation
}
/**
* Edit line item in current receiving. Used in app/Views/receivings/receiving.php
*
* @param string|int|null $item_id
* @return string
* @noinspection PhpUnused
*/
public function postEditItem($item_id): string
{
$data = [];
$validation_rule = [
'price' => 'trim|required|decimal_locale',
'quantity' => 'trim|required|decimal_locale',
'discount' => 'trim|permit_empty|decimal_locale',
];
$price = parse_decimals($this->request->getPost('price'));
$quantity = parse_quantity($this->request->getPost('quantity'));
$raw_receiving_quantity = parse_quantity($this->request->getPost('receiving_quantity'));
$description = $this->request->getPost('description', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // TODO: Duplicated code
$serialnumber = $this->request->getPost('serialnumber', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? '';
$discount_type = $this->request->getPost('discount_type', FILTER_SANITIZE_NUMBER_INT);
$discount = $discount_type
? parse_quantity(filter_var($this->request->getPost('discount'), FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION))
: parse_decimals(filter_var($this->request->getPost('discount'), FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION));
$receiving_quantity = filter_var($raw_receiving_quantity, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
if ($this->validate($validation_rule)) {
$this->receiving_lib->edit_item($item_id, $description, $serialnumber, $quantity, $discount, $discount_type, $price, $receiving_quantity);
} else {
$data['error'] = lang('Receivings.error_editing_item');
}
return $this->_reload($data); // TODO: Hungarian notation
}
/**
* Edit a receiving. Used in app/Controllers/Receivings.php
* @param $receiving_id
* @return string
* @noinspection PhpUnused
*/
public function getEdit($receiving_id): string
{
$data = [];
$data['suppliers'] = ['' => 'No Supplier'];
foreach ($this->supplier->get_all()->getResult() as $supplier) {
$data['suppliers'][$supplier->person_id] = $supplier->first_name . ' ' . $supplier->last_name;
}
$data['employees'] = [];
foreach ($this->employee->get_all()->getResult() as $employee) {
$data['employees'][$employee->person_id] = $employee->first_name . ' ' . $employee->last_name;
}
$receiving_info = $this->receiving->get_info($receiving_id)->getRowArray();
$data['selected_supplier_name'] = !empty($receiving_info['supplier_id']) ? $receiving_info['company_name'] : '';
$data['selected_supplier_id'] = $receiving_info['supplier_id'];
$data['receiving_info'] = $receiving_info;
return view('receivings/form', $data);
}
/**
* Deletes an item from the current receiving. Used in app/Views/receivings/receiving.php
*
* @param $item_number
* @return string
* @noinspection PhpUnused
*/
public function getDeleteItem($item_number): string
{
$this->receiving_lib->delete_item($item_number);
return $this->_reload(); // TODO: Hungarian notation
}
/**
* @throws ReflectionException
* @return ResponseInterface
*/
public function postDelete(int $receiving_id = -1, bool $update_inventory = true): ResponseInterface
{
$employee_id = $this->employee->get_logged_in_employee_info()->person_id;
$receiving_ids = $receiving_id == -1 ? $this->request->getPost('ids', FILTER_SANITIZE_NUMBER_INT) : [$receiving_id]; // TODO: Replace -1 with constant
if ($this->receiving->delete_list($receiving_ids, $employee_id, $update_inventory)) { // TODO: Likely need to surround this block of code in a try-catch to catch the ReflectionException
return $this->response->setJSON([
'success' => true,
'message' => lang('Receivings.successfully_deleted') . ' ' . count($receiving_ids) . ' ' . lang('Receivings.one_or_multiple'),
'ids' => $receiving_ids
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Receivings.cannot_be_deleted')]);
}
}
/**
* Removes a supplier from a receiving. Used in app/Views/receivings/receiving.php
*
* @return string
* @noinspection PhpUnused
*/
public function getRemoveSupplier(): string
{
$this->receiving_lib->clear_reference();
$this->receiving_lib->remove_supplier();
return $this->_reload(); // TODO: Hungarian notation
}
/**
* Complete and finalize receiving. Used in app/Views/receivings/receiving.php
*
* @return string
* @throws ReflectionException
* @noinspection PhpUnused
*/
public function postComplete(): string
{
$data = [];
$data['cart'] = $this->receiving_lib->get_cart();
$data['total'] = $this->receiving_lib->get_total();
$data['transaction_time'] = to_datetime(time());
$data['mode'] = $this->receiving_lib->get_mode();
$data['comment'] = $this->receiving_lib->get_comment();
$data['reference'] = $this->receiving_lib->get_reference();
$data['payment_type'] = $this->request->getPost('payment_type', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$data['show_stock_locations'] = $this->stock_location->show_locations('receivings');
$data['stock_location'] = $this->receiving_lib->get_stock_source();
if ($this->request->getPost('amount_tendered') != null) {
$data['amount_tendered'] = parse_decimals($this->request->getPost('amount_tendered'));
$data['amount_change'] = to_currency($data['amount_tendered'] - $data['total']);
}
$employee_id = $this->employee->get_logged_in_employee_info()->person_id;
$employee_info = $this->employee->get_info($employee_id);
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
$supplier_id = $this->receiving_lib->get_supplier();
if ($supplier_id != -1) {
$supplier_info = $this->supplier->get_info($supplier_id);
$data['supplier'] = $supplier_info->company_name; // TODO: duplicated code
$data['first_name'] = $supplier_info->first_name;
$data['last_name'] = $supplier_info->last_name;
$data['supplier_email'] = $supplier_info->email;
$data['supplier_address'] = $supplier_info->address_1;
if (!empty($supplier_info->zip) or !empty($supplier_info->city)) {
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
} else {
$data['supplier_location'] = '';
}
}
// SAVE receiving to database
$data['receiving_id'] = 'RECV ' . $this->receiving->save_value($data['cart'], $supplier_id, $employee_id, $data['comment'], $data['reference'], $data['payment_type'], $data['stock_location']);
if ($data['receiving_id'] == 'RECV -1') {
$data['error_message'] = lang('Receivings.transaction_failed');
} else {
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
}
$data['print_after_sale'] = $this->receiving_lib->is_print_after_sale();
$view = view("receivings/receipt", $data);
$this->receiving_lib->clear_all();
return $view;
}
/**
* Complete a receiving requisition. Used in app/Views/receivings/receiving.php.
*
* @return string
* @throws ReflectionException
* @noinspection PhpUnused
*/
public function postRequisitionComplete(): string
{
if ($this->receiving_lib->get_stock_source() != $this->receiving_lib->get_stock_destination()) {
foreach ($this->receiving_lib->get_cart() as $item) {
$this->receiving_lib->delete_item($item['line']);
$this->receiving_lib->add_item($item['item_id'], $item['quantity'], $this->receiving_lib->get_stock_destination(), $item['discount_type']);
$this->receiving_lib->add_item($item['item_id'], -$item['quantity'], $this->receiving_lib->get_stock_source(), $item['discount_type']);
}
return $this->postComplete();
} else {
$data['error'] = lang('Receivings.error_requisition');
return $this->_reload($data); // TODO: Hungarian notation
}
}
/**
* Gets the receipt for a receiving. Used in app/Views/receivings/form.php
*
* @param $receiving_id
* @return string
* @noinspection PhpUnused
*/
public function getReceipt($receiving_id): string
{
$receiving_info = $this->receiving->get_info($receiving_id)->getRowArray();
$this->receiving_lib->copy_entire_receiving($receiving_id);
$data['cart'] = $this->receiving_lib->get_cart();
$data['total'] = $this->receiving_lib->get_total();
$data['mode'] = $this->receiving_lib->get_mode();
$data['transaction_time'] = to_datetime(strtotime($receiving_info['receiving_time']));
$data['show_stock_locations'] = $this->stock_location->show_locations('receivings');
$data['payment_type'] = $receiving_info['payment_type'];
$data['reference'] = $this->receiving_lib->get_reference();
$data['receiving_id'] = 'RECV ' . $receiving_id;
$data['barcode'] = $this->barcode_lib->generate_receipt_barcode($data['receiving_id']);
$employee_info = $this->employee->get_info($receiving_info['employee_id']);
$data['employee'] = $employee_info->first_name . ' ' . $employee_info->last_name;
$supplier_id = $this->receiving_lib->get_supplier(); // TODO: Duplicated code
if ($supplier_id != -1) {
$supplier_info = $this->supplier->get_info($supplier_id);
$data['supplier'] = $supplier_info->company_name;
$data['first_name'] = $supplier_info->first_name;
$data['last_name'] = $supplier_info->last_name;
$data['supplier_email'] = $supplier_info->email;
$data['supplier_address'] = $supplier_info->address_1;
if (!empty($supplier_info->zip) or !empty($supplier_info->city)) {
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
} else {
$data['supplier_location'] = '';
}
}
$data['print_after_sale'] = false;
$view = view("receivings/receipt", $data);
$this->receiving_lib->clear_all();
return $view;
}
/**
* @param array $data
* @return string
*/
private function _reload(array $data = []): string // TODO: Hungarian notation
{
$data['cart'] = $this->receiving_lib->get_cart();
$data['modes'] = ['receive' => lang('Receivings.receiving'), 'return' => lang('Receivings.return')];
$data['mode'] = $this->receiving_lib->get_mode();
$data['stock_locations'] = $this->stock_location->get_allowed_locations('receivings');
$data['show_stock_locations'] = count($data['stock_locations']) > 1;
if ($data['show_stock_locations']) {
$data['modes']['requisition'] = lang('Receivings.requisition');
$data['stock_source'] = $this->receiving_lib->get_stock_source();
$data['stock_destination'] = $this->receiving_lib->get_stock_destination();
}
$data['total'] = $this->receiving_lib->get_total();
$data['items_module_allowed'] = $this->employee->has_grant('items', $this->employee->get_logged_in_employee_info()->person_id);
$data['comment'] = $this->receiving_lib->get_comment();
$data['reference'] = $this->receiving_lib->get_reference();
$data['payment_options'] = $this->receiving->get_payment_options();
$supplier_id = $this->receiving_lib->get_supplier();
if ($supplier_id != -1) { // TODO: Duplicated Code... replace -1 with a constant
$supplier_info = $this->supplier->get_info($supplier_id);
$data['supplier'] = $supplier_info->company_name;
$data['first_name'] = $supplier_info->first_name;
$data['last_name'] = $supplier_info->last_name;
$data['supplier_email'] = $supplier_info->email;
$data['supplier_address'] = $supplier_info->address_1;
if (!empty($supplier_info->zip) or !empty($supplier_info->city)) {
$data['supplier_location'] = $supplier_info->zip . ' ' . $supplier_info->city;
} else {
$data['supplier_location'] = '';
}
}
$data['print_after_sale'] = $this->receiving_lib->is_print_after_sale();
return view("receivings/receiving", $data);
}
/**
* @return ResponseInterface
* @throws ReflectionException
*/
public function postSave(int $receiving_id = -1): ResponseInterface // TODO: Replace -1 with a constant
{
$newdate = $this->request->getPost('date', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // TODO: newdate does not follow naming conventions
$date_formatter = date_create_from_format($this->config['dateformat'] . ' ' . $this->config['timeformat'], $newdate);
$receiving_time = $date_formatter->format('Y-m-d H:i:s');
$receiving_data = [
'receiving_time' => $receiving_time,
'supplier_id' => $this->request->getPost('supplier_id') ? $this->request->getPost('supplier_id', FILTER_SANITIZE_NUMBER_INT) : null,
'employee_id' => $this->request->getPost('employee_id', FILTER_SANITIZE_NUMBER_INT),
'comment' => $this->request->getPost('comment', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'reference' => $this->request->getPost('reference') != '' ? $this->request->getPost('reference', FILTER_SANITIZE_FULL_SPECIAL_CHARS) : null
];
$this->inventory->update('RECV ' . $receiving_id, ['trans_date' => $receiving_time]);
if ($this->receiving->update($receiving_id, $receiving_data)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Receivings.successfully_updated'),
'id' => $receiving_id
]);
} else {
return $this->response->setJSON([
'success' => false,
'message' => lang('Receivings.unsuccessfully_updated'),
'id' => $receiving_id
]);
}
}
/**
* Cancel an in-process receiving. Used in app/Views/receivings/receiving.php
*
* @return string
* @noinspection PhpUnused
*/
public function postCancelReceiving(): string
{
$this->receiving_lib->clear_all();
return $this->_reload(); // TODO: Hungarian Notation
}
}

2128
app/Controllers/Reports.php Normal file
View File

File diff suppressed because it is too large Load Diff

1712
app/Controllers/Sales.php Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,161 @@
<?php
namespace App\Controllers;
use App\Models\Employee;
use App\Models\Module;
use CodeIgniter\HTTP\ResponseInterface;
use CodeIgniter\Model;
use CodeIgniter\Session\Session;
use Config\OSPOS;
use Config\Services;
/**
* Controllers that are considered secure extend Secure_Controller, optionally a $module_id can
* be set to also check if a user can access a particular module in the system.
*
* @property employee employee
* @property module module
* @property array global_view_data
* @property session session
*
*/
class Secure_Controller extends BaseController
{
public array $global_view_data;
protected Employee $employee;
protected Module $module;
protected Session $session;
/**
* @param string $module_id
* @param string|null $submodule_id
* @param string|null $menu_group
*/
public function __construct(string $module_id = '', ?string $submodule_id = null, ?string $menu_group = null)
{
$this->employee = model(Employee::class);
$this->module = model(Module::class);
$config = config(OSPOS::class)->settings;
$validation = Services::validation();
if (!$this->employee->is_logged_in()) {
header("Location:" . base_url('login'));
exit();
}
$logged_in_employee_info = $this->employee->get_logged_in_employee_info();
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))
) {
header("Location:" . base_url("no_access/$module_id/$submodule_id"));
exit();
}
// Load up global global_view_data visible to all the loaded views
$this->session = session();
if ($menu_group == null) {
$menu_group = $this->session->get('menu_group');
} else {
$this->session->set('menu_group', $menu_group);
}
$allowed_modules = $menu_group == 'home'
? $this->module->get_allowed_home_modules($logged_in_employee_info->person_id)
: $this->module->get_allowed_office_modules($logged_in_employee_info->person_id);
$this->global_view_data = [];
foreach ($allowed_modules->getResult() as $module) {
$this->global_view_data['allowed_modules'][] = $module;
}
$this->global_view_data += [
'user_info' => $logged_in_employee_info,
'controller_name' => $module_id,
'config' => $config
];
view('viewData', $this->global_view_data);
}
public function sanitizeSortColumn($headers, $field, $default): string
{
return $field != null && in_array($field, array_keys(array_merge(...$headers))) ? $field : $default;
}
/**
* AJAX function used to confirm whether values sent in the request are numeric
* @return ResponseInterface
* @noinspection PhpUnused
*/
public function getCheckNumeric(): ResponseInterface
{
foreach ($this->request->getGet() as $value) {
if (parse_decimals($value) === false) {
return $this->response->setJSON('false');
}
}
return $this->response->setJSON('true');
}
/**
* @param $key
* @return mixed|void
*/
public function getConfig($key)
{
if (isset($config[$key])) {
return $config[$key];
}
}
/**
* @return false
*/
public function getIndex()
{
return false;
}
/**
* @return false
*/
public function getSearch()
{
return false;
}
/**
* @return false
*/
public function suggest_search()
{
return false;
}
/**
* @param int $data_item_id
* @return false
*/
public function getView(int $data_item_id = -1)
{
return false;
}
/**
* @param int $data_item_id
* @return false
*/
public function postSave(int $data_item_id = -1)
{
return false;
}
/**
* @return false
*/
public function postDelete()
{
return false;
}
}

View File

@@ -0,0 +1,192 @@
<?php
namespace App\Controllers;
use App\Models\Supplier;
use CodeIgniter\HTTP\ResponseInterface;
use Config\Services;
class Suppliers extends Persons
{
private Supplier $supplier;
public function __construct()
{
parent::__construct('suppliers');
$this->supplier = model(Supplier::class);
}
/**
* @return string
*/
public function getIndex(): string
{
$data['table_headers'] = get_suppliers_manage_table_headers();
return view('people/manage', $data);
}
/**
* Gets one row for a supplier manage table. This is called using AJAX to update one row.
* @param $row_id
* @return ResponseInterface
*/
public function getRow($row_id): ResponseInterface
{
$data_row = get_supplier_data_row($this->supplier->get_info($row_id));
$data_row['category'] = $this->supplier->get_category_name($data_row['category']);
return $this->response->setJSON($data_row);
}
/**
* Returns Supplier table data rows. This will be called with AJAX.
* @return void
**/
public function getSearch(): ResponseInterface
{
$search = $this->request->getGet('search');
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
$sort = $this->sanitizeSortColumn(supplier_headers(), $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 'people.person_id');
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$suppliers = $this->supplier->search($search, $limit, $offset, $sort, $order);
$total_rows = $this->supplier->get_found_rows($search);
$data_rows = [];
foreach ($suppliers->getResult() as $supplier) {
$row = get_supplier_data_row($supplier);
$row['category'] = $this->supplier->get_category_name($row['category']);
$data_rows[] = $row;
}
return $this->response->setJSON(['total' => $total_rows, 'rows' => $data_rows]);
}
/**
* Gives search suggestions based on what is being searched for
* @return ResponseInterface
**/
public function getSuggest(): ResponseInterface
{
$search = $this->request->getGet('term');
$suggestions = $this->supplier->get_search_suggestions($search, true);
return $this->response->setJSON($suggestions);
}
/**
* @return ResponseInterface
*/
public function suggest_search(): ResponseInterface
{
$search = $this->request->getPost('term');
$suggestions = $this->supplier->get_search_suggestions($search, false);
return $this->response->setJSON($suggestions);
}
/**
* Loads the supplier edit form
*
* @param int $supplier_id
* @return string
*/
public function getView(int $supplier_id = NEW_ENTRY): string
{
$info = $this->supplier->get_info($supplier_id);
foreach (get_object_vars($info) as $property => $value) {
$info->$property = $value;
}
$data['person_info'] = $info;
$data['categories'] = $this->supplier->get_categories();
return view("suppliers/form", $data);
}
/**
* Inserts/updates a supplier
*
* @param int $supplier_id
* @return ResponseInterface
*/
public function postSave(int $supplier_id = NEW_ENTRY): ResponseInterface
{
$first_name = $this->request->getPost('first_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS); // TODO: Duplicate code
$last_name = $this->request->getPost('last_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
$email = strtolower($this->request->getPost('email', FILTER_SANITIZE_EMAIL));
// Format first and last name properly
$first_name = $this->nameize($first_name);
$last_name = $this->nameize($last_name);
$person_data = [
'first_name' => $first_name,
'last_name' => $last_name,
'gender' => $this->request->getPost('gender'),
'email' => $email,
'phone_number' => $this->request->getPost('phone_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'address_1' => $this->request->getPost('address_1', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'address_2' => $this->request->getPost('address_2', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'city' => $this->request->getPost('city', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'state' => $this->request->getPost('state', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'zip' => $this->request->getPost('zip', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'country' => $this->request->getPost('country', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'comments' => $this->request->getPost('comments', FILTER_SANITIZE_FULL_SPECIAL_CHARS)
];
$supplier_data = [
'company_name' => $this->request->getPost('company_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'agency_name' => $this->request->getPost('agency_name', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'category' => $this->request->getPost('category', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'account_number' => $this->request->getPost('account_number') == '' ? null : $this->request->getPost('account_number', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
'tax_id' => $this->request->getPost('tax_id', FILTER_SANITIZE_NUMBER_INT)
];
if ($this->supplier->save_supplier($person_data, $supplier_data, $supplier_id)) {
// New supplier
if ($supplier_id == NEW_ENTRY) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Suppliers.successful_adding') . ' ' . $supplier_data['company_name'],
'id' => $supplier_data['person_id']
]);
} else { // Existing supplier
return $this->response->setJSON([
'success' => true,
'message' => lang('Suppliers.successful_updating') . ' ' . $supplier_data['company_name'],
'id' => $supplier_id
]);
}
} else { // Failure
return $this->response->setJSON([
'success' => false,
'message' => lang('Suppliers.error_adding_updating') . ' ' . $supplier_data['company_name'],
'id' => NEW_ENTRY
]);
}
}
/**
* This deletes suppliers from the suppliers table
*
* @return ResponseInterface
*/
public function postDelete(): ResponseInterface
{
$suppliers_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_NUMBER_INT);
if ($this->supplier->delete_list($suppliers_to_delete)) {
return $this->response->setJSON([
'success' => true,
'message' => lang('Suppliers.successful_deleted') . ' ' . count($suppliers_to_delete) . ' ' . lang('Suppliers.one_or_multiple')
]);
} else {
return $this->response->setJSON(['success' => false, 'message' => lang('Suppliers.cannot_be_deleted')]);
}
}
}

Some files were not shown because too many files have changed in this diff Show More