add 项目新增税率,税额,未税金额

收入新增税率
This commit is contained in:
lijiarao
2022-11-08 11:10:58 +08:00
parent 348891896b
commit 5fbb3ce850
11 changed files with 183 additions and 1 deletions
+73 -1
View File
@@ -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;