Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts: htdocs/accountancy/class/accountancyexport.class.php htdocs/comm/propal/class/propal.class.php htdocs/core/class/commonobject.class.php htdocs/core/class/html.formmail.class.php
This commit is contained in:
commit
990af9d5cf
@ -708,8 +708,8 @@ class AccountancyExport
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
||||
$date_doc = dol_print_date($line->doc_date, '%Y%m%d');
|
||||
$date_valid = dol_print_date($line->date_validated, '%Y%m%d');
|
||||
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
||||
$date_validation = dol_print_date($line->date_validated, '%Y%m%d');
|
||||
|
||||
// FEC:JournalCode
|
||||
print $line->code_journal.$separator;
|
||||
@ -721,25 +721,25 @@ class AccountancyExport
|
||||
print $line->piece_num.$separator;
|
||||
|
||||
// FEC:EcritureDate
|
||||
print $date_creation.$separator;
|
||||
print $date_document . $separator;
|
||||
|
||||
// FEC:CompteNum
|
||||
print $line->numero_compte.$separator;
|
||||
|
||||
// FEC:CompteLib
|
||||
print $line->label_compte.$separator;
|
||||
print dol_string_unaccent($line->label_compte) . $separator;
|
||||
|
||||
// FEC:CompAuxNum
|
||||
print $line->subledger_account.$separator;
|
||||
|
||||
// FEC:CompAuxLib
|
||||
print $line->subledger_label.$separator;
|
||||
print dol_string_unaccent($line->subledger_label) . $separator;
|
||||
|
||||
// FEC:PieceRef
|
||||
print $line->doc_ref.$separator;
|
||||
|
||||
// FEC:PieceDate
|
||||
print $date_doc.$separator;
|
||||
print dol_string_unaccent($date_creation) . $separator;
|
||||
|
||||
// FEC:EcritureLib
|
||||
print $line->label_operation.$separator;
|
||||
@ -757,7 +757,7 @@ class AccountancyExport
|
||||
print $line->date_lettering.$separator;
|
||||
|
||||
// FEC:ValidDate
|
||||
print $date_valid.$separator;
|
||||
print $date_validation . $separator;
|
||||
|
||||
// FEC:Montantdevise
|
||||
print $line->multicurrency_amount.$separator;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
@ -2992,9 +2992,9 @@ class Propal extends CommonObject
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$main = MAIN_DB_PREFIX . 'propaldet';
|
||||
$ef = $main . "_extrafields";
|
||||
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")";
|
||||
$main = MAIN_DB_PREFIX . 'propaldet';
|
||||
$ef = $main . "_extrafields";
|
||||
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")";
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id;
|
||||
if ($this->db->query($sqlef) && $this->db->query($sql))
|
||||
{
|
||||
@ -3011,6 +3011,9 @@ class Propal extends CommonObject
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->propal->multidir_output[$this->entity] && !empty($this->ref))
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
@ -3461,6 +3461,9 @@ class Commande extends CommonOrder
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// Remove directory with files
|
||||
$comref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->commande->multidir_output[$this->entity] && !empty($this->ref))
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
@ -2185,6 +2185,9 @@ class Facture extends CommonInvoice
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// On efface le repertoire de pdf provisoire
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->facture->dir_output && !empty($this->ref))
|
||||
|
||||
@ -486,6 +486,9 @@ class CMailFile
|
||||
{
|
||||
//$this->message->attach(Swift_Attachment::fromPath($filename_list[$i],$mimetype_list[$i]));
|
||||
$attachment = Swift_Attachment::fromPath($filename_list[$i], $mimetype_list[$i]);
|
||||
if (!empty($mimefilename_list[$i])) {
|
||||
$attachment->setFilename($mimefilename_list[$i]);
|
||||
}
|
||||
$this->message->attach($attachment);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -8250,4 +8250,49 @@ abstract class CommonObject
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete related files of object in database
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteEcmFiles()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
switch ($this->element){
|
||||
case 'propal':
|
||||
$element = 'propale';
|
||||
break;
|
||||
case 'product':
|
||||
$element = 'produit';
|
||||
break;
|
||||
case 'order_supplier':
|
||||
$element ='fournisseur/commande';
|
||||
break;
|
||||
case 'invoice_supplier':
|
||||
$element = 'fournisseur/facture/' . get_exdir($this->id, 2, 0, 1, $this, 'invoice_supplier');
|
||||
break;
|
||||
case 'shipping':
|
||||
$element = 'expedition/sending';
|
||||
break;
|
||||
default:
|
||||
$element = $this->element;
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_files";
|
||||
$sql.= " WHERE filename LIKE '".$this->db->escape($this->ref)."%'";
|
||||
$sql.= " AND filepath = '".$element."/".$this->db->escape($this->ref)."' AND entity = ".$conf->entity;
|
||||
|
||||
if (!$this->db->query($sql)) {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1248,7 +1248,7 @@ class FormMail extends Form
|
||||
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"); }
|
||||
elseif (!empty($type_template)) { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContent".ucfirst($type_template)); }
|
||||
elseif (!empty($type_template)) { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentGeneric"); }
|
||||
|
||||
$ret->label = 'default';
|
||||
$ret->lang = $outputlangs->defaultlang;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -1325,6 +1325,9 @@ class Expedition extends CommonObject
|
||||
{
|
||||
$this->db->commit();
|
||||
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// We delete PDFs
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if (!empty($conf->expedition->dir_output))
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
@ -1000,6 +1000,9 @@ class Fichinter extends CommonObject
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// Remove directory with files
|
||||
$fichinterref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->ficheinter->dir_output)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
@ -2062,6 +2062,9 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->fournisseur->commande->dir_output)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005 Marc Barilley <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
@ -1217,6 +1217,9 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// We remove directory
|
||||
if ($conf->fournisseur->facture->dir_output)
|
||||
{
|
||||
|
||||
@ -97,6 +97,7 @@ PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNA
|
||||
PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||
PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||
PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n
|
||||
PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_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)
|
||||
|
||||
@ -366,7 +366,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->id;
|
||||
header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withprojet=1');
|
||||
header("Location: ".DOL_URL_ROOT.'/projet/tasks/task.php?id='.$id.'&withproject=1');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2020 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
@ -2076,6 +2076,9 @@ class SupplierProposal extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive
|
||||
$this->deleteEcmFiles();
|
||||
|
||||
// We remove directory
|
||||
$ref = dol_sanitizeFileName($this->ref);
|
||||
if ($conf->supplier_proposal->dir_output && !empty($this->ref))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user