Browse Source

[backend] Report PDF : totaux en TTC

dev
Guillaume Bourgeois 4 years ago
parent
commit
3947800719
2 changed files with 6 additions and 3 deletions
  1. +3
    -3
      backend/views/distribution/report.php
  2. +3
    -0
      common/models/PointSale.php

+ 3
- 3
backend/views/distribution/report.php View File

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 ;
} }
} }



+ 3
- 0
common/models/PointSale.php View File

{ {
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;
} }
} }
} }

Loading…
Cancel
Save