Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: dev/dolibarr_changes.txt htdocs/compta/facture/card.php htdocs/compta/facture/list.php htdocs/main.inc.php
This commit is contained in:
commit
9d10eb57f2
@ -163,3 +163,10 @@ PARSEDOWN
|
|||||||
else $len = strlen($line);
|
else $len = strlen($line);
|
||||||
$shortage = 4 - $len % 4;
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
|
|
||||||
|
JEDITABLE.JS
|
||||||
|
------------
|
||||||
|
|
||||||
|
* <button type="submit" /> => <button class="button" type="submit" />
|
||||||
|
* <button type="cancel" /> => <button class="button" type="cancel" />
|
||||||
|
|
||||||
|
|||||||
@ -2616,12 +2616,12 @@ if ($action == 'create')
|
|||||||
print $desc;
|
print $desc;
|
||||||
|
|
||||||
print '<div id="credit_note_options" class="clearboth">';
|
print '<div id="credit_note_options" class="clearboth">';
|
||||||
print ' <input type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
print ' <input type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
||||||
print '<br> <input type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
print '<br> <input type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -94,10 +94,30 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($
|
|||||||
}
|
}
|
||||||
else $newelement = $element;
|
else $newelement = $element;
|
||||||
|
|
||||||
|
$_POST['action']='update'; // Hack so restrictarea will test permissions on write too
|
||||||
|
$feature = $newelement;
|
||||||
|
$feature2 = $subelement;
|
||||||
|
$object_id = $fk_element;
|
||||||
|
if ($feature == 'expedition' || $feature == 'shipping')
|
||||||
|
{
|
||||||
|
$feature = 'commande';
|
||||||
|
$object_id = 0;
|
||||||
|
}
|
||||||
|
if ($feature == 'shipping') $feature = 'commande';
|
||||||
|
if ($feature == 'payment') { $feature = 'facture'; }
|
||||||
|
if ($feature == 'payment_supplier') { $feature = 'fournisseur'; $feature2 = 'facture'; }
|
||||||
|
//var_dump(GETPOST('action','aZ09'));
|
||||||
|
//var_dump($newelement.'-'.$subelement."-".$feature."-".$object_id);
|
||||||
|
$check_access = restrictedArea($user, $feature, $object_id, '', $feature2);
|
||||||
|
//var_dump($user->rights);
|
||||||
|
/*
|
||||||
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->create) || ! empty($user->rights->$newelement->write)
|
if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->create) || ! empty($user->rights->$newelement->write)
|
||||||
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
|| (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write)))
|
||||||
|| ($element == 'payment' && $user->rights->facture->paiement)
|
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||||
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($check_access)
|
||||||
{
|
{
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$newvalue = trim($value);
|
$newvalue = trim($value);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
// Copyright (C) 2011-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
// Copyright (C) 2011-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
// Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
// Copyright (C) 2011-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or modify
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
@ -26,6 +26,50 @@ $(document).ready(function() {
|
|||||||
var table_element = $('#jeditable_table_element').html();
|
var table_element = $('#jeditable_table_element').html();
|
||||||
var fk_element = $('#jeditable_fk_element').html();
|
var fk_element = $('#jeditable_fk_element').html();
|
||||||
|
|
||||||
|
|
||||||
|
if ($('.editval_string').length > 0) {
|
||||||
|
$('.editval_string').editable(urlSaveInPlace, {
|
||||||
|
type : 'text',
|
||||||
|
id : 'field',
|
||||||
|
width : withInPlace, /* Size of string area in px ? */
|
||||||
|
tooltip : tooltipInPlace,
|
||||||
|
placeholder : placeholderInPlace,
|
||||||
|
cancel : cancelInPlace,
|
||||||
|
submit : submitInPlace,
|
||||||
|
indicator : indicatorInPlace,
|
||||||
|
submitdata : function(result, settings) {
|
||||||
|
return getParameters(this, 'string');
|
||||||
|
},
|
||||||
|
callback : function(result, settings) {
|
||||||
|
getResult(this, result);
|
||||||
|
},
|
||||||
|
onreset : function(result, settings) {
|
||||||
|
getDefault(settings);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('.editkey_string').hover(
|
||||||
|
function () {
|
||||||
|
console.log("We are hover (entry) an editkey_string");
|
||||||
|
$('#viewval_' + $(this).attr('id')).addClass("viewval_hover");
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
console.log("We are no more hover an editkey_string");
|
||||||
|
$('#viewval_' + $(this).attr('id')).removeClass("viewval_hover");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$('.editkey_string').click(function() {
|
||||||
|
console.log("We click on the edit field");
|
||||||
|
$('#viewval_' + $(this).attr('id')).click();
|
||||||
|
$('#viewval_' + $(this).attr('id')).hide();
|
||||||
|
$('#editval_' + $(this).attr('id')).show().click();
|
||||||
|
});
|
||||||
|
$('.viewval_string.active').click(function() {
|
||||||
|
console.log("We click on the viewed value");
|
||||||
|
$('#viewval_' + $(this).attr('id').substr(8)).hide();
|
||||||
|
$('#editval_' + $(this).attr('id').substr(8)).show().click();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ($('.editval_textarea').length > 0) {
|
if ($('.editval_textarea').length > 0) {
|
||||||
$('.editval_textarea').editable(urlSaveInPlace, {
|
$('.editval_textarea').editable(urlSaveInPlace, {
|
||||||
type : 'textarea',
|
type : 'textarea',
|
||||||
@ -127,49 +171,6 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($('.editval_string').length > 0) {
|
|
||||||
$('.editval_string').editable(urlSaveInPlace, {
|
|
||||||
type : 'text',
|
|
||||||
id : 'field',
|
|
||||||
width : withInPlace, /* Size of string area in px ? */
|
|
||||||
tooltip : tooltipInPlace,
|
|
||||||
placeholder : placeholderInPlace,
|
|
||||||
cancel : cancelInPlace,
|
|
||||||
submit : submitInPlace,
|
|
||||||
indicator : indicatorInPlace,
|
|
||||||
submitdata : function(result, settings) {
|
|
||||||
return getParameters(this, 'string');
|
|
||||||
},
|
|
||||||
callback : function(result, settings) {
|
|
||||||
getResult(this, result);
|
|
||||||
},
|
|
||||||
onreset : function(result, settings) {
|
|
||||||
getDefault(settings);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.editkey_string').hover(
|
|
||||||
function () {
|
|
||||||
console.log("We are hover (entry) an editkey_string");
|
|
||||||
$('#viewval_' + $(this).attr('id')).addClass("viewval_hover");
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
console.log("We are no more hover an editkey_string");
|
|
||||||
$('#viewval_' + $(this).attr('id')).removeClass("viewval_hover");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
$('.editkey_string').click(function() {
|
|
||||||
$( '#viewval_' + $(this).attr('id') ).click();
|
|
||||||
});
|
|
||||||
$('.viewval_string.active').click(function() {
|
|
||||||
$('#viewval_' + $(this).attr('id').substr(8)).hide();
|
|
||||||
$('#editval_' + $(this).attr('id').substr(8)).show().click();
|
|
||||||
});
|
|
||||||
$('.editkey_string').click(function() {
|
|
||||||
$('#viewval_' + $(this).attr('id')).hide();
|
|
||||||
$('#editval_' + $(this).attr('id')).show().click();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($('.editval_numeric').length > 0) {
|
if ($('.editval_numeric').length > 0) {
|
||||||
$('.editval_numeric').editable(urlSaveInPlace, {
|
$('.editval_numeric').editable(urlSaveInPlace, {
|
||||||
type : 'text',
|
type : 'text',
|
||||||
|
|||||||
@ -123,7 +123,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
|
||||||
|
|
||||||
// Set incoterm
|
// Reopen
|
||||||
if ($action == 'reopen' && $user->rights->expedition->creer)
|
if ($action == 'reopen' && $user->rights->expedition->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@ -501,8 +501,8 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action update description of emailing
|
// Action update
|
||||||
else if ($action == 'settrackingnumber' || $action == 'settrackingurl'
|
else if ($action == 'settracking_number' || $action == 'settracking_url'
|
||||||
|| $action == 'settrueWeight'
|
|| $action == 'settrueWeight'
|
||||||
|| $action == 'settrueWidth'
|
|| $action == 'settrueWidth'
|
||||||
|| $action == 'settrueHeight'
|
|| $action == 'settrueHeight'
|
||||||
@ -511,8 +511,8 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
if ($action == 'settrackingnumber') $object->tracking_number = trim(GETPOST('trackingnumber','alpha'));
|
if ($action == 'settracking_number') $object->tracking_number = trim(GETPOST('tracking_number','alpha'));
|
||||||
if ($action == 'settrackingurl') $object->tracking_url = trim(GETPOST('trackingurl','int'));
|
if ($action == 'settracking_url') $object->tracking_url = trim(GETPOST('tracking_url','int'));
|
||||||
if ($action == 'settrueWeight') {
|
if ($action == 'settrueWeight') {
|
||||||
$object->trueWeight = trim(GETPOST('trueWeight','int'));
|
$object->trueWeight = trim(GETPOST('trueWeight','int'));
|
||||||
$object->weight_units = GETPOST('weight_units','int');
|
$object->weight_units = GETPOST('weight_units','int');
|
||||||
@ -1989,8 +1989,8 @@ else if ($id || $ref)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Tracking Number
|
// Tracking Number
|
||||||
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber",'trackingnumber',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber",'tracking_number',$object->tracking_number,$object,$user->rights->expedition->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("TrackingNumber",'trackingnumber',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number);
|
print $form->editfieldval("TrackingNumber",'tracking_number',$object->tracking_url,$object,$user->rights->expedition->creer,'string',$object->tracking_number);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
|
|||||||
@ -424,7 +424,7 @@
|
|||||||
});
|
});
|
||||||
/* otherwise use button with given string as text */
|
/* otherwise use button with given string as text */
|
||||||
} else {
|
} else {
|
||||||
var submit = $('<button type="submit" />');
|
var submit = $('<button class="button" type="submit" />');
|
||||||
submit.html(settings.submit);
|
submit.html(settings.submit);
|
||||||
}
|
}
|
||||||
$(this).append(submit);
|
$(this).append(submit);
|
||||||
@ -435,7 +435,7 @@
|
|||||||
var cancel = $(settings.cancel);
|
var cancel = $(settings.cancel);
|
||||||
/* otherwise use button with given string as text */
|
/* otherwise use button with given string as text */
|
||||||
} else {
|
} else {
|
||||||
var cancel = $('<button type="cancel" />');
|
var cancel = $('<button class="button" type="cancel" />');
|
||||||
cancel.html(settings.cancel);
|
cancel.html(settings.cancel);
|
||||||
}
|
}
|
||||||
$(this).append(cancel);
|
$(this).append(cancel);
|
||||||
|
|||||||
@ -1243,7 +1243,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! defined('DISABLE_JQUERY_JEDITABLE'))
|
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && ! defined('DISABLE_JQUERY_JEDITABLE'))
|
||||||
{
|
{
|
||||||
print '<!-- JS to manage editInPlace feature -->'."\n";
|
print '<!-- JS to manage editInPlace feature -->'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.min.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jeditable/jquery.jeditable.ui-autocomplete.js'.($ext?'?'.$ext:'').'"></script>'."\n";
|
||||||
print '<script type="text/javascript">'."\n";
|
print '<script type="text/javascript">'."\n";
|
||||||
|
|||||||
@ -3605,17 +3605,20 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
|
|||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* jQuery - jeditable */
|
/* jQuery - jeditable for inline edit */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
.editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select, .editkey_autocomplete {
|
.editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select, .editkey_autocomplete {
|
||||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/edit.png',1) ?>) right top no-repeat;
|
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/edit.png',1) ?>) right top no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editkey_datepicker {
|
.editkey_datepicker {
|
||||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/calendar.png',1) ?>) right center no-repeat;
|
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/calendar.png',1) ?>) right center no-repeat;
|
||||||
|
margin-right: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editval_textarea.active:hover, .editval_ckeditor.active:hover, .editval_string.active:hover, .editval_email.active:hover, .editval_numeric.active:hover, .editval_select.active:hover, .editval_autocomplete.active:hover, .editval_datepicker.active:hover {
|
.editval_textarea.active:hover, .editval_ckeditor.active:hover, .editval_string.active:hover, .editval_email.active:hover, .editval_numeric.active:hover, .editval_select.active:hover, .editval_autocomplete.active:hover, .editval_datepicker.active:hover {
|
||||||
|
|||||||
@ -3678,17 +3678,19 @@ td.gtaskname {
|
|||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* jQuery - jeditable */
|
/* jQuery - jeditable for inline edit */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
.editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select, .editkey_autocomplete {
|
.editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select, .editkey_autocomplete {
|
||||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/edit.png',1) ?>) right top no-repeat;
|
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/edit.png',1) ?>) right top no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editkey_datepicker {
|
.editkey_datepicker {
|
||||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/calendar.png',1) ?>) right center no-repeat;
|
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/calendar.png',1) ?>) right center no-repeat;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editval_textarea.active:hover, .editval_ckeditor.active:hover, .editval_string.active:hover, .editval_email.active:hover, .editval_numeric.active:hover, .editval_select.active:hover, .editval_autocomplete.active:hover, .editval_datepicker.active:hover {
|
.editval_textarea.active:hover, .editval_ckeditor.active:hover, .editval_string.active:hover, .editval_email.active:hover, .editval_numeric.active:hover, .editval_select.active:hover, .editval_autocomplete.active:hover, .editval_datepicker.active:hover {
|
||||||
|
|||||||
@ -139,7 +139,8 @@ $server->wsdl->addComplexType(
|
|||||||
'date_modification' => array('name'=>'date_modification','type'=>'xsd:dateTime'),
|
'date_modification' => array('name'=>'date_modification','type'=>'xsd:dateTime'),
|
||||||
'date_invoice' => array('name'=>'date_invoice','type'=>'xsd:date'),
|
'date_invoice' => array('name'=>'date_invoice','type'=>'xsd:date'),
|
||||||
'date_term' => array('name'=>'date_modification','type'=>'xsd:date'),
|
'date_term' => array('name'=>'date_modification','type'=>'xsd:date'),
|
||||||
'type' => array('name'=>'type','type'=>'xsd:int'),
|
'label' => array('name'=>'label','type'=>'xsd:date'),
|
||||||
|
'type' => array('name'=>'type','type'=>'xsd:int'),
|
||||||
'total_net' => array('name'=>'type','type'=>'xsd:double'),
|
'total_net' => array('name'=>'type','type'=>'xsd:double'),
|
||||||
'total_vat' => array('name'=>'type','type'=>'xsd:double'),
|
'total_vat' => array('name'=>'type','type'=>'xsd:double'),
|
||||||
'total' => array('name'=>'type','type'=>'xsd:double'),
|
'total' => array('name'=>'type','type'=>'xsd:double'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user