Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
2660948778
@ -955,6 +955,8 @@ if (empty($reshook)) {
|
|||||||
$price_ttc = '';
|
$price_ttc = '';
|
||||||
$price_ttc_devise = '';
|
$price_ttc_devise = '';
|
||||||
|
|
||||||
|
// TODO Implement if (getDolGlobalInt('MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES'))
|
||||||
|
|
||||||
if (GETPOST('price_ht') !== '') {
|
if (GETPOST('price_ht') !== '') {
|
||||||
$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
|
$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -871,6 +871,8 @@ class Propal extends CommonObject
|
|||||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Implement if (getDolGlobalInt('MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES')) ?
|
||||||
|
|
||||||
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
$total_tva = $tabprice[1];
|
$total_tva = $tabprice[1];
|
||||||
|
|||||||
@ -6184,13 +6184,15 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// If field is a computed field, value must become result of compute (regardless of whether a row exists
|
// If field is a computed field, value must become result of compute (regardless of whether a row exists
|
||||||
// in the element's extrafields table)
|
// in the element's extrafields table)
|
||||||
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
if (is_array($extrafields->attributes[$this->table_element]['label'])) {
|
||||||
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
|
foreach ($extrafields->attributes[$this->table_element]['label'] as $key => $val) {
|
||||||
//var_dump($conf->disable_compute);
|
if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) {
|
||||||
if (empty($conf->disable_compute)) {
|
//var_dump($conf->disable_compute);
|
||||||
global $objectoffield; // We set a global variable to $objectoffield so
|
if (empty($conf->disable_compute)) {
|
||||||
$objectoffield = $this; // we can use it inside computed formula
|
global $objectoffield; // We set a global variable to $objectoffield so
|
||||||
$this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
|
$objectoffield = $this; // we can use it inside computed formula
|
||||||
|
$this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -436,7 +436,7 @@ class FormTicket
|
|||||||
$toolbarname = 'dolibarr_notes';
|
$toolbarname = 'dolibarr_notes';
|
||||||
if ($this->ispublic) {
|
if ($this->ispublic) {
|
||||||
$toolbarname = 'dolibarr_details';
|
$toolbarname = 'dolibarr_details';
|
||||||
print '<div class="warning">'.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'</div>';
|
print '<div class="warning hideonsmartphone">'.(getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'))).'</div>';
|
||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$uselocalbrowser = true;
|
$uselocalbrowser = true;
|
||||||
@ -464,7 +464,7 @@ class FormTicket
|
|||||||
|
|
||||||
if (count($cate_arbo)) {
|
if (count($cate_arbo)) {
|
||||||
// Categories
|
// Categories
|
||||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
print '<tr><td class="wordbreak">'.$langs->trans("Categories").'</td><td>';
|
||||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -260,7 +260,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
|
if ($type == '0' && !empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'password_hash' && function_exists('password_verify')) {
|
||||||
if ($hash[0] == '$') {
|
if (! empty($hash[0]) && $hash[0] == '$') {
|
||||||
return password_verify($chain, $hash);
|
return password_verify($chain, $hash);
|
||||||
} elseif (strlen($hash) == 32) {
|
} elseif (strlen($hash) == 32) {
|
||||||
return dol_verifyHash($chain, $hash, '3'); // md5
|
return dol_verifyHash($chain, $hash, '3'); // md5
|
||||||
|
|||||||
@ -242,21 +242,21 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output html code for logo
|
// Output html code for logo
|
||||||
if ($urllogo || getDolGlobalInt('TICKET_PUBLIC_INTERFACE_TOPIC')) {
|
if ($urllogo || getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC')) {
|
||||||
print '<div class="backgreypublicpayment">';
|
print '<div class="backgreypublicpayment">';
|
||||||
print '<div class="logopublicpayment">';
|
print '<div class="logopublicpayment">';
|
||||||
if ($urllogo) {
|
if ($urllogo) {
|
||||||
print '<a href="'.(getDolGlobalInt('TICKET_URL_PUBLIC_INTERFACE') ? getDolGlobalInt('TICKET_URL_PUBLIC_INTERFACE') : dol_buildpath('/public/ticket/index.php?entity='.$conf->entity, 1)).'">';
|
print '<a href="'.(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') : dol_buildpath('/public/ticket/index.php?entity='.$conf->entity, 1)).'">';
|
||||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
|
print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
|
||||||
print '>';
|
print '>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
if (getDolGlobalInt('TICKET_PUBLIC_INTERFACE_TOPIC')) {
|
if (getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC')) {
|
||||||
print '<div class="clearboth"></div><strong>'.(getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') ? getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') : $langs->trans("TicketSystem")).'</strong>';
|
print '<div class="clearboth"></div><strong>'.(getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') ? getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') : $langs->trans("TicketSystem")).'</strong>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
if (!getDolGlobalInt('MAIN_HIDE_POWERED_BY')) {
|
if (!getDolGlobalInt('MAIN_HIDE_POWERED_BY')) {
|
||||||
print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
print '<div class="poweredbypublicpayment opacitymedium right hideonsmartphone"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
|
||||||
}
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -412,7 +412,7 @@ if ($nolinesbefore) {
|
|||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (!empty($inputalsopricewithtax)) {
|
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoluttc right">
|
<td class="nobottom linecoluttc right">
|
||||||
|
|||||||
@ -228,9 +228,13 @@ $coldisplay++;
|
|||||||
print '<td class="right"><input rel="'.$object->multicurrency_tx.'" type="text" class="flat right" size="5" id="multicurrency_subprice" name="multicurrency_subprice" value="'.(GETPOSTISSET('multicurrency_subprice') ? GETPOST('multicurrency_subprice', 'alpha') : price($line->multicurrency_subprice)).'" /></td>';
|
print '<td class="right"><input rel="'.$object->multicurrency_tx.'" type="text" class="flat right" size="5" id="multicurrency_subprice" name="multicurrency_subprice" value="'.(GETPOSTISSET('multicurrency_subprice') ? GETPOST('multicurrency_subprice', 'alpha') : price($line->multicurrency_subprice)).'" /></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($inputalsopricewithtax) {
|
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(GETPOSTISSET('price_ttc') ? GETPOST('price_ttc') : (isset($line->pu_ttc) ? price($line->pu_ttc, 0, '', 0) : '')).'"';
|
$upinctax = isset($line->pu_ttc) ? $line->pu_ttc : null;
|
||||||
|
if (getDolGlobalInt('MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES')) {
|
||||||
|
$upinctax = price2num($line->total_ttc / $line->qty, 'MU');
|
||||||
|
}
|
||||||
|
print '<td class="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(GETPOSTISSET('price_ttc') ? GETPOST('price_ttc') : (isset($upinctax) ? price($upinctax, 0, '', 0) : '')).'"';
|
||||||
if ($situationinvoicelinewithparent) {
|
if ($situationinvoicelinewithparent) {
|
||||||
print ' readonly';
|
print ' readonly';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,7 +92,7 @@ if (isModEnabled("multicurrency") && $this->multicurrency_code != $conf->currenc
|
|||||||
print '<th class="linecoluht_currency right" style="width: 80px">'.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).'</th>';
|
print '<th class="linecoluht_currency right" style="width: 80px">'.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).'</th>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($inputalsopricewithtax) {
|
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) {
|
||||||
print '<th class="right nowraponall">'.$langs->trans('PriceUTTC').'</th>';
|
print '<th class="right nowraponall">'.$langs->trans('PriceUTTC').'</th>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -325,8 +325,14 @@ print $tooltiponpriceend;
|
|||||||
<td class="linecoluht_currency nowraponall right"><?php $coldisplay++; ?><?php print price($sign * $line->multicurrency_subprice); ?></td>
|
<td class="linecoluht_currency nowraponall right"><?php $coldisplay++; ?><?php print price($sign * $line->multicurrency_subprice); ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
if ($inputalsopricewithtax) { ?>
|
if (!empty($inputalsopricewithtax) && !getDolGlobalInt('MAIN_NO_INPUT_PRICE_WITH_TAX')) { ?>
|
||||||
<td class="linecoluttc nowraponall right"><?php $coldisplay++; ?><?php print (isset($line->pu_ttc) ? price($sign * $line->pu_ttc) : price($sign * $line->subprice)); ?></td>
|
<td class="linecoluttc nowraponall right"><?php $coldisplay++; ?><?php
|
||||||
|
$upinctax = isset($line->pu_ttc) ? $line->pu_ttc : null;
|
||||||
|
if (getDolGlobalInt('MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES')) {
|
||||||
|
$upinctax = price2num($line->total_ttc / $line->qty, 'MU');
|
||||||
|
}
|
||||||
|
print (isset($upinctax) ? price($sign * $upinctax) : price($sign * $line->subprice));
|
||||||
|
?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td class="linecolqty nowraponall right"><?php $coldisplay++; ?>
|
<td class="linecolqty nowraponall right"><?php $coldisplay++; ?>
|
||||||
|
|||||||
@ -363,6 +363,7 @@ if (count($typeleaves) == 0) {
|
|||||||
print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]);
|
print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
|
|
||||||
|
$selectedfields = '';
|
||||||
if ($massactionbutton) {
|
if ($massactionbutton) {
|
||||||
$selectedfields = $form->showCheckAddButtons('checkforselect', 1);
|
$selectedfields = $form->showCheckAddButtons('checkforselect', 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
|
|
||||||
-- Missing in v16 or lower
|
-- Missing in v16 or lower
|
||||||
|
ALTER TABLE llx_accounting_account DROP FOREIGN KEY fk_accounting_account_fk_pcg_version;
|
||||||
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32) NOT NULL;
|
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32) NOT NULL;
|
||||||
|
ALTER TABLE llx_accounting_account ADD CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version);
|
||||||
|
|
||||||
ALTER TABLE llx_c_action_trigger MODIFY elementtype VARCHAR(64);
|
ALTER TABLE llx_c_action_trigger MODIFY elementtype VARCHAR(64);
|
||||||
|
|
||||||
|
|||||||
@ -222,6 +222,12 @@ if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC')) {
|
|||||||
// For FR, default value of option to show category of operations is on by default. Decret n°2099-1299 2022-10-07
|
// For FR, default value of option to show category of operations is on by default. Decret n°2099-1299 2022-10-07
|
||||||
$conf->global->INVOICE_CATEGORY_OF_OPERATION = 1;
|
$conf->global->INVOICE_CATEGORY_OF_OPERATION = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($mysoc->localtax1_assuj || $mysoc->localtax2_assuj) {
|
||||||
|
// For countries using the 2nd or 3rd tax, we disable input/edit of lines using the price including tax (because 2nb and 3rd tax not yet taken into account).
|
||||||
|
// Work In Progress to support all taxes into unit price entry when MAIN_UNIT_PRICE_WITH_TAX_IS_FOR_ALL_TAXES is set.
|
||||||
|
$conf->global->MAIN_NO_INPUT_PRICE_WITH_TAX = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1111,11 +1111,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
$j = 0; $level = 0;
|
$j = 0; $level = 0;
|
||||||
$nboftaskshown = projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $object->id, 1, $object->id, $filterprogresscalc, ($object->usage_bill_time ? 1 : 0), $arrayfields, $arrayofselected);
|
$nboftaskshown = projectLinesa($j, 0, $tasksarray, $level, true, 0, $tasksrole, $object->id, 1, $object->id, $filterprogresscalc, ($object->usage_bill_time ? 1 : 0), $arrayfields, $arrayofselected);
|
||||||
} else {
|
} else {
|
||||||
$colspan = 10;
|
$colspan = 11;
|
||||||
if ($object->usage_bill_time) {
|
if ($object->usage_bill_time) {
|
||||||
$colspan += 2;
|
$colspan += 2;
|
||||||
}
|
}
|
||||||
print '<tr class="oddeven nobottom"><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoTasks").'</span></td></tr>';
|
print '<tr class="oddeven"><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoTasks").'</span></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@ -425,6 +425,7 @@ if ($action == "view_ticketlist") {
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
|
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
|
||||||
|
|
||||||
// Filter bar
|
// Filter bar
|
||||||
@ -696,6 +697,8 @@ if ($action == "view_ticketlist") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<form method="post" id="form_view_ticket" name="form_view_ticket" action="'.dol_buildpath('/public/ticket/view.php', 1).(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" style="display:none;">';
|
print '<form method="post" id="form_view_ticket" name="form_view_ticket" action="'.dol_buildpath('/public/ticket/view.php', 1).(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" style="display:none;">';
|
||||||
|
|||||||
@ -124,4 +124,10 @@ div.ticketform .index_create, div.ticketform .index_display {
|
|||||||
@media only screen and (max-width: 767px)
|
@media only screen and (max-width: 767px)
|
||||||
{
|
{
|
||||||
#form_create_ticket input.text, #form_create_ticket textarea { width: unset;}
|
#form_create_ticket input.text, #form_create_ticket textarea { width: unset;}
|
||||||
|
|
||||||
|
#form_create_ticket, #form_view_ticket
|
||||||
|
{
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user