-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add hook's in dolreceiptprinter.php #19501
Labels
Feature request
This is a feature request
good-first-issue
This is a good issue to try make your first PR if you don't know very well the project
hacktoberfest
This is a good issue to try make your first PR if you don't know very well the project
Comments
I have problems with Github, I attach file with the modifications. I add 2 hooks inside the function: sendToPrinter()
|
We need a dev to post the PR that include this change to submit 2 new hooks... |
Any news ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature request
This is a feature request
good-first-issue
This is a good issue to try make your first PR if you don't know very well the project
hacktoberfest
This is a good issue to try make your first PR if you don't know very well the project
Instructions
The idea is to add 2 hooks to be able to add more fields and functions to the receiptsprinters.
Feature Request
in ../core/class/dolreceiptprinter.class.php:
Hook for ADD template variables
$this->template = str_replace('{dol_value_vendor_firstname}', $user->firstname, $this->template); $this->template = str_replace('{dol_value_vendor_lastname}', $user->lastname, $this->template); $this->template = str_replace('{dol_value_vendor_mail}', $user->email, $this->template);
-->>HOOK HERE
// parse template $this->template = str_replace("{", "<", $this->template); $this->template = str_replace("}", ">", $this->template);
Hook for ADD template format and data:
default: $this->printer->text($vals[$tplline]['tag']); $this->printer->text($vals[$tplline]['value']);
-->>HOOK HERE
$this->errors[] = 'UnknowTag: <'.strtolower($vals[$tplline]['tag']).'>'; $error++; break;
The text was updated successfully, but these errors were encountered: