✨ 开票申请商品行选择开票内容时快照税收分类编码并随保存提交
This commit is contained in:
@@ -497,6 +497,7 @@ const emptyLine = () => ({
|
|||||||
localId: ++localId,
|
localId: ++localId,
|
||||||
goodsCategory: '',
|
goodsCategory: '',
|
||||||
goodsName: '',
|
goodsName: '',
|
||||||
|
taxClassificationCode: '',
|
||||||
unit: '吨',
|
unit: '吨',
|
||||||
quantity: 0,
|
quantity: 0,
|
||||||
unitPriceNoTax: 0,
|
unitPriceNoTax: 0,
|
||||||
@@ -724,9 +725,11 @@ export default {
|
|||||||
const item = this.findInvoiceItem(line);
|
const item = this.findInvoiceItem(line);
|
||||||
if (item) {
|
if (item) {
|
||||||
line.taxRate = Number(item.defaultTaxRate || 0);
|
line.taxRate = Number(item.defaultTaxRate || 0);
|
||||||
|
line.taxClassificationCode = item.taxClassificationCode || '';
|
||||||
} else if (clearInvalid) {
|
} else if (clearInvalid) {
|
||||||
line.goodsName = '';
|
line.goodsName = '';
|
||||||
line.taxRate = 0;
|
line.taxRate = 0;
|
||||||
|
line.taxClassificationCode = '';
|
||||||
}
|
}
|
||||||
this.recalculateLine(line);
|
this.recalculateLine(line);
|
||||||
},
|
},
|
||||||
@@ -734,6 +737,7 @@ export default {
|
|||||||
const names = this.invoiceItemNames(line.goodsCategory);
|
const names = this.invoiceItemNames(line.goodsCategory);
|
||||||
if (!names.some(item => item.shortName === line.goodsName)) line.goodsName = '';
|
if (!names.some(item => item.shortName === line.goodsName)) line.goodsName = '';
|
||||||
line.taxRate = 0;
|
line.taxRate = 0;
|
||||||
|
line.taxClassificationCode = this.findInvoiceItem(line)?.taxClassificationCode || '';
|
||||||
if (names.length === 1) {
|
if (names.length === 1) {
|
||||||
line.goodsName = names[0].shortName;
|
line.goodsName = names[0].shortName;
|
||||||
this.handleGoodsNameChange(line);
|
this.handleGoodsNameChange(line);
|
||||||
@@ -743,9 +747,11 @@ export default {
|
|||||||
const item = this.findInvoiceItem(line);
|
const item = this.findInvoiceItem(line);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
line.taxRate = 0;
|
line.taxRate = 0;
|
||||||
|
line.taxClassificationCode = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
line.taxRate = Number(item.defaultTaxRate || 0);
|
line.taxRate = Number(item.defaultTaxRate || 0);
|
||||||
|
line.taxClassificationCode = item.taxClassificationCode || '';
|
||||||
this.recalculateLine(line);
|
this.recalculateLine(line);
|
||||||
},
|
},
|
||||||
validateSettlements(rule, value, callback) {
|
validateSettlements(rule, value, callback) {
|
||||||
@@ -1141,6 +1147,7 @@ export default {
|
|||||||
lines: sheet.lines.map(line => ({
|
lines: sheet.lines.map(line => ({
|
||||||
goodsCategory: line.goodsCategory,
|
goodsCategory: line.goodsCategory,
|
||||||
goodsName: line.goodsName,
|
goodsName: line.goodsName,
|
||||||
|
taxClassificationCode: line.taxClassificationCode,
|
||||||
unit: line.unit,
|
unit: line.unit,
|
||||||
quantity: line.quantity,
|
quantity: line.quantity,
|
||||||
unitPriceNoTax: line.unitPriceNoTax,
|
unitPriceNoTax: line.unitPriceNoTax,
|
||||||
|
|||||||
Reference in New Issue
Block a user