feat: Enhance email functionality and PDF generation for Sales Orders
- Enabled SMTP debugging in PHPMailer for better error tracking. - Added a "Test send email" link in the Inventory Detail View for quick email testing. - Implemented automatic PDF generation and email sending upon Sales Order creation. - Created a new action for sending Sales Order emails with attached PDFs. - Added a new AJAX action for testing outgoing email server configurations. - Updated outgoing server settings to use new SMTP credentials. - Improved email templates for better user experience. - Added test scripts for validating PDF generation and email sending.
This commit is contained in:
@@ -1,95 +1,189 @@
|
||||
{*+**********************************************************************************
|
||||
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
|
||||
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
************************************************************************************}
|
||||
|
||||
{* modules/Vtiger/views/DashBoard.php *}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function getSplashScreen(){
|
||||
|
||||
$.ajax({
|
||||
|
||||
type: "GET",
|
||||
|
||||
url: "index.php?module=SplashScreenAjax&view=SplashScreenAjax",
|
||||
|
||||
contentType: "application/json; charset=utf-8",
|
||||
|
||||
success: function(result) {
|
||||
|
||||
$("#SplashScreen").html(result);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
getSplashScreen();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
{strip}
|
||||
|
||||
|
||||
|
||||
{assign var="roleid" value=$USER_MODEL->get('roleid')}
|
||||
|
||||
|
||||
|
||||
<div id="SplashScreen"></div>
|
||||
|
||||
|
||||
|
||||
<div class="dashBoardContainer clearfix">
|
||||
|
||||
<div class="tabContainer">
|
||||
|
||||
<ul class="nav nav-tabs tabs sortable container-fluid">
|
||||
|
||||
{foreach key=index item=TAB_DATA from=$DASHBOARD_TABS}
|
||||
|
||||
<li class="{if $TAB_DATA["id"] eq $SELECTED_TAB}active{/if} dashboardTab" data-tabid="{$TAB_DATA["id"]}" data-tabname="{$TAB_DATA["tabname"]}">
|
||||
|
||||
<a data-toggle="tab" href="#tab_{$TAB_DATA["id"]}">
|
||||
|
||||
<div>
|
||||
|
||||
<span class="name textOverflowEllipsis" value="{$TAB_DATA["tabname"]}" style="width:10%">
|
||||
|
||||
<strong>{$TAB_DATA["tabname"]}</strong>
|
||||
|
||||
</span>
|
||||
|
||||
<span class="editTabName hide">
|
||||
|
||||
<input type="text" name="tabName"/>
|
||||
|
||||
</span>
|
||||
|
||||
{if $TAB_DATA["isdefault"] eq 0}
|
||||
|
||||
<i class="fa fa-close deleteTab"></i>
|
||||
|
||||
{/if}
|
||||
|
||||
{*+**********************************************************************************
|
||||
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.1
|
||||
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
************************************************************************************}
|
||||
|
||||
{* modules/Vtiger/views/DashBoard.php *}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function getSplashScreen(){
|
||||
|
||||
$.ajax({
|
||||
|
||||
type: "GET",
|
||||
|
||||
url: "index.php?module=SplashScreenAjax&view=SplashScreenAjax",
|
||||
|
||||
contentType: "application/json; charset=utf-8",
|
||||
|
||||
success: function(result) {
|
||||
|
||||
$("#SplashScreen").html(result);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
getSplashScreen();
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
{strip}
|
||||
|
||||
|
||||
|
||||
{assign var="roleid" value=$USER_MODEL->get('roleid')}
|
||||
|
||||
|
||||
|
||||
<div id="SplashScreen"></div>
|
||||
|
||||
|
||||
|
||||
<div class="dashBoardContainer clearfix">
|
||||
|
||||
<div class="tabContainer">
|
||||
|
||||
<ul class="nav nav-tabs tabs sortable container-fluid">
|
||||
|
||||
{foreach key=index item=TAB_DATA from=$DASHBOARD_TABS}
|
||||
|
||||
<li class="{if $TAB_DATA["id"] eq $SELECTED_TAB}active{/if} dashboardTab" data-tabid="{$TAB_DATA["id"]}" data-tabname="{$TAB_DATA["tabname"]}">
|
||||
|
||||
<a data-toggle="tab" href="#tab_{$TAB_DATA["id"]}">
|
||||
|
||||
<div>
|
||||
|
||||
<span class="name textOverflowEllipsis" value="{$TAB_DATA["tabname"]}" style="width:10%">
|
||||
|
||||
<strong>{$TAB_DATA["tabname"]}</strong>
|
||||
|
||||
</span>
|
||||
|
||||
<span class="editTabName hide">
|
||||
|
||||
<input type="text" name="tabName"/>
|
||||
|
||||
</span>
|
||||
|
||||
{if $TAB_DATA["isdefault"] eq 0}
|
||||
|
||||
<i class="fa fa-close deleteTab"></i>
|
||||
|
||||
{/if}
|
||||
|
||||
<i class="fa fa-bars moveTab hide"></i>
|
||||
|
||||
</div>
|
||||
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
{/foreach}
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
{if isGro($roleid) || isVP($roleid) || isDG($roleid)}
|
||||
|
||||
<li class="dashboardTab font-large-2" ><a href="index.php?module=CustomDashboard&view=CustomDashboard"><div><strong>Conventions</strong></div></a></li>
|
||||
|
||||
{/if}
|
||||
|
||||
-->
|
||||
|
||||
{if isDG($roleid) || $roleid == 'H8' || isMedecin($roleid)}
|
||||
|
||||
|
||||
|
||||
{if isVM($roleid)}
|
||||
|
||||
<!-- sophal --><li class="dashboardTab" style="font-size: 1.2rem"><a href="index.php?module=MonitoringVmCompte&view=MonitoringVmCompte"><div><strong>Monitoring Promotion Medicale</strong></div></a></li><!-- sophal -->
|
||||
|
||||
{else}
|
||||
|
||||
<!-- sophal --><li class="dashboardTab" style="font-size: 1.2rem"><a href="index.php?module=MonitoringVMPlanning&view=MonitoringVMPlanning"><div><strong>Monitoring Promotion Medicale</strong></div></a></li><!-- sophal -->
|
||||
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
{if isGro($roleid) || isPharma($roleid) || isDG($roleid)}
|
||||
|
||||
<!-- sophal --><li class="dashboardTab" style="font-size: 1.2rem"><a href="index.php?module=MonitoringVpBCTotal&view=MonitoringVpBCTotal"><div><strong>Monitoring Commercial</strong></div></a></li><!-- sophal -->
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
<div class="moreSettings pull-right">
|
||||
|
||||
<div class="dropdown dashBoardDropDown">
|
||||
|
||||
<button class="btn btn-default reArrangeTabs dropdown-toggle" type="button" data-toggle="dropdown">{vtranslate('LBL_MORE',$MODULE)}
|
||||
|
||||
<span class="caret"></span></button>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right moreDashBoards">
|
||||
|
||||
<li id="newDashBoardLi"{if count($DASHBOARD_TABS) eq $DASHBOARD_TABS_LIMIT}class="disabled"{/if}><a class = "addNewDashBoard" href="#">{vtranslate('LBL_ADD_NEW_DASHBOARD',$MODULE)}</a></li>
|
||||
|
||||
<li><a class = "reArrangeTabs" href="#">{vtranslate('LBL_REARRANGE_DASHBOARD_TABS',$MODULE)}</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<button class="btn-success updateSequence pull-right hide">{vtranslate('LBL_SAVE_ORDER',$MODULE)}</button>
|
||||
|
||||
</div>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
{foreach key=index item=TAB_DATA from=$DASHBOARD_TABS}
|
||||
|
||||
<div id="tab_{$TAB_DATA["id"]}" data-tabid="{$TAB_DATA["id"]}" data-tabname="{$TAB_DATA["tabname"]}" class="tab-pane fade {if $TAB_DATA["id"] eq $SELECTED_TAB}in active{/if}">
|
||||
|
||||
{if $TAB_DATA["id"] eq $SELECTED_TAB}
|
||||
|
||||
{include file="dashboards/DashBoardTabContents.tpl"|vtemplate_path:$MODULE TABID=$TABID}
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/strip}
|
||||
Reference in New Issue
Block a user