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

This commit is contained in:
Laurent Destailleur 2024-09-29 22:49:02 +02:00
commit 1754ee61d5
11 changed files with 27 additions and 14 deletions

View file

@ -112,6 +112,7 @@ if ($nolinesbefore) {
print '<td class="linecoledit" colspan="' . $colspan . '">&nbsp;</td>';
print '</tr>';
}
print '<tr class="pair nodrag nodrop nohoverpair'.(($nolinesbefore || $object->element == 'contrat') ? '' : ' liste_titre_create').'">';
$coldisplay = 0;

View file

@ -192,6 +192,16 @@ if ($filtertype == 1 && isModEnabled('workstation')) {
print '<td class="linecolworkstation nowrap">';
$coldisplay++;
if ($res > 0) {
$unit = new CUnits($object->db);
$fk_defaultUnit = $unit->getUnitFromCode('h', 'short_label', 'time');
$nbPlannedHour = $unit->unitConverter($line->qty, $line->fk_unit, $fk_defaultUnit);
$line->total_cost = 0;
if ($workstation->thm_machine_estimated) {
$line->total_cost += $nbPlannedHour * $workstation->thm_machine_estimated;
}
if ($workstation->thm_operator_estimated) {
$line->total_cost += $nbPlannedHour * $workstation->thm_operator_estimated;
}
echo $workstation->getNomUrl(1);
}
print '</td>';
@ -199,6 +209,7 @@ if ($filtertype == 1 && isModEnabled('workstation')) {
// Cost
$total_cost = 0;
$tmpbom->calculateCosts();
print '<td id="costline_'.$line->id.'" class="linecolcost nowrap right">';
$coldisplay++;

View file

@ -98,7 +98,7 @@ class box_actions extends ModeleBoxes
$sql .= " AND s.rowid = ".((int) $user->socid);
}
if (!$user->hasRight('agenda', 'allactions', 'read')) {
$sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id).")";
$sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id).")";
}
$sql .= " ORDER BY a.datep ASC";
$sql .= $this->db->plimit($max, 0);

View file

@ -10381,6 +10381,7 @@ abstract class CommonObject
if ($resql) {
$num_rows = $this->db->num_rows($resql);
$i = 0;
$this->lines = array();
while ($i < $num_rows) {
$obj = $this->db->fetch_object($resql);
if ($obj) {

View file

@ -454,7 +454,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_propale['nb'];
print '</td><td class="right">';
print $product->stats_propale['qty'];
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -473,7 +473,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_proposal_supplier['nb'];
print '</td><td class="right">';
print $product->stats_proposal_supplier['qty'];
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -492,7 +492,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande['nb'];
print '</td><td class="right">';
print $product->stats_commande['qty'];
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -511,7 +511,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_commande_fournisseur['qty'];
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -530,7 +530,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture['nb'];
print '</td><td class="right">';
print $product->stats_facture['qty'];
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -568,7 +568,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_facture_fournisseur['qty'];
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@ -628,7 +628,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_contrat['nb'];
print '</td><td class="right">';
print $product->stats_contrat['qty'];
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}

View file

@ -1355,7 +1355,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -1909,7 +1909,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -1998,7 +1998,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -1432,7 +1432,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -817,7 +817,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View file

@ -1106,7 +1106,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetTextColor(0, 0, 0);
}
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index);
$parameters = array('pdf' => &$pdf, 'object' => &$object, 'outputlangs' => $outputlangs, 'index' => &$index, 'posy' => $posy);
$reshook = $hookmanager->executeHooks('afterPDFTotalTable', $parameters, $this); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {