feat: include customer notes in kitchen printer order lines

This commit is contained in:
Suherdy Yacob 2026-06-02 13:43:05 +07:00
parent 6d11f0e83a
commit d2325ef723

View File

@ -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 || '',