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

Conflicts:
	htdocs/product/price.php
This commit is contained in:
Laurent Destailleur 2021-03-07 19:07:18 +01:00
commit 13d0398bd2
3 changed files with 36 additions and 43 deletions

View File

@ -1185,6 +1185,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) {
print dol_get_fiche_head('');
print '<div class="div-table-responsive-no-min">';
print '<table class="border centpercent">';
// VAT
@ -1271,6 +1272,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) {
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print '</table>';
print '</div>';
print dol_get_fiche_end();
@ -1318,6 +1320,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) {
print $langs->trans('UseMultipriceRules').' <input type="checkbox" id="usePriceRules" name="usePriceRules" '.($object->price_autogen ? 'checked' : '').'><br><br>';
}
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
print '<thead><tr class="liste_titre">';
@ -1392,6 +1395,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) {
print '</tbody>';
print '</table>';
print '</div>';
//print dol_get_fiche_end();
@ -1493,7 +1497,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action == 'showlog_defaul
print '<tr class="oddeven">';
// Date
print "<td>".dol_print_date($db->jdate($objp->dp), "dayhour")."</td>";
print "<td>".dol_print_date($db->jdate($objp->dp), "dayhour", 'tzuserrel')."</td>";
// Price level
if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) {
@ -1665,13 +1669,11 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<input type="hidden" name="action" value="add_customer_price_confirm">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print dol_get_fiche_head();
print '<table class="liste centpercent">';
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans('ThirdParty').'</td>';
print '<td>';
print $form->select_company('', 'socid', 's.client IN (1,2,3)', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300');
print img_picto('', 'company').$form->select_company('', 'socid', 's.client IN (1,2,3)', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300');
print '</td>';
print '</tr>';
@ -1721,14 +1723,13 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '</table>';
print dol_get_fiche_end();
print '<div class="center">';
// Update all child soc
print '<div class="marginbottomonly">';
print '<input type="checkbox" name="updatechildprice" value="1"> ';
print $langs->trans('ForceUpdateChildPriceSoc');
print '<input type="checkbox" name="updatechildprice" id="updatechildprice" value="1"> ';
print '<label for="updatechildprice">'.$langs->trans('ForceUpdateChildPriceSoc').'</label>';
print '</div>';
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
@ -1753,14 +1754,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<input type="hidden" name="action" value="update_customer_price_confirm">';
print '<input type="hidden" name="lineid" value="'.$prodcustprice->id.'">';
print dol_get_fiche_head();
print '<table class="liste centpercent">';
print '<tr>';
print '<td class="titlefield">'.$langs->trans('ThirdParty').'</td>';
print '<td class="titlefield fieldrequired">'.$langs->trans('ThirdParty').'</td>';
$staticsoc = new Societe($db);
$staticsoc->fetch($prodcustprice->fk_soc);
print "<td colspan='2'>".$staticsoc->getNomUrl(1)."</td>";
print "<td>".$staticsoc->getNomUrl(1)."</td>";
print '</tr>';
// Ref. Customer
@ -1768,12 +1767,12 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<td><input name="ref_customer" size="12" value="' . dol_escape_htmltag($prodcustprice->ref_customer) . '"></td></tr>';
// VAT
print '<tr><td>'.$langs->trans("DefaultTaxRate").'</td><td colspan="2">';
print '<tr><td class="fieldrequired">'.$langs->trans("DefaultTaxRate").'</td><td>';
print $form->load_tva("tva_tx", $prodcustprice->default_vat_code ? $prodcustprice->tva_tx.' ('.$prodcustprice->default_vat_code.')' : $prodcustprice->tva_tx, $mysoc, '', $object->id, $prodcustprice->recuperableonly, $object->type, false, 1);
print '</td></tr>';
// Price base
print '<tr><td>';
print '<tr><td class="fieldrequired">';
print $langs->trans('PriceBase');
print '</td>';
print '<td>';
@ -1782,7 +1781,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '</tr>';
// Price
print '<tr><td>';
print '<tr><td class="fieldrequired">';
$text = $langs->trans('SellingPrice');
print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
print '</td><td>';
@ -1809,21 +1808,13 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
}
print '</tr>';
// Update all child soc
print '<tr><td>';
print '</td>';
print '<td>';
print '</td>';
print '</tr>';
print '</table>';
print dol_get_fiche_end();
print '<div class="center">';
print '<div class="marginbottomonly">';
print '<input type="checkbox" name="updatechildprice" value="1"> ';
print $langs->trans('ForceUpdateChildPriceSoc');
print '<input type="checkbox" name="updatechildprice" id="updatechildprice" value="1"> ';
print '<label for="updatechildprice">'.$langs->trans('ForceUpdateChildPriceSoc').'</label>';
print "</div>";
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
@ -1866,6 +1857,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<div class="div-table-responsive-no-min">';
print '<table class="liste centpercent">';
print '<tr class="liste_titre">';
@ -1915,8 +1907,8 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<tr class="oddeven">';
print "<td>".$staticsoc->getNomUrl(1)."</td>";
print '<td>' . $line->ref_customer . '</td>';
print "<td>".dol_print_date($line->datec, "dayhour")."</td>";
print '<td>'.$line->ref_customer.'</td>';
print "<td>".dol_print_date($line->datec, "dayhour", 'tzuserrel')."</td>";
print '<td class="center">'.$langs->trans($line->price_base_type)."</td>";
print '<td class="right">';
@ -1960,6 +1952,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '</tr>';
}
print "</table>";
print '</div>';
} else {
print $langs->trans('None');
}
@ -1986,6 +1979,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<div class="div-table-responsive-no-min">';
print '<table class="liste centpercent">';
if (count($prodcustprice->lines) > 0 || $search_soc) {
@ -2020,7 +2014,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("HT").'</td>';
print '<td class="right">'.$langs->trans("MinPrice").' '.$langs->trans("TTC").'</td>';
print '<td class="right">'.$langs->trans("ChangedBy").'</td>';
print '<td>&nbsp;</td>';
print '<td></td>';
print '</tr>';
// Line for default price
@ -2081,15 +2075,14 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print '<td class="right">';
print '</td>';
if ($user->rights->produit->supprimer || $user->rights->service->supprimer) {
print '<td class="right">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=showlog_default_price&amp;id='.$object->id.'">';
print '<td class="nowraponall">';
print '<a class="marginleftonly marginrightonly" href="'.$_SERVER["PHP_SELF"].'?action=showlog_default_price&amp;id='.$object->id.'">';
print img_info($langs->trans('PriceByCustomerLog'));
print '</a>';
print ' ';
print '<a class="marginleftonly editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_price&amp;id='.$object->id.'">';
print '<a class="marginleftonly marginrightonly editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_price&amp;id='.$object->id.'">';
print img_edit('default', 0, 'style="vertical-align: middle;"');
print '</a>';
print ' &nbsp; ';
print '</td>';
}
print "</tr>\n";
@ -2124,8 +2117,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print "<td>".$staticsoc->getNomUrl(1)."</td>";
print '<td>' . $line->ref_customer . '</td>';
print "<td>".dol_print_date($line->datec, "dayhour")."</td>";
print "<td>".dol_print_date($line->datec, "dayhour", 'tzuserrel')."</td>";
print '<td class="center">'.$langs->trans($line->price_base_type)."</td>";
print '<td class="right">';
@ -2142,6 +2134,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
if (empty($positiverates)) {
$positiverates = '0';
}
echo vatrate($positiverates.($line->default_vat_code ? ' ('.$line->default_vat_code.')' : ''), '%', ($line->tva_npr ? $line->tva_npr : $line->recuperableonly));
print "</td>";
@ -2185,16 +2178,9 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
print "</tr>\n";
}
}
/*else
{
$colspan=9;
if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan+=1;
print "<tr ".$bc[false].">";
print '<td colspan="'.$colspan.'">'.$langs->trans('None').'</td>';
print "</tr>";
}*/
print "</table>";
print '</div>';
print "</form>";
}

View File

@ -1606,7 +1606,7 @@ td.showDragHandle {
float: left;
}
.classforhorizontalscrolloftabs #id-right {
width:calc(100% - 210px);
width: calc(100% - 210px);
display: inline-block;
}
@ -1710,10 +1710,17 @@ div.vmenu, td.vmenu {
/* rule to reduce top menu - 3rd reduction: The menu for user is on left */
@media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */
{
/* no side-nav */
body.sidebar-collapse .side-nav {
display: none;
}
/* if no side-nav, we don't need to have width forced */
.classforhorizontalscrolloftabs #id-right {
width: unset;
display: unset;
}
body.sidebar-collapse .login_block {
display: none;
}

View File

@ -712,7 +712,7 @@ class Ticket extends CommonObject
if (!empty($filter)) {
foreach ($filter as $key => $value) {
if (strpos($key, 'date')) { // To allow $filter['YEAR(s.dated)']=>$year
$sql .= ' AND '.$key." = '".$this->db->scape($value)."'";
$sql .= ' AND '.$key." = '".$this->db->escape($value)."'";
} elseif (($key == 't.fk_user_assign') || ($key == 't.type_code') || ($key == 't.category_code') || ($key == 't.severity_code') || ($key == 't.fk_soc')) {
$sql .= " AND ".$key." = '".$this->db->escape($value)."'";
} elseif ($key == 't.fk_statut') {