Jump to content

customize sales report


sokalsondha

Recommended Posts

Hello everyone.

greetings from me again. i need to print out monthly sales report to submit tax office and the way whmcs sales tax liability report print its not possible to submit.

there is no company name showing and also we dont work with clients name so i dont need to show the client name in the report.

also after print out the report it showing in the top the whole whmcs admin link and whmcs printer friendly report.

is there any chance i can customize the pdf report? like the way we customize the pdf invoice

Hope someone can help me on this issue

 

Thanks again

Link to comment
Share on other sites

11 hours ago, sokalsondha said:

there is no company name showing and also we dont work with clients name so i dont need to show the client name in the report.

then you would need to duplicate the report file in /modules/reports and edit the duplicate file - there's no point making changes to the original report file as it would just get overwritten during an update.

    ->select('tblinvoices.*', 'tblclients.firstname', 'tblclients.lastname')

becomes...

    ->select('tblinvoices.*', 'tblclients.firstname', 'tblclients.lastname', 'tblclients.companyname')

technically, you might not need first and last name in the query... i'm just thinking ahead in case you tell me you might have clients with no company name.

    $client = "{$result->firstname} {$result->lastname}";

becomes...

    $client = "{$result->companyname}";

optionally, you could also change 'clientname' to 'companyname' if you wanted to alter the table heading from "Client Name" to "Company Name"...

    $aInt->lang('fields', 'clientname'),
11 hours ago, sokalsondha said:

also after print out the report it showing in the top the whole whmcs admin link and whmcs printer friendly report.

that's the page title and it's hardcoded in the encrypted file.... I don't know if you could run a hook on the reports print page so using that to modify the title might not be an option.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated