diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 5b678a0f7ac..b95d1e5253f 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1900,7 +1900,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht'; } - $totalarray['val']['p.total_ht'] += $obj->total_ht; + if (empty($totalarray['val']['p.total_ht'])) { + $totalarray['val']['p.total_ht'] = $obj->total_ht; + } else { + $totalarray['val']['p.total_ht'] += $obj->total_ht; + } } // Amount VAT if (!empty($arrayfields['p.total_tva']['checked'])) { @@ -1911,7 +1915,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_tva'; } - $totalarray['val']['p.total_tva'] += $obj->total_tva; + if (empty($totalarray['val']['p.total_tva'])) { + $totalarray['val']['p.total_tva'] = $obj->total_tva; + } else { + $totalarray['val']['p.total_tva'] += $obj->total_tva; + } } // Amount TTC if (!empty($arrayfields['p.total_ttc']['checked'])) { @@ -1922,7 +1930,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ttc'; } - $totalarray['val']['p.total_ttc'] += $obj->total_ttc; + if (empty($totalarray['val']['p.total_ttc'])) { + $totalarray['val']['p.total_ttc'] = $obj->total_ttc; + } else { + $totalarray['val']['p.total_ttc'] += $obj->total_ttc; + } } // Amount invoiced HT if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) { @@ -1933,7 +1945,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced'; } - $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT; + if (empty($totalarray['val']['p.total_ht_invoiced'])) { + $totalarray['val']['p.total_ht_invoiced'] = $totalInvoicedHT; + } else { + $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT; + } } // Amount invoiced TTC if (!empty($arrayfields['p.total_invoiced']['checked'])) { @@ -1944,7 +1960,11 @@ if ($resql) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced'; } - $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC; + if (empty($totalarray['val']['p.total_invoiced'])) { + $totalarray['val']['p.total_invoiced'] = $totalInvoicedTTC; + } else { + $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC; + } } // Currency if (!empty($arrayfields['p.multicurrency_code']['checked'])) { diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 3b9019868ec..37b3540a0f5 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -612,7 +612,7 @@ class ChargeSociales extends CommonObject } $linkclose = ''; - if (empty($notooltip) && $user->rights->facture->lire) { + if (empty($notooltip) && $user->hasRight("facture", "read")) { if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label = $langs->trans("SocialContribution"); $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 1ce6bed212b..d6efb35ef2f 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -345,8 +345,8 @@ class Tva extends CommonObject $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; $this->fk_account = $obj->fk_account; - $this->fk_type = $obj->fk_type; - $this->rappro = $obj->rappro; + $this->fk_type = empty($obj->fk_type) ? "" : $obj->fk_type; + $this->rappro = empty($obj->rappro) ? "" : $obj->rappro; } $this->db->free($resql); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 309ea1e4a87..ffc2ef8ca68 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -55,6 +55,7 @@ $search_type = GETPOST('search_type', 'int'); $search_account = GETPOST('search_account', 'int'); $search_amount = GETPOST('search_amount', 'alpha'); $search_status = GETPOST('search_status', 'int'); +$ltt = GETPOST("ltt", "int"); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -278,6 +279,13 @@ if (!empty($search_amount)) { if ($search_status != '' && $search_status != '-1') { $param .= '&search_status='.urlencode($search_status); } +$arrayofmassactions = array( + //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), +); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +$moreforfilter = ''; print '