+
@@ -622,6 +632,8 @@ const settings = ref({
silent_print: 0,
allow_negative_stock: 0,
tax_inclusive: 0,
+ allow_promotional_offers: 1,
+ allow_coupons: 1,
})
// Stock Sync Settings (localStorage persisted)
diff --git a/POS/src/stores/posSettings.js b/POS/src/stores/posSettings.js
index 9278faf4e..0b49303bd 100644
--- a/POS/src/stores/posSettings.js
+++ b/POS/src/stores/posSettings.js
@@ -48,6 +48,8 @@ export const usePOSSettingsStore = defineStore("posSettings", () => {
allow_customer_purchase_order: 0,
allow_duplicate_customer_names: 0,
fetch_coupon: 0,
+ allow_promotional_offers: 0,
+ allow_coupons: 0,
// Printing
allow_print_last_invoice: 0,
silent_print: 0,
@@ -183,6 +185,12 @@ export const usePOSSettingsStore = defineStore("posSettings", () => {
Boolean(settings.value.allow_duplicate_customer_names),
)
const fetchCoupon = computed(() => Boolean(settings.value.fetch_coupon))
+ const allowPromotionalOffers = computed(() => {
+ return Number(settings.value.allow_promotional_offers) === 1
+ })
+ const allowCoupons = computed(() => {
+ return Number(settings.value.allow_coupons) === 1
+ })
// Computed - Printing
const allowPrintLastInvoice = computed(() =>
@@ -330,6 +338,8 @@ export const usePOSSettingsStore = defineStore("posSettings", () => {
allow_customer_purchase_order: 0,
allow_duplicate_customer_names: 0,
fetch_coupon: 0,
+ allow_promotional_offers: 0,
+ allow_coupons: 0,
allow_print_last_invoice: 0,
silent_print: 0,
use_delivery_charges: 0,
@@ -451,6 +461,8 @@ export const usePOSSettingsStore = defineStore("posSettings", () => {
allowCustomerPurchaseOrder,
allowDuplicateCustomerNames,
fetchCoupon,
+ allowPromotionalOffers,
+ allowCoupons,
// Computed - Printing
allowPrintLastInvoice,
diff --git a/pos_next/api/constants.py b/pos_next/api/constants.py
index 059c04ea0..abd63789a 100644
--- a/pos_next/api/constants.py
+++ b/pos_next/api/constants.py
@@ -37,6 +37,8 @@
"allow_sales_order",
"allow_select_sales_order",
"create_only_sales_order",
+ "allow_promotional_offers",
+ "allow_coupons",
"enable_session_lock",
"session_lock_timeout",
"show_variants_as_items",
@@ -67,6 +69,8 @@
"allow_sales_order": 0,
"allow_select_sales_order": 0,
"create_only_sales_order": 0,
+ "allow_promotional_offers": 1,
+ "allow_coupons": 1,
"enable_session_lock": 0,
"session_lock_timeout": 5,
"show_variants_as_items": 0,
diff --git a/pos_next/pos_next/doctype/pos_settings/pos_settings.json b/pos_next/pos_next/doctype/pos_settings/pos_settings.json
index 5aa983bbe..f4ae3155b 100644
--- a/pos_next/pos_next/doctype/pos_settings/pos_settings.json
+++ b/pos_next/pos_next/doctype/pos_settings/pos_settings.json
@@ -403,13 +403,27 @@
"fieldtype": "Check",
"label": "Allow Duplicate Customer Names"
},
- {
- "default": "0",
- "description": "Automatically apply eligible coupons",
- "fieldname": "fetch_coupon",
- "fieldtype": "Check",
- "label": "Auto Fetch Coupon Gifts"
- },
+ {
+ "default": "0",
+ "description": "Automatically apply eligible coupons",
+ "fieldname": "fetch_coupon",
+ "fieldtype": "Check",
+ "label": "Auto Fetch Coupon Gifts"
+ },
+ {
+ "default": "1",
+ "description": "Allow applying promotional offers on the cart",
+ "fieldname": "allow_promotional_offers",
+ "fieldtype": "Check",
+ "label": "Allow Promotional Offers"
+ },
+ {
+ "default": "1",
+ "description": "Allow applying coupons on the cart",
+ "fieldname": "allow_coupons",
+ "fieldtype": "Check",
+ "label": "Allow Coupons"
+ },
{
"collapsible": 1,
"fieldname": "section_break_printing",