Fixed recepit lenght
This commit is contained in:
10
migrate.py
10
migrate.py
@@ -6,12 +6,12 @@ def upgrade_db():
|
|||||||
try:
|
try:
|
||||||
with sqlite3.connect(DB_FILE) as conn:
|
with sqlite3.connect(DB_FILE) as conn:
|
||||||
# Add stock column
|
# Add stock column
|
||||||
conn.execute("ALTER TABLE products ADD COLUMN stock REAL DEFAULT 0")
|
# conn.execute("ALTER TABLE products ADD COLUMN stock REAL DEFAULT 0")
|
||||||
print("Successfully added 'stock' column.")
|
# print("Successfully added 'stock' column.")
|
||||||
|
|
||||||
# App.py also expects unit_type, adding it to prevent future headaches
|
# # App.py also expects unit_type, adding it to prevent future headaches
|
||||||
conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'")
|
# conn.execute("ALTER TABLE products ADD COLUMN unit_type TEXT DEFAULT 'unit'")
|
||||||
print("Successfully added 'unit_type' column.")
|
# print("Successfully added 'unit_type' column.")
|
||||||
|
|
||||||
conn.execute("ALTER TABLE dicom ADD COLUMN image_url TEXT;")
|
conn.execute("ALTER TABLE dicom ADD COLUMN image_url TEXT;")
|
||||||
print("Successfully added 'image_url' column.")
|
print("Successfully added 'image_url' column.")
|
||||||
|
|||||||
@@ -49,14 +49,39 @@
|
|||||||
<div id="receipt-print-zone{{ id_suffix }}" class="d-none d-print-block">
|
<div id="receipt-print-zone{{ id_suffix }}" class="d-none d-print-block">
|
||||||
<style>
|
<style>
|
||||||
@media print {
|
@media print {
|
||||||
body * { visibility: hidden; }
|
/* Tell the browser this is a continuous 80mm thermal roll */
|
||||||
#receipt-print-zone{{ id_suffix }}, #receipt-print-zone{{ id_suffix }} * { visibility: visible; }
|
@page {
|
||||||
|
margin: 0;
|
||||||
|
size: 80mm auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nuke the rest of the layout from the document flow so it takes up 0 height */
|
||||||
|
nav, .discord-card, .modal, .row {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body * {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Resurrect the receipt and put it in the top left corner */
|
||||||
|
#receipt-print-zone{{ id_suffix }}, #receipt-print-zone{{ id_suffix }} * {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
#receipt-print-zone{{ id_suffix }} {
|
#receipt-print-zone{{ id_suffix }} {
|
||||||
position: absolute; left: 0; top: 0; width: 80mm;
|
position: absolute;
|
||||||
padding: 5mm; margin: 0; display: block !important;
|
left: 0;
|
||||||
font-family: 'Courier New', Courier, monospace; font-size: 10px; color: #000;
|
top: 0;
|
||||||
|
width: 80mm;
|
||||||
|
padding: 2mm 5mm;
|
||||||
|
margin: 0;
|
||||||
|
display: block !important;
|
||||||
|
font-family: 'Courier New', Courier, monospace;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.receipt-table { width: 100%; border-collapse: collapse; font-family: monospace; font-size: 12px; }
|
.receipt-table { width: 100%; border-collapse: collapse; font-family: monospace; font-size: 12px; }
|
||||||
.receipt-header { text-align: center; margin-bottom: 10px; border-bottom: 1px dashed #000; padding-bottom: 5px; }
|
.receipt-header { text-align: center; margin-bottom: 10px; border-bottom: 1px dashed #000; padding-bottom: 5px; }
|
||||||
.receipt-total-row { border-top: 1px dashed #000; margin-top: 5px; padding-top: 5px; font-weight: bold; }
|
.receipt-total-row { border-top: 1px dashed #000; margin-top: 5px; padding-top: 5px; font-weight: bold; }
|
||||||
|
|||||||
Reference in New Issue
Block a user