bug fix in person card export
This commit is contained in:
parent
37cacfbd3f
commit
0298e11076
|
@ -796,24 +796,22 @@ class PersonsController extends AbstractController
|
||||||
if (!$person)
|
if (!$person)
|
||||||
throw $this->createNotFoundException();
|
throw $this->createNotFoundException();
|
||||||
if (!array_key_exists('items', $params)) {
|
if (!array_key_exists('items', $params)) {
|
||||||
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
$transactions = $entityManager->getRepository(HesabdariRow::class)->findByJoinMoney([
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person,
|
'person' => $person,
|
||||||
'year' => $acc['year'],
|
'year' => $acc['year'],
|
||||||
'money' => $acc['money'],
|
], $acc['money']);
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
$transactions = [];
|
$transactions = [];
|
||||||
foreach ($params['items'] as $param) {
|
foreach ($params['items'] as $param) {
|
||||||
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
$prs = $entityManager->getRepository(HesabdariRow::class)->findByJoinMoney([
|
||||||
'id' => $param['id'],
|
'id' => $param['id'],
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person,
|
'person' => $person,
|
||||||
'year' => $acc['year'],
|
'year' => $acc['year'],
|
||||||
'money' => $acc['money'],
|
], $acc['money']);
|
||||||
]);
|
if (count($prs) != 0) {
|
||||||
if ($prs) {
|
$transactions[] = $prs[0];
|
||||||
$transactions[] = $prs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -866,24 +864,22 @@ class PersonsController extends AbstractController
|
||||||
throw $this->createNotFoundException();
|
throw $this->createNotFoundException();
|
||||||
|
|
||||||
if (!array_key_exists('items', $params)) {
|
if (!array_key_exists('items', $params)) {
|
||||||
$transactions = $entityManager->getRepository(HesabdariRow::class)->findBy([
|
$transactions = $entityManager->getRepository(HesabdariRow::class)->findByJoinMoney([
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person,
|
'person' => $person,
|
||||||
'year' => $acc['year'],
|
'year' => $acc['year'],
|
||||||
'money' => $acc['money'],
|
], $acc['money']);
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
$transactions = [];
|
$transactions = [];
|
||||||
foreach ($params['items'] as $param) {
|
foreach ($params['items'] as $param) {
|
||||||
$prs = $entityManager->getRepository(HesabdariRow::class)->findOneBy([
|
$prs = $entityManager->getRepository(HesabdariRow::class)->findByJoinMoney([
|
||||||
'id' => $param['id'],
|
'id' => $param['id'],
|
||||||
'bid' => $acc['bid'],
|
'bid' => $acc['bid'],
|
||||||
'person' => $person,
|
'person' => $person,
|
||||||
'year' => $acc['year'],
|
'year' => $acc['year'],
|
||||||
'money' => $acc['money'],
|
], $acc['money']);
|
||||||
]);
|
if (count($prs) != 0) {
|
||||||
if ($prs) {
|
$transactions[] = $prs[0];
|
||||||
$transactions[] = $prs;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue