forked from Wavyzz/dolibarr
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
dev_importproduct_measuringunit Conflicts: htdocs/contact/consumption.php htdocs/webservices/server_productorservice.php
This commit is contained in:
@@ -144,9 +144,9 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
$leftmenu=''; $mainmenu='';
|
||||
if (GETPOST('menuId', 'int') && ! is_numeric(GETPOST('menuId', 'int')))
|
||||
if (GETPOST('menuId', 'alpha') && ! is_numeric(GETPOST('menuId', 'alpha')))
|
||||
{
|
||||
$tmp=explode('&', GETPOST('menuId', 'int'));
|
||||
$tmp=explode('&', GETPOST('menuId', 'alpha'));
|
||||
foreach($tmp as $s)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/', $s))
|
||||
|
||||
@@ -106,7 +106,7 @@ if ($year) $param.='&year='.$year;
|
||||
|
||||
if ($mode != 'sconly')
|
||||
{
|
||||
print $langs->trans("DescTaxAndDividendsArea").'<br>';
|
||||
print '<span class="opacitymedium">'.$langs->trans("DescTaxAndDividendsArea").'</span><br>';
|
||||
print "<br>";
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ if ($user->societe_id > 0)
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$entity = GETPOST('entity','int')?GETPOST('entity','int'):$conf->entity;
|
||||
|
||||
//$parameters = array('socid' => $id);
|
||||
//$reshook = $hookmanager->executeHooks('doActions', $parameters, $object); // Note that $object may have been modified by some hooks
|
||||
//if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
@@ -91,21 +93,27 @@ if(($action=="searchfiles" || $action=="dl" ) && $date_start && $date_stop) {
|
||||
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
|
||||
$sql="SELECT rowid as id, ref as ref,paye as paid, total_ttc, fk_soc, datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
|
||||
$sql.=" WHERE datef between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref, paye as paid, total_ttc, fk_soc, datef as date, 'InvoiceSupplier' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||
$sql.=" WHERE datef between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref, paid, total_ttc, fk_user_author as fk_soc, date_fin as date,'ExpenseReport' as item FROM ".MAIN_DB_PREFIX."expensereport";
|
||||
$sql.=" WHERE date_fin between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, ref,paid,amount as total_ttc, '0' as fk_soc, datedon as date,'Donation' as item FROM ".MAIN_DB_PREFIX."don";
|
||||
$sql.=" WHERE datedon between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, label as ref, 1 as paid, amount as total_ttc, fk_user as fk_soc,datep as date,'SalaryPayment' as item FROM ".MAIN_DB_PREFIX."payment_salary";
|
||||
$sql.=" WHERE datep between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$sql.=" UNION ALL";
|
||||
$sql.=" SELECT rowid as id, libelle as ref, paye as paid, amount as total_ttc, 0 as fk_soc, date_creation as date, 'SocialContributions' as item FROM ".MAIN_DB_PREFIX."chargesociales";
|
||||
$sql.=" WHERE date_creation between ".$wheretail;
|
||||
$sql.=" AND entity IN (".($entity==1?'0,1':$entity).')';
|
||||
$resd = $db->query($sql);
|
||||
$files=array();
|
||||
$link='';
|
||||
@@ -264,8 +272,37 @@ $form = new Form($db);
|
||||
$userstatic=new User($db);
|
||||
$title=$langs->trans("ComptaFiles").' - '.$langs->trans("List");
|
||||
print '<form name="searchfiles" action="?action=searchfiles'.$tail.'" method="POST" >'."\n";
|
||||
print $langs->trans("ReportPeriod").': '.$form->select_date($date_start, 'date_start', 0, 0, 0, "", 1, 1, 1);
|
||||
print ' - '.$form->select_date($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 1)."\n</a>";
|
||||
print $langs->trans("ReportPeriod").': '.$form->selectDate($date_start, 'date_start', 0, 0, 0, "", 1, 1, 0);
|
||||
print ' - '.$form->selectDate($date_stop, 'date_stop', 0, 0, 0, "", 1, 1, 0)."\n</a>";
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled) && is_object($mc))
|
||||
{
|
||||
print '<br>';
|
||||
// This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module
|
||||
if (method_exists($mc, 'formObjectOptions'))
|
||||
{
|
||||
if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && ! $user->entity) // condition must be same for create and edit mode
|
||||
{
|
||||
print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($entity);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||
}
|
||||
}
|
||||
|
||||
/*$object = new stdClass();
|
||||
// Other attributes
|
||||
$parameters=array('objectsrc' => null, 'colspan' => ' colspan="3"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $object->showOptionals($extrafields, 'edit');
|
||||
}*/
|
||||
}
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Refresh").'" /></form>'."\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -488,7 +488,8 @@ if ($sql_select)
|
||||
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
||||
}
|
||||
|
||||
if (($objp->info_bits & 2) == 2) {
|
||||
if (($objp->info_bits & 2) == 2)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'">';
|
||||
$txt='';
|
||||
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
||||
|
||||
@@ -115,7 +115,7 @@ function tree_showpad(&$fulltree, $key, $silent = 0)
|
||||
*/
|
||||
function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0)
|
||||
{
|
||||
global $tree_recur_alreadyadded;
|
||||
global $tree_recur_alreadyadded, $menu_handler_to_search;
|
||||
|
||||
if ($rang == 0 && empty($donoresetalreadyloaded)) $tree_recur_alreadyadded=array();
|
||||
|
||||
@@ -203,7 +203,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
||||
if ($showfk)
|
||||
{
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
print '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">';
|
||||
print '<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$tab[$x]['rowid'].'">';
|
||||
print $tab[$x]['title'];
|
||||
print '</a></strong>';
|
||||
print ' (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
|
||||
@@ -92,6 +92,11 @@ class Don extends CommonObject
|
||||
public $labelstatut;
|
||||
public $labelstatutshort;
|
||||
|
||||
/**
|
||||
* Draft
|
||||
*/
|
||||
const STATUS_DRAFT = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -274,4 +274,5 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (24
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (244,'ME','MNE','Monténégro',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (245,'BL','BLM','Saint-Barthélemy',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (246,'MF','MAF','Saint-Martin',1,0);
|
||||
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (247,'XK','XKX','Kosovo',1,0);
|
||||
|
||||
|
||||
@@ -262,6 +262,7 @@ CREATE TABLE llx_pos_cash_fence(
|
||||
-- VMYSQL4.3 ALTER TABLE llx_accounting_account MODIFY COLUMN account_number varchar(32) NOT NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_accounting_account ALTER COLUMN account_number SET NOT NULL;
|
||||
|
||||
|
||||
-- Withdrawals / Prelevements
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_END_TO_END' where name = 'END_TO_END';
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_USTRD' where name = 'USTRD';
|
||||
|
||||
@@ -1104,8 +1104,7 @@ if ($action == 'create' || $action == 'adduserldap')
|
||||
{
|
||||
print '<tr><td>' . $form->editfieldkey('Categories', 'usercats', '', $object, 0) . '</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null,
|
||||
null, '90%' );
|
||||
print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@@ -190,6 +190,8 @@ function getCategory($authentication, $id)
|
||||
{
|
||||
global $db,$conf,$langs;
|
||||
|
||||
$nbmax = 10;
|
||||
|
||||
dol_syslog("Function: getCategory login=".$authentication['login']." id=".$id);
|
||||
|
||||
if ($authentication['entity']) $conf->entity=$authentication['entity'];
|
||||
|
||||
Reference in New Issue
Block a user