Skip to content

Commit f306819

Browse files
committed
fix: include item-wise comments in sync_order payload
1 parent acdbb57 commit f306819

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

pos/src/components/ProductDialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ const ProductDialog: React.FC<ProductDialogProps> = ({
252252
const orderItem: OrderItem = {
253253
...selectedItem,
254254
quantity: numericQuantity,
255-
price: basePrice
255+
price: basePrice,
256+
comment: comments || undefined
256257
};
257258
addToOrder(orderItem);
258259

pos/src/lib/order-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export interface SyncOrderRequest {
6464
item_name: string;
6565
rate: number;
6666
qty: number;
67+
comment?: string;
6768
}>;
6869
no_of_pax: number;
6970
mode_of_payment?: string;

pos/src/store/pos-store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ export const usePOSStore = create<POSStore>((set, get) => ({
608608
description: item.description || '',
609609
special_dish: 0 as 0 | 1,
610610
tax_rate: 0,
611+
comment: item.comment || '',
611612
};
612613
return {
613614
...orderItem,

0 commit comments

Comments
 (0)