Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
28de634a95
@ -100,16 +100,18 @@ if ($action == 'add')
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
|
||||
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
if ($result == 0)
|
||||
{
|
||||
$mesg='<div class="warning">'.$langs->trans("WarningNoEMailsAdded").'</div>';
|
||||
setEventMessage($langs->trans("WarningNoEMailsAdded"),'warnings');
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg='<div class="error">'.$langs->trans("Error").($obj->error?' '.$obj->error:'').'</div>';
|
||||
setEventMessage($langs->trans("Error").($obj->error?' '.$obj->error:''),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('mailingcard'));
|
||||
|
||||
// Tableau des substitutions possibles
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$object->substitutionarray=array(
|
||||
'__ID__' => 'IdRecord',
|
||||
'__EMAIL__' => 'EMail',
|
||||
@ -213,19 +213,20 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
||||
$tmpfield=explode('=',$other[2],2); $other3=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
||||
$tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
||||
$tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
||||
// Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray=array(
|
||||
'__ID__' => $obj->source_id,
|
||||
'__EMAIL__' => $obj->email,
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
||||
'__LASTNAME__' => $obj->lastname,
|
||||
'__FIRSTNAME__' => $obj->firstname,
|
||||
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
||||
'__OTHER1__' => $other1,
|
||||
'__OTHER2__' => $other2,
|
||||
'__OTHER3__' => $other3,
|
||||
'__OTHER4__' => $other4,
|
||||
'__OTHER5__' => $other5
|
||||
'__OTHER5__' => $other5,
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'
|
||||
);
|
||||
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||
{
|
||||
@ -731,7 +732,7 @@ else
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
$mesgembedded.='<div class="warning">'.$langs->trans("MailingNeedCommand").'</div>';
|
||||
$mesgembedded.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
|
||||
$mesgembedded.='<br><textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
|
||||
$mesgembedded.='<br><br><div class="warning">'.$langs->trans("MailingNeedCommand2").'</div>';
|
||||
$_GET["action"]='';
|
||||
}
|
||||
@ -915,7 +916,11 @@ else
|
||||
print '<br><br></div>';
|
||||
}
|
||||
|
||||
if (! empty($mesgembedded)) dol_htmloutput_mesg($mesgembedded,'','warning',1);
|
||||
if (! empty($mesgembedded))
|
||||
{
|
||||
dol_htmloutput_mesg($mesgembedded,'','warning',1);
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
// Affichage formulaire de TEST
|
||||
if ($action == 'test')
|
||||
|
||||
@ -167,9 +167,9 @@ if ($resql)
|
||||
|
||||
print '<form method="post" action="search.php" name="search_form">';
|
||||
|
||||
$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('DateOperationShort') . ': ';
|
||||
$moreforfilter .= $langs->trans('Period') . ' ' . $langs->trans('StartDate') . ': ';
|
||||
$moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
||||
$moreforfilter .= $langs->trans('PeriodEndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
||||
$moreforfilter .= $langs->trans('EndDate') . ':' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 1, 1);
|
||||
|
||||
|
||||
if ($moreforfilter) {
|
||||
|
||||
@ -79,7 +79,7 @@ if ($result)
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("WithdrawalReceipts"),"bons.php","p.ref",'','','class="liste_titre"');
|
||||
print_liste_field_titre($langs->trans("WithdrawalsReceipts"),"bons.php","p.ref",'','','class="liste_titre"');
|
||||
print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"');
|
||||
print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -47,7 +47,7 @@ $page = GETPOST('page','int');
|
||||
$sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha');
|
||||
$sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha');
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
||||
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
||||
|
||||
if ($prev_id)
|
||||
{
|
||||
@ -56,7 +56,7 @@ if ($prev_id)
|
||||
if ($bon->fetch($prev_id) == 0)
|
||||
{
|
||||
$head = prelevement_prepare_head($bon);
|
||||
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
||||
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ $page = GETPOST('page','int');
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
||||
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
||||
|
||||
if ($prev_id)
|
||||
{
|
||||
@ -55,7 +55,7 @@ if ($prev_id)
|
||||
if ($bon->fetch($prev_id) == 0)
|
||||
{
|
||||
$head = prelevement_prepare_head($bon);
|
||||
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
||||
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ $page = GETPOST('page','int');
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
||||
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
||||
|
||||
if ($prev_id)
|
||||
{
|
||||
@ -53,7 +53,7 @@ if ($prev_id)
|
||||
if ($bon->fetch($prev_id) == 0)
|
||||
{
|
||||
$head = prelevement_prepare_head($bon);
|
||||
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
||||
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
|
||||
$bon = new BonPrelevement($db,"");
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
||||
llxHeader('',$langs->trans("WithdrawalsReceipts")); i
|
||||
|
||||
|
||||
if ($id > 0)
|
||||
@ -141,7 +141,7 @@ if ($id > 0)
|
||||
$bon->fetch($id);
|
||||
|
||||
$head = prelevement_prepare_head($bon);
|
||||
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
||||
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalsReceipts"), '', 'payment');
|
||||
|
||||
if (GETPOST('error','alpha')!='')
|
||||
{
|
||||
|
||||
@ -130,7 +130,7 @@ if ($id)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("WithdrawalReceipts").'</td><td>';
|
||||
print '<tr><td width="20%">'.$langs->trans("WithdrawalsReceipts").'</td><td>';
|
||||
print '<a href="fiche.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';
|
||||
|
||||
@ -54,7 +54,7 @@ $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortf
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
||||
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
||||
|
||||
if ($prev_id)
|
||||
{
|
||||
@ -63,7 +63,7 @@ if ($prev_id)
|
||||
if ($bon->fetch($prev_id) == 0)
|
||||
{
|
||||
$head = prelevement_prepare_head($bon);
|
||||
dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
||||
dol_fiche_head($head, 'lines', $langs->trans("WithdrawalsReceipts"), '', 'payment');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -111,7 +111,7 @@ if ($result)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
|
||||
print_liste_field_titre($langs->trans("WithdrawalReceipts"),$_SERVER["PHP_SELF"],"p.ref");
|
||||
print_liste_field_titre($langs->trans("WithdrawalsReceipts"),$_SERVER["PHP_SELF"],"p.ref");
|
||||
print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom");
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"');
|
||||
|
||||
@ -1615,7 +1615,7 @@ abstract class CommonObject
|
||||
//print 'Line '.$i.' rowid='.$obj->rowid.' vat_rate='.$obj->vatrate.' total_ht='.$obj->total_ht.' total_tva='.$obj->total_tva.' total_ttc='.$obj->total_ttc.' total_ht_by_vats='.$total_ht_by_vats[$obj->vatrate].' total_tva_by_vats='.$total_tva_by_vats[$obj->vatrate].' (new calculation = '.$tmpvat.') total_ttc_by_vats='.$total_ttc_by_vats[$obj->vatrate].($diff?" => DIFF":"")."<br>\n";
|
||||
if ($diff)
|
||||
{
|
||||
if (abs($diff) > 0.1) { dol_syslog('','A rounding difference was detected into TOTAL but is too high to be corrected', LOG_WARNING); exit; }
|
||||
if (abs($diff) > 0.1) { dol_syslog('A rounding difference was detected into TOTAL but is too high to be corrected', LOG_WARNING); exit; }
|
||||
$sqlfix="UPDATE ".MAIN_DB_PREFIX.$this->table_element_line." SET ".$fieldtva." = ".($obj->total_tva - $diff).", total_ttc = ".($obj->total_ttc - $diff)." WHERE rowid = ".$obj->rowid;
|
||||
dol_syslog('We found a difference of '.$diff.' for line rowid = '.$obj->rowid.". We fix the total_vat and total_ttc of line by running sqlfix = ".$sqlfix);
|
||||
$resqlfix=$this->db->query($sqlfix);
|
||||
|
||||
@ -177,7 +177,7 @@ function member_stats_prepare_head($object)
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/stats/geo.php?mode=memberbyregion';
|
||||
$head[$h][1] = $langs->trans("Region");
|
||||
$head[$h][2] = 'statscregion';
|
||||
$head[$h][2] = 'statsregion';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/stats/geo.php?mode=memberbystate';
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/contract/doc/pdf_strato.modules.php
|
||||
* \ingroup ficheinter
|
||||
* \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Strato
|
||||
* \brief Strato contracts template class file
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
@ -64,7 +64,7 @@ class pdf_strato extends ModelePDFContract
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = 'strato';
|
||||
$this->description = $langs->trans("DocumentModelStandard");
|
||||
$this->description = $langs->trans("StandardContractsTemplate");
|
||||
|
||||
// Dimension page pour format A4
|
||||
$this->type = 'pdf';
|
||||
@ -116,7 +116,6 @@ class pdf_strato extends ModelePDFContract
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("contracts");
|
||||
$outputlangs->load("interventions");
|
||||
|
||||
if ($conf->contrat->dir_output)
|
||||
{
|
||||
@ -171,10 +170,10 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->SetDrawColor(128,128,128);
|
||||
|
||||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("InterventionCard"));
|
||||
$pdf->SetSubject($outputlangs->transnoentities("ContractCard"));
|
||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("InterventionCard"));
|
||||
$pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("ContractCard"));
|
||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
|
||||
@ -408,13 +407,13 @@ class pdf_strato extends ModelePDFContract
|
||||
if (empty($hidebottom))
|
||||
{
|
||||
$pdf->SetXY(20,230);
|
||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("NameAndSignatureOfInternalContact"),0,'L',0);
|
||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0);
|
||||
|
||||
$pdf->SetXY(20,235);
|
||||
$pdf->MultiCell(80,25, '', 1);
|
||||
|
||||
$pdf->SetXY(110,230);
|
||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("NameAndSignatureOfExternalContact"),0,'L',0);
|
||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0);
|
||||
|
||||
$pdf->SetXY(110,235);
|
||||
$pdf->MultiCell(80,25, '', 1);
|
||||
@ -565,11 +564,11 @@ class pdf_strato extends ModelePDFContract
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
|
||||
else $socname = $object->client->nom;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
$this->recipient->name=$outputlangs->convToOutputCharset($socname);
|
||||
}
|
||||
else
|
||||
{
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
$this->recipient->name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
}
|
||||
|
||||
$carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target');
|
||||
@ -591,11 +590,11 @@ class pdf_strato extends ModelePDFContract
|
||||
// Show recipient name
|
||||
$pdf->SetXY($posx+2,$posy+3);
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, 'L');
|
||||
$pdf->MultiCell($widthrecbox, 4, $this->recipient->name, 0, 'L');
|
||||
|
||||
// Show recipient information
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($carac_client_name,50)*4));
|
||||
$pdf->SetXY($posx+2,$posy+4+(dol_nboflines_bis($this->recipient->name,50)*4));
|
||||
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 François Cerbelle <francois@cerbelle.net>
|
||||
* Copyright (C) 2013 florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Florian HENRY <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -27,8 +27,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
|
||||
|
||||
/**
|
||||
* \class mailing_contacts4
|
||||
* \brief Class to manage a list of personalised recipients for mailing feature
|
||||
* Class to manage a list of personalised recipients for mailing feature
|
||||
*/
|
||||
class mailing_contacts4 extends MailingTargets
|
||||
{
|
||||
@ -78,7 +77,7 @@ class mailing_contacts4 extends MailingTargets
|
||||
|
||||
// La requete doit retourner: id, email, fk_contact, name, firstname, other
|
||||
$sql = "SELECT sp.rowid as id, sp.email as email, sp.rowid as fk_contact,";
|
||||
$sql.= " sp.lastname, sp.firstname, sp.civility_id,";
|
||||
$sql.= " sp.lastname, sp.firstname, sp.civilite as civility_id,";
|
||||
$sql.= " s.nom as companyname";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
|
||||
if ($filtersarray[0] <> 'all')$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie_contact as cs ON cs.fk_socpeople=sp.rowid";
|
||||
|
||||
@ -28,8 +28,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* \class mailing_fraise
|
||||
* \brief Class to generate target according to rule Fraise
|
||||
* Class to generate target according to rule Fraise
|
||||
*/
|
||||
class mailing_fraise extends MailingTargets
|
||||
{
|
||||
|
||||
@ -19,8 +19,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
||||
|
||||
|
||||
/**
|
||||
* \class mailing_framboise
|
||||
* \brief Class to manage a list of personalised recipients for mailing feature
|
||||
* Class to manage a list of personalised recipients for mailing feature
|
||||
*/
|
||||
class mailing_framboise extends MailingTargets
|
||||
{
|
||||
@ -58,11 +57,14 @@ class mailing_framboise extends MailingTargets
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("members");
|
||||
$langs->load("companies");
|
||||
|
||||
$cibles = array();
|
||||
|
||||
// Select the members from category
|
||||
$sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
|
||||
$sql.= " a.datefin, a.civilite as civility_id, a.login, a.societe,"; // Other fields
|
||||
if ($_POST['filter']) $sql.= " c.label";
|
||||
else $sql.=" null as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||
@ -97,7 +99,12 @@ class mailing_framboise extends MailingTargets
|
||||
'fk_contact' => $obj->fk_contact,
|
||||
'lastname' => $obj->lastname,
|
||||
'firstname' => $obj->firstname,
|
||||
'other' => ($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
|
||||
'other' =>
|
||||
($langs->transnoentities("Login").'='.$obj->login).';'.
|
||||
($langs->transnoentities("UserTitle").'='.($obj->civility_id?$langs->transnoentities("Civility".$obj->civility_id):'')).';'.
|
||||
($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')).';'.
|
||||
($langs->transnoentities("Company").'='.$obj->societe).';'.
|
||||
($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
|
||||
'source_url' => $this->url($obj->id),
|
||||
'source_id' => $obj->id,
|
||||
'source_type' => 'member'
|
||||
|
||||
@ -143,12 +143,13 @@ class mailing_pomme extends MailingTargets
|
||||
function add_to_target($mailing_id,$filtersarray=array())
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("companies");
|
||||
|
||||
$cibles = array();
|
||||
|
||||
// La requete doit retourner: id, email, fk_contact, name, firstname
|
||||
// La requete doit retourner: id, email, fk_contact, lastname, firstname
|
||||
$sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,";
|
||||
$sql.= " u.lastname as name, u.firstname as firstname, u.civilite as civility_id, u.login, u.office_phone";
|
||||
$sql.= " u.lastname as lastname, u.firstname as firstname, u.civilite as civility_id, u.login, u.office_phone";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
|
||||
$sql.= " AND u.entity IN (0,".$conf->entity.")";
|
||||
|
||||
@ -108,8 +108,8 @@ class mailing_thirdparties extends MailingTargets
|
||||
$cibles[$j] = array(
|
||||
'email' => $obj->email,
|
||||
'fk_contact' => $obj->fk_contact,
|
||||
'lastname' => $obj->lastname,
|
||||
'firstname' => $obj->firstname,
|
||||
'lastname' => $obj->name, // For a thirdparty, we must use name
|
||||
'firstname' => '', // For a thirdparty, lastname is ''
|
||||
'other' => ($obj->label?$langs->transnoentities("Category").'='.$obj->label:''),
|
||||
'source_url' => $this->url($obj->id),
|
||||
'source_id' => $obj->id,
|
||||
|
||||
@ -39,6 +39,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db=$db;
|
||||
|
||||
$this->arrayofproducts=array();
|
||||
@ -46,7 +48,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
// List of services
|
||||
$sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= " WHERE entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " AND fk_product_type = 1";
|
||||
if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $sql.= " AND fk_product_type = 1"; // By default, only services
|
||||
$sql.= " ORDER BY ref";
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
@ -123,7 +125,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
{
|
||||
$cibles[$j] = array(
|
||||
'email' => $obj->email,
|
||||
'lastname' => $obj->lastname,
|
||||
'lastname' => $obj->name, // For thirdparties, lastname must be name
|
||||
'firstname' => '', // For thirdparties, firstname is ''
|
||||
'other' =>
|
||||
('StartDate='.dol_print_date($this->db->jdate($obj->date_ouverture),'day')).';'.
|
||||
('EndDate='.dol_print_date($this->db->jdate($obj->date_fin_validite),'day')).';'.
|
||||
@ -142,8 +145,8 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog($this->db->error());
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog($this->db->lasterror());
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -193,7 +196,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
||||
$sql.= " AND cd.statut= 4 AND cd.fk_product=p.rowid";
|
||||
$sql.= " AND p.ref IN ('".join("','",$this->arrayofproducts)."')";
|
||||
$sql.= " AND cd.date_fin_validite < '".$this->db->idate($now)."'";
|
||||
//print $sql;
|
||||
|
||||
$a=parent::getNbOfRecipients($sql);
|
||||
|
||||
return $a;
|
||||
|
||||
@ -104,7 +104,7 @@ class mailing_xinputuser extends MailingTargets
|
||||
global $langs;
|
||||
|
||||
$s='';
|
||||
$s.='<input type="text" name="xinputuser" class="flat" size="40">';
|
||||
$s.='<input type="text" name="xinputuser" class="flat" size="40" value="'.GETPOST("xinputuser").'">';
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ class modBarcode extends DolibarrModules
|
||||
'leftmenu'=>'barcodeprint',
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
'titre'=>'BarCodePrintsheet',
|
||||
'url'=>'/barcode/printsheet.php?mainmenu=home&leftmenu=modulesadmintools',
|
||||
'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint',
|
||||
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>200,
|
||||
'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
|
||||
@ -155,7 +155,7 @@ if ($memmaxorig != '')
|
||||
if (strtoupper($reg[2]) == 'M') $memmax=$reg[1]*1024*1024;
|
||||
if (strtoupper($reg[2]) == 'K') $memmax=$reg[1]*1024;
|
||||
}
|
||||
if ($memmax >= $memrequired)
|
||||
if ($memmax >= $memrequired || $memmax == -1)
|
||||
{
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPMemoryOK",$memmaxorig,$memrequiredorig)."<br>\n";
|
||||
}
|
||||
@ -212,13 +212,13 @@ else
|
||||
else dolibarr_install_syslog("failed to create a new file ".$conffile." into current dir ".getcwd().". Check permission.", LOG_ERR);
|
||||
}
|
||||
|
||||
// First install, on ne peut pas upgrader
|
||||
// First install, we can't upgrade
|
||||
$allowupgrade=0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Si fichier absent et n'a pu etre cree
|
||||
// File is missng and can't be created
|
||||
if (! file_exists($conffile))
|
||||
{
|
||||
print '<img src="../theme/eldy/img/error.png" alt="Error"> '.$langs->trans("ConfFileDoesNotExistsAndCouldNotBeCreated",$conffiletoshow);
|
||||
@ -231,7 +231,7 @@ if (! file_exists($conffile))
|
||||
}
|
||||
else
|
||||
{
|
||||
// Si fichier present mais ne peut etre modifie
|
||||
// File exists but can't be modified
|
||||
if (!is_writable($conffile))
|
||||
{
|
||||
if ($confexists)
|
||||
@ -248,7 +248,7 @@ else
|
||||
|
||||
$allowinstall=0;
|
||||
}
|
||||
// Si fichier present et peut etre modifie
|
||||
// File exists and can be modified
|
||||
else
|
||||
{
|
||||
if ($confexists)
|
||||
@ -267,12 +267,12 @@ else
|
||||
}
|
||||
print "<br>\n";
|
||||
|
||||
// Si prerequis ok, on affiche le bouton pour passer a l'etape suivante
|
||||
// Requirements ok, we display the next step button
|
||||
if ($checksok)
|
||||
{
|
||||
$ok=0;
|
||||
|
||||
// Try to create db connexion
|
||||
// Try to create db connection
|
||||
if (file_exists($conffile))
|
||||
{
|
||||
include_once $conffile;
|
||||
@ -523,5 +523,5 @@ $("div#AShowChoices a").click(function() {
|
||||
|
||||
</script>';
|
||||
|
||||
pFooter(1); // 1 car ne doit jamais afficher bouton Suivant
|
||||
pFooter(true); // Never display next button
|
||||
|
||||
|
||||
@ -89,6 +89,8 @@ ListOfServicesToExpireWithDuration=List of Services to expire in %s days
|
||||
ListOfServicesToExpireWithDurationNeg=List of Services expired from more than %s days
|
||||
ListOfServicesToExpire=List of Services to expire
|
||||
NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative.
|
||||
StandardContractsTemplate=Standard contracts template
|
||||
ContactNameAndSignature=For %s, name and signature:
|
||||
|
||||
##### Types de contacts #####
|
||||
TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract
|
||||
|
||||
@ -79,6 +79,7 @@ MailtoEMail=Hyper link to email
|
||||
ActivateCheckRead=Allow to use the "Unsubcribe" link
|
||||
ActivateCheckReadKey=Key use to encrypt URL use for "Read Receipt" and "Unsubcribe" feature
|
||||
EMailSentToNRecipients=EMail sent to %s recipients.
|
||||
XTargetsAdded=<b>%s</b> recipients added into target list
|
||||
EachInvoiceWillBeAttachedToEmail=A document using default invoice document template will be created and attached to each email.
|
||||
MailTopicSendRemindUnpaidInvoices=Reminder of invoice %s (%s)
|
||||
SendRemind=Send reminder by EMails
|
||||
|
||||
@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics
|
||||
ProductsStatistics=Products statistics
|
||||
ProductsOnSell=Available products
|
||||
ProductsNotOnSell=Obsolete products
|
||||
ProductsOnSellAndOnBuy=Products not for sale nor purchase
|
||||
ServicesOnSell=Available services
|
||||
ServicesNotOnSell=Obsolete services
|
||||
ServicesOnSellAndOnBuy=Services not for sale nor purchase
|
||||
InternalRef=Internal reference
|
||||
LastRecorded=Last products/services on sell recorded
|
||||
LastRecordedProductsAndServices=Last %s recorded products/services
|
||||
|
||||
@ -1621,9 +1621,12 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
||||
//Dolibarr version
|
||||
$doliurl='http://www.dolibarr.org';
|
||||
|
||||
//local communities
|
||||
if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
|
||||
//local communities
|
||||
if (preg_match('/fr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.fr';
|
||||
if (preg_match('/es/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.es';
|
||||
if (preg_match('/de/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.de';
|
||||
if (preg_match('/it/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.it';
|
||||
if (preg_match('/gr/i',$langs->defaultlang)) $doliurl='http://www.dolibarr.gr';
|
||||
|
||||
$appli='Dolibarr';
|
||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE))
|
||||
|
||||
@ -765,18 +765,20 @@ print '</tr>';
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="80%">'.$langs->trans("AddRefInList").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center">';
|
||||
if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST))
|
||||
{
|
||||
print '<td align="center" colspan="2"><a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=0">';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=0">';
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
print '</a></td>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center" colspan="2"><a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=1">';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setaddrefinlist&value=1">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
|
||||
@ -144,19 +144,21 @@ if ($resql)
|
||||
$other3=$other[2];
|
||||
$other4=$other[3];
|
||||
$other5=$other[4];
|
||||
// Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray=array(
|
||||
'__ID__' => $obj->source_id,
|
||||
'__EMAIL__' => $obj->email,
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj2->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
|
||||
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj2->email.'">'.$obj2->email.'</a>',
|
||||
'__LASTNAME__' => $obj2->lastname,
|
||||
'__FIRSTNAME__' => $obj2->firstname,
|
||||
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj2->email.'">'.$obj2->email.'</a>',
|
||||
'__OTHER1__' => $other1,
|
||||
'__OTHER2__' => $other2,
|
||||
'__OTHER3__' => $other3,
|
||||
'__OTHER4__' => $other4,
|
||||
'__OTHER5__' => $other5
|
||||
'__OTHER5__' => $other5,
|
||||
'__SIGNATURE__' => '', // Signature is empty when ran from command line (user is a bot)
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj2->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj2->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>'
|
||||
);
|
||||
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
||||
{
|
||||
|
||||
1
test/phpunit/testemailing.txt
Normal file
1
test/phpunit/testemailing.txt
Normal file
@ -0,0 +1 @@
|
||||
test@bidon.com;Name of user;Lastname of user;Other
|
||||
Loading…
Reference in New Issue
Block a user