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:
BACHIR SOULDI
2026-02-17 15:59:31 +01:00
parent 2794e62571
commit 2a647b138a
46 changed files with 25100 additions and 1296 deletions

View File

@@ -1,4 +1,4 @@
<?php /* Smarty version Smarty-3.1.7, created on 2025-09-26 16:17:25
<?php /* Smarty version Smarty-3.1.7, created on 2025-09-30 09:14:25
compiled from "C:\xampp\htdocs\sophalcrm\includes\runtime/../../layouts/v7\modules\Vtiger\partials\SidebarAppMenu.tpl" */ ?>
<?php /*%%SmartyHeaderCode:88911824368d6bc952ae0a7-57885333%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
@@ -7,7 +7,7 @@ $_valid = $_smarty_tpl->decodeProperties(array (
'833e7fc50cbf769ba11253f5188fa344a967b92e' =>
array (
0 => 'C:\\xampp\\htdocs\\sophalcrm\\includes\\runtime/../../layouts/v7\\modules\\Vtiger\\partials\\SidebarAppMenu.tpl',
1 => 1758796685,
1 => 1759223637,
2 => 'file',
),
),
@@ -15,6 +15,8 @@ $_valid = $_smarty_tpl->decodeProperties(array (
'function' =>
array (
),
'version' => 'Smarty-3.1.7',
'unifunc' => 'content_68d6bc952e7ed',
'variables' =>
array (
'USER_MODEL' => 0,
@@ -38,8 +40,6 @@ $_valid = $_smarty_tpl->decodeProperties(array (
'DOCUMENTS_MODULE_MODEL' => 0,
),
'has_nocache_code' => false,
'version' => 'Smarty-3.1.7',
'unifunc' => 'content_68d6bc952e7ed',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_68d6bc952e7ed')) {function content_68d6bc952e7ed($_smarty_tpl) {?>
@@ -394,12 +394,15 @@ $_smarty_tpl->tpl_vars['moduleModel']->_loop = true;
<span style="font-size: 10pt" class="module-name textOverflowEllipsis">Questionnaire</span>
</a>
</li>
<li style=" padding: 2.5% 2% !important;">
<?php if (!hideStock($_smarty_tpl->tpl_vars['roleid']->value)){?>
<li style=" padding: 2.5% 2% !important;">
<a style=" color:#ffffff; " href="?module=EtatStockReporting&view=EtatStockReporting">
<!--<span class="fa fa-cog module-icon"></span>-->
<span style="font-size: 10pt" class="module-name textOverflowEllipsis">Stock</span>
</a>
</li>
<?php }?>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['roleid']->value=='H8'){?>
<li style=" padding: 2.5% 2% !important;">
@@ -415,15 +418,17 @@ $_smarty_tpl->tpl_vars['moduleModel']->_loop = true;
</a>
</li>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['roleid']->value=='H12'||$_smarty_tpl->tpl_vars['roleid']->value=='H11'||$_smarty_tpl->tpl_vars['roleid']->value=='H4'||$_smarty_tpl->tpl_vars['roleid']->value=='H34'||$_smarty_tpl->tpl_vars['roleid']->value=='H36'||$_smarty_tpl->tpl_vars['roleid']->value=='H38'||$_smarty_tpl->tpl_vars['roleid']->value=='H42'||$_smarty_tpl->tpl_vars['roleid']->value=='H44'){?>
<li style=" padding: 2.5% 2% !important;">
<?php if ($_smarty_tpl->tpl_vars['roleid']->value=='H12'||$_smarty_tpl->tpl_vars['roleid']->value=='H11'||$_smarty_tpl->tpl_vars['roleid']->value=='H4'){?>
<li style=" padding: 2.5% 2% !important;">
<a style=" color:#ffffff; " href="?module=EtatStockReporting&view=EtatStockReporting">
<!--<span class="fa fa-cog module-icon"></span>-->
<span style="font-size: 10pt" class="module-name textOverflowEllipsis">Stock</span>
</a>
</li>
<?php }?>
<?php if ($_smarty_tpl->tpl_vars['roleid']->value!='H12'&&$_smarty_tpl->tpl_vars['roleid']->value!='H11'&&$_smarty_tpl->tpl_vars['roleid']->value!='H4'&&$_smarty_tpl->tpl_vars['roleid']->value!='H34'&&$_smarty_tpl->tpl_vars['roleid']->value!='H36'&&$_smarty_tpl->tpl_vars['roleid']->value!='H38'&&$_smarty_tpl->tpl_vars['roleid']->value!='H42'&&$_smarty_tpl->tpl_vars['roleid']->value!='H44'){?>
<?php if ($_smarty_tpl->tpl_vars['roleid']->value!='H12'&&$_smarty_tpl->tpl_vars['roleid']->value!='H11'&&$_smarty_tpl->tpl_vars['roleid']->value!='H4'){?>
<li style=" padding: 2.5% 2% !important;">
<a style=" color:#ffffff; " href="?module=ExportData&view=ExportData">
<span style="font-size: 10pt" class="module-name textOverflowEllipsis">Export Data</span>