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") { if (printer.config && printer.config.printer_type === "network_escpos") {
const changesData = data.changes?.data || []; const changesData = data.changes?.data || [];
// Build the data object to send to backend const lines = changesData.map(c => {
const lines = changesData.map(c => ({ const noteParts = [];
name: c.name, const customerNote = c.customer_note || c.customerNote;
qty: c.quantity || c.qty || 1, if (customerNote) {
note: c.note || '' 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 = { const receipt_data = {
order_name: data.name || '', order_name: data.name || '',