fix: remove duplicate updatePrices function
Co-authored-by: aider (openai/DeepSeek-V3.2-Thinking) <aider@aider.chat>
This commit is contained in:
@ -1057,18 +1057,6 @@ watch(() => [form.in_quantity, form.unit_price], () => {
|
|||||||
form.post_tax_unit_price = Number((form.unit_price * taxMultiplier).toFixed(4));
|
form.post_tax_unit_price = Number((form.unit_price * taxMultiplier).toFixed(4));
|
||||||
})
|
})
|
||||||
|
|
||||||
const updatePrices = (source) => {
|
|
||||||
const taxMultiplier = 1 + (form.tax_rate || 0) / 100;
|
|
||||||
if (source === 'pre') {
|
|
||||||
form.post_tax_unit_price = Number((form.unit_price * taxMultiplier).toFixed(4));
|
|
||||||
} else if (source === 'post') {
|
|
||||||
form.unit_price = Number((form.post_tax_unit_price / taxMultiplier).toFixed(4));
|
|
||||||
} else if (source === 'tax') {
|
|
||||||
form.post_tax_unit_price = Number((form.unit_price * taxMultiplier).toFixed(4));
|
|
||||||
}
|
|
||||||
form.total_price = Number((form.in_quantity * form.unit_price).toFixed(4));
|
|
||||||
}
|
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user