Plugin Directory

Changeset 3067126


Ignore:
Timestamp:
04/08/2024 06:29:41 PM (2 years ago)
Author:
taz_bambu
Message:

update class-admin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • webd-woocommerce-advanced-reporting-statistics/trunk/class-admin.php

    r3067117 r3067126  
    9696    private $payments = [];
    9797   
    98     private $total;
    99     private $subtotal;
    100     private $shipping;
    101     private $taxes;
    102     private $refunds;
    103     private $discounts;
     98    private $total =0;
     99    private $subtotal =0;
     100    private $shipping =0;
     101    private $taxes =0;
     102    private $refunds =0;
     103    private $discounts =0;
    104104    private $products;
    105105    private $net;
     
    501501                if ( !in_array( $order['date'] , $this->uniqueDates ) ) array_push( $this->uniqueDates, $order['date'] );
    502502               
    503                 $this->total += $order['total'];
    504                 $this->subtotal += $order['subtotal'];
    505                 $this->shipping += $order['shipping'];
    506                 $this->taxes += $order['tax'];
    507                 $this->refunds += (int)$order['refund'];
    508                 $this->discounts += $order['discount'];
    509                 $this->products += $order['quantity'];
     503                $this->total += (float)$order['total'];
     504                $this->subtotal += (float)$order['subtotal'];
     505                $this->shipping += (float)$order['shipping'];
     506                $this->taxes += (float)$order['tax'];
     507                $this->refunds += (float)$order['refund'];
     508                $this->discounts += (float)$order['discount'];
     509                $this->products += (float)$order['quantity'];
    510510               
    511511            }
     
    583583                    $filteredOrders[] = $order;
    584584                   
    585                     $this->total += $order['total'];
    586                     $this->subtotal += $order['subtotal'];
    587                     $this->taxes += $order['tax'];
    588                     $this->refunds += (int)$order['refund'];
    589                     $this->discounts += $order['discount'];
    590                     $this->shipping += $order['shipping'];
    591                     $this->products += $order['quantity'];
     585                    $this->total += (float)$order['total'];
     586                    $this->subtotal += (float)$order['subtotal'];
     587                    $this->taxes += (float)$order['tax'];
     588                    $this->refunds += (float)$order['refund'];
     589                    $this->discounts += (float)$order['discount'];
     590                    $this->shipping += (float)$order['shipping'];
     591                    $this->products += (float)$order['quantity'];
    592592                    if ( !in_array( $order['date'] , $this->uniqueDates ) ) array_push( $this->uniqueDates, $order['date'] );
    593593                }
Note: See TracChangeset for help on using the changeset viewer.