Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/accountancy/customer/index.php
	htdocs/contrat/class/contrat.class.php
	htdocs/product/list.php
This commit is contained in:
Laurent Destailleur 2017-10-26 17:06:11 +02:00
commit 8058712d47
10 changed files with 28 additions and 23 deletions

View File

@ -2195,7 +2195,7 @@ if ($action == 'create')
// Show object lines
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
<input type="hidden" name="mode" value="">

View File

@ -2388,7 +2388,7 @@ if ($action == 'create' && $user->rights->commande->creer)
*/
$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">

View File

@ -4078,7 +4078,7 @@ else if ($id > 0 || ! empty($ref))
}
}
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
<input type="hidden" name="mode" value="">

View File

@ -2261,17 +2261,18 @@ class Contrat extends CommonObject
}
}
/**
/**
* Create an array of order lines
*
* @return int >0 if OK, <0 if KO
*/
function getLinesArray()
{
return $this->fetch_lines();
}
*/
function getLinesArray()
{
return $this->fetch_lines();
}
/**
/**
* Create a document onto disk according to template module.
*
* @param string $modele Force model to use ('' to not force)

View File

@ -214,8 +214,8 @@ if (empty($reshook))
$objectsrc->fetch($object->origin_id);
$object->socid = $objectsrc->socid;
$object->ref_customer = ''; // We don't use $objectsrc->ref_client, this is ref or order not shipment
$object->model_pdf = GETPOST('model','alpha');
$object->ref_customer = GETPOST('ref_customer','alpha');
$object->model_pdf = GETPOST('model');
$object->date_delivery = $date_delivery; // Date delivery planed
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
$object->shipping_method_id = GETPOST('shipping_method_id','int');
@ -693,7 +693,7 @@ if ($action == 'create')
else if ($origin == 'propal') print $langs->trans('RefCustomerOrder');
else print $langs->trans('RefCustomer');
print '</td><td colspan="3">';
print $object->ref_client;
print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />';
print '</td>';
print '</tr>';

View File

@ -2111,7 +2111,7 @@ elseif (! empty($object->id))
//$result = $object->getLinesArray();
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">
<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
<input type="hidden" name="mode" value="">

View File

@ -2660,7 +2660,7 @@ else
/*
* Lines
*/
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">';
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">';
print '<input type="hidden" name="mode" value="">';

View File

@ -157,6 +157,7 @@ ALTER TABLE llx_loan ADD COLUMN fk_projet integer DEFAULT NULL;
ALTER TABLE llx_holiday ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer;
ALTER TABLE llx_projet_task_time ADD COLUMN datec date;
ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp;

View File

@ -36,6 +36,7 @@ create table llx_projet_task
progress integer DEFAULT 0, -- percentage increase
priority integer DEFAULT 0, -- priority
fk_user_creat integer, -- user who created the task
fk_user_modif integer, -- user who modify the task
fk_user_valid integer, -- user who validated the task
fk_statut smallint DEFAULT 0 NOT NULL,
note_private text,

View File

@ -495,15 +495,17 @@ else
$moreforfilter.='</div>';
}
if ($moreforfilter)
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $moreforfilter.=$hookmanager->resPrint;
else $moreforfilter=$hookmanager->resPrint;
if ($moreforfilter)
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
}
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</div>';
}
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields