Commit 292d6685 authored by Karamel's avatar Karamel
Browse files

Don't count prepayment refill as CS in cash session summary.

parent d57105ee
......@@ -239,7 +239,11 @@ class CashsessionAPI extends APIHelper implements API
// Line sums
$tktLines = $tkt->getLines();
foreach ($tktLines as $line) {
$cs += $line->getDiscountPrice();
if ($line->getProduct() === null
|| (!$line->getProduct()->isPrepay())) {
// Add in CS only if not a prepay refill
$cs += $line->getDiscountPrice();
}
// Tax
$taxId = $line->getTax()->getId();
if (!isset($summaryTaxes[$taxId])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment