bug fix in print invoice sell type
This commit is contained in:
parent
98645b24c3
commit
a579a020bc
|
|
@ -1013,6 +1013,7 @@ class SellController extends AbstractController
|
||||||
'doc' => $doc,
|
'doc' => $doc,
|
||||||
'rows' => array_map(function ($row) {
|
'rows' => array_map(function ($row) {
|
||||||
return [
|
return [
|
||||||
|
'person' => $row->getPerson(),
|
||||||
'commodity' => $row->getCommodity(),
|
'commodity' => $row->getCommodity(),
|
||||||
'commodityCount' => $row->getCommdityCount(),
|
'commodityCount' => $row->getCommdityCount(),
|
||||||
'des' => $row->getDes(),
|
'des' => $row->getDes(),
|
||||||
|
|
|
||||||
|
|
@ -148,4 +148,9 @@ class twigFunctions
|
||||||
|
|
||||||
return $footerText;
|
return $footerText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSystemFooterText(string $side)
|
||||||
|
{
|
||||||
|
return $this->getStaticData('system', $side);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
<tbody style="text-align:right">
|
<tbody style="text-align:right">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:right">تاریخ :
|
<td style="text-align:right">تاریخ :
|
||||||
<span>{{doc.date}}</span>
|
<span>{{Jdate.jdate('Y/n/d H:i',doc.dateSubmit)}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">شماره :
|
<td style="text-align:right">شماره :
|
||||||
<span>#
|
<span>#
|
||||||
|
|
@ -141,6 +141,35 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{% set firstPerson = null %}
|
||||||
|
{% for row in rows %}
|
||||||
|
{% if row.person != null and firstPerson is null %}
|
||||||
|
{% set firstPerson = row.person %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if firstPerson %}
|
||||||
|
<section class="person-details" style="margin:4px 3px 6px 3px; padding:4px 3px; border:1px dashed #bbb; border-radius: 4px; background: #fafbfc;">
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>نام مستعار:</strong> {{ firstPerson.nikename|default(firstPerson.name) }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>نام / نام خانوادگی:</strong> {{ firstPerson.name|default(firstPerson.name) }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>آدرس:</strong> {{ firstPerson.address|default('-') }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>موبایل:</strong>
|
||||||
|
{% if firstPerson.mobile %}
|
||||||
|
{{ firstPerson.mobile }}
|
||||||
|
{% elseif firstPerson.mobile2 is defined and firstPerson.mobile2 %}
|
||||||
|
{{ firstPerson.mobile2 }}
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
<table class="items">
|
<table class="items">
|
||||||
<thead style="background:gray;text-color:white;">
|
<thead style="background:gray;text-color:white;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -160,30 +189,12 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% set firstPerson = null %}
|
|
||||||
{% for row in rows %}
|
|
||||||
{% if row.person != null and firstPerson is null %}
|
|
||||||
{% set firstPerson = row.person %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if firstPerson %}
|
|
||||||
<section class="person-details" style="margin-top:6px; width:100%;">
|
|
||||||
<p><strong>نام مستعار:</strong> {{ firstPerson.nikename|default(firstPerson.name) }}</p>
|
|
||||||
<p><strong>آدرس:</strong> {{ firstPerson.address|default('-') }}</p>
|
|
||||||
<p><strong>موبایل:</strong>
|
|
||||||
{% if firstPerson.mobile %}{{ firstPerson.mobile }}
|
|
||||||
{% elseif firstPerson.mobile2 is defined and firstPerson.mobile2 %}{{ firstPerson.mobile2 }}
|
|
||||||
{% else %}-{% endif %}
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
{% endif %}
|
|
||||||
<footer style="text-align:center">
|
<footer style="text-align:center">
|
||||||
<p>{{ bid.name }}</p>
|
<p>{{ bid.name }}</p>
|
||||||
</footer>
|
</footer>
|
||||||
<hr>
|
<footer style="text-align:center; font-size: 8px;">
|
||||||
<footer style="text-align:center; font-size: 11px;">
|
<p>{{ twigFunctions.getSystemFooterText('footerRight') }}</p>
|
||||||
<p>{{ twigFunctions.getFooterText('right', pluginService, bid) }}</p>
|
<p>{{ twigFunctions.getSystemFooterText('footerLeft') }}</p>
|
||||||
<p>{{ twigFunctions.getFooterText('left', pluginService, bid) }}</p>
|
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
<tbody style="text-align:right">
|
<tbody style="text-align:right">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align:right">تاریخ :
|
<td style="text-align:right">تاریخ :
|
||||||
<span>{{doc.date}}</span>
|
<span>{{Jdate.jdate('Y/n/d H:i',doc.dateSubmit)}}</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align:right">شماره :
|
<td style="text-align:right">شماره :
|
||||||
<span>#
|
<span>#
|
||||||
|
|
@ -145,7 +145,35 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{% set firstPerson = null %}
|
||||||
|
{% for row in rows %}
|
||||||
|
{% if row.person != null and firstPerson is null %}
|
||||||
|
{% set firstPerson = row.person %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if firstPerson %}
|
||||||
|
<section class="person-details" style="margin:4px 3px 6px 3px; padding:4px 3px; border:1px dashed #bbb; border-radius: 4px; background: #fafbfc;">
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>نام مستعار:</strong> {{ firstPerson.nikename|default(firstPerson.name) }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>نام / نام خانوادگی:</strong> {{ firstPerson.name|default(firstPerson.name) }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>آدرس:</strong> {{ firstPerson.address|default('-') }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 2px 0; font-size:11px; line-height: 1.5;">
|
||||||
|
<strong>موبایل:</strong>
|
||||||
|
{% if firstPerson.mobile %}
|
||||||
|
{{ firstPerson.mobile }}
|
||||||
|
{% elseif firstPerson.mobile2 is defined and firstPerson.mobile2 %}
|
||||||
|
{{ firstPerson.mobile2 }}
|
||||||
|
{% else %}
|
||||||
|
-
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
<table class="items">
|
<table class="items">
|
||||||
<thead style="background:gray;text-color:white;">
|
<thead style="background:gray;text-color:white;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -217,10 +245,9 @@
|
||||||
<p>{{ bid.address }}</p>
|
<p>{{ bid.address }}</p>
|
||||||
<p>{{ bid.tel }}</p>
|
<p>{{ bid.tel }}</p>
|
||||||
</footer>
|
</footer>
|
||||||
<hr>
|
<footer style="text-align:center; font-size: 8px;">
|
||||||
<footer style="text-align:center; font-size: 11px;">
|
<p>{{ twigFunctions.getSystemFooterText('footerRight') }}</p>
|
||||||
<p>{{ twigFunctions.getFooterText('right', pluginService, bid) }}</p>
|
<p>{{ twigFunctions.getSystemFooterText('footerLeft') }}</p>
|
||||||
<p>{{ twigFunctions.getFooterText('left', pluginService, bid) }}</p>
|
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue