Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc
This commit is contained in:
commit
d1b003f3c4
@ -70,13 +70,13 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
||||
|
||||
print $langs->trans("SetupDescription1").' ';
|
||||
print $langs->trans("AreaForAdminOnly").' ';
|
||||
print $langs->trans("SetupDescription2")."<br><br>";
|
||||
print $langs->trans("SetupDescription2", $langs->trans("MenuCompanySetup"), $langs->trans("Modules"))."<br><br>";
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Show info setup company
|
||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) $setupcompanynotcomplete=1;
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription3",DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit'));
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete)?'':'&action=edit'), $langs->trans("Setup"), $langs->trans("MenuCompanySetup"));
|
||||
if (! empty($setupcompanynotcomplete))
|
||||
{
|
||||
$langs->load("errors");
|
||||
@ -88,7 +88,7 @@ print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription4",DOL_URL_ROOT.'/admin/modules.php?mainmenu=home');
|
||||
print img_picto('','puce').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->trans("Setup"), $langs->trans("Modules"));
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
|
||||
{
|
||||
$langs->load("errors");
|
||||
|
||||
@ -87,7 +87,7 @@ $parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (GETPOST('buttonreset'))
|
||||
if (GETPOST('buttonreset','alpha'))
|
||||
{
|
||||
$search_keyword='';
|
||||
$search_status='';
|
||||
@ -748,13 +748,17 @@ if ($mode == 'common')
|
||||
print '<!-- This module is an external module and it may have a warning to show (note: your country is '.$mysoc->country_code.') -->'."\n";
|
||||
foreach ($arrayofwarningsext as $keymodule => $arrayofwarningsextbycountry)
|
||||
{
|
||||
if (! empty($modules[$keymodule]->const_name)) // If module that request warning is on
|
||||
$keymodulelowercase=strtolower(preg_replace('/^mod/','',$keymodule));
|
||||
if (in_array($keymodulelowercase, $conf->modules)) // If module that request warning is on
|
||||
{
|
||||
foreach ($arrayofwarningsextbycountry as $keycountry => $cursorwarningmessage)
|
||||
{
|
||||
if ($keycountry == 'always' || $keycountry == $mysoc->country_code)
|
||||
{
|
||||
$warningmessage .= ($warningmessage?"\n":"").$langs->trans($cursorwarningmessage, $objMod->getName(), $mysoc->country_code, $modules[$keymodule]->getName());
|
||||
$warningmessage .= ($warningmessage?"\n":"").($warningmessage?"\n":"").$langs->trans("Module").' : '.$objMod->getName();
|
||||
if (! empty($objMod->editor_name)) $warningmessage .= ($warningmessage?"\n":"").$langs->trans("Publisher").' : '.$objMod->editor_name;
|
||||
if (! empty($objMod->editor_name)) $warningmessage .= ($warningmessage?"\n":"").$langs->trans("ModuleTriggeringThisWarning").' : '.$modules[$keymodule]->getName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2621,6 +2621,19 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$outputlangs->load('commercial');
|
||||
}
|
||||
|
||||
// Show email form
|
||||
|
||||
// By default if $action=='presend'
|
||||
$titreform='SendOrderByMail';
|
||||
$topicmail='';
|
||||
if (empty($object->ref_client)) {
|
||||
$topicmail = $outputlangs->trans('SendOrderRef', '__ORDERREF__');
|
||||
} else if (! empty($object->ref_client)) {
|
||||
$topicmail = $outputlangs->trans('SendOrderRef', '__ORDERREF__ (__REFCLIENT__)');
|
||||
}
|
||||
$action='send';
|
||||
$modelmail='order_send';
|
||||
|
||||
// Build document if it not exists
|
||||
if (! $file || ! is_readable($file)) {
|
||||
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
@ -2635,7 +2648,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<div id="formmailbeforetitle" name="formmailbeforetitle"></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans('SendOrderByMail'));
|
||||
print load_fiche_titre($langs->trans($titreform));
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
@ -2662,11 +2675,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste;
|
||||
$formmail->withtocc = $liste;
|
||||
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
|
||||
if (empty($object->ref_client)) {
|
||||
$formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__');
|
||||
} else if (! empty($object->ref_client)) {
|
||||
$formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__ (__REFCLIENT__)');
|
||||
}
|
||||
$formmail->withtopic = $topicmail;
|
||||
$formmail->withfile = 2;
|
||||
$formmail->withbody = 1;
|
||||
$formmail->withdeliveryreceipt = 1;
|
||||
@ -2696,8 +2705,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
|
||||
// Tableau des parametres complementaires
|
||||
$formmail->param['action'] = 'send';
|
||||
$formmail->param['models'] = 'order_send';
|
||||
$formmail->param['action'] = $action;
|
||||
$formmail->param['models'] = $modelmail;
|
||||
$formmail->param['models_id']=GETPOST('modelmailselected','int');
|
||||
$formmail->param['orderid'] = $object->id;
|
||||
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
/*
|
||||
* Add file in email form
|
||||
*/
|
||||
*/
|
||||
if (GETPOST('addfile'))
|
||||
{
|
||||
$trackid = GETPOST('trackid','aZ09');
|
||||
@ -137,7 +137,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
{
|
||||
$sendtosocid=$possibleaccounts[1]['id'];
|
||||
$result=$object->fetch($sendtosocid);
|
||||
|
||||
|
||||
setEventMessages($langs->trans('ErrorFoundMoreThanOneRecordWithEmail',$_POST['sendto'],$object->name), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
@ -229,7 +229,12 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
|
||||
if (dol_strlen($sendto))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
// Define $urlwithroot
|
||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
|
||||
$langs->load("commercial");
|
||||
|
||||
@ -254,11 +259,17 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
|
||||
$replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>';
|
||||
$message = $_POST['message'];
|
||||
|
||||
|
||||
// Make a change into HTML code to allow to include images from medias directory with an external reabable URL.
|
||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// become
|
||||
// <img alt="" src="'.$urlwithroot.'viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
$message=preg_replace('/(<img.*src=")[^\"]*viewimage\.php([^\"]*)modulepart=medias([^\"]*)file=([^\"]*)("[^\/]*\/>)/', '\1'.$urlwithroot.'/viewimage.php\2modulepart=medias\3file=\4\5', $message);
|
||||
|
||||
$sendtobcc= GETPOST('sendtoccc');
|
||||
if ($mode == 'emailfromproposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO));
|
||||
if ($mode == 'emailfromorder') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO));
|
||||
if ($mode == 'emailfrominvoice') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO));
|
||||
if ($mode == 'emailfromproposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO));
|
||||
if ($mode == 'emailfromorder') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO));
|
||||
if ($mode == 'emailfrominvoice') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO));
|
||||
if ($mode == 'emailfromsupplierproposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO));
|
||||
if ($mode == 'emailfromsupplierorder') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO));
|
||||
if ($mode == 'emailfromsupplierinvoice') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO));
|
||||
@ -371,7 +382,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
if (is_object($object))
|
||||
{
|
||||
if (empty($actiontypecode)) $actiontypecode='AC_OTH_AUTO'; // Event insert into agenda automatically
|
||||
|
||||
|
||||
$object->socid = $sendtosocid; // To link to a company
|
||||
$object->sendtoid = $sendtoid; // To link to contacts/addresses. This is an array.
|
||||
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
|
||||
@ -392,7 +403,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($error)
|
||||
{
|
||||
dol_print_error($db);
|
||||
@ -403,7 +414,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
// This avoid sending mail twice if going out and then back to page
|
||||
$mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2));
|
||||
setEventMessages($mesg, null, 'mesgs');
|
||||
if ($conf->dolimail->enabled)
|
||||
if ($conf->dolimail->enabled)
|
||||
{
|
||||
header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.(is_object($object)?$object->id:'').'&'.($paramname2?$paramname2:'mid').'='.$parm2val);
|
||||
exit;
|
||||
|
||||
@ -288,14 +288,15 @@ class FormMail extends Form
|
||||
$outputlangs->load('other');
|
||||
}
|
||||
|
||||
// Get message template
|
||||
// Get message template for $this->param["models"] into c_email_templates
|
||||
$model_id=0;
|
||||
if (array_key_exists('models_id',$this->param))
|
||||
{
|
||||
$model_id=$this->param["models_id"];
|
||||
}
|
||||
$arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs, $model_id);
|
||||
//var_dump($arraydefaultmessage);
|
||||
//var_dump($this->param["models"]);
|
||||
//var_dump($arraydefaultmessage);
|
||||
|
||||
$out.= "\n".'<!-- Begin form mail --><div id="mailformdiv"></div>'."\n";
|
||||
if ($this->withform == 1)
|
||||
@ -876,6 +877,7 @@ class FormMail extends Form
|
||||
elseif ($type_template=='shipping_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendShipping"); }
|
||||
elseif ($type_template=='fichinter_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||
elseif ($type_template=='thirdparty') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentThirdparty"); }
|
||||
elseif ($type_template=='user') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentUser"); }
|
||||
|
||||
$ret['label']='default';
|
||||
$ret['topic']='';
|
||||
|
||||
@ -756,7 +756,7 @@ function purgeSessions($mysessionid)
|
||||
*/
|
||||
function activateModule($value,$withdeps=1)
|
||||
{
|
||||
global $db, $modules, $langs, $conf;
|
||||
global $db, $modules, $langs, $conf, $mysoc;
|
||||
|
||||
// Check parameters
|
||||
if (empty($value)) {
|
||||
@ -813,7 +813,7 @@ function activateModule($value,$withdeps=1)
|
||||
}
|
||||
|
||||
$result=$objMod->init(); // Enable module
|
||||
if ($result <= 0)
|
||||
if ($result <= 0)
|
||||
{
|
||||
$ret['errors'][]=$objMod->error;
|
||||
}
|
||||
@ -848,19 +848,19 @@ function activateModule($value,$withdeps=1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($activate)
|
||||
{
|
||||
$ret['nbmodules']+=$resarray['nbmodules'];
|
||||
$ret['nbperms']+=$resarray['nbperms'];
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$ret['errors'][] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $modulestring);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith) && ! empty($objMod->conflictwith))
|
||||
{
|
||||
// Desactivation des modules qui entrent en conflit
|
||||
@ -879,12 +879,12 @@ function activateModule($value,$withdeps=1)
|
||||
}
|
||||
}
|
||||
|
||||
if (! count($ret['errors']))
|
||||
if (! count($ret['errors']))
|
||||
{
|
||||
$ret['nbmodules']++;
|
||||
$ret['nbperms']+=count($objMod->rights);
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -1221,7 +1221,7 @@ function form_constantes($tableau, $strictw3c=0, $helptext='')
|
||||
if ($result)
|
||||
{
|
||||
$obj = $db->fetch_object($result); // Take first result of select
|
||||
|
||||
|
||||
|
||||
// For avoid warning in strict mode
|
||||
if (empty($obj)) {
|
||||
@ -1360,7 +1360,7 @@ function showModulesExludedForExternal($modules)
|
||||
//if (empty($conf->global->$moduleconst)) continue;
|
||||
if (! in_array($modulename,$listofmodules)) continue;
|
||||
//var_dump($modulename.'eee'.$langs->trans('Module'.$module->numero.'Name'));
|
||||
|
||||
|
||||
if ($i > 0) $text.=', ';
|
||||
else $text.=' ';
|
||||
$i++;
|
||||
@ -1391,7 +1391,7 @@ function addDocumentModel($name, $type, $label='', $description='')
|
||||
$sql.= ($label?"'".$db->escape($label)."'":'null').", ";
|
||||
$sql.= (! empty($description)?"'".$db->escape($description)."'":"null");
|
||||
$sql.= ")";
|
||||
|
||||
|
||||
dol_syslog("admin.lib::addDocumentModel", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -865,7 +865,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
// Make a change into HTML code to allow to include images from medias directory.
|
||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// become
|
||||
// <img src="'.DOL_DATA_ROOT.'/media/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// <img alt="" src="'.DOL_DATA_ROOT.'/media/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
$newfreetext=preg_replace('/(<img.*src=")[^\"]*viewimage\.php[^\"]*modulepart=medias[^\"]*file=([^\"]*)("[^\/]*\/>)/', '\1'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext);
|
||||
|
||||
$line.=$outputlangs->convToOutputCharset($newfreetext);
|
||||
|
||||
@ -65,9 +65,9 @@ class modBlockedLog extends DolibarrModules
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->hidden = false; // A condition to disable module
|
||||
$this->depends = array('modFacture'); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->depends = array('always'=>'modFacture'); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->langfiles = array();
|
||||
|
||||
// Constants
|
||||
|
||||
@ -65,11 +65,13 @@ class modCashDesk extends DolibarrModules
|
||||
$this->config_page_url = array("cashdesk.php@cashdesk");
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array("modBanque","modFacture","modProduct"); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->depends = array('always'=>"modBanque", 'always'=>"modFacture", 'always'=>"modProduct", 'FR'=>'modBlockedLog'); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->phpmin = array(4,1); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(2,4); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("cashdesk");
|
||||
$this->warnings_activation = array('FR'=>'WarningNoteModulePOSForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation_ext = array('FR'=>'WarningInstallationMayBecomeNotCompliantWithLaw'); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
@ -64,14 +64,13 @@ class modFacture extends DolibarrModules
|
||||
$this->dirs = array("/facture/temp");
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array('always'=>"modSociete", 'FR'=>'modBlockedLog');
|
||||
$this->depends = array('always'=>"modSociete");
|
||||
$this->requiredby = array("modComptabilite","modAccounting");
|
||||
$this->conflictwith = array();
|
||||
$this->langfiles = array("bills","companies","compta","products");
|
||||
$this->warnings_activation = array('FR'=>'WarningNoteModuleInvoiceForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation = array();
|
||||
$this->warnings_activation_ext = array('FR'=>'WarningInstallationMayBecomeNotCompliantWithLaw'); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='text')
|
||||
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='text')
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("facture.php");
|
||||
|
||||
@ -99,7 +98,7 @@ class modFacture extends DolibarrModules
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
|
||||
/*$this->const[$r][0] = "FACTURE_DRAFT_WATERMARK";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "__(Draft)__";
|
||||
@ -107,7 +106,7 @@ class modFacture extends DolibarrModules
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;*/
|
||||
|
||||
|
||||
|
||||
// Boxes
|
||||
//$this->boxes = array(0=>array(1=>'box_factures_imp.php'),1=>array(1=>'box_factures.php'));
|
||||
$this->boxes = array(
|
||||
@ -116,16 +115,16 @@ class modFacture extends DolibarrModules
|
||||
2=>array('file'=>'box_graph_invoices_permonth.php','enabledbydefaulton'=>'Home')
|
||||
);
|
||||
|
||||
// Cronjobs
|
||||
// Cronjobs
|
||||
$this->cronjobs = array(
|
||||
0=>array('label'=>'RecurringInvoices', 'jobtype'=>'method', 'class'=>'compta/facture/class/facture-rec.class.php', 'objectname'=>'FactureRec', 'method'=>'createRecurringInvoices', 'parameters'=>'', 'comment'=>'Generate recurring invoices', 'frequency'=>1, 'unitfrequency'=>3600*24),
|
||||
0=>array('label'=>'RecurringInvoices', 'jobtype'=>'method', 'class'=>'compta/facture/class/facture-rec.class.php', 'objectname'=>'FactureRec', 'method'=>'createRecurringInvoices', 'parameters'=>'', 'comment'=>'Generate recurring invoices', 'frequency'=>1, 'unitfrequency'=>3600*24),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>3600, 'unitfrequency'=>3600)
|
||||
);
|
||||
// List of cron jobs entries to add
|
||||
// Example:
|
||||
);
|
||||
// List of cron jobs entries to add
|
||||
// Example:
|
||||
// $this->cronjobs=array(
|
||||
// 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600)
|
||||
// 0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600),
|
||||
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600)
|
||||
// );
|
||||
|
||||
// Permissions
|
||||
@ -206,8 +205,8 @@ class modFacture extends DolibarrModules
|
||||
// Menus
|
||||
//-------
|
||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||
|
||||
|
||||
|
||||
|
||||
// Exports
|
||||
//--------
|
||||
$r=1;
|
||||
|
||||
@ -104,7 +104,7 @@ MenuIdParent=Parent menu ID
|
||||
DetailMenuIdParent=ID of parent menu (empty for a top menu)
|
||||
DetailPosition=Sort number to define menu position
|
||||
AllMenus=All
|
||||
NotConfigured=Module not configured
|
||||
NotConfigured=Module/Application not configured
|
||||
Active=Active
|
||||
SetupShort=Setup
|
||||
OtherOptions=Other options
|
||||
@ -114,7 +114,6 @@ CurrentValueSeparatorThousand=Thousand separator
|
||||
Destination=Destination
|
||||
IdModule=Module ID
|
||||
IdPermissions=Permissions ID
|
||||
Modules=Modules
|
||||
LanguageBrowserParameter=Parameter %s
|
||||
LocalisationDolibarrParameters=Localisation parameters
|
||||
ClientTZ=Client Time Zone (user)
|
||||
@ -191,7 +190,7 @@ FeatureAvailableOnlyOnStable=Feature only available on official stable versions
|
||||
Rights=Permissions
|
||||
BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the dustbin to disable it.
|
||||
OnlyActiveElementsAreShown=Only elements from <a href="%s">enabled modules</a> are shown.
|
||||
ModulesDesc=Dolibarr modules define which application/feature is enabled in software. Some application/modules require permissions you must grant to users, after enabling module. Click on button on/off to enable an application/module.
|
||||
ModulesDesc=Dolibarr modules define which application/feature is enabled in software. Some application/modules require permissions you must grant to users, after activating it. Click on button on/off to enable a module/application.
|
||||
ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet...
|
||||
ModulesDeployDesc=If permissions on your file system allows it, you can use this tool to deploy an external module. The module wil then be visible on the tab <strong>%s</strong>.
|
||||
ModulesMarketPlaces=Find external modules...
|
||||
@ -271,7 +270,7 @@ FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your
|
||||
SubmitTranslation=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit your change to www.transifex.com/dolibarr-association/dolibarr/
|
||||
SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory <b>langs/%s</b> and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr.
|
||||
ModuleSetup=Module setup
|
||||
ModulesSetup=Modules setup
|
||||
ModulesSetup=Modules/Application setup
|
||||
ModuleFamilyBase=System
|
||||
ModuleFamilyCrm=Customer Relation Management (CRM)
|
||||
ModuleFamilySrm=Supplier Relation Management (SRM)
|
||||
@ -467,7 +466,7 @@ Module30Desc=Invoice and credit note management for customers. Invoice managemen
|
||||
Module40Name=Suppliers
|
||||
Module40Desc=Supplier management and buying (orders and invoices)
|
||||
Module42Name=Logs
|
||||
Module42Desc=Logging facilities (file, syslog, ...). Such logs are for technical/debug purposes. For legal purpose, see instead module 'Non Reversible Logs'.
|
||||
Module42Desc=Logging facilities (file, syslog, ...). Such logs are for technical/debug purposes.
|
||||
Module49Name=Editors
|
||||
Module49Desc=Editor management
|
||||
Module50Name=Products
|
||||
@ -566,7 +565,7 @@ Module2900Desc=GeoIP Maxmind conversions capabilities
|
||||
Module3100Name=Skype
|
||||
Module3100Desc=Add a Skype button into users / third parties / contacts / members cards
|
||||
Module3200Name=Non Reversible Logs
|
||||
Module3200Desc=Activate log of some business events into a non reversible log. Events are archived in real-time. The log is a table that can be then exported. This module may be mandatory for some countries.
|
||||
Module3200Desc=Activate log of some business events into a non reversible log. Events are archived in real-time. The log is a table of chained event that can be then read and exported. This module may be mandatory for some countries.
|
||||
Module4000Name=HRM
|
||||
Module4000Desc=Human resources management (mangement of department, employee contracts and feelings)
|
||||
Module5000Name=Multi-company
|
||||
@ -998,9 +997,9 @@ Delays_MAIN_DELAY_MEMBERS=Tolerance delay (in days) before alert on delayed memb
|
||||
Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolerance delay (in days) before alert for cheques deposit to do
|
||||
Delays_MAIN_DELAY_EXPENSEREPORTS=Tolerance delay (in days) before alert for expense reports to approve
|
||||
SetupDescription1=The setup area is for initial setup parameters before starting to use Dolibarr.
|
||||
SetupDescription2=The two most important setup steps are the first two in the setup menu on the left: Company/Organisation setup page and Modules setup page:
|
||||
SetupDescription3=Parameters in menu <a href="%s">Setup -> Company/Organisation</a> are required because submitted data are used on Dolibarr displays and to customize the default behaviour of the software (for country-related features for example).
|
||||
SetupDescription4=Parameters in menu <a href="%s">Setup -> Modules</a> are required because Dolibarr is not a monolithic ERP/CRM but a collection of several modules, all more or less independent. New features will be added to menus for every module you'll enable.
|
||||
SetupDescription2=The two mandatory setup steps are the first two in the setup menu on the left: %s setup page and %s setup page :
|
||||
SetupDescription3=Parameters in menu <a href="%s">%s -> %s</a> are required because defined data are used on Dolibarr screens and to customize the default behavior of the software (for country-related features for example).
|
||||
SetupDescription4=Parameters in menu <a href="%s">%s -> %s</a> are required because Dolibarr ERP/CRM is a collection of several modules/applications, all more or less independent. New features will be added to menus for every module you will activate.
|
||||
SetupDescription5=Other menu entries manage optional parameters.
|
||||
LogEvents=Security audit events
|
||||
Audit=Audit
|
||||
@ -1016,7 +1015,7 @@ BrowserOS=Browser OS
|
||||
ListOfSecurityEvents=List of Dolibarr security events
|
||||
SecurityEventsPurged=Security events purged
|
||||
LogEventDesc=You can enable here the logging for Dolibarr security events. Administrators can then see its content via menu <b>System tools - Audit</b>. Warning, this feature can consume a large amount of data in database.
|
||||
AreaForAdminOnly=Those features can be used by <b>administrator users</b> only.
|
||||
AreaForAdminOnly=Setup parameters can be set by <b>administrator users</b> only.
|
||||
SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only.
|
||||
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
|
||||
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" or "Save" button at bottom of page)
|
||||
@ -1700,7 +1699,8 @@ UserHasNoPermissions=This user has no permission defined
|
||||
TypeCdr=Use "None" if the date of payment term is date of invoice plus a delta in days (delta is field "Nb of days")<br>Use "At end of month", if, after delta, the date must be increased to reach the end of month (+ an optional "Offset" in days)<br>Use "Current/Next" to have payment term date being the first Nth of the month (N is stored into field "Nb of days")
|
||||
BaseCurrency=Reference currency of the company (go into setup of company to change this)
|
||||
WarningNoteModuleInvoiceForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016).
|
||||
WarningInstallationMayBecomeNotCompliantWithLaw=You try to install the module %s that is an external module. Activating an external module means you trust the editor of the module and you are sure that this module does not alterate negatively the behavior of your application and is compliant with laws of your country (%s). If the module bring a non legal feature, you become responsible for the use of a non legal software.
|
||||
WarningNoteModulePOSForFrenchLaw=This module %s is compliant with french laws (Loi Finance 2016) because module Non Reversible Logs is automatically activated.
|
||||
WarningInstallationMayBecomeNotCompliantWithLaw=You try to install the module %s that is an external module. Activating an external module means you trust the publisher of the module and you are sure that this module does not alterate negatively the behavior of your application and is compliant with laws of your country (%s). If the module bring a non legal feature, you become responsible for the use of a non legal software.
|
||||
##### Resource ####
|
||||
ResourceSetup=Configuration du module Resource
|
||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||
|
||||
@ -44,6 +44,7 @@ ErrorFailedToWriteInDir=Failed to write in directory %s
|
||||
ErrorFoundBadEmailInFile=Found incorrect email syntax for %s lines in file (example line %s with email=%s)
|
||||
ErrorUserCannotBeDelete=User cannot be deleted. May be it is associated to Dolibarr entities.
|
||||
ErrorFieldsRequired=Some required fields were not filled.
|
||||
ErrorSubjectIsRequired=The email topic is required
|
||||
ErrorFailedToCreateDir=Failed to create a directory. Check that Web server user has permissions to write into Dolibarr documents directory. If parameter <b>safe_mode</b> is enabled on this PHP, check that Dolibarr php files owns to web server user (or group).
|
||||
ErrorNoMailDefinedForThisUser=No mail defined for this user
|
||||
ErrorFeatureNeedJavascript=This feature need javascript to be activated to work. Change this in setup - display.
|
||||
|
||||
@ -366,7 +366,8 @@ VATRate=Tax Rate
|
||||
Average=Average
|
||||
Sum=Sum
|
||||
Delta=Delta
|
||||
Module=Module
|
||||
Module=Module/Application
|
||||
Modules=Modules/Applications
|
||||
Option=Option
|
||||
List=List
|
||||
FullList=Full list
|
||||
|
||||
@ -81,6 +81,7 @@ PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nYou will find her
|
||||
PredefinedMailContentSendShipping=__CONTACTCIVNAME__\n\nYou will find here the shipping __SHIPPINGREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
||||
PredefinedMailContentSendFichInter=__CONTACTCIVNAME__\n\nYou will find here the intervention __FICHINTERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
||||
PredefinedMailContentThirdparty=__CONTACTCIVNAME__\n\n__PERSONALIZED__\n\n__SIGNATURE__
|
||||
PredefinedMailContentUser=aa__PERSONALIZED__\n\n__SIGNATURE__
|
||||
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
|
||||
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
|
||||
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
|
||||
|
||||
@ -114,6 +114,8 @@ class modMyModule extends DolibarrModules
|
||||
$this->phpmin = array(5,0); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("mymodule@mymodule");
|
||||
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
|
||||
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
|
||||
@ -2528,7 +2528,6 @@ div.pagination li.noborder a:hover {
|
||||
div.pagination li a,
|
||||
div.pagination li span {
|
||||
background-color: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
div.pagination li:first-child a,
|
||||
div.pagination li:first-child span {
|
||||
|
||||
@ -1659,13 +1659,11 @@ else
|
||||
}
|
||||
if ($action == 'presend')
|
||||
{
|
||||
/*
|
||||
* Affiche formulaire mail
|
||||
*/
|
||||
// Show email form
|
||||
|
||||
// By default if $action=='presend'
|
||||
$titreform='SendMail';
|
||||
$topicmail='';
|
||||
$topicmail=1;
|
||||
$action='send';
|
||||
$modelmail='user';
|
||||
|
||||
@ -1680,9 +1678,8 @@ else
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
|
||||
$newlang = $_REQUEST['lang_id'];
|
||||
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||
$newlang = $object->default_lang;
|
||||
//if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
||||
// $newlang = $object->thirdparty->default_lang;
|
||||
|
||||
// Cree l'objet formulaire mail
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
@ -1701,7 +1698,7 @@ else
|
||||
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'thi'.$object->id);
|
||||
}
|
||||
$formmail->withfrom=1;
|
||||
$formmail->withtopic=1;
|
||||
$formmail->withtopic=$topicmail;
|
||||
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$object->email;
|
||||
$formmail->withtofree=1;
|
||||
$formmail->withtocc=1;
|
||||
@ -1711,37 +1708,9 @@ else
|
||||
$formmail->withdeliveryreceipt=1;
|
||||
$formmail->withcancel=1;
|
||||
// Tableau des substitutions
|
||||
//$formmail->setSubstitFromObject($object);
|
||||
$formmail->setSubstitFromObject($object);
|
||||
$formmail->substit['__LASTNAME__']=$object->lastname;
|
||||
$formmail->substit['__FIRSTNAME__']=$object->firstname;
|
||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||
$formmail->substit['__PERSONALIZED__']='';
|
||||
|
||||
//Find the good contact adress
|
||||
/*
|
||||
$custcontact='';
|
||||
$contactarr=array();
|
||||
$contactarr=$object->liste_contact(-1,'external');
|
||||
|
||||
if (is_array($contactarr) && count($contactarr)>0)
|
||||
{
|
||||
foreach($contactarr as $contact)
|
||||
{
|
||||
if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
|
||||
$contactstatic=new Contact($db);
|
||||
$contactstatic->fetch($contact['id']);
|
||||
$custcontact=$contactstatic->getFullName($langs,1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($custcontact)) {
|
||||
$formmail->substit['__CONTACTCIVNAME__']=$custcontact;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
// Tableau des parametres complementaires du post
|
||||
$formmail->param['action']=$action;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user