diff --git a/pos/src/lib/pos-profile-api.ts b/pos/src/lib/pos-profile-api.ts index 5f965f0..a8f03ec 100644 --- a/pos/src/lib/pos-profile-api.ts +++ b/pos/src/lib/pos-profile-api.ts @@ -64,6 +64,7 @@ export interface PosProfileFull { role_allowed_for_billing: RolePermission[]; role_restricted_for_table_order?: RolePermission[]; paid_limit?: number; + custom_allow_without_print_on_payment?: boolean } // Combined POS Profile with both limited and full fields @@ -84,6 +85,7 @@ export interface PosProfileCombined extends PosProfileFull { edit_order_type?: number; view_all_status?: number; custom_daily_pos_close?: number; + custom_allow_without_print_on_payment?: boolean; } export interface Currency { @@ -133,6 +135,7 @@ export async function getCombinedPosProfile(): Promise { enable_discount: limitedProfile.enable_discount, multiple_cashier: limitedProfile.multiple_cashier, edit_order_type: limitedProfile.edit_order_type, + custom_allow_without_print_on_payment: Boolean(fullProfile.custom_allow_without_print_on_payment), }; return combinedProfile; diff --git a/pos/src/pages/Orders.tsx b/pos/src/pages/Orders.tsx index 4a281e7..a4b3797 100644 --- a/pos/src/pages/Orders.tsx +++ b/pos/src/pages/Orders.tsx @@ -464,20 +464,23 @@ export default function Orders() { {isPrinting ? : } {/* Payment Button - Only show for Draft, Unbilled, and Recently Paid orders */} - {(selectedOrder.status === 'Draft' || selectedOrder.status === 'Unbilled' || selectedOrder.status === 'Recently Paid') && ( - - )} + {(selectedOrder.status === 'Draft' || selectedOrder.status === 'Unbilled' || selectedOrder.status === 'Recently Paid') && ( + + )} {/* Total */} {formatCurrency(selectedOrder.rounded_total)} diff --git a/ury/hooks.py b/ury/hooks.py index e75c3fc..128e64b 100644 --- a/ury/hooks.py +++ b/ury/hooks.py @@ -354,7 +354,8 @@ "POS Profile-custom_table_order_printer", "POS Profile-custom_reprint_kot_format", "Employee-payment_amount", - "Employee-payment_type" + "Employee-payment_type", + "POS Profile-custom_allow_without_print_on_payment", }, ] ], diff --git a/ury/ury_pos/api.py b/ury/ury_pos/api.py index 64d48ec..f8a476b 100644 --- a/ury/ury_pos/api.py +++ b/ury/ury_pos/api.py @@ -471,6 +471,7 @@ def getPosProfile(): multiple_cashier = pos_profiles.custom_enable_multiple_cashier edit_order_type = pos_profiles.custom_edit_order_type enable_kot_reprint = pos_profiles.custom_enable_kot_reprint + custom_allow_without_print_on_payment = pos_profiles.custom_allow_without_print_on_payment if multiple_cashier: details = getBranchRoom() room = details[0].get('name')