[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r636 - in trunk/rapport_avance/include: . template
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r636 - in trunk/rapport_avance/include: . template |
Date: |
Fri, 20 Dec 2013 16:09:04 +0100 (CET) |
Author: danydb
Date: 2013-12-20 16:09:04 +0100 (Fri, 20 Dec 2013)
New Revision: 636
Modified:
trunk/rapport_avance/include/class_rapav_listing_compute.php
trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
trunk/rapport_avance/include/template/parameter_send_mail_input.php
Log:
Add copy to the sender
Modified: trunk/rapport_avance/include/class_rapav_listing_compute.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_listing_compute.php
2013-12-20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/class_rapav_listing_compute.php
2013-12-20 15:09:04 UTC (rev 636)
@@ -295,7 +295,7 @@
$fiche->generate_document();
}
}
- function send_mail($p_from,$p_subject,$p_message,$p_attach)
+ function send_mail($p_from,$p_subject,$p_message,$p_attach,$p_copy)
{
global $cn;
$ofiche=new RAPAV_Listing_Compute_Fiche();
@@ -306,7 +306,7 @@
for ($i = 0;$i < $nb_fiche;$i++)
{
$fiche=$ofiche->next($r_fiche,$i);
-
$a_result[]=$fiche->send_mail($p_from,$p_subject,$p_message,$p_attach);
+
$a_result[]=$fiche->send_mail($p_from,$p_subject,$p_message,$p_attach,$p_copy);
}
return $a_result;
}
Modified: trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
2013-12-20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/class_rapav_listing_compute_fiche.php
2013-12-20 15:09:04 UTC (rev 636)
@@ -518,8 +518,11 @@
* - 0 no attach
* - 1 PDF document
* - 2 document from db
+ * @param $p_copy
+ * - 0 no copy to the sender
+ * - 1 copy to the sender
*/
- function send_mail($p_from, $p_subject, $p_message, $p_attach)
+ function send_mail($p_from, $p_subject, $p_message, $p_attach,$p_copy)
{
global $cn;
$fiche = new Fiche($cn, $this->f_id);
@@ -541,6 +544,9 @@
$mail->set_from($p_from);
$mail->set_message($p_message);
$mail->set_subject($p_subject);
+ if ($p_copy == 1 ) {
+ $email.=','.$p_from;
+ }
$mail->mailto($email);
switch ($p_attach)
{
Modified: trunk/rapport_avance/include/template/parameter_send_mail_input.php
===================================================================
--- trunk/rapport_avance/include/template/parameter_send_mail_input.php
2013-12-20 15:08:42 UTC (rev 635)
+++ trunk/rapport_avance/include/template/parameter_send_mail_input.php
2013-12-20 15:09:04 UTC (rev 636)
@@ -16,6 +16,9 @@
<p>
<label>Attache</label><?php echo $attach->input();?>
</p>
+<p>
+ <label>Copie pour l'expéditeur</label><?php echo $copy->input();?>
+</p>
<?php
echo HtmlInput::submit("send_mail", _('Envoi'), '', 'smallbutton');
echo HtmlInput::button_close('parameter_send_mail_input');
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r636 - in trunk/rapport_avance/include: . template,
phpcompta-dev <=