controller for pi taxes for admin page

This commit is contained in:
2019-04-20 00:31:04 -05:00
parent e1fd4aeebd
commit a44c2665ec
5 changed files with 62 additions and 48 deletions
+12
View File
@@ -98,6 +98,18 @@ class TaxesHelper {
return $revenue;
}
public function GetPiGross($start, $end) {
$revenue = 0.00;
$grosses = PISaleJournal::whereBetween('date', [$start, $end]);
foreach($grosses as $gross) {
$revenue += ($gross['quantity'] * $gross['unit_price']);
}
return $revenue;
}
/**
* Returns a set of dates from now until the amount of months has passed
*