Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c1d3ddf10b
@ -225,6 +225,13 @@ print '<tr class="oddeven"><td>'.$langs->trans("MemberCreateAnExternalUserForSub
|
||||
print $form->selectyesno('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', (!empty($conf->global->ADHERENT_CREATE_EXTERNAL_USER_LOGIN) ? $conf->global->ADHERENT_CREATE_EXTERNAL_USER_LOGIN : 0), 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Allow members to change type on renewal forms
|
||||
/* To test during next beta
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MemberAllowchangeOfType").'</td><td>';
|
||||
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
|
||||
print "</td></tr>\n";
|
||||
*/
|
||||
|
||||
// Insert subscription into bank account
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
||||
$arraychoices = array('0'=>$langs->trans("None"));
|
||||
|
||||
@ -7757,7 +7757,7 @@ abstract class CommonObject
|
||||
|
||||
if ($display_type == 'card') {
|
||||
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="valuefieldcreate '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.(!empty($this->id)?'_'.$this->id:'').'" '.$domData.' >';
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && $action == 'view') {
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && ($action == 'view' || $action == 'editline')) {
|
||||
$out .= '<td></td>';
|
||||
}
|
||||
$out .= '<td class="wordbreak';
|
||||
|
||||
@ -90,7 +90,7 @@ if ($permission) {
|
||||
?>
|
||||
<form class="tagtr liste_titre">
|
||||
<div class="tagtd liste_titre"><?php echo $langs->trans("ThirdParty"); ?></div>
|
||||
<div class="tagtd liste_titre"><?php echo $langs->trans("Users").' | '.$langs->trans("Contacts"); ?></div>
|
||||
<div class="tagtd liste_titre"><?php echo img_picto($langs->trans("Users"), 'user', 'class="optiongrey paddingright"').$langs->trans("Users").' | '.img_picto($langs->trans("Contacts"), 'contact', 'class="optiongrey paddingright"').$langs->trans("Contacts"); ?></div>
|
||||
<div class="tagtd liste_titre"><?php echo $langs->trans("ContactType"); ?></div>
|
||||
<div class="tagtd liste_titre"> </div>
|
||||
<div class="tagtd liste_titre"> </div>
|
||||
|
||||
@ -379,7 +379,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("QtyToShip").'/'.$langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
|
||||
$labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip");
|
||||
if (!empty($conf->stock->enabled)) {
|
||||
$labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse");
|
||||
}
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -717,6 +721,16 @@ if (empty($reshook)) {
|
||||
unset($_POST[$qty]);
|
||||
}
|
||||
}
|
||||
} elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated.
|
||||
$qty = "qtyl".$line_id;
|
||||
$line->id = $line_id;
|
||||
$line->qty = GETPOST($qty, 'int');
|
||||
$line->entrepot_id = 0;
|
||||
if ($line->update($user) < 0) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
unset($_POST[$qty]);
|
||||
}
|
||||
} else {
|
||||
// Product no predefined
|
||||
@ -786,6 +800,10 @@ $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expedic
|
||||
|
||||
llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url);
|
||||
|
||||
if (empty($action)) {
|
||||
$action = 'view';
|
||||
}
|
||||
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formproduct = new FormProduct($db);
|
||||
@ -997,9 +1015,9 @@ if ($action == 'create') {
|
||||
|
||||
$numAsked = count($object->lines);
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#autofill").click(function() {';
|
||||
print '<script type="text/javascript" language="javascript">'."\n";
|
||||
print 'jQuery(document).ready(function() {'."\n";
|
||||
print 'jQuery("#autofill").click(function() {';
|
||||
$i = 0;
|
||||
while ($i < $numAsked) {
|
||||
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
|
||||
@ -1008,10 +1026,11 @@ if ($action == 'create') {
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print '});
|
||||
jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0); });
|
||||
});
|
||||
</script>';
|
||||
print 'return false; });'."\n";
|
||||
print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n";
|
||||
print 'return false; });'."\n";
|
||||
print '});'."\n";
|
||||
print '</script>'."\n";
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -1172,7 +1191,7 @@ if ($action == 'create') {
|
||||
$deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int');
|
||||
}
|
||||
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
||||
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
||||
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl center" type="text" size="4" value="'.$deliverableQty.'">';
|
||||
} else {
|
||||
print $langs->trans("NA");
|
||||
}
|
||||
@ -2185,7 +2204,7 @@ if ($action == 'create') {
|
||||
|
||||
if ($action == 'editline' && $lines[$i]->id == $line_id) {
|
||||
// edit mode
|
||||
print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding">';
|
||||
print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">';
|
||||
if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) {
|
||||
print '<!-- case edit 1 -->';
|
||||
$line = new ExpeditionLigne($db);
|
||||
@ -2248,6 +2267,16 @@ if ($action == 'create') {
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} elseif (empty($conf->stock->enabled) && empty($conf->productbatch->enabled)) { // both product batch and stock are not activated.
|
||||
print '<!-- case edit 6 -->';
|
||||
print '<tr>';
|
||||
// Qty to ship or shipped
|
||||
print '<td><input class="qtyl" name="qtyl'.$line_id.'" id="qtyl'.$line_id.'" type="text" size="4" value="'.$lines[$i]->qty_shipped.'"></td>';
|
||||
// Warehouse source
|
||||
print '<td></td>';
|
||||
// Batch number managment
|
||||
print '<td></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table></td>';
|
||||
@ -2365,10 +2394,11 @@ if ($action == 'create') {
|
||||
$line = $lines[$i];
|
||||
$line->fetch_optionals();
|
||||
|
||||
// TODO Show all in same line by setting $display_type = 'line'
|
||||
if ($action == 'editline' && $line->id == $line_id) {
|
||||
print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked);
|
||||
print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked, '', 0, 'card');
|
||||
} else {
|
||||
print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked);
|
||||
print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked, '', 0, 'card');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3392,13 +3392,13 @@ class SupplierInvoiceLine extends CommonObjectLine
|
||||
if (empty($this->fk_product)) {
|
||||
$fk_product = "null";
|
||||
} else {
|
||||
$fk_product = $this->fk_product;
|
||||
$fk_product = (int) $this->fk_product;
|
||||
}
|
||||
|
||||
if (empty($this->fk_unit)) {
|
||||
$fk_unit = "null";
|
||||
} else {
|
||||
$fk_unit = "'".$this->db->escape($this->fk_unit)."'";
|
||||
$fk_unit = (int) $this->fk_unit;
|
||||
}
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
|
||||
|
||||
@ -2219,7 +2219,8 @@ if ($module == 'initmodule') {
|
||||
|
||||
if ($action != 'editfile' || empty($file)) {
|
||||
print '<span class="opacitymedium">';
|
||||
$htmlhelp = $langs->trans("DictionariesDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans('Setup').' - '.$langs->trans('Dictionaries').'</a>');
|
||||
$htmlhelp = $langs->trans("DictionariesDefDescTooltip", '{s1}');
|
||||
$htmlhelp = str_replace('{s1}', '<a target="adminbis" class="nofocusvisible" href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans('Setup').' - '.$langs->trans('Dictionaries').'</a>', $htmlhelp);
|
||||
print $form->textwithpicto($langs->trans("DictionariesDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>';
|
||||
print '</span>';
|
||||
print '<br>';
|
||||
@ -3012,7 +3013,8 @@ if ($module == 'initmodule') {
|
||||
|
||||
if ($action != 'editfile' || empty($file)) {
|
||||
print '<span class="opacitymedium">';
|
||||
$htmlhelp = $langs->trans("MenusDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/menus/index.php">'.$langs->trans('Setup').' - '.$langs->trans('Menus').'</a>');
|
||||
$htmlhelp = $langs->trans("MenusDefDescTooltip", '{s1}');
|
||||
$htmlhelp = str_replace('{s1}', '<a target="adminbis" class="nofocusvisible" href="'.DOL_URL_ROOT.'/admin/menus/index.php">'.$langs->trans('Setup').' - '.$langs->trans('Menus').'</a>', $htmlhelp);
|
||||
print $form->textwithpicto($langs->trans("MenusDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>';
|
||||
print '</span>';
|
||||
print '<br>';
|
||||
@ -3144,7 +3146,8 @@ if ($module == 'initmodule') {
|
||||
|
||||
if ($action != 'editfile' || empty($file)) {
|
||||
print '<span class="opacitymedium">';
|
||||
$htmlhelp = $langs->trans("PermissionsDefDescTooltip", '<a href="'.DOL_URL_ROOT.'/admin/perms.php">'.$langs->trans('DefaultPermissions').'</a>');
|
||||
$htmlhelp = $langs->trans("PermissionsDefDescTooltip", '{s1}');
|
||||
$htmlhelp = str_replace('{s1}', '<a target="adminbis" class="nofocusvisible" href="'.DOL_URL_ROOT.'/admin/perms.php">'.$langs->trans('DefaultRights').'</a>', $htmlhelp);
|
||||
print $form->textwithpicto($langs->trans("PermissionsDefDesc"), $htmlhelp, 1, 'help', '', 0, 2, 'helpondesc').'<br>';
|
||||
print '</span>';
|
||||
print '<br>';
|
||||
@ -3611,7 +3614,7 @@ if ($module == 'initmodule') {
|
||||
$cronjobs = $moduleobj->cronjobs;
|
||||
|
||||
if ($action != 'editfile' || empty($file)) {
|
||||
print '<span class="opacitymedium">'.str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>', $langs->trans("CronJobDefDesc", '{s1}')).'</span><br>';
|
||||
print '<span class="opacitymedium">'.str_replace('{s1}', '<a target="adminbis" class="nofocusvisible" href="'.DOL_URL_ROOT.'/cron/list.php">'.$langs->transnoentities('CronList').'</a>', $langs->trans("CronJobDefDesc", '{s1}')).'</span><br>';
|
||||
print '<br>';
|
||||
|
||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("DescriptorFile").' : <strong>'.$pathtofile.'</strong>';
|
||||
|
||||
@ -69,7 +69,7 @@ class MyModuleApi extends DolibarrApi
|
||||
*/
|
||||
public function get($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->read) {
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->read) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ class MyModuleApi extends DolibarrApi
|
||||
*/
|
||||
public function post($request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->write) {
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->write) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ class MyModuleApi extends DolibarrApi
|
||||
*/
|
||||
public function put($id, $request_data = null)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->write) {
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->write) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ class MyModuleApi extends DolibarrApi
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->delete) {
|
||||
if (!DolibarrApiAccess::$user->rights->mymodule->myobject->delete) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->myobject->fetch($id);
|
||||
|
||||
@ -1516,7 +1516,7 @@ if ($source == 'member' || $source == 'membersubscription') {
|
||||
$oldtypeid = $member->typeid;
|
||||
$newtypeid = (int) (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $member->typeid);
|
||||
|
||||
if ($oldtypeid != $newtypeid && !empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE)) {
|
||||
if (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
$adht = new AdherentType($db);
|
||||
// Amount by member type
|
||||
|
||||
@ -454,7 +454,7 @@ $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.barcode, s.address, s.tow
|
||||
$sql .= " s.entity,";
|
||||
$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,";
|
||||
$sql .= " s.email, s.phone, s.fax, s.url, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4 as idprof4, s.idprof5 as idprof5, s.idprof6 as idprof6, s.tva_intra, s.fk_pays,";
|
||||
$sql .= " s.tms as date_update, s.datec as date_creation,";
|
||||
$sql .= " s.tms as date_update, s.datec as date_creation, s.import_key,";
|
||||
$sql .= " s.code_compta, s.code_compta_fournisseur, s.parent as fk_parent,s.price_level,";
|
||||
$sql .= " s2.nom as name2,";
|
||||
$sql .= " typent.code as typent_code,";
|
||||
|
||||
@ -297,6 +297,10 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment {
|
||||
cursor: pointer;
|
||||
max-width: 350px;
|
||||
}
|
||||
.nofocusvisible:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
div.buttonpayment input:focus {
|
||||
color: #008;
|
||||
}
|
||||
|
||||
@ -473,6 +473,10 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment {
|
||||
white-space: normal;
|
||||
color: #888 !important;
|
||||
}
|
||||
.nofocusvisible:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
div.buttonpayment input {
|
||||
background-color: unset;
|
||||
border-bottom: unset;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user