@@ -424,7 +424,7 @@ public function getDateRange($range, $customStart, $customEnd, $returnObjects =
424
424
break ;
425
425
case '24h ' :
426
426
$ dateEnd = new \DateTime ();
427
- $ dateStart = new \ DateTime (); $ dateEnd ->modify ('+1 hour ' );
427
+ $ dateEnd ->modify ('+1 hour ' );
428
428
$ dateStart = clone $ dateEnd ;
429
429
$ dateStart ->modify ('-1 day ' );
430
430
break ;
@@ -699,8 +699,8 @@ public function setStoreIds($storeIds)
699
699
'invoiced ' => 'SUM(main_table.base_total_paid) ' ,
700
700
'refunded ' => 'SUM(main_table.base_total_refunded) ' ,
701
701
'profit ' => "SUM( {$ baseSubtotalInvoiced }) " .
702
- "+ SUM( {$ baseDiscountRefunded }) - SUM( {$ baseSubtotalRefunded }) " .
703
- "- SUM( {$ baseDiscountInvoiced }) - SUM( {$ baseTotalInvocedCost }) " ,
702
+ "+ SUM( {$ baseDiscountRefunded }) - SUM( {$ baseSubtotalRefunded }) " .
703
+ "- SUM( {$ baseDiscountInvoiced }) - SUM( {$ baseTotalInvocedCost }) " ,
704
704
]
705
705
);
706
706
} else {
@@ -714,10 +714,10 @@ public function setStoreIds($storeIds)
714
714
'invoiced ' => 'SUM(main_table.base_total_paid * main_table.base_to_global_rate) ' ,
715
715
'refunded ' => 'SUM(main_table.base_total_refunded * main_table.base_to_global_rate) ' ,
716
716
'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) " ,
721
721
]
722
722
);
723
723
}
@@ -855,7 +855,7 @@ private function getTotalsExpressionWithDiscountRefunded(
855
855
$ template = ($ storeId != 0 )
856
856
? '(main_table.base_subtotal - %2$s - %1$s - (ABS(main_table.base_discount_amount) - %3$s - %4$s)) '
857
857
: '((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) ' ;
859
859
return sprintf (
860
860
$ template ,
861
861
$ baseSubtotalRefunded ,
0 commit comments