bug fix in sell tax get
This commit is contained in:
parent
ab07489f57
commit
0f9d8915a6
|
@ -199,7 +199,7 @@
|
||||||
<tr class="stimol">
|
<tr class="stimol">
|
||||||
<td class="item" style="padding:1%">
|
<td class="item" style="padding:1%">
|
||||||
<h4>توضیحات:</h4>
|
<h4>توضیحات:</h4>
|
||||||
{{ note|nl2br }}
|
{{ note|raw }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -791,7 +791,22 @@ export default {
|
||||||
try {
|
try {
|
||||||
// اول تنظیمات را لود میکنیم
|
// اول تنظیمات را لود میکنیم
|
||||||
this.loadSettings();
|
this.loadSettings();
|
||||||
|
|
||||||
|
// دریافت آیدی کسبوکار فعال از localStorage
|
||||||
|
const activeBid = localStorage.getItem('activeBid');
|
||||||
|
if (activeBid) {
|
||||||
|
try {
|
||||||
|
const businessRes = await axios.get(`/api/business/get/info/${activeBid}`);
|
||||||
|
if (businessRes.data && businessRes.data.maliyatafzode) {
|
||||||
|
// فقط اگر فاکتور جدید است مقدار پیشفرض مالیات را ست کن
|
||||||
|
if (!this.$route.params.id) {
|
||||||
|
this.taxPercent = Number(businessRes.data.maliyatafzode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('خطا در دریافت اطلاعات کسبوکار:', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
// بررسی وضعیت پیشنویس
|
// بررسی وضعیت پیشنویس
|
||||||
this.isNewInvoice = !this.$route.params.id;
|
this.isNewInvoice = !this.$route.params.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue