Ongkos bikin
@@ -159,7 +159,7 @@
-
@@ -215,12 +215,12 @@ const itemsWithMinimal = computed(() => {
props.transaksi.item_transaksi ||
[]
const arr = [...items]
- // biar minimal ada 1 row terlihat
+
if (arr.length === 0) arr.push({ produk: {}, harga_deal: 0, posisi_asal: '' })
return arr
})
-// === Tambahan style/helper sama dengan strukoverlay ===
+
const getRowStyle = () => {
if (itemsWithMinimal.value.length === 1) {
return { height: '126px' }
@@ -258,23 +258,39 @@ const formatNumber = (number) => {
font-weight: 400;
}
-/* Print styles */
+
@media print {
+ @page {
+ size: A4; /* atau '80mm 200mm' kalau thermal */
+ margin: Minimum;
+ }
+ /* Sembunyikan semua elemen di luar print-area */
body * {
- visibility: hidden;
+ visibility: hidden !important;
}
- .print-area, .print-area * {
- visibility: visible;
+ .print-area * {
+ visibility: visible !important;
+ -webkit-print-color-adjust: exact !important;
+ print-color-adjust: exact !important;
+
}
+
.print-area {
position: absolute;
top: 0;
left: 0;
- transform: scale(0.5);
+ width: 1224px;
+ height: 528px;
+ margin: 0;
+ padding: 0;
+ transform: scale(0.6673);
transform-origin: top left;
}
+
+ /* Hilangkan tombol tutup & print */
.no-print {
display: none !important;
}
}
+
\ No newline at end of file