618 Commits

Author SHA1 Message Date
jekkos
f1672d9701 Prevent type juggling for password hash comparison (#3324) 2021-09-30 22:51:05 +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
jekkos
5669dff7da Add sorting for quantity and sales (#3262) 2021-08-20 23:36:02 +02:00
Jeroen Peelaerts
4c3f6e4c31 Fix username verification on insert/update (#3239) 2021-08-07 02:12:30 +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
Jeroen Peelaerts
1547272665 Check username before employee creation (#3239) 2021-07-23 00:59:40 +02:00
Jeroen Peelaerts
c6d0582fcb Add category column to item summary report (#3240) 2021-07-21 23:22:53 +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
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
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
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
Steve Ireland
4b65aa628a Fix the discount calculation on reports. The rounding was in the wrong place. 2021-02-19 22:00:31 -05:00
Steve Ireland
7a4cf1e2bd Fix discounted price rounding issues in reports 2021-02-13 20:44:56 -05: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
c5b22a0300 Improved support for cash rounding transactions. 2021-02-07 13:39:51 -05:00
printgeek
2cb65bc2cb Update Specific_supplier.php 2021-01-19 21:39:20 +01:00
Jeroen Peelaerts
87ea0c45f7 Update inventory date if sale/receiving is edited (#2844) 2020-12-04 23:48:57 +01:00
Carl Hunter
a54f596ea9 Rename Count column in Payments Summary Report to Transactions 2020-12-03 15:49:16 +01:00
Carl Hunter
d571734f98 Fixed sorting of Quantity column in Customer Summary Report 2020-12-03 15:49:16 +01:00
Carl Hunter
516f8f71da Added Transactions column to Customer Summary Report 2020-12-03 15:49:16 +01:00
Kwaku Amoh-Aboagye
084770643d Fixed inventory after deleting receiving
When you add new/ update an item with a *receiving quantity* more than 1, (Let's say 63), so you then do a new receiving of that particular item, you will get the option to select pack as x63 or x1.

So if you select more that 1 Ship pack (receiving quantity), (in this eg. that is, x63) and finish the receiving successfully, your inventory of that item update with increment of 63 and inventory count details also, good.

But when you realize the receiving you just did had a mistake and  you go and delete it, the inventory reduction is wrongly calculated.
Instead of decreasing the inventory by 63, it reduces it by 1.

So i fixed it.
2020-11-20 21:49:52 +01:00
Jeroen Peelaerts
4b2b098a85 Add credit filter for payment types (#2983) 2020-11-20 17:24:24 +01:00
Jeroen Peelaerts
e47f3ee571 Fix detailed sales report (#2967) 2020-11-15 17:02:00 +01:00
Carl Hunter
5ddda4dc1e Fix quantity sorting in Categories, Employees and Transactions reports 2020-11-15 15:44:40 +01:00
Carl Hunter
20d78224a4 Added Transactions column to Employees Summary Report and Transactions Summary Report 2020-11-15 15:44:40 +01:00
Carl Hunter
36b0b28109 Add Retail Price to Items Summary Report 2020-11-07 22:40:07 +01:00
Jeroen Peelaerts
67e1e4ef19 Add takings filtering on credit card (#2983) 2020-11-02 12:42:45 +01:00
Jeroen Peelaerts
958469e207 Fix detailed sale report (#2967) 2020-10-29 22:14:34 +01:00
Jeroen Peelaerts
47f61e1a30 Detailed sales + receiving fix (#2967) 2020-10-29 21:35:04 +01:00
Jeroen Peelaerts
65c84a8857 Fix receivings report in MySQL (#2967) 2020-10-28 20:55:57 +01:00
jekkos-t520
760d7490a2 Fix stock location crud (#2965) 2020-10-17 01:05:03 +02:00
Jeroen Peelaerts
c0ff849c0f Do not cast quantity change to int in sale delete (#2964) 2020-10-13 21:27:09 +02:00
Steve Ireland
8e99889174 On document reprint retrieve the taxes originally applied to the reprinted document. 2020-09-19 14:14:01 +02:00
SteveIreland
bf88f8fdae Fixes #2922 feature request by adding the cash rounding type of half-five as a trigger for cash rounding and including the decimals as a factor in the round function. 2020-09-14 18:03:12 +02:00
jekkos-t520
b4fadbf84f Add quote year count to token list (#2886) 2020-08-24 13:21:40 +02:00
jekkos-t520
7873110fc5 Code style remarks (#2886) 2020-08-24 13:21:40 +02:00
Jeroen Peelaerts
46d957f5b4 Quote improvements 2020-08-24 13:21:40 +02:00
SteveIreland
b7fcc94eb0 Fixes #2872 SQL Error in Sale.php 2020-07-01 08:58:04 +02:00
objecttothis
a11f25e983 Update Item.php
Set group_concat_max_len session variable to prevent count totals at the bottom of the tables becoming `1 to null of null items` when database includes significant number of item rows.
2020-06-29 11:23:10 +02:00
SteveIreland
6d91ae3845 Fix included destination tax 2020-06-28 18:12:46 -04:00
objecttothis
a3fb05b566 Change the locations of global constants to make them global across
files

- Items Constants
- Attributes Constants
- Sale Constants
2020-06-03 14:15:05 +04:00
objecttothis
979ec9fe02 Merge branch 'master' into category_as_dropdown 2020-05-20 13:55:41 +04:00
objecttothis
89a56820d2 Formatting Corrections 2020-05-20 13:52:54 +04:00