Improve print layout and pagination
This commit is contained in:
7
app.js
7
app.js
@@ -631,9 +631,6 @@
|
||||
updatePreviewText("#p_vat", formatMoney(vat));
|
||||
updatePreviewText("#p_total", formatMoney(total));
|
||||
updatePreviewText("#p_totalDays", numStr(totalDays));
|
||||
|
||||
// Rebuild print pages preview structure (for print)
|
||||
buildPrintPages();
|
||||
};
|
||||
|
||||
const applyInitialDefaults = () => {
|
||||
@@ -648,7 +645,6 @@
|
||||
const container = document.getElementById("printPages");
|
||||
const previewPanel = document.getElementById("printArea");
|
||||
if (!container || !previewPanel) return;
|
||||
container.style.display = "block";
|
||||
container.innerHTML = "";
|
||||
|
||||
const rows = Array.from(
|
||||
@@ -866,7 +862,6 @@
|
||||
$("#addItemBtn")?.addEventListener("click", () => addItem());
|
||||
$("#addGroupBtn")?.addEventListener("click", () => addGroup());
|
||||
$("#printBtn")?.addEventListener("click", () => {
|
||||
buildPrintPages();
|
||||
window.print();
|
||||
});
|
||||
// Save current quote
|
||||
@@ -1457,8 +1452,6 @@
|
||||
window.addEventListener("beforeprint", () => {
|
||||
const num = (state.quoteNumber || "").toString().trim();
|
||||
document.title = num ? `Devis ${num}` : "Devis";
|
||||
// Assure que les pages d'impression sont reconstruites juste avant l'aperçu
|
||||
buildPrintPages();
|
||||
});
|
||||
window.addEventListener("afterprint", () => {
|
||||
document.title = originalTitle;
|
||||
|
||||
Reference in New Issue
Block a user