Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credits and Inventory #905

Closed
wants to merge 23 commits into from
Closed

Credits and Inventory #905

wants to merge 23 commits into from

Conversation

o-psi
Copy link
Contributor

@o-psi o-psi commented Mar 8, 2024

Credits, and Inventory modules.

@wrongecho
Copy link
Collaborator

Test these changes at: https://0185905.pr-review.itflow.org
(automatic message)

@wrongecho
Copy link
Collaborator

Unsure why #897 was closed, but would recommend credits and inventory are raised as separate PRs to allow for proper testing.

@johnnyq
Copy link
Collaborator

johnnyq commented Mar 10, 2024

This is fine for now just for the future one PR per feature will make it easier to manage and review. I see this is still is draft so will review when ready, looking forward to credits and Inventory.

@johnnyq
Copy link
Collaborator

johnnyq commented Mar 11, 2024

This looks pretty good to me,
@o-psi has it been working good for you guys over there
@wrongecho how does it look to you

@wrongecho
Copy link
Collaborator

On initial review, I'm unable to get the PR Review database past 1.1.0.

@wrongecho
Copy link
Collaborator

@johnnyq Have added a few comments but on mobile atm. Will try and take a look this week once the update queries are working.

credits.php Outdated Show resolved Hide resolved
db.sql Show resolved Hide resolved
post/inventory_model.php Show resolved Hide resolved
ticket_add_product_modal.php Outdated Show resolved Hide resolved
@o-psi
Copy link
Contributor Author

o-psi commented Mar 12, 2024

@johnnyq When you invited me to fork the repository, that is when we started doing version numbers.
And it is the fact that I am doing one PR per version number, rather than feature. This is as, everything from 0.1.8.4 would have been in this PR regardless.

@o-psi o-psi marked this pull request as ready for review March 12, 2024 19:21
@o-psi
Copy link
Contributor Author

o-psi commented Mar 12, 2024

I cannot mark the changes as accepted, but all comments have been resolved. We have now been using for a few days, and have yet to find any quirks.

Copy link
Collaborator

@johnnyq johnnyq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sanitize the outputs of these guys to prevent XSS Attacks

credits.php Outdated Show resolved Hide resolved
credits.php Outdated Show resolved Hide resolved
credits.php Outdated Show resolved Hide resolved
credits.php Outdated Show resolved Hide resolved
database_updates.php Outdated Show resolved Hide resolved
@johnnyq
Copy link
Collaborator

johnnyq commented Mar 12, 2024

Something still appears to broken on Database updates.

Copy link
Collaborator

@wrongecho wrongecho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still struggling to get the update correctly working on my side, syntax issues and mismatch between updated db version and latest db version.
Also looks as though there is a syntax issue in db.sql which would break new installs.

Edit: it would also be great if we could get that Sonar issue count down. Sometimes it's overzealous, but I don't think I've ever seen so many new issues in one PR. Appreciate you're trying to get the bare bones of this working as quickly as possible, which is fine in your fork, but ideally we're aiming for maintainable code here as many others will be relying on it.

db.sql Outdated Show resolved Hide resolved
post/inventory.php Outdated Show resolved Hide resolved
ticket.php Outdated Show resolved Hide resolved
ticket.php Outdated Show resolved Hide resolved
post/invoice.php Outdated Show resolved Hide resolved
DROP TABLE IF EXISTS `inventory_locations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventory_locations` (
Copy link
Collaborator

@wrongecho wrongecho Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth checking with @johnnyq but believe the table name is plural (correct) but the column names should be singular.

https://docs.itflow.org/code_standards#sql_table_structure
Column Naming: Define by non-plural word of the table name separated with an underscore. Example table users has user_id user_first_name

--

Edit: There is a column name mismatch between db.sql and database_updates.php - inventory_location_id VS inventory_locationS_id, etc.

db.sql:

CREATE TABLE `inventory_locations` (
  `inventory_locations_id` int(11) NOT NULL AUTO_INCREMENT,
  `inventory_locations_name` varchar(200) NOT NULL,

database_updates.php:

mysqli_query($mysqli, "CREATE TABLE `inventory_locations` (
  `inventory_location_id` int(11) NOT NULL AUTO_INCREMENT,
  `inventory_location_name` varchar(200) NOT NULL,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes the field names should be singular good catch

inventory_manage.php Outdated Show resolved Hide resolved
@o-psi o-psi marked this pull request as draft March 13, 2024 00:58
@o-psi
Copy link
Contributor Author

o-psi commented Mar 13, 2024

There seems to be a few commits missing that must be stashed somewhere. I know I went through and sanitized most if not all of these mentioned. Many thanks for taking the time to recognize that.

@o-psi o-psi marked this pull request as ready for review March 14, 2024 22:27
@o-psi o-psi requested a review from johnnyq March 14, 2024 22:27
@johnnyq
Copy link
Collaborator

johnnyq commented Mar 15, 2024

Hey @o-psi the field names should be singular for the table inventory_locations to keep consistency
example inventory_location_id

@o-psi
Copy link
Contributor Author

o-psi commented Mar 19, 2024

Crazy weekend. This has been fixed.

@johnnyq
Copy link
Collaborator

johnnyq commented Mar 20, 2024

Crazy weekend. This has been fixed.

Yeah man same here
We'll go ahead and review further

Copy link

Quality Gate Passed Quality Gate passed

Issues
62 New issues
0 Accepted issues

Measures
1 Security Hotspot
No data about Coverage
3.8% Duplication on New Code

See analysis details on SonarCloud

@o-psi o-psi closed this Mar 22, 2024
@o-psi o-psi deleted the 0.1.8.5 branch March 25, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants