Merge branch '13.0' into 13p31
This commit is contained in:
commit
b5702fcb13
@ -45,14 +45,14 @@ $search_mvt_num = GETPOST('search_mvt_num', 'int');
|
||||
$search_doc_type = GETPOST("search_doc_type", 'alpha');
|
||||
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
|
||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
|
||||
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
||||
$search_date_creation_end = dol_mktime(23, 59, 59, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
|
||||
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
|
||||
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
||||
$search_date_modification_end = dol_mktime(23, 59, 59, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
|
||||
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
|
||||
$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
|
||||
$search_date_export_end = dol_mktime(23, 59, 59, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
|
||||
|
||||
//var_dump($search_date_start);exit;
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
|
||||
@ -46,7 +46,7 @@ $search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);
|
||||
$search_date_end = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||
$search_date_export_startyear = GETPOST('search_date_export_startyear', 'int');
|
||||
$search_date_export_startmonth = GETPOST('search_date_export_startmonth', 'int');
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
|
||||
@ -7205,7 +7205,7 @@ class Form
|
||||
print '<input type="radio" name="idtolinkto" value='.$objp->rowid.'>';
|
||||
print '</td>';
|
||||
print '<td class="center">'.$objp->ref.'</td>';
|
||||
print '<td>'.$objp->ref_client.'</td>';
|
||||
print '<td>'.(!empty($objp->ref_client) ? $objp->ref_client : $objp->ref_supplier).'</td>';
|
||||
print '<td class="right">';
|
||||
if ($possiblelink[label] == 'LinkToContract') {
|
||||
$form = new Form($db);
|
||||
|
||||
@ -3337,7 +3337,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach',
|
||||
'title_agenda'=>'calendar-alt',
|
||||
'uparrow'=>'mail-forward', 'vcard'=>'address-card',
|
||||
'uparrow'=>'share', 'vcard'=>'address-card',
|
||||
'jabber'=>'comment-o',
|
||||
'website'=>'globe-americas'
|
||||
);
|
||||
|
||||
@ -285,15 +285,15 @@ class modAccounting extends DolibarrModules
|
||||
//'b.doc_type'=>'Doctype',
|
||||
'b.doc_ref'=>'Piece',
|
||||
'b.code_journal'=>'Codejournal',
|
||||
//'b.journal_label'=>'JournalLabel',
|
||||
'b.journal_label'=>'JournalLabel',
|
||||
'b.numero_compte'=>'AccountAccounting',
|
||||
//'b.label_compte'=>'LabelAccount',
|
||||
'b.label_compte'=>'LabelAccount',
|
||||
'b.subledger_account'=>'SubledgerAccount',
|
||||
'b.subledger_label'=>'SubledgerAccountLabel',
|
||||
'b.label_operation'=>'LabelOperation',
|
||||
'b.debit'=>"Debit",
|
||||
'b.credit'=>"Credit",
|
||||
'b.sens'=>'Direction' // This field is still used by accounting export. We can remove it once it has been replace into accountancyexport.class.php by a detection using ->debit and ->credit
|
||||
'b.sens'=>'Direction' // This field is still used by accounting export. We can remove it once it has been replaced into accountancyexport.class.php by a detection using ->debit and ->credit
|
||||
);
|
||||
$this->import_fieldshidden_array[$r] = array('b.doc_type'=>'const-import_from_external', 'b.fk_doc'=>'const-0', 'b.fk_docdet'=>'const-0', 'b.fk_user_author'=>'user->id', 'b.date_creation'=>'const-'.dol_print_date(dol_now(), 'standard')); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
|
||||
$this->import_regex_array[$r] = array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
|
||||
@ -303,9 +303,9 @@ class modAccounting extends DolibarrModules
|
||||
//'b.doc_type'=>'import',
|
||||
'b.doc_ref'=>'My document ABC',
|
||||
'b.code_journal'=>"VTE",
|
||||
//'b.journal_label'=>"Sale journal",
|
||||
'b.journal_label'=>"Sale journal",
|
||||
'b.numero_compte'=>"707",
|
||||
//'b.label_compte'=>'Product account 707',
|
||||
'b.label_compte'=>'Product account 707',
|
||||
'b.subledger_account'=>'',
|
||||
'b.subledger_label'=>'',
|
||||
'b.label_operation'=>"Sale of ABC",
|
||||
|
||||
@ -241,7 +241,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME))
|
||||
{
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp;
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp;
|
||||
$newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax)
|
||||
}
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING))
|
||||
{
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010 Cyrille de Lambert <info@auguria.net>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/expensereport/ajax/ajaxprojet.php
|
||||
* \ingroup expensereport
|
||||
* \brief File to return Ajax response on third parties request
|
||||
*/
|
||||
|
||||
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal
|
||||
if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
|
||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');
|
||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
|
||||
|
||||
$res = 0;
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
// Ajout directives pour resoudre bug IE
|
||||
//header('Cache-Control: Public, must-revalidate');
|
||||
//header('Pragma: public');
|
||||
|
||||
//top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
|
||||
top_httphead();
|
||||
|
||||
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
dol_syslog(join(',', $_GET));
|
||||
|
||||
|
||||
// Generation liste des projets
|
||||
if (GETPOST('fk_projet') != '')
|
||||
{
|
||||
$return_arr = array();
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.title, s.nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid";
|
||||
if (!empty($_GET["fk_projet"])) $sql .= " WHERE p.ref LIKE '%".$db->escape($_GET["fk_projet"])."%' OR p.title LIKE '%".$db->escape($_GET["fk_projet"])."%' OR s.nom LIKE '%".$db->escape($_GET["fk_projet"])."%'"; // Add other filters
|
||||
$sql .= " ORDER BY p.ref ASC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ($row = $db->fetch_array($resql))
|
||||
{
|
||||
$label = $row['ref'].' - '.$row['title'];
|
||||
$row_array['label'] = $label;
|
||||
$row_array['value'] = $label;
|
||||
$row_array['key'] = $row['rowid'];
|
||||
|
||||
array_push($return_arr, $row_array);
|
||||
}
|
||||
|
||||
echo json_encode($return_arr);
|
||||
} else {
|
||||
echo json_encode(array('nom'=>'Error', 'label'=>'Error', 'key'=>'Error', 'value'=>'Error'));
|
||||
}
|
||||
} else {
|
||||
echo json_encode(array('nom'=>'ErrorBadParameter', 'label'=>'ErrorBadParameter', 'key'=>'ErrorBadParameter', 'value'=>'ErrorBadParameter'));
|
||||
}
|
||||
@ -237,8 +237,6 @@ if (empty($reshook))
|
||||
$objectsrc = new $classname($db);
|
||||
$objectsrc->fetch($object->origin_id);
|
||||
|
||||
|
||||
|
||||
$object->socid = $objectsrc->socid;
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
@ -280,10 +278,8 @@ if (empty($reshook))
|
||||
$stockLocation = "ent1".$i."_0";
|
||||
$qty = "qtyl".$i;
|
||||
|
||||
|
||||
|
||||
//var_dump(GETPOST($qty,'int')); var_dump($_POST); var_dump($batch);exit;
|
||||
//reception line for product with no batch management and no multiple stock location
|
||||
//var_dump(GETPOST($qty,'int')); var_dump($_POST); var_dump($batch);exit;
|
||||
//reception line for product with no batch management and no multiple stock location
|
||||
if (GETPOST($qty, 'int') > 0)
|
||||
$totalqty += GETPOST($qty, 'int');
|
||||
|
||||
@ -318,9 +314,15 @@ if (empty($reshook))
|
||||
|
||||
$entrepot_id = is_numeric(GETPOST($ent, 'int')) ? GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int');
|
||||
|
||||
if (!empty($lineToTest)) {
|
||||
$fk_product = $lineToTest->fk_product;
|
||||
} else {
|
||||
$fk_product = $linesrc->fk_product;
|
||||
}
|
||||
|
||||
if ($entrepot_id < 0)
|
||||
$entrepot_id = '';
|
||||
if (!($linesrc->fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||
if (!($fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||
$entrepot_id = 0;
|
||||
$eatby = GETPOST($eatby, 'alpha');
|
||||
$sellby = GETPOST($sellby, 'alpha');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user