Task #8618: Add send mail form

This commit is contained in:
Juanjo Menent 2010-10-28 11:37:29 +00:00
parent 4399c9bfdc
commit 06cefbb34b
2 changed files with 5 additions and 4 deletions

View File

@ -54,6 +54,7 @@ $eventstolog=array(
array('id'=>'ORDER_SUPPLIER_SENTBYMAIL','test'=>$conf->fournisseur->enabled), array('id'=>'ORDER_SUPPLIER_SENTBYMAIL','test'=>$conf->fournisseur->enabled),
array('id'=>'BILL_SUPPLIER_VALIDATE', 'test'=>$conf->fournisseur->enabled), array('id'=>'BILL_SUPPLIER_VALIDATE', 'test'=>$conf->fournisseur->enabled),
array('id'=>'BILL_SUPPLIER_PAYED', 'test'=>$conf->fournisseur->enabled), array('id'=>'BILL_SUPPLIER_PAYED', 'test'=>$conf->fournisseur->enabled),
array('id'=>'BILL_SUPPLIER_SENTBYMAIL', 'test'=>$conf->fournisseur->enabled),
// array('id'=>'PAYMENT_CUSTOMER_CREATE','test'=>$conf->facture->enabled), // array('id'=>'PAYMENT_CUSTOMER_CREATE','test'=>$conf->facture->enabled),
// array('id'=>'PAYMENT_SUPPLIER_CREATE','test'=>$conf->fournisseur->enabled), // array('id'=>'PAYMENT_SUPPLIER_CREATE','test'=>$conf->fournisseur->enabled),
array('id'=>'MEMBER_VALIDATE', 'test'=>$conf->adherent->enabled), array('id'=>'MEMBER_VALIDATE', 'test'=>$conf->adherent->enabled),

View File

@ -527,7 +527,7 @@ if (! empty($_POST['removedfile']))
/* /*
* Send mail * Send mail
*/ */
if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_POST['cancel']) if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_POST['cancel'])
{ {
$langs->load('mails'); $langs->load('mails');
@ -622,7 +622,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a
// Appel des triggers // Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($db); $interface=new Interfaces($db);
$result=$interface->run_triggers('ORDER_SUPPLIER_SENTBYMAIL',$facturefourn,$user,$langs,$conf); $result=$interface->run_triggers('BILL_SUPPLIER_SENTBYMAIL',$facturefourn,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; } if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers // Fin appel triggers
@ -634,7 +634,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a
{ {
// Redirect here // Redirect here
// This avoid sending mail twice if going out and then back to page // This avoid sending mail twice if going out and then back to page
Header('Location: '.$_SERVER["PHP_SELF"].'?faid='.$facturefourn->id.'&mesg='.urlencode($mesg)); Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$facturefourn->id.'&mesg='.urlencode($mesg));
exit; exit;
} }
} }
@ -677,7 +677,7 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a
dol_syslog('Unable to read data from the invoice. The invoice file has perhaps not been generated.'); dol_syslog('Unable to read data from the invoice. The invoice file has perhaps not been generated.');
} }
$_GET['action'] = 'presend'; //$_GET['action'] = 'presend';
} }
/* /*