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

New: advanced tab with Number tools extension code integrated #613

Merged
merged 47 commits into from
Nov 1, 2023

Conversation

alexmigf
Copy link
Member

@alexmigf alexmigf commented Sep 22, 2023

closes #606

This PR introduces changes to the old Debug tab.

Screenshot from 2023-09-22 16-53-48

  • The contents of the page are now divided into sub-tabs with simple and catchy names:

Screenshot from 2023-09-22 16-48-46

  • The Numbers tab includes now the Number Store List from the legacy Number Tools extension

Screenshot from 2023-09-22 16-49-55

  • The Tools tab includes now the Renumber/Delete documents code from the legacy Number Tools extension

Screenshot from 2023-09-22 16-50-56

  • To enable this Danger zone tools, I have added a new setting under the Settings tab, just to prevent being displayed by default

Screenshot from 2023-09-22 16-51-48

  • I have also made significant code changes in terms of code styling and optimization
  • I have included code to disable the legacy Number Tools extension

alexmigf and others added 30 commits September 19, 2023 16:24
…om:wpovernight/woocommerce-pdf-invoices-packing-slips into 606-improve-debug-tab-include-number-tools
woocommerce-pdf-invoices-packingslips.php Outdated Show resolved Hide resolved
readme.txt Outdated Show resolved Hide resolved
assets/js/debug-script.js Outdated Show resolved Hide resolved
includes/class-wcpdf-install.php Outdated Show resolved Hide resolved
includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
Copy link
Contributor

@MohamadNateqi MohamadNateqi left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@dwalkerpriv dwalkerpriv left a comment

Choose a reason for hiding this comment

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

it works as intended.

the one thing i noticed was that in testing the danger zone options, i wonder why this section is placed under the Tools tab and not under the Number tab when activated? i had automatically checked the Number tab after i activated the danger zone setting since that setting is exclusive to the number tools

@alexmigf
Copy link
Member Author

alexmigf commented Oct 3, 2023

@dwalkerpriv because all the tools are in one place, and I thought it would make sense adding those there as well. Don't forget that in the extension they were also separated with tabs, and the renumber/delete was called tools as well. If you need to take an action, I think makes more sense inside the tools.

Copy link
Contributor

@YordanSoares YordanSoares left a comment

Choose a reason for hiding this comment

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

I ran all the tools operations with all the documents again, just in case, and everything worked perfectly, as expected.

However, I'm leaving some comments below...

includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
includes/settings/class-wcpdf-settings-debug.php Outdated Show resolved Hide resolved
includes/views/advanced-tools.php Show resolved Hide resolved
'settings' => __( 'Settings', 'woocommerce-pdf-invoices-packing-slips' ),
'status' => __( 'Status', 'woocommerce-pdf-invoices-packing-slips' ),
'tools' => __( 'Tools', 'woocommerce-pdf-invoices-packing-slips' ),
'numbers' => __( 'Numbers', 'woocommerce-pdf-invoices-packing-slips' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could be more explicit with the tab name. What do you think about "Document numbers" or "Number logs"? I also like "Document numbers logs", but it can be too much longer 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that, but because the other tabs have short names it felt strange to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

If you think it's OK, please ignore my comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe the others could also give their input, I'm open to change.

@MohamadNateqi @dwalkerpriv @Terminator-Barbapapa

Copy link
Contributor

Choose a reason for hiding this comment

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

I think "Numbers" is good. As Alex mentioned, it feels strange around other short names.

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer "Document Numbers" as its more descriptive. However if "Numbers" is preferable, we can adjust the description to something like this: "This tab has a record of all of the document numbers generated since the last reset (which happens when you set the next Invoice number value in the settings)."

@YordanSoares YordanSoares self-requested a review October 9, 2023 07:33
Copy link
Contributor

@YordanSoares YordanSoares left a comment

Choose a reason for hiding this comment

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

@alexmigf your last commit (97b5094) fixed the date controls issue! 🎉

@Terminator-Barbapapa
Copy link
Contributor

Terminator-Barbapapa commented Oct 10, 2023

Currently it is not possible to view numbers for other documents that follow the main invoice number sequence. As their numbers are stored in the invoice number store table, but they are not an invoice number so they will not show up.

For instance here I've created an order (invoice # 263) which I have refunded (credit note # 264), and then created another order (invoice # 265). As my credit notes follow the main invoice numbering my invoice number store table looks like this:

Scherm­afbeelding 2023-10-10 om 13 19 02

But my table in the Numbers tab looks like this:

Scherm­afbeelding 2023-10-10 om 13 14 17

Perhaps we should also display credit notes / proforma invoices when the user selected to use the main invoice numbering for these documents. And add an extra column to the table with document type. Like this:

Scherm­afbeelding 2023-10-10 om 13 14 17 - customized

@alexmigf
Copy link
Member Author

@Terminator-Barbapapa check now using the last commit.

Copy link
Contributor

@Terminator-Barbapapa Terminator-Barbapapa left a comment

Choose a reason for hiding this comment

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

Great work!

includes/views/advanced-numbers.php Outdated Show resolved Hide resolved
@alexmigf alexmigf merged commit ff5b2fe into main Nov 1, 2023
5 checks passed
@alexmigf alexmigf deleted the 606-improve-debug-tab-include-number-tools branch November 1, 2023 14:28
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.

Integrate Number Tools inside the plugin
5 participants