@@ -424,7 +424,7 @@ public function getDateRange($range, $customStart, $customEnd, $returnObjects =
424424 break ;
425425 case '24h ' :
426426 $ dateEnd = new \DateTime ();
427- $ dateStart = new \ DateTime (); $ dateEnd ->modify ('+1 hour ' );
427+ $ dateEnd ->modify ('+1 hour ' );
428428 $ dateStart = clone $ dateEnd ;
429429 $ dateStart ->modify ('-1 day ' );
430430 break ;
@@ -699,8 +699,8 @@ public function setStoreIds($storeIds)
699699 'invoiced ' => 'SUM(main_table.base_total_paid) ' ,
700700 'refunded ' => 'SUM(main_table.base_total_refunded) ' ,
701701 'profit ' => "SUM( {$ baseSubtotalInvoiced }) " .
702- "+ SUM( {$ baseDiscountRefunded }) - SUM( {$ baseSubtotalRefunded }) " .
703- "- SUM( {$ baseDiscountInvoiced }) - SUM( {$ baseTotalInvocedCost }) " ,
702+ "+ SUM( {$ baseDiscountRefunded }) - SUM( {$ baseSubtotalRefunded }) " .
703+ "- SUM( {$ baseDiscountInvoiced }) - SUM( {$ baseTotalInvocedCost }) " ,
704704 ]
705705 );
706706 } else {
@@ -714,10 +714,10 @@ public function setStoreIds($storeIds)
714714 'invoiced ' => 'SUM(main_table.base_total_paid * main_table.base_to_global_rate) ' ,
715715 'refunded ' => 'SUM(main_table.base_total_refunded * main_table.base_to_global_rate) ' ,
716716 'profit ' => "SUM( {$ baseSubtotalInvoiced } * main_table.base_to_global_rate) " .
717- "+ SUM( {$ baseDiscountRefunded } * main_table.base_to_global_rate) " .
718- "- SUM( {$ baseSubtotalRefunded } * main_table.base_to_global_rate) " .
719- "- SUM( {$ baseDiscountInvoiced } * main_table.base_to_global_rate) " .
720- "- SUM( {$ baseTotalInvocedCost } * main_table.base_to_global_rate) " ,
717+ "+ SUM( {$ baseDiscountRefunded } * main_table.base_to_global_rate) " .
718+ "- SUM( {$ baseSubtotalRefunded } * main_table.base_to_global_rate) " .
719+ "- SUM( {$ baseDiscountInvoiced } * main_table.base_to_global_rate) " .
720+ "- SUM( {$ baseTotalInvocedCost } * main_table.base_to_global_rate) " ,
721721 ]
722722 );
723723 }
@@ -855,7 +855,7 @@ private function getTotalsExpressionWithDiscountRefunded(
855855 $ template = ($ storeId != 0 )
856856 ? '(main_table.base_subtotal - %2$s - %1$s - (ABS(main_table.base_discount_amount) - %3$s - %4$s)) '
857857 : '((main_table.base_subtotal - %1$s - %2$s - (ABS(main_table.base_discount_amount) - %3$s - %4$s)) '
858- . ' * main_table.base_to_global_rate) ' ;
858+ . ' * main_table.base_to_global_rate) ' ;
859859 return sprintf (
860860 $ template ,
861861 $ baseSubtotalRefunded ,
0 commit comments