Skip to content
Code-Schnipsel Gruppen Projekte
Commit 87915185 erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

fix: do not show article VAT info for article lists without applied vat

Übergeordneter 44c1b86e
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -18,9 +18,11 @@
<th class="articles-article-header-information">
{locale group="quiqqer/erp" var="article.list.articles.header.description" Locale=$Locale}
</th>
<th class="articles-article-header-vat">
{locale group="quiqqer/erp" var="article.list.articles.header.vat" Locale=$Locale}
</th>
{if !empty($vatArray)}
<th class="articles-article-header-vat">
{locale group="quiqqer/erp" var="article.list.articles.header.vat" Locale=$Locale}
</th>
{/if}
<th class="articles-article-header-quantity" colspan="2">
{locale group="quiqqer/erp" var="article.list.articles.header.quantity" Locale=$Locale}
</th>
......
......@@ -35,11 +35,13 @@
{/foreach}
</ul>
</td>
<td class="articles-article-vat"
data-label="{locale group='quiqqer/erp' var='article.list.articles.header.vat'}"
>
{$this->getAttribute('vat')}%
</td>
{if $hasAppliedVat}
<td class="articles-article-vat"
data-label="{locale group='quiqqer/erp' var='article.list.articles.header.vat'}"
>
{$this->getAttribute('vat')}%
</td>
{/if}
{if $this->getAttribute('quantity') !== false}
<td class="articles-article-quantity"
......
......@@ -188,6 +188,8 @@ public function toHTML(): string
]);
}
$articleData = $this->Article->toArray();
$Engine->assign([
'this' => $this,
'position' => $this->position,
......@@ -197,7 +199,8 @@ public function toHTML(): string
'calculated_price' => $Currency->format($calc['price']),
'calculated_sum' => $Currency->format($calc['sum']),
'calculated_nettoSum' => $Currency->format($calc['nettoSum']),
'customFields' => $customFields
'customFields' => $customFields,
'hasAppliedVat' => !empty($articleData['calculated']['vatArray']['vat'])
]);
if ($this->Article instanceof QUI\ERP\Accounting\Articles\Text) {
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren