⬅ Back NK TEXTILE 25-08-2025.sql
use common

select * from tds_type_master


use t25n001

select sum(t1.f1), TDSTYPE from (
select sum(tdsamt) as f1, tdstype from general_purchase GROUP BY Tdstype union all
select sum(tdsamt) as f1, tdstype  from gp_received_from_mill GROUP BY Tdstype union all
select sum(tdsamt) as f1 , tdstype from received_from_job GROUP BY Tdstype union all
select sum(tdsamt) as f1 , tdstype from multi_journal_addless_detail WHERE LEN(BKSRNO)=6 GROUP BY Tdstype) as t1
GROUP BY TDSTYPE

select tdstype from general_purchase 


UPDATE MULTI_JOURNAL_ADDLESS_DETAIL SET TDSType = 'TDS (COMMISSION)' WHERE TDSType = 'TDS (COMMISSION) 3.75 %'
UPDATE MULTI_JOURNAL_ADDLESS_DETAIL SET TDSType = 'TDS (INTEREST)' WHERE TDSType = 'TDS (INTEREST) 7.50%'

select * from multi_journal_addless_detail WHERE tdstype = 'TDS (COMMISSION)'