bug fix in create pdf images
This commit is contained in:
parent
59262b6515
commit
490e404568
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
|
||||
hesabixArchive/
|
||||
hesabixBackup/
|
||||
backup/
|
||||
.idea/
|
||||
|
|
BIN
hesabixArchive/seal/default.png
Normal file
BIN
hesabixArchive/seal/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
1
hesabixArchive/seal/index.php
Executable file
1
hesabixArchive/seal/index.php
Executable file
|
@ -0,0 +1 @@
|
|||
<?php
|
|
@ -55,15 +55,29 @@ class AvatarController extends AbstractController
|
|||
}
|
||||
|
||||
#[Route('/api/avatar/get/file/{id}', name: 'api_avatar_get_file')]
|
||||
public function api_avatar_get_file(string $id): BinaryFileResponse
|
||||
public function api_avatar_get_file(string $id = ''): BinaryFileResponse
|
||||
{
|
||||
$fileAdr = __DIR__ . '/../../../hesabixArchive/avatars/' . $id;
|
||||
if (!file_exists($fileAdr))
|
||||
throw $this->createNotFoundException();
|
||||
$fileAdr = __DIR__ . '/../../../hesabixArchive/avatars/default.png';
|
||||
$response = new BinaryFileResponse($fileAdr);
|
||||
return $response;
|
||||
}
|
||||
|
||||
#[Route('/front/seal/file/get/{id}', name: 'front_seal_file_get')]
|
||||
public function front_seal_file_get(EntityManagerInterface $entityManager, string $id = '0'): BinaryFileResponse
|
||||
{
|
||||
$bid = $entityManager->getRepository(Business::class)->find($id);
|
||||
if (!$bid)
|
||||
return new BinaryFileResponse(dirname(__DIR__, 3) . '/hesabixArchive/seal/default.png');
|
||||
$fileAdr = dirname(__DIR__, 3) . '/hesabixArchive/seal/' . $bid->getSealFile();
|
||||
if (!$bid->getAvatar() || !file_exists($fileAdr))
|
||||
return new BinaryFileResponse(dirname(__DIR__, 3) . '/hesabixArchive/seal/default.png');
|
||||
$response = new BinaryFileResponse($fileAdr);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
#[Route('/api/seal/get/file/{id}', name: 'api_seal_get_file')]
|
||||
public function api_seal_get_file(string $id = null): BinaryFileResponse
|
||||
{
|
||||
|
|
|
@ -442,10 +442,10 @@ class BuyController extends AbstractController
|
|||
foreach ($doc->getHesabdariRows() as $item) {
|
||||
if ($item->getPerson()) {
|
||||
$person = $item->getPerson();
|
||||
} elseif ($item->getRef()->getCode() == 90) {
|
||||
$discount = $item->getBd();
|
||||
} elseif ($item->getRef()->getCode() == 51) {
|
||||
$transfer = $item->getBs();
|
||||
$discount = $item->getBs();
|
||||
} elseif ($item->getRef()->getCode() == 90) {
|
||||
$transfer = $item->getBd();
|
||||
}
|
||||
}
|
||||
$pdfPid = 0;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">{{bid.name}}</h3>
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
{% if printInvoice%}
|
||||
<header>
|
||||
<p style="text-align:center;">{{ bid.name }}</p>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</header>
|
||||
<table class="bill-details">
|
||||
<tbody style="text-align:right">
|
||||
|
@ -228,7 +228,7 @@
|
|||
</table>
|
||||
<footer style="text-align:center">
|
||||
<p>{{ bid.name }}</p>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</footer>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">صورتحساب خرید کالا و خدمات</h3>
|
||||
|
@ -297,7 +297,7 @@
|
|||
مهر و امضا خریدار
|
||||
</h4>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</td>
|
||||
<td class="center" style="height:90px">
|
||||
<h4>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">{{ bid.name }}</h3>
|
||||
|
@ -170,7 +170,7 @@
|
|||
<br>
|
||||
<b>{{ doc.submitter.fullname }}</b>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</h4>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">صورتحساب برگشت از خرید کالا و خدمات</h3>
|
||||
|
@ -297,7 +297,7 @@
|
|||
مهر و امضا خریدار
|
||||
</h4>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</td>
|
||||
<td class="center" style="height:90px">
|
||||
<h4>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">صورتحساب برگشت از فروش کالا و خدمات</h3>
|
||||
|
@ -302,7 +302,7 @@
|
|||
مهر و امضا فروشنده:
|
||||
</h4>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">صورتحساب فروش کالا و خدمات</h3>
|
||||
|
@ -304,7 +304,7 @@
|
|||
مهر و امضا فروشنده:
|
||||
</h4>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="160"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="160"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<td style="width:20%">
|
||||
<img src="{{ "/api/avatar/get/file/" ~ bid.avatar}}" width="65"/>
|
||||
<img src="{{ url('front_avatar_file_get', {id: bid.id},)}}" width="65"/>
|
||||
</td>
|
||||
<td style="width:60%; text-align:center">
|
||||
<h3 class="">{{ bid.name }}</h3>
|
||||
|
@ -185,7 +185,7 @@
|
|||
{{doc.storeroom.manager}}
|
||||
</h5>
|
||||
<br>
|
||||
<img src="{{ "/api/seal/get/file/" ~ bid.sealFile}}" width="80"/>
|
||||
<img src="{{ url('front_seal_file_get', {id: bid.id},)}}" width="80"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue