feat: include customer notes in kitchen printer order lines
This commit is contained in:
parent
6d11f0e83a
commit
d2325ef723
@ -37,12 +37,21 @@ patch(PosStore.prototype, {
|
||||
if (printer.config && printer.config.printer_type === "network_escpos") {
|
||||
const changesData = data.changes?.data || [];
|
||||
|
||||
// Build the data object to send to backend
|
||||
const lines = changesData.map(c => ({
|
||||
name: c.name,
|
||||
qty: c.quantity || c.qty || 1,
|
||||
note: c.note || ''
|
||||
}));
|
||||
const lines = changesData.map(c => {
|
||||
const noteParts = [];
|
||||
const customerNote = c.customer_note || c.customerNote;
|
||||
if (customerNote) {
|
||||
noteParts.push(customerNote);
|
||||
}
|
||||
if (c.note) {
|
||||
noteParts.push(c.note);
|
||||
}
|
||||
return {
|
||||
name: c.name,
|
||||
qty: c.quantity || c.qty || 1,
|
||||
note: noteParts.join(" | ")
|
||||
};
|
||||
});
|
||||
|
||||
const receipt_data = {
|
||||
order_name: data.name || '',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user