Plugin Directory

Changeset 2594965


Ignore:
Timestamp:
09/07/2021 10:51:11 AM (5 years ago)
Author:
paperdork
Message:

Fixed a bug with the shipping costs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • paperdork/trunk/classes/Paperdork.php

    r2594960 r2594965  
    315315
    316316        if($shipping < 0){
    317             $lines[] = [
     317            $shipping_line = [
    318318                'type' => 1,
    319319                'description' => 'Verzendkosten',
    320                 'includeVat' => (!$this->vat_exempted),
     320                'includeVat' => true,
    321321                'revenueType' => 2,
    322322                'count' => '1',
    323323                'amount' => round($shipping,2)
    324324            ];
     325
     326            if($this->vat_exempted){
     327                $shipping_line['vatType'] = 1;
     328            }else {
     329                $shipping_line['vatType'] = 0;
     330                $shipping_line['vatPercentage'] = 21;
     331            }
     332
     333            $lines[] = $shipping_line;
    325334        }
    326335
Note: See TracChangeset for help on using the changeset viewer.