Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/facture/card.php htdocs/core/class/html.form.class.php htdocs/product/price.php
This commit is contained in:
commit
3b8947dadd
@ -299,7 +299,7 @@ SELECT2
|
|||||||
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
|
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
|
||||||
|
|
||||||
.select2-hidden-accessible {
|
.select2-hidden-accessible {
|
||||||
margin: -1px !important; /* line to restore */
|
margin: -10000px !important; /* line to restore */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,6 +39,8 @@ if (!$user->admin) accessforbidden();
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$type = 'paymentorder';
|
$type = 'paymentorder';
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -73,30 +75,25 @@ if ($action == "set")
|
|||||||
} else $error++;
|
} else $error++;
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity);
|
||||||
if (!$res > 0) $error++;
|
if (! ($res > 0)) $error++;
|
||||||
|
|
||||||
if (GETPOST("PRELEVEMENT_USER") > 0)
|
if (GETPOST("PRELEVEMENT_USER") > 0) {
|
||||||
{
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USER", GETPOST("PRELEVEMENT_USER"), 'chaine', 0, '', $conf->entity);
|
if (! ($res > 0)) $error++;
|
||||||
if (!$res > 0) $error++;
|
}
|
||||||
}
|
if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "") {
|
||||||
if (GETPOST("PRELEVEMENT_END_TO_END") || GETPOST("PRELEVEMENT_END_TO_END") == "")
|
$res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
||||||
{
|
if (! ($res > 0)) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_END_TO_END", GETPOST("PRELEVEMENT_END_TO_END"), 'chaine', 0, '', $conf->entity);
|
}
|
||||||
if (!$res > 0) $error++;
|
if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "") {
|
||||||
}
|
$res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity);
|
||||||
if (GETPOST("PRELEVEMENT_USTRD") || GETPOST("PRELEVEMENT_USTRD") == "")
|
if (! ($res > 0)) $error++;
|
||||||
{
|
}
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_USTRD", GETPOST("PRELEVEMENT_USTRD"), 'chaine', 0, '', $conf->entity);
|
|
||||||
if (!$res > 0) $error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GETPOST("PRELEVEMENT_ADDDAYS") || GETPOST("PRELEVEMENT_ADDDAYS") == "")
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
||||||
{
|
if (! ($res > 0)) $error++;
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"), 'chaine', 0, '', $conf->entity);
|
|
||||||
if (!$res > 0) $error++;
|
if (! $error) {
|
||||||
} elseif (!$error)
|
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
@ -193,9 +190,10 @@ print '</td></tr>';
|
|||||||
//ADDDAYS
|
//ADDDAYS
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("ADDDAYS").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("ADDDAYS").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
if (!$conf->global->PRELEVEMENT_ADDDAYS) $conf->global->PRELEVEMENT_ADDDAYS = 0;
|
if (empty($conf->global->PRELEVEMENT_ADDDAYS)) $conf->global->PRELEVEMENT_ADDDAYS = 0;
|
||||||
print '<input type="text" name="PRELEVEMENT_ADDDAYS" value="'.$conf->global->PRELEVEMENT_ADDDAYS.'" size="5" ></td>';
|
print '<input type="text" name="PRELEVEMENT_ADDDAYS" value="'.$conf->global->PRELEVEMENT_ADDDAYS.'" size="5" ></td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -2433,22 +2433,22 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$object->fetch($id, '', '', '', true);
|
$object->fetch($id, '', '', '', true);
|
||||||
|
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $object->type == Facture::TYPE_SITUATION
|
&& $object->type == Facture::TYPE_SITUATION
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
&& $object->is_last_in_cycle()
|
&& $object->is_last_in_cycle()
|
||||||
&& $usercanunvalidate
|
&& $usercanunvalidate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$outingError = 0;
|
$outingError = 0;
|
||||||
$newCycle = $object->newCycle(); // we need to keep the "situation behavior" so we place it on a new situation cycle
|
$newCycle = $object->newCycle(); // we need to keep the "situation behavior" so we place it on a new situation cycle
|
||||||
if ($newCycle > 1)
|
if ($newCycle > 1)
|
||||||
{
|
{
|
||||||
// Search credit notes
|
// Search credit notes
|
||||||
$lastCycle = $object->situation_cycle_ref;
|
$lastCycle = $object->situation_cycle_ref;
|
||||||
$lastSituationCounter = $object->situation_counter;
|
$lastSituationCounter = $object->situation_counter;
|
||||||
$linkedCreditNotesList = array();
|
$linkedCreditNotesList = array();
|
||||||
|
|
||||||
if (count($object->tab_next_situation_invoice) > 0) {
|
if (count($object->tab_next_situation_invoice) > 0) {
|
||||||
foreach ($object->tab_next_situation_invoice as $next_invoice) {
|
foreach ($object->tab_next_situation_invoice as $next_invoice) {
|
||||||
@ -3764,18 +3764,18 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Confirmation to remove invoice from cycle
|
// Confirmation to remove invoice from cycle
|
||||||
if ($action == 'situationout') {
|
if ($action == 'situationout') {
|
||||||
$text = $langs->trans('ConfirmRemoveSituationFromCycle', $object->ref);
|
$text = $langs->trans('ConfirmRemoveSituationFromCycle', $object->ref);
|
||||||
$label = $langs->trans("ConfirmOuting");
|
$label = $langs->trans("ConfirmOuting");
|
||||||
$formquestion = array();
|
$formquestion = array();
|
||||||
// remove situation from cycle
|
// remove situation from cycle
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
&& $object->is_last_in_cycle()
|
&& $object->is_last_in_cycle()
|
||||||
&& $usercanunvalidate
|
&& $usercanunvalidate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $label, $text, 'confirm_situationout', $formquestion, "yes", 1);
|
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $label, $text, 'confirm_situationout', $formquestion, "yes", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5278,12 +5278,12 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove situation from cycle
|
// Remove situation from cycle
|
||||||
if ($object->statut > Facture::STATUS_DRAFT
|
if (in_array($object->statut, array(Facture::STATUS_CLOSED, Facture::STATUS_VALIDATED))
|
||||||
&& $object->type == Facture::TYPE_SITUATION
|
&& $object->type == Facture::TYPE_SITUATION
|
||||||
&& $usercancreate
|
&& $usercancreate
|
||||||
&& !$objectidnext
|
&& !$objectidnext
|
||||||
&& $object->situation_counter > 1
|
&& $object->situation_counter > 1
|
||||||
&& $object->is_last_in_cycle()
|
&& $object->is_last_in_cycle()
|
||||||
&& $usercanunvalidate
|
&& $usercanunvalidate
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6259,12 +6259,6 @@ class Form
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if (!$forcecombo)
|
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
|
||||||
$out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct $out and $outarray
|
// Construct $out and $outarray
|
||||||
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').($moreparams ? ' '.$moreparams : '').' name="'.$htmlname.'">'."\n";
|
$out .= '<select id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').($moreparams ? ' '.$moreparams : '').' name="'.$htmlname.'">'."\n";
|
||||||
|
|
||||||
@ -6310,6 +6304,11 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
$out .= '</select>'."\n";
|
$out .= '</select>'."\n";
|
||||||
|
|
||||||
|
if (!$forcecombo) {
|
||||||
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||||
|
$out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,7 @@
|
|||||||
-webkit-clip-path: inset(50%) !important;
|
-webkit-clip-path: inset(50%) !important;
|
||||||
clip-path: inset(50%) !important;
|
clip-path: inset(50%) !important;
|
||||||
height: 1px !important;
|
height: 1px !important;
|
||||||
margin: -1px !important;
|
margin: -10000px !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
|
|||||||
@ -1438,14 +1438,14 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
|
|||||||
{
|
{
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
|
|
||||||
// Il doit au moins y avoir la ligne de prix initial.
|
// Il doit au moins y avoir la ligne de prix initial.
|
||||||
// On l'ajoute donc pour remettre a niveau (pb vieilles versions)
|
// On l'ajoute donc pour remettre a niveau (pb vieilles versions)
|
||||||
//$object->updatePrice($object->price, $object->price_base_type, $user, $object->tva_tx, $object->price_min);
|
// We emulate the change of the price from interface with the same value than the one into table llx_product
|
||||||
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||||
$object->updatePrice($object->multiprices[1], $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1]) ? 0 : $object->multiprices_tva_tx[1]), $object->multiprices_min[1], 1);
|
$object->updatePrice(($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_ttc[1] : $object->multiprices[1]), $object->multiprices_base_type[1], $user, (empty($object->multiprices_tva_tx[1]) ? 0 : $object->multiprices_tva_tx[1]), ($object->multiprices_base_type[1] == 'TTC' ? $object->multiprices_min_ttc[1] : $object->multiprices_min[1]), 1);
|
||||||
} else {
|
} else {
|
||||||
$object->updatePrice($object->price, $object->price_base_type, $user, $object->tva_tx, $object->price_min);
|
$object->updatePrice(($object->price_base_type == 'TTC' ? $object->price_ttc : $object->price), $object->price_base_type, $user, $object->tva_tx, ($object->price_base_type == 'TTC' ? $object->price_min_ttc : $object->price_min));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|||||||
@ -6762,6 +6762,24 @@ div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 320px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 270px; /* must always be 50 slower than width */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 300px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 280px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 230px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -429,6 +429,25 @@ a.top-menu-dropdown-link {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 320px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 270px; /* must always be 50 slower than width */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 300px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 250px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 280px)
|
||||||
|
{
|
||||||
|
.dropdown dd ul {
|
||||||
|
max-width: 230px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.dropdown-search-input::placeholder {
|
.dropdown-search-input::placeholder {
|
||||||
color: color(#575756 a(0.8));
|
color: color(#575756 a(0.8));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user