-- 附件文件地址更新
UPDATE `zh_advance_file` SET `filepath` = CONCAT('app/',`filepath`);
UPDATE `zh_material_file` SET `filepath` = CONCAT('app/',`filepath`);
-- 调差材料税计算
ALTER TABLE `zh_material` ADD `material_tax` TINYINT NOT NULL DEFAULT '0' COMMENT '是否已使用材料税，默认为0' AFTER `rate`;
ALTER TABLE `zh_material` ADD `m_tax_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '材料含税金额' AFTER `material_tax`;
ALTER TABLE `zh_material` ADD `m_tax_pre_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '截止上期材料含税金额' AFTER `m_tax_tp`;
ALTER TABLE `zh_material_bills` ADD `m_tax_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '调差金额（材料税）' AFTER `pre_tp`, ADD `tax_pre_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '截止上期调差金额（材料税）' AFTER `m_tax_tp`;
ALTER TABLE `zh_material_bills` ADD `m_tax` SMALLINT(3) NOT NULL DEFAULT NULL COMMENT '材料税税率' AFTER `is_summary`;
ALTER TABLE `zh_material_bills_history` ADD `m_tax_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '调差金额（材料税）' AFTER `pre_tp`, ADD `tax_pre_tp` DECIMAL(30,8) NULL DEFAULT NULL COMMENT '截止上期调差金额（材料税）' AFTER `m_tax_tp`;
ALTER TABLE `zh_material_bills_history` ADD `m_tax` SMALLINT(3) NOT NULL DEFAULT NULL COMMENT '材料税税率' AFTER `is_summary`;
