Merge branch 'WarehouseOffer/show-discount-in-pdf' into 'master'
show discount in pdf from now See merge request fronk/thetool!1741
This commit is contained in:
@@ -343,6 +343,7 @@ class WarehouseOfferController extends TTCrud
|
||||
$p['articleDescription'] = ($article->description !== $article->title) ? ($article->description ?? '') : '';
|
||||
$p['articleUnit'] = $p['unit'] ?? $article->unit ?? 'Stk.';
|
||||
$p['price'] = (float)($p['unitPrice'] ?? 0);
|
||||
$p['discount'] = isset($p['discount']) ? (float)$p['discount'] : 0;
|
||||
$p['amount'] = (float)($p['amount'] ?? 0);
|
||||
$discount = isset($p['discount']) ? (float)$p['discount'] : 0;
|
||||
$p['totalPrice'] = ($p['price'] * $p['amount']) * (1 - $discount / 100);
|
||||
|
||||
Reference in New Issue
Block a user