Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5ea9be671c
11 changed files with 95 additions and 84 deletions
|
|
@ -160,7 +160,7 @@ The following changes may create regressions for some external modules, but were
|
|||
* The API to create a website account /idthirdparty/accounts/site is now POST (instead of PUT) and to update is PUT (instead of PATCH).
|
||||
* Debug v22 - Invert option TICKET_DO_NOT_INCLUDE_LINK_TO_CUSTOMER (that add link to backoffice interface link when it should remain private)
|
||||
into TICKET_INCLUDE_LINK_TO_PUBLIC_INTERFACE_IN_MESSAGE. It also avoid often emails marked as SPAM due to suspicious link.
|
||||
|
||||
* The property ->price_ht of an object line that was a duplicate of ->subprice has been standardized. Use ->subprice everywhere now.
|
||||
|
||||
|
||||
***** ChangeLog for 21.0.3 compared to 21.0.2 *****
|
||||
|
|
|
|||
|
|
@ -579,18 +579,16 @@ print '</div>';
|
|||
|
||||
print '<div class="center"><input type="submit" class="button reposition" value="'.dol_escape_htmltag($langs->trans('Save')).'" name="button"></div>';
|
||||
|
||||
print '<br>';
|
||||
// Show numbering options
|
||||
print '<br><br>';
|
||||
|
||||
// Accountancy Numbering model
|
||||
$dirmodels = array_merge(array('/'), $conf->modules_parts['models']);
|
||||
|
||||
print load_fiche_titre($langs->trans("BookkeepingNumberingModules"), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td colspan="2">'.$langs->trans("BookkeepingNumberingModules").'</td>';
|
||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
|
|
|
|||
|
|
@ -2298,7 +2298,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||
$style1 .= 'peruser_busy ';
|
||||
}
|
||||
if ($ev['css']) {
|
||||
$style1 .= ' '.$ev['css'];
|
||||
$style1 .= $ev['css'].' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2318,7 +2318,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||
$style2 .= 'peruser_busy ';
|
||||
}
|
||||
if ($ev['css']) {
|
||||
$style2 .= ' '.$ev['css'];
|
||||
$style2 .= $ev['css'].' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2338,7 +2338,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||
$style3 .= 'peruser_busy ';
|
||||
}
|
||||
if ($ev['css']) {
|
||||
$style3 .= ' '.$ev['css'];
|
||||
$style3 .= $ev['css'].' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2358,7 +2358,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
|||
$style4 .= 'peruser_busy ';
|
||||
}
|
||||
if ($ev['css']) {
|
||||
$style4 .= ' '.$ev['css'];
|
||||
$style4 .= $ev['css'].' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -960,7 +960,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -970,7 +970,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl);
|
||||
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -981,7 +981,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', true);
|
||||
|
||||
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -1257,7 +1257,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$pdf->SetFillColor(255, 255, 255);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHT") : ''), 0, 'L', true);
|
||||
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
|
|
@ -1300,7 +1300,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', true);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
$total_localtax = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_localtax, 0, $outputlangs), 0, 'R', true);
|
||||
|
|
|
|||
|
|
@ -1503,7 +1503,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -1513,7 +1513,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl);
|
||||
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -1524,7 +1524,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities(!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT') ? "TotalHT" : "Total").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities(!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT') ? "TotalHT" : "Total") : ''), 0, 'L', true);
|
||||
|
||||
$total_ht = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$total_ht = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $object->multicurrency_total_ht : $object->total_ht);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ht, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
|
|
|
|||
|
|
@ -1821,7 +1821,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -2169,12 +2169,18 @@ class pdf_sponge extends ModelePDFFactures
|
|||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Paid").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("Paid") : ''), 0, 'L', false);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
if (!isModEnabled("multicurrency") || $object->multicurrency_tx == 1 || getDolGlobalInt('MULTICURRENCY_SHOW_ALSO_MAIN_CURRENCY_ON_PDF') == 0) {
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', false);
|
||||
} else {
|
||||
//$pdf->MultiCell($largcol2, $tab2_hl, '('.price($deja_regle_origin + $depositsamount_origin, 0, $outputlangs, 1, -1, 'MT', $mysoc->currency_code).') '.price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', false);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', false);
|
||||
}
|
||||
//if (!isModEnabled("multicurrency") || $object->multicurrency_tx == 1 || getDolGlobalInt('MULTICURRENCY_SHOW_ALSO_MAIN_CURRENCY_ON_PDF') == 0) {
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', false);
|
||||
//} else {
|
||||
// $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', false);
|
||||
//
|
||||
// $index++;
|
||||
// $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
// $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Paid").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("Paid") : '').' ('.$outputlangs->getCurrencySymbol($mysoc->currency_code).')', $useborder, 'L', true);
|
||||
|
||||
// $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
// $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle_origin + $depositsamount_origin, 0, $outputlangs, 1, -1, -1, $mysoc->currency_code), $useborder, 'L', true);
|
||||
//}
|
||||
|
||||
// Credit note
|
||||
if ($creditnoteamount) {
|
||||
|
|
|
|||
|
|
@ -1111,7 +1111,8 @@ class pdf_azur extends ModelePDFPropales
|
|||
protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $outputlangsbis = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $mysoc;
|
||||
global $mysoc;
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$tab2_top = $posy;
|
||||
|
|
@ -1155,7 +1156,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
|
|||
|
|
@ -1325,7 +1325,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHTBeforeDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalHTBeforeDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top);
|
||||
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$total_before_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? ($object->multicurrency_total_ht + $multicurrency_total_discount_on_lines) : ($object->total_ht + $total_discount_on_lines));
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_before_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -1335,7 +1335,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalDiscount").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("TotalDiscount") : ''), 0, 'L', true);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl);
|
||||
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$total_discount_to_show = ((isModEnabled("multicurrency") && $object->multicurrency_tx != 1) ? $multicurrency_total_discount_on_lines : $total_discount_on_lines);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_discount_to_show, 0, $outputlangs), 0, 'R', true);
|
||||
|
||||
$index++;
|
||||
|
|
@ -1551,64 +1551,64 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc_origin, 0, $outputlangs, 1, -1, -1, $mysoc->currency_code), $useborder, 'L', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$resteapayer = 0;
|
||||
/*
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
if (!empty($object->paye)) $resteapayer=0;
|
||||
*/
|
||||
|
||||
if ($deja_regle > 0) {
|
||||
// Already paid + Deposits
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("AlreadyPaid") : ''), 0, 'L', false);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', false);
|
||||
|
||||
$resteapayer = 0;
|
||||
/*
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
if (!empty($object->paye)) $resteapayer=0;
|
||||
if ($object->close_code == 'discount_vat') {
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
}
|
||||
*/
|
||||
|
||||
if ($deja_regle > 0) {
|
||||
// Already paid + Deposits
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("AlreadyPaid") : ''), 0, 'L', false);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', false);
|
||||
|
||||
/*
|
||||
if ($object->close_code == 'discount_vat') {
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
}
|
||||
*/
|
||||
|
||||
$index++;
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("RemainderToPay") : ''), $useborder, 'L', true);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', true);
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
}
|
||||
|
||||
$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) {
|
||||
$this->error = $hookmanager->error;
|
||||
$this->errors = $hookmanager->errors;
|
||||
}
|
||||
|
||||
$index++;
|
||||
return ($tab2_top + ($tab2_hl * $index));
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->SetFillColor(224, 224, 224);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("RemainderToPay") : ''), $useborder, 'L', true);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', true);
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
}
|
||||
|
||||
$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) {
|
||||
$this->error = $hookmanager->error;
|
||||
$this->errors = $hookmanager->errors;
|
||||
}
|
||||
|
||||
$index++;
|
||||
return ($tab2_top + ($tab2_hl * $index));
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ DateEmploymentStart=Employment Start Date
|
|||
DateEmploymentEnd=Employment End Date
|
||||
RangeOfLoginValidity=Access validity date range
|
||||
CantDisableYourself=You can't disable your own user record
|
||||
CantDisableAnAdminUserWithMassActions=You can't disable users in a mass action when one of them is an admin user (like "%s"). Try to disable the admin user(s) manually, one by one from their dedicated page.
|
||||
CantEnableAnAdminUserWithMassActions=You can't enable users in a mass action when one of them is an admin user (like "%s"). Try to disable the admin user(s) manually, one by one from their dedicated page.
|
||||
ForceUserExpenseValidator=Force expense report validator
|
||||
ForceUserHolidayValidator=Force leave request validator
|
||||
ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behavior.
|
||||
|
|
|
|||
|
|
@ -305,7 +305,6 @@ if (empty($reshook)) {
|
|||
$uploaddir = $conf->user->dir_output;
|
||||
|
||||
global $error;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
// Disable or Enable records
|
||||
if (!$error && ($massaction == 'disable' || $massaction == 'reactivate') && $permissiontoadd) {
|
||||
|
|
@ -316,7 +315,7 @@ if (empty($reshook)) {
|
|||
$nbok = 0;
|
||||
foreach ($toselect as $toselectid) {
|
||||
if ($toselectid == $user->id) {
|
||||
setEventMessages($langs->trans($massaction == 0 ? 'CantDisableYourself' : 'CanEnableYourself'), null, 'errors');
|
||||
setEventMessages($langs->trans($massaction == 'disable' ? 'CantDisableYourself' : 'CanEnableYourself'), null, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
|
@ -324,7 +323,7 @@ if (empty($reshook)) {
|
|||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
if ($objecttmp->admin) {
|
||||
setEventMessages($langs->trans($massaction == 0 ? 'CantDisableAnAdminUserWithMassActions' : 'CantEnableAnAdminUserWithMassActions', $objecttmp->login), null, 'errors');
|
||||
setEventMessages($langs->trans($massaction == 'disable' ? 'CantDisableAnAdminUserWithMassActions' : 'CantEnableAnAdminUserWithMassActions', $objecttmp->login), null, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
|
@ -360,7 +359,12 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
|
||||
$massaction = '';
|
||||
}
|
||||
|
||||
// Generic mass actions
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue