add 项目新增税率,税额,未税金额
收入新增税率
This commit is contained in:
+73
-1
@@ -636,4 +636,76 @@ group by pcp.id,pcpr.id
|
||||
) pp
|
||||
where pp.allMoney is not null
|
||||
and pp.allMoney != 0
|
||||
order by pp.createTime;
|
||||
order by pp.createTime;
|
||||
|
||||
-- 新增税率
|
||||
alter table pay_payment_record
|
||||
add column tax_rate varchar(10) null comment '税率' ;
|
||||
alter table pay_mail_bill_project
|
||||
add column tax_rate varchar(10) null comment '税率';
|
||||
alter table pay_confirm_payment_record
|
||||
add column tax_rate varchar(10) null comment '税率';
|
||||
-- 处理历史数据
|
||||
update pay_payment_record
|
||||
set tax_rate = ROUND(tax / no_tax_amount, 2);
|
||||
update pay_mail_bill_project
|
||||
set tax_rate = ROUND(tax / no_tax_amount, 2);
|
||||
update pay_confirm_payment_record
|
||||
set tax_rate = ROUND(tax / no_tax_amount, 2);
|
||||
|
||||
-- 新增税率,税额,未税金额
|
||||
alter table pay_common_project
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
alter table pay_working_group_subitem
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
alter table pay_member_project_subitem
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
alter table pay_meeting_situation
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
alter table tb_member_project_subitem
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
alter table tb_certificate_payment
|
||||
add column tax_rate varchar(10) null comment '税率',
|
||||
add column tax decimal(12, 2) default 0 comment '税额',
|
||||
add column no_tax_amount decimal(12, 2) default 0 comment '未税金额';
|
||||
|
||||
-- 六个项目处理历史数据
|
||||
update pay_common_project
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = receivable_amount / 1.06,
|
||||
tax = receivable_amount - no_tax_amount;
|
||||
update pay_working_group_subitem
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = receivable_amount / 1.06,
|
||||
tax = receivable_amount - no_tax_amount;
|
||||
update pay_member_project_subitem
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = amount_receivable / 1.06,
|
||||
tax = amount_receivable - no_tax_amount;
|
||||
update pay_meeting_situation
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = amount_receivable / 1.06,
|
||||
tax = amount_receivable - no_tax_amount;
|
||||
update tb_member_project_subitem
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = amount_receivable / 1.06,
|
||||
tax = amount_receivable - no_tax_amount;
|
||||
update tb_certificate_payment
|
||||
set tax_rate = 0.06,
|
||||
no_tax_amount = amount_receivable / 1.06,
|
||||
tax = amount_receivable - no_tax_amount;
|
||||
Reference in New Issue
Block a user