fix(pos): point the cash-up printer errors at the right screen
There is exactly one printer setting (pos.printerSettings, written only by receipt.html's "Save printer settings"), and its form lives on the slip screen behind the "Printer: …" row — not on the Settings page. Both cash-up error paths told the operator to open "Printer settings", where they'd find nothing. Name the actual location instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
bcd9b88dd4
commit
cbf45048f2
1 changed files with 7 additions and 2 deletions
|
|
@ -454,7 +454,11 @@ async function printCashup(){
|
|||
const xml = window.EposPrint.buildEposCashupXml(letterhead, report, cashupBlocks, cashupLogo);
|
||||
if(settings.type === 'network'){
|
||||
if(!settings.ip){
|
||||
alert('Set the printer IP address in Printer settings first.');
|
||||
// The printer form lives on the slip screen, not the Settings
|
||||
// page — tapping the "Printer: …" row there expands it. There is
|
||||
// only one saved setting (pos.printerSettings), shared with the
|
||||
// sale slip, so point the operator at the one place it exists.
|
||||
alert('No printer IP set. Print a sale slip, tap the "Printer: …" row on that screen, and save the IP there — the cash-up slip uses the same printer.');
|
||||
return;
|
||||
}
|
||||
await window.EposPrint.printViaNetwork(settings.ip, xml);
|
||||
|
|
@ -467,7 +471,8 @@ async function printCashup(){
|
|||
// button does nothing at all. Same stance as EposPrint.printTest().
|
||||
throw new Error(
|
||||
'The cash-up slip prints over the network printer only. ' +
|
||||
'Set the printer to Network (and its IP) in Printer settings.'
|
||||
'Print a sale slip, tap the "Printer: …" row on that screen, ' +
|
||||
'and switch it to Network with the printer IP.'
|
||||
);
|
||||
}
|
||||
}catch(e){
|
||||
|
|
|
|||
Loading…
Reference in a new issue