bug fix in bank transfer
This commit is contained in:
parent
c630bc7dca
commit
b3ac78242f
|
@ -157,7 +157,6 @@ class TransferController extends AbstractController
|
||||||
throw $this->createNotFoundException('bank not found');
|
throw $this->createNotFoundException('bank not found');
|
||||||
$hesabdariRow->setBank($bank);
|
$hesabdariRow->setBank($bank);
|
||||||
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '5']));
|
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '5']));
|
||||||
|
|
||||||
} elseif ($row['type'] == 'salary') {
|
} elseif ($row['type'] == 'salary') {
|
||||||
$salary = $entityManager->getRepository(Salary::class)->findOneBy([
|
$salary = $entityManager->getRepository(Salary::class)->findOneBy([
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
|
@ -167,7 +166,6 @@ class TransferController extends AbstractController
|
||||||
throw $this->createNotFoundException('salary not found');
|
throw $this->createNotFoundException('salary not found');
|
||||||
$hesabdariRow->setSalary($salary);
|
$hesabdariRow->setSalary($salary);
|
||||||
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '122']));
|
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '122']));
|
||||||
|
|
||||||
} elseif ($row['type'] == 'cashdesk') {
|
} elseif ($row['type'] == 'cashdesk') {
|
||||||
$cashdesk = $entityManager->getRepository(Cashdesk::class)->findOneBy([
|
$cashdesk = $entityManager->getRepository(Cashdesk::class)->findOneBy([
|
||||||
'id' => $row['id'],
|
'id' => $row['id'],
|
||||||
|
@ -177,7 +175,8 @@ class TransferController extends AbstractController
|
||||||
throw $this->createNotFoundException('cashdesk not found');
|
throw $this->createNotFoundException('cashdesk not found');
|
||||||
$hesabdariRow->setCashdesk($cashdesk);
|
$hesabdariRow->setCashdesk($cashdesk);
|
||||||
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '121']));
|
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '121']));
|
||||||
|
} elseif ($row['type'] == 'calc') {
|
||||||
|
$hesabdariRow->setRef($entityManager->getRepository(HesabdariTable::class)->findOneBy(['code' => '108']));
|
||||||
}
|
}
|
||||||
|
|
||||||
$entityManager->persist($hesabdariRow);
|
$entityManager->persist($hesabdariRow);
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="inputValue"
|
v-model="inputValue"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
:class="$attrs.class"
|
||||||
type="text"
|
type="text"
|
||||||
:rules="combinedRules"
|
:rules="combinedRules"
|
||||||
:error-messages="errorMessages"
|
:error-messages="errorMessages"
|
||||||
@keypress="restrictToNumbers"
|
@keypress="restrictToNumbers"
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
dense
|
dense
|
||||||
hide-details="auto"
|
:hide-details="$attrs['hide-details'] || 'auto'"
|
||||||
>
|
>
|
||||||
<template v-for="(_, slot) in $slots" #[slot]="props">
|
<template v-for="(_, slot) in $slots" #[slot]="props">
|
||||||
<slot :name="slot" v-bind="props" />
|
<slot :name="slot" v-bind="props" />
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
cat="transfer"></archive-upload>
|
cat="transfer"></archive-upload>
|
||||||
<v-tooltip :text="$t('dialog.save')" location="bottom">
|
<v-tooltip :text="$t('dialog.save')" location="bottom">
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-btn v-bind="props" color="primary" @click="save()" variant="text" icon="mdi-content-save" />
|
<v-btn v-bind="props" color="primary" @click="save()" variant="text" icon="mdi-content-save" :loading="loading" />
|
||||||
</template>
|
</template>
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
|
|
||||||
|
@ -53,12 +53,12 @@
|
||||||
:items="salarys" item-title="name" item-value="id" label="تنخواه گردان" variant="outlined"
|
:items="salarys" item-title="name" item-value="id" label="تنخواه گردان" variant="outlined"
|
||||||
:item-props="salaryItemProps"></v-select>
|
:item-props="salaryItemProps"></v-select>
|
||||||
|
|
||||||
<Hnumberinput :hide-details="false" v-model="sideOne.bs" label="مبلغ" variant="outlined" />
|
<Hnumberinput :hide-details="false" v-model="sideOne.bs" label="مبلغ" variant="outlined" class="mb-4" />
|
||||||
|
|
||||||
<Hnumberinput :hide-details="false" v-model="sideOne.tax" label="کارمزد خدمات بانکی" variant="outlined" />
|
<Hnumberinput :hide-details="false" v-model="sideOne.tax" label="کارمزد خدمات بانکی" variant="outlined" class="mb-4" />
|
||||||
|
|
||||||
<v-text-field :hide-details="false" v-model="sideOne.reference" label="ارجاع"
|
<v-text-field :hide-details="false" v-model="sideOne.reference" label="ارجاع"
|
||||||
variant="outlined"></v-text-field>
|
variant="outlined" class="mb-4"></v-text-field>
|
||||||
|
|
||||||
<v-text-field v-model="sideOne.des" label="شرح" variant="outlined"></v-text-field>
|
<v-text-field v-model="sideOne.des" label="شرح" variant="outlined"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
@ -88,13 +88,13 @@
|
||||||
:items="salarys" item-title="name" item-value="id" label="تنخواه گردان" variant="outlined"
|
:items="salarys" item-title="name" item-value="id" label="تنخواه گردان" variant="outlined"
|
||||||
:item-props="salaryItemProps"></v-select>
|
:item-props="salaryItemProps"></v-select>
|
||||||
|
|
||||||
<Hnumberinput :hide-details="false" v-model="sideTwo.bd" label="مبلغ" variant="outlined" readonly />
|
<Hnumberinput :hide-details="false" v-model="sideTwo.bd" label="مبلغ" variant="outlined" class="mb-4" readonly />
|
||||||
|
|
||||||
<Hnumberinput :hide-details="false" v-model="sideTwo.tax" label="کارمزد خدمات بانکی" variant="outlined"
|
<Hnumberinput :hide-details="false" v-model="sideTwo.tax" label="کارمزد خدمات بانکی" class="mb-4" variant="outlined"
|
||||||
readonly />
|
readonly />
|
||||||
|
|
||||||
<v-text-field :hide-details="false" v-model="sideTwo.reference" label="ارجاع"
|
<v-text-field :hide-details="false" v-model="sideTwo.reference" label="ارجاع"
|
||||||
variant="outlined"></v-text-field>
|
variant="outlined" class="mb-4"></v-text-field>
|
||||||
|
|
||||||
<v-text-field v-model="sideTwo.des" label="شرح" variant="outlined"></v-text-field>
|
<v-text-field v-model="sideTwo.des" label="شرح" variant="outlined"></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
@ -148,6 +148,7 @@ export default {
|
||||||
year: {},
|
year: {},
|
||||||
date: '',
|
date: '',
|
||||||
des: '',
|
des: '',
|
||||||
|
loading: false,
|
||||||
sideOne: {
|
sideOne: {
|
||||||
type: 'bank',
|
type: 'bank',
|
||||||
bank: undefined,
|
bank: undefined,
|
||||||
|
@ -331,6 +332,7 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.loading = true;
|
||||||
let PushData = {
|
let PushData = {
|
||||||
date: this.date,
|
date: this.date,
|
||||||
des: this.des,
|
des: this.des,
|
||||||
|
@ -360,18 +362,21 @@ export default {
|
||||||
bd: this.sideOne.tax,
|
bd: this.sideOne.tax,
|
||||||
bs: 0,
|
bs: 0,
|
||||||
type: 'calc',
|
type: 'calc',
|
||||||
des: 'کارمزد هزینههای بانکی'
|
des: 'کارمزد هزینههای بانکی',
|
||||||
|
referral: this.sideOne.reference
|
||||||
});
|
});
|
||||||
PushData.rows.push({
|
PushData.rows.push({
|
||||||
bs: this.sideOne.tax,
|
bs: this.sideOne.tax,
|
||||||
bd: 0,
|
bd: 0,
|
||||||
type: this.sideOne.type,
|
type: this.sideOne.type,
|
||||||
id: this.sideOne.id,
|
id: this.sideOne.id,
|
||||||
des: 'کارمزد هزینههای بانکی'
|
des: 'کارمزد هزینههای بانکی',
|
||||||
|
referral: this.sideOne.reference
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.post('/api/transfer/insert', PushData).then((response) => {
|
axios.post('/api/transfer/insert', PushData).then((response) => {
|
||||||
|
this.loading = false;
|
||||||
if (response.data.result == '1') {
|
if (response.data.result == '1') {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
text: 'سند انتقال با موفقیت ثبت شد.',
|
text: 'سند انتقال با موفقیت ثبت شد.',
|
||||||
|
@ -388,6 +393,13 @@ export default {
|
||||||
confirmButtonText: 'قبول'
|
confirmButtonText: 'قبول'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
Swal.fire({
|
||||||
|
text: 'خطا در ارتباط با سرور',
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonText: 'قبول'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeDes(type) {
|
changeDes(type) {
|
||||||
|
|
Loading…
Reference in a new issue