{"action":"created","issue":{"url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/2801","repository_url":"https://api.github.com/repos/salesagility/SuiteCRM","labels_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/2801/labels{/name}","comments_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/2801/comments","events_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/2801/events","html_url":"https://github.com/salesagility/SuiteCRM/issues/2801","id":196302242,"node_id":"MDU6SXNzdWUxOTYzMDIyNDI=","number":2801,"title":"Suggestion - Customisable PDF export file names","user":{"login":"blloyd78","id":17355746,"node_id":"MDQ6VXNlcjE3MzU1NzQ2","avatar_url":"https://avatars0.githubusercontent.com/u/17355746?v=4","gravatar_id":"","url":"https://api.github.com/users/blloyd78","html_url":"https://github.com/blloyd78","followers_url":"https://api.github.com/users/blloyd78/followers","following_url":"https://api.github.com/users/blloyd78/following{/other_user}","gists_url":"https://api.github.com/users/blloyd78/gists{/gist_id}","starred_url":"https://api.github.com/users/blloyd78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blloyd78/subscriptions","organizations_url":"https://api.github.com/users/blloyd78/orgs","repos_url":"https://api.github.com/users/blloyd78/repos","events_url":"https://api.github.com/users/blloyd78/events{/privacy}","received_events_url":"https://api.github.com/users/blloyd78/received_events","type":"User","site_admin":false},"labels":[{"id":302422253,"node_id":"MDU6TGFiZWwzMDI0MjIyNTM=","url":"https://api.github.com/repos/salesagility/SuiteCRM/labels/suggestion","name":"suggestion","color":"84b6eb","default":false}],"state":"closed","locked":false,"assignee":{"login":"mattlorimer","id":6449723,"node_id":"MDQ6VXNlcjY0NDk3MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/6449723?v=4","gravatar_id":"","url":"https://api.github.com/users/mattlorimer","html_url":"https://github.com/mattlorimer","followers_url":"https://api.github.com/users/mattlorimer/followers","following_url":"https://api.github.com/users/mattlorimer/following{/other_user}","gists_url":"https://api.github.com/users/mattlorimer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattlorimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattlorimer/subscriptions","organizations_url":"https://api.github.com/users/mattlorimer/orgs","repos_url":"https://api.github.com/users/mattlorimer/repos","events_url":"https://api.github.com/users/mattlorimer/events{/privacy}","received_events_url":"https://api.github.com/users/mattlorimer/received_events","type":"User","site_admin":false},"assignees":[{"login":"mattlorimer","id":6449723,"node_id":"MDQ6VXNlcjY0NDk3MjM=","avatar_url":"https://avatars0.githubusercontent.com/u/6449723?v=4","gravatar_id":"","url":"https://api.github.com/users/mattlorimer","html_url":"https://github.com/mattlorimer","followers_url":"https://api.github.com/users/mattlorimer/followers","following_url":"https://api.github.com/users/mattlorimer/following{/other_user}","gists_url":"https://api.github.com/users/mattlorimer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattlorimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattlorimer/subscriptions","organizations_url":"https://api.github.com/users/mattlorimer/orgs","repos_url":"https://api.github.com/users/mattlorimer/repos","events_url":"https://api.github.com/users/mattlorimer/events{/privacy}","received_events_url":"https://api.github.com/users/mattlorimer/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-12-18T22:03:03Z","updated_at":"2018-12-10T13:59:26Z","closed_at":"2017-04-01T22:26:01Z","author_association":"NONE","body":"<!--- Provide a general summary of the issue in the **Title** above -->\r\n<!--- Before you open an issue, please check if a similar issue already exists or has been closed before. --->\r\n\r\n#### Issue\r\n<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->\r\nCannot currently alter default PDF file names after export\r\n\r\n#### Expected Behavior\r\n<!--- Tell us what should happen -->\r\nShould be able to change the file names of exported reports, invoices and quotes.\r\n\r\n#### Actual Behavior\r\n<!--- Tell us what happens instead -->\r\nFile names are not configurable or changeable\r\n\r\n#### Possible Fix\r\n<!--- Not obligatory, but suggest a fix or reason for the bug -->\r\nThe following code inserted into **modules/AOS_PDF_Templates/generatePdf.php** allows the quote export file name to be changed to the format **quote_[billing_account_name]_[quote_number].pdf**:\r\n\r\n```\r\nif ($bean->module_dir==\"AOS_Invoices\") { \r\n\t\t// custom naming scheme for Invoices module\r\n\t\t$file_name = \"Facture_\".str_replace(\" \",\"_\",$bean->billing_account).\"_\".$bean->number.\"_\".substr($bean->invoice_date, 0, 2).substr($bean->invoice_date, 3, 2).substr($bean->invoice_date, -2).\".pdf\";\r\n\t\t} elseif ($bean->module_dir==\"AOS_Quotes\") {\r\n\t\t// custom naming scheme for Quotes module\r\n\t\t$file_name = \"Devis_\".str_replace(\" \",\"_\",$bean->billing_account).\"_\".$bean->number.\".pdf\";\r\n\t\t} else {\t\t\t\r\n\t\t$file_name = $mod_strings['LBL_PDF_NAME'] . \"_\" . str_replace(\" \", \"_\", $bean->name) . \".pdf\"; \t// original naming scheme\t\t\t\r\n\t}\t\r\n```\r\n\r\n#### Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug include code to reproduce, if relevant -->\r\nNone required.\r\n\r\n#### Context\r\n<!--- How has this bug affected you? What were you trying to accomplish? -->\r\n<!--- If you feel this should be a low/medium/high priority then please state so -->\r\nMust manually rename exported files to prevent duplicate file names.\r\n\r\n#### Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* SuiteCRM Version used: SuiteCRM 7.7.8\r\n* Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Safari\r\n* Environment name and version (e.g. MySQL, PHP 7): MySQL, PHP 5.6\r\n* Operating System and version (e.g Ubuntu 16.04): Ubuntu 16.04\r\n"},"comment":{"url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/comments/445824313","html_url":"https://github.com/salesagility/SuiteCRM/issues/2801#issuecomment-445824313","issue_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/2801","id":445824313,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTgyNDMxMw==","user":{"login":"Mausino","id":5773777,"node_id":"MDQ6VXNlcjU3NzM3Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/5773777?v=4","gravatar_id":"","url":"https://api.github.com/users/Mausino","html_url":"https://github.com/Mausino","followers_url":"https://api.github.com/users/Mausino/followers","following_url":"https://api.github.com/users/Mausino/following{/other_user}","gists_url":"https://api.github.com/users/Mausino/gists{/gist_id}","starred_url":"https://api.github.com/users/Mausino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mausino/subscriptions","organizations_url":"https://api.github.com/users/Mausino/orgs","repos_url":"https://api.github.com/users/Mausino/repos","events_url":"https://api.github.com/users/Mausino/events{/privacy}","received_events_url":"https://api.github.com/users/Mausino/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T13:59:26Z","updated_at":"2018-12-10T13:59:26Z","author_association":"CONTRIBUTOR","body":"@samus-aran  yes, can be part of solution.. I am not developer.. i cant test it for you ... but i can't  evaluate code 👍 "}}
{"actor":{"display_login":"Mausino"}}