Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2572847b2a
6 changed files with 14 additions and 12 deletions
|
|
@ -1159,7 +1159,8 @@ if ($num) {
|
|||
$fieldsforcontent[] = 'content_lines';
|
||||
}
|
||||
|
||||
$parameters = array('fieldsforcontent' => &$fieldsforcontent, 'tabname' => $tabname[$id]);
|
||||
$tabname=isset($tabname[$id]) ? $tabname[$id] :'';
|
||||
$parameters = array('fieldsforcontent' => &$fieldsforcontent, 'tabname' => $tabname);
|
||||
$hookmanager->executeHooks('editEmailTemplateFieldsForContent', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
foreach ($fieldsforcontent as $tmpfieldlist) {
|
||||
|
|
|
|||
|
|
@ -84,8 +84,7 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
|
|||
|
||||
// Default sort order (if not yet defined by previous GETPOST)
|
||||
if (!$sortfield) {
|
||||
reset($object->fields); // Reset is required to avoid key() to return null.
|
||||
$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
||||
$sortfield = "t.ref"; // Set here default search field. By default 1st field in definition.
|
||||
}
|
||||
if (!$sortorder) {
|
||||
$sortorder = "ASC";
|
||||
|
|
@ -753,9 +752,7 @@ while ($i < $imaxinloop) {
|
|||
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
||||
}
|
||||
|
||||
if (in_array($val['type'], array('timestamp'))) {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowraponall';
|
||||
} elseif ($key == 'ref') {
|
||||
if ($key == 'ref') {
|
||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowraponall';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7237,7 +7237,7 @@ class Form
|
|||
|
||||
$tmparray = array();
|
||||
$tmparray['rowid'] = $obj->rowid;
|
||||
$tmparray['type_vat'] = $obj->type_vat;
|
||||
$tmparray['type_vat'] = ($obj->type_vat <= 0 ? 0 : $obj->type_vat); // Some version have type_vat corrupted with value -1
|
||||
$tmparray['code'] = $obj->code;
|
||||
$tmparray['txtva'] = $obj->taux;
|
||||
$tmparray['nprtva'] = $obj->recuperableonly;
|
||||
|
|
@ -7370,7 +7370,8 @@ class Form
|
|||
} else {
|
||||
$code_country = "'" . $mysoc->country_code . "'"; // Pour compatibilite ascendente
|
||||
}
|
||||
if (getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) { // If option to have vat for end customer for services is on
|
||||
|
||||
if ($societe_vendeuse == $mysoc && getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) { // If option to have vat for end customer for services is on
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
|
||||
// If SERVICE_ARE_ECOMMERCE_200238EC=1 combo list vat rate of purchaser and seller countries
|
||||
// If SERVICE_ARE_ECOMMERCE_200238EC=2 combo list only the vat rate of the purchaser country
|
||||
|
|
@ -7419,7 +7420,6 @@ class Form
|
|||
}
|
||||
|
||||
$num = count($arrayofvatrates);
|
||||
|
||||
if ($num > 0) {
|
||||
// Define the vat rate to pre-select (if defaulttx not forced so is -1 or '')
|
||||
if ($defaulttx < 0 || dol_strlen($defaulttx) == 0) {
|
||||
|
|
|
|||
|
|
@ -2469,7 +2469,8 @@ if ($action == 'create') {
|
|||
// VAT
|
||||
$selectedvat = price2num($line->vatrate).(!empty($line->vat_src_code) ? ' ('.$line->vat_src_code.')' : '');
|
||||
print '<td class="right">';
|
||||
print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $selectedvat), $mysoc, null, 0, 0, '', false, 1, 2);
|
||||
// We must use null, null for seller and buyer as we don't know them for expense report.
|
||||
print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $selectedvat), null, null, 0, 0, '', false, 1, 2);
|
||||
print '</td>';
|
||||
|
||||
// Unit price
|
||||
|
|
@ -2655,6 +2656,7 @@ if ($action == 'create') {
|
|||
// If option to have no default VAT on expense report is on, we force MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS
|
||||
$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
|
||||
}
|
||||
// We must use null, null for seller and buyer as we don't know them for expense report.
|
||||
print $form->load_tva('vatrate', (!empty($vatrate) ? $vatrate : $defaultvat), null, null, 0, 0, '', false, 1);
|
||||
print '</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -693,4 +693,7 @@ ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE INDEX uk_pr
|
|||
-- delete a constant that should not be set
|
||||
DELETE FROM llx_const WHERE name = 'INVOICE_USE_RETAINED_WARRANTY' AND value = -1;
|
||||
|
||||
|
||||
DELETE FROM llx_hrm_skilldet WHERE rankorder = 0;
|
||||
|
||||
UPDATE llx_c_tva SET type_vat = 0 WHERE type_vat < 0;
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
|
|||
|
||||
// Default sort order (if not yet defined by previous GETPOST)
|
||||
if (!$sortfield) {
|
||||
reset($object->fields); // Reset is required to avoid key() to return null.
|
||||
$sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
||||
$sortfield = "t.ref"; // Set here default search field. By default 1st field in definition.
|
||||
}
|
||||
if (!$sortorder) {
|
||||
$sortorder = "ASC";
|
||||
|
|
|
|||
Loading…
Reference in a new issue