|
@@ -694,11 +694,11 @@ export default {
|
|
|
if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
return
|
|
|
}
|
|
|
- currentRow.no_tax_price = '';
|
|
|
- currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // currentRow.no_tax_price = '';
|
|
|
+ // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
|
}
|
|
@@ -739,10 +739,10 @@ export default {
|
|
|
if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
return
|
|
|
}
|
|
|
- currentRow.tax_rate = '';
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // currentRow.tax_rate = '';
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
|
}
|
|
@@ -783,11 +783,11 @@ export default {
|
|
|
if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
return
|
|
|
}
|
|
|
- currentRow.price = ''
|
|
|
- currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // currentRow.price = ''
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
|
}
|
|
@@ -814,7 +814,7 @@ export default {
|
|
|
on: {
|
|
|
'on-change': (e) => {
|
|
|
currentRow.no_tax_amount = e.target.value
|
|
|
- currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
|
|
|
+ currentRow.no_tax_price = ((1 * currentRow.no_tax_amount) / (1*currentRow.num)).toFixed(2)
|
|
|
currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
@@ -827,10 +827,10 @@ export default {
|
|
|
if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
return
|
|
|
}
|
|
|
- currentRow.no_tax_amount = '';
|
|
|
- currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = '';
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
@@ -880,7 +880,7 @@ export default {
|
|
|
if(Math.abs(((currentRow.total_price*1)-(currentRow.num*1*currentRow.no_tax_price))-row.tax_amount*1)>this.ext_tax_rate){
|
|
|
let tax_amount = ((this.tableData[index].total_price*1)-((this.tableData[index].no_tax_price*1*this.tableData[index].num))).toFixed(2);
|
|
|
this.tableData.splice(index, 1, JSON.parse(JSON.stringify(this.tableData[index])));
|
|
|
- this.tableData[index] =Object.assign({}, this.tableData[index], {
|
|
|
+ this.tableData[index] =Object.assign({},this.tableData[index], {
|
|
|
tax_amount:tax_amount*1
|
|
|
})
|
|
|
this.tableData[index].no_tax_amount = ((this.tableData[index].total_price*1)-(this.tableData[index].tax_amount*1)).toFixed(2);
|
|
@@ -896,10 +896,10 @@ export default {
|
|
|
this.tableData.splice(index,1,currentRow)
|
|
|
|
|
|
}else{
|
|
|
- currentRow.tax_amount = ''
|
|
|
+ // currentRow.tax_amount = ''
|
|
|
// currentRow.fax = (1 * currentRow.tax_amount / currentRow.no_tax_price).toFixed(2)
|
|
|
- currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
|
|
|
- currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):0
|
|
|
+ // currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
|
|
|
+ // currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):'0.00'
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
|
}
|
|
@@ -926,9 +926,9 @@ export default {
|
|
|
on: {
|
|
|
'on-change': (e) => {
|
|
|
currentRow.total_price = e.target.value
|
|
|
- currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
|
|
|
+ currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):'0.00';
|
|
|
currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
|
|
|
+ currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):'0.00';
|
|
|
currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
@@ -939,11 +939,11 @@ export default {
|
|
|
if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
return
|
|
|
}
|
|
|
- currentRow.total_price =''
|
|
|
- currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
|
|
|
- currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // currentRow.total_price =''
|
|
|
+ // currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):'0.00';
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):'0.00';
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
if(!currentRow.copy&&!currentRow.edit){
|
|
|
currentRow.change = true;
|
|
|
}
|