Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1658bee81c
@ -113,11 +113,11 @@ print '</tr>';
|
|||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
print '<div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -830,7 +830,7 @@ if (empty($reshook))
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $object->setValueFrom('ref',GETPOST('ref','alpha'));;
|
$result = $object->setValueFrom('ref',GETPOST('ref','alpha'));
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action = 'editref';
|
$action = 'editref';
|
||||||
@ -843,6 +843,30 @@ if (empty($reshook))
|
|||||||
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
elseif ($action=='setdate_contrat')
|
||||||
|
{
|
||||||
|
$cancelbutton = GETPOST('cancel');
|
||||||
|
|
||||||
|
if (!$cancelbutton) {
|
||||||
|
$result = $object->fetch($id);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
$datacontrat=dol_mktime(GETPOST('date_contrathour'), GETPOST('date_contratmin'), 0, GETPOST('date_contratmonth'), GETPOST('date_contratday'), GETPOST('date_contratyear'));
|
||||||
|
$result = $object->setValueFrom('date_contrat',$datacontrat,'',null,'date');
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
$action = 'editdate_contrat';
|
||||||
|
} else {
|
||||||
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generation doc (depuis lien ou depuis cartouche doc)
|
// Generation doc (depuis lien ou depuis cartouche doc)
|
||||||
@ -1278,8 +1302,15 @@ else
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
print '<tr>';
|
||||||
print '<td colspan="3">'.dol_print_date($object->date_contrat,"dayhour")."</td></tr>\n";
|
print '<td width="20%">';
|
||||||
|
print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer);
|
||||||
|
print '</td><td>';
|
||||||
|
print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
/* print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||||
|
print '<td colspan="3">'.dol_print_date($object->date_contrat,"dayhour")."</td></tr>\n";*/
|
||||||
|
|
||||||
// Projet
|
// Projet
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
|
|||||||
@ -221,7 +221,7 @@ abstract class DoliDB implements Database
|
|||||||
* Define sort criteria of request
|
* Define sort criteria of request
|
||||||
*
|
*
|
||||||
* @param string $sortfield List of sort fields, separated by comma. Example: 't1.fielda, t2.fieldb'
|
* @param string $sortfield List of sort fields, separated by comma. Example: 't1.fielda, t2.fieldb'
|
||||||
* @param string $sortorder Sort order
|
* @param 'ASC'|'DESC' $sortorder Sort order
|
||||||
* @return string String to provide syntax of a sort sql string
|
* @return string String to provide syntax of a sort sql string
|
||||||
*/
|
*/
|
||||||
function order($sortfield=null,$sortorder=null)
|
function order($sortfield=null,$sortorder=null)
|
||||||
@ -236,9 +236,11 @@ abstract class DoliDB implements Database
|
|||||||
else $return.=',';
|
else $return.=',';
|
||||||
|
|
||||||
$return.=preg_replace('/[^0-9a-z_\.]/i','',$val);
|
$return.=preg_replace('/[^0-9a-z_\.]/i','',$val);
|
||||||
if (! empty($sortorder))
|
// Only ASC and DESC values are valid SQL
|
||||||
{
|
if ($sortorder === 'ASC') {
|
||||||
$return.=' '.preg_replace('/[^0-9a-z]/i','',$sortorder);
|
$return .= ' ASC';
|
||||||
|
} elseif ($sortorder === 'DESC') {
|
||||||
|
$return .= ' DESC';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|||||||
@ -864,8 +864,8 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
|
|||||||
.addClass( "ui-widget ui-widget-content ui-corner-left dolibarrcombobox" );
|
.addClass( "ui-widget ui-widget-content ui-corner-left dolibarrcombobox" );
|
||||||
|
|
||||||
input.data("ui-autocomplete")._renderItem = function( ul, item ) {
|
input.data("ui-autocomplete")._renderItem = function( ul, item ) {
|
||||||
return $("<li></li>")
|
return $("<li>")
|
||||||
.data( "item.autocomplete", item )
|
.data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0
|
||||||
.append( "<a>" + item.label + "</a>" )
|
.append( "<a>" + item.label + "</a>" )
|
||||||
.appendTo( ul );
|
.appendTo( ul );
|
||||||
};
|
};
|
||||||
|
|||||||
@ -170,8 +170,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
}
|
}
|
||||||
,delay: 500
|
,delay: 500
|
||||||
}).data("ui-autocomplete")._renderItem = function( ul, item ) {
|
}).data("ui-autocomplete")._renderItem = function( ul, item ) {
|
||||||
return $("<li></li>")
|
return $("<li>")
|
||||||
.data( "item.autocomplete", item )
|
.data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0
|
||||||
.append( \'<a><span class="tag">\' + item.label + "</span></a>" )
|
.append( \'<a><span class="tag">\' + item.label + "</span></a>" )
|
||||||
.appendTo(ul);
|
.appendTo(ul);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -313,3 +313,4 @@ PropalMergePdfProductChooseFile=Select PDF files
|
|||||||
IncludingProductWithTag=Including product/service with tag
|
IncludingProductWithTag=Including product/service with tag
|
||||||
DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer
|
DefaultPriceRealPriceMayDependOnCustomer=Default price, real price may depend on customer
|
||||||
WarningSelectOneDocument=Please select at least one document
|
WarningSelectOneDocument=Please select at least one document
|
||||||
|
DefaultUnitToShow=Units
|
||||||
|
|||||||
@ -297,3 +297,4 @@ PropalMergePdfProductChooseFile=Sélectionnez les fichiers PDF
|
|||||||
IncludingProductWithTag=Incluant un produit ayant le tag/catégorie
|
IncludingProductWithTag=Incluant un produit ayant le tag/catégorie
|
||||||
DefaultPriceRealPriceMayDependOnCustomer=Prix par défaut, le prix réel peut dépendre du client
|
DefaultPriceRealPriceMayDependOnCustomer=Prix par défaut, le prix réel peut dépendre du client
|
||||||
WarningSelectOneDocument=Sélectionnez au moins un document
|
WarningSelectOneDocument=Sélectionnez au moins un document
|
||||||
|
DefaultUnitToShow=Unités
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user