Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
d172a95dfe
@ -283,6 +283,8 @@ if ($resql)
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#searchFormList").on("submit", function (e) {
|
$("#searchFormList").on("submit", function (e) {
|
||||||
|
//event.preventDefault();
|
||||||
|
//var form = this;
|
||||||
console.log("chartofaccounts focus = "+$("#chartofaccounts").is(":focus"));
|
console.log("chartofaccounts focus = "+$("#chartofaccounts").is(":focus"));
|
||||||
console.log("change_chart focus = "+$("#change_chart").is(":focus"));
|
console.log("change_chart focus = "+$("#change_chart").is(":focus"));
|
||||||
if ($("#change_chart").is(":focus"))
|
if ($("#change_chart").is(":focus"))
|
||||||
@ -290,6 +292,7 @@ if ($resql)
|
|||||||
console.log("We set valid_change_chart to 1");
|
console.log("We set valid_change_chart to 1");
|
||||||
$("#valid_change_chart").val(1);
|
$("#valid_change_chart").val(1);
|
||||||
}
|
}
|
||||||
|
//form.submit();
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -161,6 +161,7 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
// Define main accounts for thirdparty
|
// Define main accounts for thirdparty
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
|
||||||
|
|
||||||
foreach ($list_account_main as $key) {
|
foreach ($list_account_main as $key) {
|
||||||
print '<tr class="oddeven value">';
|
print '<tr class="oddeven value">';
|
||||||
@ -180,15 +181,6 @@ foreach ($list_account_main as $key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print "</table>\n";
|
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
|
||||||
// Define default accounts
|
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
|
||||||
|
|
||||||
foreach ($list_account as $key) {
|
foreach ($list_account as $key) {
|
||||||
$reg=array();
|
$reg=array();
|
||||||
if (preg_match('/---(.*)---/', $key, $reg)) {
|
if (preg_match('/---(.*)---/', $key, $reg)) {
|
||||||
|
|||||||
@ -134,13 +134,13 @@ if ($action == 'update') {
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$title = $langs->trans('ConfigAccountingExpert');
|
$title = $langs->trans('ExportOptions');
|
||||||
llxHeader('', $title);
|
llxHeader('', $title);
|
||||||
|
|
||||||
|
|
||||||
$linkback = '';
|
$linkback = '';
|
||||||
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
|
||||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy');
|
print load_fiche_titre($langs->trans('ExportOptions'), $linkback, 'accountancy');
|
||||||
|
|
||||||
|
|
||||||
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
print "\n".'<script type="text/javascript" language="javascript">'."\n";
|
||||||
|
|||||||
@ -448,8 +448,9 @@ class Documents extends DolibarrApi
|
|||||||
/**
|
/**
|
||||||
* Upload a file.
|
* Upload a file.
|
||||||
*
|
*
|
||||||
* Test sample 1: { "filename": "mynewfile.txt", "modulepart": "facture", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
* Test sample for invoice: { "filename": "mynewfile.txt", "modulepart": "invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
||||||
* Test sample 2: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
|
* Test sample for supplier invoice: { "filename": "mynewfile.txt", "modulepart": "supplier_invoice", "ref": "FA1701-001", "subdir": "", "filecontent": "content text", "fileencoding": "", "overwriteifexists": "0" }.
|
||||||
|
* Test sample for medias file: { "filename": "mynewfile.txt", "modulepart": "medias", "ref": "", "subdir": "image/mywebsite", "filecontent": "Y29udGVudCB0ZXh0Cg==", "fileencoding": "base64", "overwriteifexists": "0" }.
|
||||||
*
|
*
|
||||||
* @param string $filename Name of file to create ('FA1705-0123.txt')
|
* @param string $filename Name of file to create ('FA1705-0123.txt')
|
||||||
* @param string $modulepart Name of module or area concerned by file upload ('facture', 'project', 'project_task', ...)
|
* @param string $modulepart Name of module or area concerned by file upload ('facture', 'project', 'project_task', ...)
|
||||||
@ -505,6 +506,13 @@ class Documents extends DolibarrApi
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
$object = new Facture($this->db);
|
$object = new Facture($this->db);
|
||||||
}
|
}
|
||||||
|
elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice')
|
||||||
|
{
|
||||||
|
$modulepart = 'supplier_invoice';
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
|
$object = new FactureFournisseur($this->db);
|
||||||
|
}
|
||||||
elseif ($modulepart == 'project')
|
elseif ($modulepart == 'project')
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
@ -569,6 +577,12 @@ class Documents extends DolibarrApi
|
|||||||
throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found.");
|
throw new RestException(404, 'The object '.$modulepart." with ref '".$ref."' was not found.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special cases that need to use get_exdir to get real dir of object
|
||||||
|
// If future, all object should use this to define path of documents.
|
||||||
|
if ($modulepart == 'supplier_invoice') {
|
||||||
|
$tmpreldir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier');
|
||||||
|
}
|
||||||
|
|
||||||
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref);
|
$relativefile = $tmpreldir.dol_sanitizeFileName($object->ref);
|
||||||
|
|
||||||
$tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write');
|
$tmp = dol_check_secure_access_document($modulepart, $relativefile, $entity, DolibarrApiAccess::$user, $ref, 'write');
|
||||||
|
|||||||
@ -137,9 +137,9 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$modulepart = 'bank';
|
$modulepart = 'bank';
|
||||||
$permission = $user->rights->banque->modifier;
|
$permission = $user->rights->banque->modifier;
|
||||||
$permtoedit = $user->rights->banque->modifier;
|
$permtoedit = $user->rights->banque->modifier;
|
||||||
$param = '&id='.$object->id.'&num='.$num;
|
$param = '&id='.$object->id.'&num='.urlencode($num);
|
||||||
$uri = '&num='.$num;
|
$moreparam = '&num='.urlencode($num);;
|
||||||
$relativepathwithnofile = $id."/statement/".$num."/";
|
$relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/";
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
|||||||
$langs->loadLangs(array("banks", "categories", "companies", "bills", "trips", "donations", "loan"));
|
$langs->loadLangs(array("banks", "categories", "companies", "bills", "trips", "donations", "loan"));
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$id = GETPOST('account', 'int');
|
$id = GETPOST('account', 'int') ? GETPOST('account', 'int') : GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$dvid = GETPOST('dvid', 'alpha');
|
$dvid = GETPOST('dvid', 'alpha');
|
||||||
$numref = GETPOST('num', 'alpha');
|
$numref = GETPOST('num', 'alpha');
|
||||||
|
|||||||
@ -687,7 +687,9 @@ class modSociete extends DolibarrModules
|
|||||||
'sr.domiciliation' => "BankAccountDomiciliation",
|
'sr.domiciliation' => "BankAccountDomiciliation",
|
||||||
'sr.proprio' => "BankAccountOwner",
|
'sr.proprio' => "BankAccountOwner",
|
||||||
'sr.owner_address' => "BankAccountOwnerAddress",
|
'sr.owner_address' => "BankAccountOwnerAddress",
|
||||||
'sr.default_rib' => 'Default'
|
'sr.default_rib' => 'Default',
|
||||||
|
'sr.rum' => 'RUM',
|
||||||
|
'sr.type' => "Type ban is defaut",
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->import_convertvalue_array[$r] = array(
|
$this->import_convertvalue_array[$r] = array(
|
||||||
@ -714,7 +716,9 @@ class modSociete extends DolibarrModules
|
|||||||
'sr.domiciliation' => 'bank branch address eg. "PARIS"',
|
'sr.domiciliation' => 'bank branch address eg. "PARIS"',
|
||||||
'sr.proprio' => 'name on the bank account',
|
'sr.proprio' => 'name on the bank account',
|
||||||
'sr.owner_address' => 'address of account holder',
|
'sr.owner_address' => 'address of account holder',
|
||||||
'sr.default_rib' => '1 (default account) / 0 (not default)'
|
'sr.default_rib' => '1 (default account) / 0 (not default)',
|
||||||
|
'sr.rum' => 'RUM code',
|
||||||
|
'sr.type' => 'ban',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Import Company Sales representatives
|
// Import Company Sales representatives
|
||||||
|
|||||||
@ -38,6 +38,10 @@ $original_file = GETPOST("file");
|
|||||||
$backtourl = GETPOST('backtourl');
|
$backtourl = GETPOST('backtourl');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
|
|
||||||
|
$file = GETPOST('file', 'alpha');
|
||||||
|
$num = GETPOST('num', 'alpha'); // Used for document on bank statement
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
||||||
$accessallowed = 0;
|
$accessallowed = 0;
|
||||||
@ -249,19 +253,25 @@ else {
|
|||||||
|
|
||||||
if (empty($backtourl))
|
if (empty($backtourl))
|
||||||
{
|
{
|
||||||
if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
$regs = array();
|
||||||
elseif (in_array($modulepart, array('expensereport'))) $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
|
||||||
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
if (in_array($modulepart, array('product', 'produit', 'service', 'produit|service'))) $backtourl = DOL_URL_ROOT."/product/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('expensereport'))) $backtourl = DOL_URL_ROOT."/expensereport/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('holiday'))) $backtourl = DOL_URL_ROOT."/holiday/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('member'))) $backtourl = DOL_URL_ROOT."/adherents/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('project'))) $backtourl = DOL_URL_ROOT."/projet/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('propal'))) $backtourl = DOL_URL_ROOT."/comm/propal/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('societe'))) $backtourl = DOL_URL_ROOT."/societe/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('bank'))) $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
elseif (in_array($modulepart, array('mrp'))) $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
else $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($_POST["file"]);
|
elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) {
|
||||||
|
$num = $regs[1];
|
||||||
|
$backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".$id.'&num='.urlencode($num).'&file='.urldecode($file);
|
||||||
|
}
|
||||||
|
elseif (in_array($modulepart, array('bank'))) $backtourl = DOL_URL_ROOT."/compta/bank/document.php?id=".$id.'&file='.urldecode($file);
|
||||||
|
elseif (in_array($modulepart, array('mrp'))) $backtourl = DOL_URL_ROOT."/mrp/mo_document.php?id=".$id.'&file='.urldecode($file);
|
||||||
|
else $backtourl = DOL_URL_ROOT."/".$modulepart."/".$modulepart."_document.php?id=".$id.'&file='.urldecode($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -283,11 +293,11 @@ if ($cancel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_resize' && (isset($_POST["file"]) != "") && (isset($_POST["sizex"]) != "") && (isset($_POST["sizey"]) != ""))
|
if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey"))
|
||||||
{
|
{
|
||||||
$fullpath = $dir."/".$original_file;
|
$fullpath = $dir."/".$original_file;
|
||||||
|
|
||||||
$result = dol_imageResizeOrCrop($fullpath, 0, $_POST['sizex'], $_POST['sizey']);
|
$result = dol_imageResizeOrCrop($fullpath, 0, GETPOST('sizex', 'int'), GETPOST('sizey', 'int'));
|
||||||
|
|
||||||
if ($result == $fullpath)
|
if ($result == $fullpath)
|
||||||
{
|
{
|
||||||
@ -357,7 +367,7 @@ if ($action == 'confirm_crop')
|
|||||||
$fullpath = $dir."/".$original_file;
|
$fullpath = $dir."/".$original_file;
|
||||||
|
|
||||||
//var_dump($_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit;
|
//var_dump($_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit;
|
||||||
$result = dol_imageResizeOrCrop($fullpath, 1, $_POST['w'], $_POST['h'], $_POST['x'], $_POST['y']);
|
$result = dol_imageResizeOrCrop($fullpath, 1, GETPOST('w', 'int'), GETPOST('h', 'int'), GETPOST('x', 'int'), GETPOST('y', 'int'));
|
||||||
|
|
||||||
if ($result == $fullpath)
|
if ($result == $fullpath)
|
||||||
{
|
{
|
||||||
@ -445,7 +455,7 @@ print '<br>'."\n";
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
print '<!-- Form to resize -->'."\n";
|
print '<!-- Form to resize -->'."\n";
|
||||||
print '<form name="redim_file" action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
print '<form name="redim_file" action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
|
||||||
print '<fieldset id="redim_file">';
|
print '<fieldset id="redim_file">';
|
||||||
@ -454,7 +464,7 @@ print $langs->trans("ResizeDesc").'<br>';
|
|||||||
print $langs->trans("NewLength").': <input name="sizex" type="number" class="flat maxwidth50"> px '.$langs->trans("or").' ';
|
print $langs->trans("NewLength").': <input name="sizex" type="number" class="flat maxwidth50"> px '.$langs->trans("or").' ';
|
||||||
print $langs->trans("NewHeight").': <input name="sizey" type="number" class="flat maxwidth50"> px <br>';
|
print $langs->trans("NewHeight").': <input name="sizey" type="number" class="flat maxwidth50"> px <br>';
|
||||||
|
|
||||||
print '<input type="hidden" name="file" value="'.dol_escape_htmltag(GETPOST('file')).'" />';
|
print '<input type="hidden" name="file" value="'.dol_escape_htmltag($file).'" />';
|
||||||
print '<input type="hidden" name="action" value="confirm_resize" />';
|
print '<input type="hidden" name="action" value="confirm_resize" />';
|
||||||
print '<input type="hidden" name="product" value="'.$id.'" />';
|
print '<input type="hidden" name="product" value="'.$id.'" />';
|
||||||
print '<input type="hidden" name="modulepart" value="'.dol_escape_htmltag($modulepart).'" />';
|
print '<input type="hidden" name="modulepart" value="'.dol_escape_htmltag($modulepart).'" />';
|
||||||
@ -497,7 +507,8 @@ if (!empty($conf->use_javascript_ajax))
|
|||||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$object->entity.'&file='.urlencode($original_file).'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
|
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$object->entity.'&file='.urlencode($original_file).'" alt="" id="cropbox" width="'.$widthforcrop.'px"/>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div><br>';
|
print '</div><br>';
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.'" method="POST">';
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$id.($num ? '&num='.$num : '').'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '
|
print '
|
||||||
<div class="jc_coords">
|
<div class="jc_coords">
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
// $permissiontoadd = permission or not to add a file (can use also $permission) and permission or not to edit file name or crop file (can use also $permtoedit)
|
// $permissiontoadd = permission or not to add a file (can use also $permission) and permission or not to edit file name or crop file (can use also $permtoedit)
|
||||||
// $modulepart = for download
|
// $modulepart = for download
|
||||||
// $param = param to add to download links
|
// $param = param to add to download links
|
||||||
|
// $moreparam = param to add to download link for the form_attach_new_file function
|
||||||
// $upload_dir
|
// $upload_dir
|
||||||
// $object
|
// $object
|
||||||
// $filearray
|
// $filearray
|
||||||
@ -109,7 +110,7 @@ if (!isset($savingdocmask) || !empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_
|
|||||||
|
|
||||||
// Show upload form (document and links)
|
// Show upload form (document and links)
|
||||||
$formfile->form_attach_new_file(
|
$formfile->form_attach_new_file(
|
||||||
$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1'),
|
$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($withproject)?'':'&withproject=1').(empty($moreparam)?'':$moreparam),
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|||||||
@ -384,6 +384,10 @@ class ExpenseReports extends DolibarrApi
|
|||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
|
*
|
||||||
|
* @throws RestException 401 Not allowed
|
||||||
|
* @throws RestException 404 Expense report not found
|
||||||
|
* @throws RestException 500
|
||||||
*/
|
*/
|
||||||
public function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -59,11 +59,14 @@ ALTER TABLE llx_emailcollector_emailcollectoraction ADD COLUMN position integer
|
|||||||
|
|
||||||
-- For v11
|
-- For v11
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE llx_product_price MODIFY COLUMN tva_tx double(6,3) DEFAULT 0 NOT NULL;
|
ALTER TABLE llx_product_price MODIFY COLUMN tva_tx double(6,3) DEFAULT 0 NOT NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_facturedet MODIFY COLUMN situation_percent real DEFAULT 100;
|
ALTER TABLE llx_facturedet MODIFY COLUMN situation_percent real DEFAULT 100;
|
||||||
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
|
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
|
||||||
|
|
||||||
|
-- Set country to null for deprecated accounting system (there is now one per country)
|
||||||
|
UPDATE llx_accounting_system SET fk_country = NULL, active = 0 WHERE pcg_version = 'SYSCOHADA';
|
||||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 20, 'BAS-K1-MINI', 'The Swedish mini chart of accounts', 1);
|
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 20, 'BAS-K1-MINI', 'The Swedish mini chart of accounts', 1);
|
||||||
|
|
||||||
ALTER TABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(64) NOT NULL;
|
ALTER TABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(64) NOT NULL;
|
||||||
|
|||||||
@ -5024,7 +5024,7 @@ function migrate_users_socialnetworks()
|
|||||||
$obj->socialnetworks = '[]';
|
$obj->socialnetworks = '[]';
|
||||||
}
|
}
|
||||||
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
|
$socialnetworks = array_merge($arraysocialnetworks, json_decode($obj->socialnetworks, true));
|
||||||
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX.'user SET socialnetworks="'.$db->escape(json_encode($socialnetworks, true)).'"';
|
$sqlupd = 'UPDATE '.MAIN_DB_PREFIX."user SET socialnetworks='".$db->escape(json_encode($socialnetworks, true))."'";
|
||||||
$sqlupd.= ', skype=null';
|
$sqlupd.= ', skype=null';
|
||||||
$sqlupd.= ', twitter=null';
|
$sqlupd.= ', twitter=null';
|
||||||
$sqlupd.= ', facebook=null';
|
$sqlupd.= ', facebook=null';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user