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,
|
||||
'rows' => array_map(function ($row) {
|
||||
return [
|
||||
'person' => $row->getPerson(),
|
||||
'commodity' => $row->getCommodity(),
|
||||
'commodityCount' => $row->getCommdityCount(),
|
||||
'des' => $row->getDes(),
|
||||
|
|
|
|||
|
|
@ -148,4 +148,9 @@ class twigFunctions
|
|||
|
||||
return $footerText;
|
||||
}
|
||||
|
||||
public function getSystemFooterText(string $side)
|
||||
{
|
||||
return $this->getStaticData('system', $side);
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
<tbody style="text-align:right">
|
||||
<tr>
|
||||
<td style="text-align:right">تاریخ :
|
||||
<span>{{doc.date}}</span>
|
||||
<span>{{Jdate.jdate('Y/n/d H:i',doc.dateSubmit)}}</span>
|
||||
</td>
|
||||
<td style="text-align:right">شماره :
|
||||
<span>#
|
||||
|
|
@ -141,6 +141,35 @@
|
|||
</tbody>
|
||||
</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">
|
||||
<thead style="background:gray;text-color:white;">
|
||||
<tr>
|
||||
|
|
@ -160,30 +189,12 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</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">
|
||||
<p>{{ bid.name }}</p>
|
||||
</footer>
|
||||
<hr>
|
||||
<footer style="text-align:center; font-size: 11px;">
|
||||
<p>{{ twigFunctions.getFooterText('right', pluginService, bid) }}</p>
|
||||
<p>{{ twigFunctions.getFooterText('left', pluginService, bid) }}</p>
|
||||
<footer style="text-align:center; font-size: 8px;">
|
||||
<p>{{ twigFunctions.getSystemFooterText('footerRight') }}</p>
|
||||
<p>{{ twigFunctions.getSystemFooterText('footerLeft') }}</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
<tbody style="text-align:right">
|
||||
<tr>
|
||||
<td style="text-align:right">تاریخ :
|
||||
<span>{{doc.date}}</span>
|
||||
<span>{{Jdate.jdate('Y/n/d H:i',doc.dateSubmit)}}</span>
|
||||
</td>
|
||||
<td style="text-align:right">شماره :
|
||||
<span>#
|
||||
|
|
@ -145,7 +145,35 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</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">
|
||||
<thead style="background:gray;text-color:white;">
|
||||
<tr>
|
||||
|
|
@ -217,10 +245,9 @@
|
|||
<p>{{ bid.address }}</p>
|
||||
<p>{{ bid.tel }}</p>
|
||||
</footer>
|
||||
<hr>
|
||||
<footer style="text-align:center; font-size: 11px;">
|
||||
<p>{{ twigFunctions.getFooterText('right', pluginService, bid) }}</p>
|
||||
<p>{{ twigFunctions.getFooterText('left', pluginService, bid) }}</p>
|
||||
<footer style="text-align:center; font-size: 8px;">
|
||||
<p>{{ twigFunctions.getSystemFooterText('footerRight') }}</p>
|
||||
<p>{{ twigFunctions.getSystemFooterText('footerLeft') }}</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue