Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/modulebuilder/index.php
This commit is contained in:
commit
2db84a679e
@ -897,7 +897,7 @@ class ActionComm extends CommonObject
|
||||
$val=array('id'=>$val);
|
||||
}
|
||||
$sql ="INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['manadatory'])?'0':$val['manadatory']).", ".(empty($val['transparency'])?'0':$val['transparency']).", ".(empty($val['answer_status'])?'0':$val['answer_status']).")";
|
||||
$sql.=" VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory'])?'0':$val['mandatory']).", ".(empty($val['transparency'])?'0':$val['transparency']).", ".(empty($val['answer_status'])?'0':$val['answer_status']).")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql)
|
||||
|
||||
@ -1332,6 +1332,7 @@ class Propal extends CommonObject
|
||||
$sql.= ", p.fk_shipping_method";
|
||||
$sql.= ", p.fk_incoterms, p.location_incoterms";
|
||||
$sql.= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc";
|
||||
$sql.= ", p.tms as date_modification";
|
||||
$sql.= ", i.libelle as libelle_incoterms";
|
||||
$sql.= ", c.label as statut_label";
|
||||
$sql.= ", ca.code as availability_code, ca.label as availability";
|
||||
@ -1388,6 +1389,7 @@ class Propal extends CommonObject
|
||||
$this->datev = $this->db->jdate($obj->datev); // TODO deprecated
|
||||
$this->date_creation = $this->db->jdate($obj->datec); //Creation date
|
||||
$this->date_validation = $this->db->jdate($obj->datev); //Validation date
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification); // tms
|
||||
$this->date = $this->db->jdate($obj->dp); // Proposal date
|
||||
$this->datep = $this->db->jdate($obj->dp); // deprecated
|
||||
$this->fin_validite = $this->db->jdate($obj->dfv);
|
||||
|
||||
@ -685,6 +685,7 @@ class Contact extends CommonObject
|
||||
$sql.= " c.photo,";
|
||||
$sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,";
|
||||
$sql.= " c.import_key,";
|
||||
$sql.= " c.datec as date_creation, c.tms as date_modification,";
|
||||
$sql.= " co.label as country, co.code as country_code,";
|
||||
$sql.= " d.nom as state, d.code_departement as state_code,";
|
||||
$sql.= " u.rowid as user_id, u.login as user_login,";
|
||||
@ -719,6 +720,9 @@ class Contact extends CommonObject
|
||||
$this->zip = $obj->zip;
|
||||
$this->town = $obj->town;
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||
|
||||
$this->fk_departement = $obj->fk_departement; // deprecated
|
||||
$this->state_id = $obj->fk_departement;
|
||||
$this->departement_code = $obj->state_code; // deprecated
|
||||
|
||||
@ -1055,7 +1055,7 @@ class Contrat extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error="Failed to add contact";
|
||||
$this->error="Failed to add contract";
|
||||
dol_syslog(get_class($this)."::create - 20 - ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
|
||||
@ -74,6 +74,8 @@ class box_graph_propales_permonth extends ModeleBoxes
|
||||
//include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
//$propalstatic=new Propal($db);
|
||||
|
||||
$langs->load("propal");
|
||||
|
||||
$text = $langs->trans("BoxProposalsPerMonth",$max);
|
||||
$this->info_box_head = array(
|
||||
'text' => $text,
|
||||
|
||||
@ -599,15 +599,16 @@ abstract class CommonDocGenerator
|
||||
}
|
||||
|
||||
// Retrieve extrafields
|
||||
/*if(is_array($object->array_options) && count($object->array_options))
|
||||
if (is_array($object->array_options) && count($object->array_options))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields = new ExtraFields($this->db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('shipment',true);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('expedition',true);
|
||||
$object->fetch_optionals();
|
||||
|
||||
$array_shipment = $this->fill_substitutionarray_with_extrafields($object,$array_shipment,$extrafields,$array_key,$outputlangs);
|
||||
}*/
|
||||
}
|
||||
|
||||
return $array_shipment;
|
||||
}
|
||||
|
||||
@ -615,16 +616,16 @@ abstract class CommonDocGenerator
|
||||
/**
|
||||
* Define array with couple substitution key => substitution value
|
||||
*
|
||||
* @param array $line Array of lines
|
||||
* @param ExpeditionLigne $line Object line
|
||||
* @param Translate $outputlangs Lang object to use for output
|
||||
* @return array Substitution array
|
||||
*/
|
||||
function get_substitutionarray_shipment_lines($line,$outputlangs)
|
||||
function get_substitutionarray_shipment_lines($line, $outputlangs)
|
||||
{
|
||||
global $conf;
|
||||
dol_include_once('/core/lib/product.lib.php');
|
||||
|
||||
return array(
|
||||
$resarray = array(
|
||||
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
|
||||
'line_product_ref'=>$line->product_ref,
|
||||
'line_product_label'=>$line->product_label,
|
||||
@ -643,6 +644,18 @@ abstract class CommonDocGenerator
|
||||
'line_surface'=>empty($line->surface) ? '' : $line->surface*$line->qty_shipped.' '.measuring_units_string($line->surface_units, 'surface'),
|
||||
'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'),
|
||||
);
|
||||
|
||||
// Retrieve extrafields
|
||||
$extrafieldkey = $line->element;
|
||||
$array_key = "line";
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
$extrafields = new ExtraFields($this->db);
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey, true);
|
||||
$line->fetch_optionals();
|
||||
|
||||
$resarray = $this->fill_substitutionarray_with_extrafields($line, $resarray, $extrafields, $array_key, $outputlangs);
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1
htdocs/dav/index.html
Normal file
1
htdocs/dav/index.html
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -675,7 +675,7 @@ ALTER TABLE llx_blockedlog MODIFY COLUMN ref_object varchar(255);
|
||||
|
||||
-- SPEC : use database type 'double' to store monetary values
|
||||
ALTER TABLE llx_blockedlog MODIFY COLUMN amounts double(24,8) NOT NULL;
|
||||
ALTER TABLE llx_chargessociales MODIFY COLUMN amount double(24,8);
|
||||
ALTER TABLE llx_chargesociales MODIFY COLUMN amount double(24,8);
|
||||
ALTER TABLE llx_commande MODIFY COLUMN amount_ht double(24,8) default 0;
|
||||
ALTER TABLE llx_commande_fournisseur MODIFY COLUMN amount_ht double(24,8);
|
||||
ALTER TABLE llx_don MODIFY COLUMN amount double(24,8);
|
||||
|
||||
@ -52,6 +52,7 @@ ALTER TABLE llx_ecm_files ADD UNIQUE INDEX uk_ecm_files (filepath, filename, ent
|
||||
|
||||
UPDATE llx_const set name = __ENCRYPT('INVOICE_FREE_TEXT')__ where name = __ENCRYPT('FACTURE_FREE_TEXT')__;
|
||||
|
||||
ALTER TABLE llx_chargesociales MODIFY COLUMN amount double(24,8);
|
||||
|
||||
|
||||
-- drop very old table (bad name)
|
||||
|
||||
@ -121,20 +121,22 @@ if ($dirins && $action == 'initmodule' && $modulename)
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($conf->global->MODULEBUILDER_USE_ABOUT)){
|
||||
dol_delete_file($destdir.'/admin/about.php');
|
||||
}
|
||||
if(!empty($conf->global->MODULEBUILDER_USE_DOCFOLDER)){
|
||||
dol_delete_dir($destdir.'/doc/');
|
||||
}
|
||||
if (!empty($conf->global->MODULEBUILDER_USE_ABOUT))
|
||||
{
|
||||
dol_delete_file($destdir.'/admin/about.php');
|
||||
}
|
||||
if (!empty($conf->global->MODULEBUILDER_USE_DOCFOLDER))
|
||||
{
|
||||
dol_delete_dir($destdir.'/doc/');
|
||||
}
|
||||
|
||||
// Delete some files
|
||||
// Delete some files related to object (because to previous dolCopyDir has copied everything)
|
||||
dol_delete_file($destdir.'/myobject_card.php');
|
||||
dol_delete_file($destdir.'/myobject_note.php');
|
||||
dol_delete_file($destdir.'/myobject_document.php');
|
||||
dol_delete_file($destdir.'/myobject_agenda.php');
|
||||
dol_delete_file($destdir.'/myobject_list.php');
|
||||
dol_delete_file($destdir.'/lib/myobject.lib.php');
|
||||
dol_delete_file($destdir.'/lib/mymodule_myobject.lib.php');
|
||||
dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php');
|
||||
dol_delete_file($destdir.'/sql/llx_mymodule_myobject.sql');
|
||||
dol_delete_file($destdir.'/sql/llx_mymodule_myobject_extrafields.sql');
|
||||
@ -291,14 +293,14 @@ if ($dirins && $action == 'initobject' && $module && $objectname)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// Delete some files
|
||||
// Copy some files
|
||||
$filetogenerate = array(
|
||||
'myobject_card.php'=>strtolower($objectname).'_card.php',
|
||||
'myobject_note.php'=>strtolower($objectname).'_note.php',
|
||||
'myobject_document.php'=>strtolower($objectname).'_document.php',
|
||||
'myobject_agenda.php'=>strtolower($objectname).'_agenda.php',
|
||||
'myobject_list.php'=>strtolower($objectname).'_list.php',
|
||||
'lib/myobject.lib.php'=>'lib/'.strtolower($objectname).'.lib.php',
|
||||
'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php',
|
||||
'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.$objectname.'Test.php',
|
||||
'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql',
|
||||
'sql/llx_mymodule_myobject_extrafields.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql',
|
||||
@ -660,7 +662,8 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname)
|
||||
'myobject_document.php'=>strtolower($objectname).'_document.php',
|
||||
'myobject_agenda.php'=>strtolower($objectname).'_agenda.php',
|
||||
'myobject_list.php'=>strtolower($objectname).'_list.php',
|
||||
'lib/myobject.lib.php'=>'lib/'.strtolower($objectname).'.lib.php',
|
||||
'lib/mymodule.lib.php'=>'lib/'.strtolower($module).'.lib.php',
|
||||
'lib/mymodule_myobject.lib.php'=>'lib/'.strtolower($module).'_'.strtolower($objectname).'.lib.php',
|
||||
'test/phpunit/MyObjectTest.php'=>'test/phpunit/'.$objectname.'Test.php',
|
||||
'sql/llx_mymodule_myobject.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'.sql',
|
||||
'sql/llx_mymodule_myobject_extrafields.sql'=>'sql/llx_'.strtolower($module).'_'.strtolower($objectname).'_extrafields.sql',
|
||||
|
||||
@ -13,7 +13,7 @@ Other modules are available on <a href="https://www.dolistore.com" target="_new"
|
||||
|
||||
### Translations
|
||||
|
||||
Translations can be define manually by editing files into directories [langs](langs).
|
||||
Translations can be define manually by editing files into directories *langs*.
|
||||
|
||||
<!--
|
||||
This module contains also a sample configuration for Transifex, under the hidden directory [.tx](.tx), so it is possible to manage translation using this service.
|
||||
@ -91,7 +91,7 @@ Licenses
|
||||
|
||||
GPLv3 or (at your option) any later version.
|
||||
|
||||
See [COPYING](COPYING) for more information.
|
||||
See file COPYING for more information.
|
||||
|
||||
#### Documentation
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/modulebuilder/template/lib/myobject.lib.php
|
||||
* \file htdocs/modulebuilder/template/lib/mymodule_myobject.lib.php
|
||||
* \ingroup mymodule
|
||||
* \brief Library files with common functions for MyObject
|
||||
*/
|
||||
@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
dol_include_once('/mymodule/class/myobject.class.php');
|
||||
dol_include_once('/mymodule/lib/myobject.lib.php');
|
||||
dol_include_once('/mymodule/lib/mymodule_myobject.lib.php');
|
||||
|
||||
|
||||
// Load translation files required by the page
|
||||
|
||||
@ -60,7 +60,7 @@ if (! $res) die("Include of main fails");
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
dol_include_once('/mymodule/class/myobject.class.php');
|
||||
dol_include_once('/mymodule/lib/myobject.lib.php');
|
||||
dol_include_once('/mymodule/lib/mymodule_myobject.lib.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mymodule@mymodule","other"));
|
||||
@ -80,7 +80,7 @@ $extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction=$conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('myobjectcard','globalcard')); // Note that conf->hooks_modules contains array
|
||||
// Fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label('myobject');
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||
|
||||
// Initialize array of search criterias
|
||||
@ -98,9 +98,6 @@ if (empty($action) && empty($id) && empty($ref)) $action='view';
|
||||
//if ($user->societe_id > 0) $socid = $user->societe_id;
|
||||
//$result = restrictedArea($user, 'mymodule', $id);
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
// Load object
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
dol_include_once('/mymodule/class/myobject.class.php');
|
||||
dol_include_once('/mymodule/lib/myobject.lib.php');
|
||||
dol_include_once('/mymodule/lib/mymodule_myobject.lib.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mymodule@mymodule","companies","other","mails"));
|
||||
|
||||
@ -38,7 +38,7 @@ if (! $res && file_exists("../../../main.inc.php")) $res=@include "../../../main
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
dol_include_once('/mymodule/class/myobject.class.php');
|
||||
dol_include_once('/mymodule/lib/myobject.lib.php');
|
||||
dol_include_once('/mymodule/lib/mymodule_myobject.lib.php');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mymodule@mymodule","companies"));
|
||||
|
||||
@ -218,7 +218,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."product_lot as t";
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " WHERE p.rowid = t.fk_product";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product').")";
|
||||
$sql.= " AND p.entity IN (".getEntity('product').")";
|
||||
|
||||
if ($search_entity) $sql.= natural_search("entity",$search_entity);
|
||||
if ($search_product) $sql.= natural_search("p.ref",$search_product);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user