feat: include cash control details in closing receipt and reduce overall font sizes for better layout consistency
This commit is contained in:
parent
43f92c39a2
commit
fbf70c34b8
@ -45,7 +45,7 @@
|
|||||||
<t t-foreach="docs" t-as="session">
|
<t t-foreach="docs" t-as="session">
|
||||||
<t t-set="data" t-value="session.get_closing_summary_data()"/>
|
<t t-set="data" t-value="session.get_closing_summary_data()"/>
|
||||||
<div style="font-family: 'Courier New', Courier, monospace;
|
<div style="font-family: 'Courier New', Courier, monospace;
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -54,14 +54,14 @@
|
|||||||
|
|
||||||
<!-- ===== HEADER ===== -->
|
<!-- ===== HEADER ===== -->
|
||||||
<div style="text-align: center; margin-bottom: 10px;">
|
<div style="text-align: center; margin-bottom: 10px;">
|
||||||
<div style="font-size: 36px; font-weight: bold;
|
<div style="font-size: 33px; font-weight: bold;
|
||||||
letter-spacing: 1px; text-transform: uppercase;">
|
letter-spacing: 1px; text-transform: uppercase;">
|
||||||
<t t-esc="data['session_name']"/>
|
<t t-esc="data['session_name']"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 4px; font-size: 24px; letter-spacing: 2px;">
|
<div style="margin-top: 4px; font-size: 21px; letter-spacing: 2px;">
|
||||||
SESSION CLOSING SUMMARY
|
SESSION CLOSING SUMMARY
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px; font-size: 22px; color: #666;">
|
<div style="margin-top: 2px; font-size: 19px; color: #666;">
|
||||||
(REPRINT)
|
(REPRINT)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold; padding: 5px 0;">Date/Time</td>
|
<td style="font-weight: bold; padding: 5px 0;">Date/Time</td>
|
||||||
<td style="text-align: right; padding: 5px 0; font-size: 24px;">
|
<td style="text-align: right; padding: 5px 0; font-size: 21px;">
|
||||||
<t t-esc="data['closing_time']"/>
|
<t t-esc="data['closing_time']"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -119,8 +119,8 @@
|
|||||||
<!-- ===== GRAND TOTAL ===== -->
|
<!-- ===== GRAND TOTAL ===== -->
|
||||||
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold; font-size: 32px; padding: 6px 0;">TOTAL</td>
|
<td style="font-weight: bold; font-size: 29px; padding: 6px 0;">TOTAL</td>
|
||||||
<td style="text-align: right; font-weight: bold; font-size: 32px; padding: 6px 0;">
|
<td style="text-align: right; font-weight: bold; font-size: 29px; padding: 6px 0;">
|
||||||
<t t-esc="data['grand_total']"
|
<t t-esc="data['grand_total']"
|
||||||
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
t-options="{'widget': 'monetary', 'display_currency': session.currency_id}"/>
|
||||||
</td>
|
</td>
|
||||||
@ -159,7 +159,7 @@
|
|||||||
|
|
||||||
<!-- ===== FOOTER ===== -->
|
<!-- ===== FOOTER ===== -->
|
||||||
<div style="text-align: center; margin-top: 12px;
|
<div style="text-align: center; margin-top: 12px;
|
||||||
font-size: 24px; letter-spacing: 1px;">
|
font-size: 21px; letter-spacing: 1px;">
|
||||||
*** Session Closed ***
|
*** Session Closed ***
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.pos-closing-receipt-print {
|
.pos-closing-receipt-print {
|
||||||
width: 512px;
|
width: 512px;
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,14 @@
|
|||||||
-->
|
-->
|
||||||
<t t-name="pos_closing_receipt.ClosingReceipt">
|
<t t-name="pos_closing_receipt.ClosingReceipt">
|
||||||
<div class="pos-closing-receipt-print">
|
<div class="pos-closing-receipt-print">
|
||||||
<div class="pos-receipt" style="font-family: 'Courier New', Courier, monospace; font-size: 28px; width: 100%; max-width: 320px; margin: 0 auto; padding: 12px;">
|
<div class="pos-receipt" style="font-family: 'Courier New', Courier, monospace; font-size: 25px; width: 100%; max-width: 320px; margin: 0 auto; padding: 12px;">
|
||||||
|
|
||||||
<!-- ===== HEADER ===== -->
|
<!-- ===== HEADER ===== -->
|
||||||
<div style="text-align: center; margin-bottom: 10px;">
|
<div style="text-align: center; margin-bottom: 10px;">
|
||||||
<div style="font-size: 36px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;">
|
<div style="font-size: 33px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase;">
|
||||||
<t t-esc="props.sessionName"/>
|
<t t-esc="props.sessionName"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 4px; font-size: 24px; letter-spacing: 2px;">
|
<div style="margin-top: 4px; font-size: 21px; letter-spacing: 2px;">
|
||||||
SESSION CLOSING SUMMARY
|
SESSION CLOSING SUMMARY
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold; padding: 5px 0;">Date/Time</td>
|
<td style="font-weight: bold; padding: 5px 0;">Date/Time</td>
|
||||||
<td style="text-align: right; padding: 5px 0; font-size: 24px;">
|
<td style="text-align: right; padding: 5px 0; font-size: 21px;">
|
||||||
<t t-esc="props.closingTime"/>
|
<t t-esc="props.closingTime"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -72,8 +72,8 @@
|
|||||||
<!-- ===== GRAND TOTAL ===== -->
|
<!-- ===== GRAND TOTAL ===== -->
|
||||||
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
<table style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="font-weight: bold; font-size: 32px; padding: 6px 0;">TOTAL</td>
|
<td style="font-weight: bold; font-size: 29px; padding: 6px 0;">TOTAL</td>
|
||||||
<td style="text-align: right; font-weight: bold; font-size: 32px; padding: 6px 0;">
|
<td style="text-align: right; font-weight: bold; font-size: 29px; padding: 6px 0;">
|
||||||
<t t-esc="props.grandTotal"/>
|
<t t-esc="props.grandTotal"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -107,7 +107,7 @@
|
|||||||
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
<div style="border-top: 1px dashed #000; margin: 8px 0;"/>
|
||||||
|
|
||||||
<!-- ===== FOOTER ===== -->
|
<!-- ===== FOOTER ===== -->
|
||||||
<div style="text-align: center; margin-top: 12px; font-size: 24px; letter-spacing: 1px;">
|
<div style="text-align: center; margin-top: 12px; font-size: 21px; letter-spacing: 1px;">
|
||||||
*** Session Closed ***
|
*** Session Closed ***
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -218,6 +218,26 @@ patch(ClosePosPopup.prototype, {
|
|||||||
</tr>`
|
</tr>`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let cashControlBlock = "";
|
||||||
|
if (receiptData.hasCashControl) {
|
||||||
|
cashControlBlock = `
|
||||||
|
<div class="dashed"></div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:5px 0;">Expected Cash</td>
|
||||||
|
<td class="right" style="padding:5px 0;">${receiptData.expectedCash}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding:5px 0;">Counted Cash</td>
|
||||||
|
<td class="right" style="padding:5px 0;">${receiptData.countedCash}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="bold" style="padding:5px 0;">Cash Difference</td>
|
||||||
|
<td class="right bold" style="padding:5px 0;">${receiptData.cashDifference}</td>
|
||||||
|
</tr>
|
||||||
|
</table>`;
|
||||||
|
}
|
||||||
|
|
||||||
const html = `<!DOCTYPE html>
|
const html = `<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -227,7 +247,7 @@ patch(ClosePosPopup.prototype, {
|
|||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
body {
|
body {
|
||||||
font-family: 'Courier New', Courier, monospace;
|
font-family: 'Courier New', Courier, monospace;
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
@ -239,14 +259,14 @@ patch(ClosePosPopup.prototype, {
|
|||||||
}
|
}
|
||||||
.center { text-align: center; }
|
.center { text-align: center; }
|
||||||
.header-title {
|
.header-title {
|
||||||
font-size: 36px;
|
font-size: 33px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.header-sub {
|
.header-sub {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 24px;
|
font-size: 21px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
.dashed { border-top: 1px dashed #000; margin: 8px 0; }
|
.dashed { border-top: 1px dashed #000; margin: 8px 0; }
|
||||||
@ -255,11 +275,11 @@ patch(ClosePosPopup.prototype, {
|
|||||||
td { padding: 5px 0; }
|
td { padding: 5px 0; }
|
||||||
.right { text-align: right; }
|
.right { text-align: right; }
|
||||||
.bold { font-weight: bold; }
|
.bold { font-weight: bold; }
|
||||||
.total-row td { font-weight: bold; font-size: 32px; padding: 6px 0; }
|
.total-row td { font-weight: bold; font-size: 29px; padding: 6px 0; }
|
||||||
.footer {
|
.footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
font-size: 24px;
|
font-size: 21px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.feed { margin-top: 28px; }
|
.feed { margin-top: 28px; }
|
||||||
@ -282,7 +302,7 @@ patch(ClosePosPopup.prototype, {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bold">Date/Time</td>
|
<td class="bold">Date/Time</td>
|
||||||
<td class="right" style="font-size:24px;">${receiptData.closingTime}</td>
|
<td class="right" style="font-size:21px;">${receiptData.closingTime}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="dashed"></div>
|
<div class="dashed"></div>
|
||||||
@ -297,6 +317,7 @@ patch(ClosePosPopup.prototype, {
|
|||||||
<td class="right">${receiptData.grandTotal}</td>
|
<td class="right">${receiptData.grandTotal}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
${cashControlBlock}
|
||||||
<div class="dashed"></div>
|
<div class="dashed"></div>
|
||||||
<div class="footer">*** Session Closed ***</div>
|
<div class="footer">*** Session Closed ***</div>
|
||||||
<div class="feed"> </div>
|
<div class="feed"> </div>
|
||||||
@ -495,7 +516,7 @@ patch(Navbar.prototype, {
|
|||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
body {
|
body {
|
||||||
font-family: 'Courier New', Courier, monospace;
|
font-family: 'Courier New', Courier, monospace;
|
||||||
font-size: 28px;
|
font-size: 25px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
@ -507,19 +528,19 @@ patch(Navbar.prototype, {
|
|||||||
}
|
}
|
||||||
.center { text-align: center; }
|
.center { text-align: center; }
|
||||||
.header-title {
|
.header-title {
|
||||||
font-size: 36px;
|
font-size: 33px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
.header-sub {
|
.header-sub {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
font-size: 24px;
|
font-size: 21px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
}
|
}
|
||||||
.reprint-label {
|
.reprint-label {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
font-size: 22px;
|
font-size: 19px;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.dashed { border-top: 1px dashed #000; margin: 8px 0; }
|
.dashed { border-top: 1px dashed #000; margin: 8px 0; }
|
||||||
@ -528,11 +549,11 @@ patch(Navbar.prototype, {
|
|||||||
td { padding: 5px 0; }
|
td { padding: 5px 0; }
|
||||||
.right { text-align: right; }
|
.right { text-align: right; }
|
||||||
.bold { font-weight: bold; }
|
.bold { font-weight: bold; }
|
||||||
.total-row td { font-weight: bold; font-size: 32px; padding: 6px 0; }
|
.total-row td { font-weight: bold; font-size: 29px; padding: 6px 0; }
|
||||||
.footer {
|
.footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
font-size: 24px;
|
font-size: 21px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.feed { margin-top: 28px; }
|
.feed { margin-top: 28px; }
|
||||||
@ -556,7 +577,7 @@ patch(Navbar.prototype, {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bold">Date/Time</td>
|
<td class="bold">Date/Time</td>
|
||||||
<td class="right" style="font-size:24px;">${sessionData.closing_time}</td>
|
<td class="right" style="font-size:21px;">${sessionData.closing_time}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="dashed"></div>
|
<div class="dashed"></div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user