if($pointSale->credit) { | if($pointSale->credit) { | ||||
$html .= '<td></td>' ; | $html .= '<td></td>' ; | ||||
} | } | ||||
$html .= '<td><strong>'.number_format($pointSale->revenues, 2) . ' €</strong></td>'; | |||||
$html .= '<td><strong>'.Price::format($pointSale->revenues_with_tax) . '</strong></td>'; | |||||
$html .= '</tbody></table><pagebreak>' ; | $html .= '</tbody></table><pagebreak>' ; | ||||
} | } | ||||
$html = substr($html, 0, strlen($html) - 6) ; | $html = substr($html, 0, strlen($html) - 6) ; | ||||
$html .= '</td><td>'.number_format($pointSale->revenues, 2).' €</td></tr>' ; | |||||
$revenues += $pointSale->revenues ; | |||||
$html .= '</td><td>'.Price::format($pointSale->revenues_with_tax, 2).'</td></tr>' ; | |||||
$revenues += $pointSale->revenues_with_tax ; | |||||
} | } | ||||
} | } | ||||
{ | { | ||||
var $orders = []; | var $orders = []; | ||||
var $revenues = 0; | var $revenues = 0; | ||||
var $revenues_with_tax = 0; | |||||
var $data_select_orders; | var $data_select_orders; | ||||
var $data_options_orders; | var $data_options_orders; | ||||
var $users = []; | var $users = []; | ||||
{ | { | ||||
$this->orders = []; | $this->orders = []; | ||||
$this->revenues = 0; | $this->revenues = 0; | ||||
$this->revenues_with_tax = 0; | |||||
if ($ordersArray) { | if ($ordersArray) { | ||||
foreach ($ordersArray as $order) { | foreach ($ordersArray as $order) { | ||||
if (is_null($order->date_delete)) { | if (is_null($order->date_delete)) { | ||||
$this->revenues += (float)$order->amount; | $this->revenues += (float)$order->amount; | ||||
$this->revenues_with_tax += (float)$order->amount_with_tax; | |||||
} | } | ||||
} | } | ||||
} | } |