-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add 58mm receipt #4269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add 58mm receipt #4269
Conversation
# Conflicts: # app/Language/en/Config.php # app/Views/configs/receipt_config.php
objecttothis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curly braces formatting needs to be fixed for PSR-12 compliance. Take a look at the rest of the code base to see the formatting for if statements.
Done! |
|
@objecttothis @BudsieBuds , Hi any news on this review? |
objecttothis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I thought I submitted these comments but I just had it in progress. Just fix these and I think we are good to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for 58mm receipt format specifically designed for POS thermal printers. The implementation provides a new compact receipt template optimized for narrow thermal printer widths.
- New 58mm receipt template with optimized layout for thermal printers
- Added configuration option to select the 58mm receipt format
- Compact CSS styling designed for 58mm width constraints
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| public/css/receipt.css | Added CSS styles for 58mm receipt format with monospace font and compact layout |
| app/Views/sales/receipt_58mm.php | New receipt template with condensed layout optimized for 58mm thermal printers |
| app/Views/configs/receipt_config.php | Added 58mm option to receipt template dropdown configuration |
| app/Language/en/Config.php | Added language key for 58mm receipt option |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| width: 100%; | ||
| } | ||
|
|
||
| .items_58 th, .items td { |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS selector mismatch: should be .items_58 th, .items_58 td to properly target both th and td elements within the items_58 class.
| .items_58 th, .items td { | |
| .items_58 th, .items_58 td { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diego-ramos can you take a look at these comments made by copilot and fix any that need to be fixed?
| <div><?= lang('Sales.giftcard_balance') ?>: <?= to_currency($cur_giftcard_value) ?></div> | ||
| <?php } ?> | ||
|
|
||
| <div><?= lang('Sales.amount_due') ?>:: <?= to_currency($amount_change); ?></div> |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double colon after 'amount_due' - should be single colon for consistency with other labels.
| <div><?= lang('Sales.amount_due') ?>:: <?= to_currency($amount_change); ?></div> | |
| <div><?= lang('Sales.amount_due') ?>: <?= to_currency($amount_change); ?></div> |
| <div id="sale_id"><?= lang('Sales.id') . esc(": $sale_id") ?></div> | ||
|
|
||
| <?php if(!empty($invoice_number)) { ?> | ||
| <div id="invoice_number"><?= lang('Sales.invoice_number') . ": $invoice_number" ?></div> |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing output escaping for $invoice_number variable. Should use esc() function to prevent XSS vulnerabilities.
| <div id="invoice_number"><?= lang('Sales.invoice_number') . ": $invoice_number" ?></div> | |
| <div id="invoice_number"><?= lang('Sales.invoice_number') . ": " . esc($invoice_number) ?></div> |
New Receipt format that works on POS thermal printers (58/80 mm)