✨ 开票合计反算、配载承运商乙方交集与临时合同结算校验
开票按合计金额/税率反算不含税单价(6位小数);配载按子单客户合同甲方匹配后取承运商乙方交集;临时合同过期不可结算,并修正合同变更编号唯一校验。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- 开票申请明细:不含税单价按合计金额反算后保留 6 位小数
|
||||
SET @schema_name = DATABASE();
|
||||
SET @has_unit_price_column = (
|
||||
SELECT COUNT(1)
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = @schema_name
|
||||
AND table_name = 'blade_invoice_application_line'
|
||||
AND column_name = 'unit_price_no_tax'
|
||||
);
|
||||
SET @alter_unit_price_sql = IF(
|
||||
@has_unit_price_column > 0,
|
||||
'ALTER TABLE `blade_invoice_application_line` MODIFY COLUMN `unit_price_no_tax` decimal(18,6) DEFAULT NULL COMMENT ''不含税单价''',
|
||||
'SELECT 1'
|
||||
);
|
||||
PREPARE stmt FROM @alter_unit_price_sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
Reference in New Issue
Block a user