From 45fcd282185c95e85832e1a9eeec95098841d441 Mon Sep 17 00:00:00 2001
From: Madhu S R <madhu.sr@vtigersolutions.com>
Date: Sun, 21 Apr 2024 21:11:05 +0530
Subject: [PATCH] Fixes: Disabling the mass edit for the inventory line item
 fields discount_amount and discount_percent

---
 modules/Migration/schema/811_to_812.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/Migration/schema/811_to_812.php b/modules/Migration/schema/811_to_812.php
index 9fcc3412d..52e8bbfa3 100644
--- a/modules/Migration/schema/811_to_812.php
+++ b/modules/Migration/schema/811_to_812.php
@@ -25,4 +25,7 @@ if (defined('VTIGER_UPGRADE')) {
 	// Resize column width to text (instead of varchar)
 	$db->pquery("ALTER TABLE vtiger_shorturls MODIFY COLUMN handler_data text");
 
+	// Disabling the mass edit for the inventory line item fields.
+	$db->pquery("UPDATE vtiger_field set masseditable = 0 where columnname in ('discount_percent','discount_amount') 
+	and tablename in ('vtiger_quotes','vtiger_purchaseorder','vtiger_salesorder','vtiger_invoice')", array());
 }
-- 
GitLab