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

Tweak: improves the templates number/date functions #660

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

alexmigf
Copy link
Member

@alexmigf alexmigf commented Nov 16, 2023

#659

This PR improves the templates display functions:

New functions:

$this->number( $document_type );
$this->date( $document_type );
$this->number_title();
$this->date_title();
$this->due_date_title();

Deprecated functions:
get_invoice_number
invoice_number
get_invoice_date
invoice_date

Changed functions:
get_number: now includes $formatted bool arg
get_date: now includes $formatted bool arg

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!

@MohamadNateqi
Copy link
Contributor

@alexmigf Do you have any idea how the customer could raise this error? Since it seems they didn't have the Pro extension.

@alexmigf
Copy link
Member Author

Not yet, it's still in discussion in the ticket.

@alexmigf
Copy link
Member Author

alexmigf commented Nov 27, 2023

@MohamadNateqi it seems that the issue was caused by another plugin that creates a receipt document for our plugin. Anyway, I think we should go forward with this improvements which simplifies the number and date document functions. What you think?

@MohamadNateqi
Copy link
Contributor

I think we should go forward with this improvements which simplifies the number and date document functions. What you think?

Totally agree. It's a good improvement.

@alexmigf alexmigf merged commit 590eb97 into main Nov 27, 2023
5 checks passed
@alexmigf alexmigf deleted the 659-improved-templates-number-date-display-functions branch November 27, 2023 11:32
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.

2 participants